From: Stefen Boyd (stefen@boyd.com)
Date: Wed Nov 18 1998 - 18:43:59 PST
At 05:55 PM 11/18/98 -0800, Michael McNamara wrote:
>/* Proposal for the new partselect operators [ +: ] and [ -: ]:
X-Lines: 45
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1018
X-Status: $$$$
X-UID: 0000000711
Status: RO
I find the +: and the -: distasteful, but regardless, your
examples have a couple typos.
> // an alternative syntax
> always @(clk) begin
> if ( blue[sel+:3] === green[sel+:3] )
> $display("Match A!");
> if ( blue[sel-:1] === green[sel-:1] )
> $display("Match B!");
> if ( blue[sel+2 -: 1] === green[sel+2 -: 1] )
> $display("Match C!");
>
> end // always @ (clk)
hould be:
> // an alternative syntax
> always @(clk) begin
> if ( blue[sel+:4] === green[sel+:4] )
> $display("Match A!");
> if ( blue[sel-:2] === green[sel-:2] )
> $display("Match B!");
> if ( blue[sel+2 -: 2] === green[sel+2 -: 2] )
> $display("Match C!");
>
> end // always @ (clk)
Note that the width is going to be 1 larger than the constant
difference used in the current proposal.
Regards,
Stefen
--------------------
Stefen Boyd
__
| \ ____
|_/_ |
| \ |__
|___/oyd |
|___nterprises
stefen@boyd.com
(408)739-BOYD
(408)481-9658 (fax)
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:02 PDT
and
sponsored by Boyd Technology, Inc.