Re: [sv-bc] Indexed part-select of one-bit vector (11.5.1)

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Thu Oct 04 2007 - 10:24:41 PDT
Brad Pierce wrote:
> The description in 11.5.1 regarding indexed part-selects is unclear for
> the following example --
> 
>   module test( input i, output reg [1:1] o );
>     always @* o[i+:2] = 2'b10;
>   endmodule
> 
> because the range of 'o' is neither ascending nor descending.
> 
> Pointed out to me by Greg Jaxon.
> 
> -- Brad

Yes.  "Test" is either an inverter (if you read it as 1 downto 1)
or a buffer (if you read it as 1 upto 1).  I think we should leave
this ambiguity in the language as a warning to future languages
on how NOT to declare arrays ;-)

Greg


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Oct 4 10:24:57 2007

This archive was generated by hypermail 2.1.8 : Thu Oct 04 2007 - 10:25:11 PDT