[sv-bc] Re: [sv-ec] Proposed rules for name binding

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Fri Aug 17 2007 - 15:05:52 PDT
Mark Hartoog wrote:
> Here is a first pass at a set of rules similar to the rules that Gord
> sent out. Some of these rules are essentially the same as the ones Gord
> proposed. Some are very different. I adopted most of Gord's
> anti-backtracking rules, except for the one about bit selects for
> instance arrays or names from unrolled generate blocks. I did not
> understand how that rule would be backwardly compatible with 1364. 

Actually the gen block / array part is not specified in 1364 since
it only talks about scope names and doesn't address the impact of
out-of-bounds access to arrays or gen loops during resolution.

I believe that both Steven and I agree that the noted line in the
following should not resolve.

   module top;
     genvar g;
     for (g=10; g < 20; g = g + 1) begin : b
        integer x;
        child c1();
     end
   endmodule

   module child;
     genvar g;
     for (g=0; g < 10; g = g + 1) begin : b
        integer x;
        initial x = b[11].x;   // should not resolve
     end
   endmodule


The rationale here is that in realistic scenarios it is far more
likely that parametrically determined bounds are going to cause
indexing problems into the array/loop that the user intended to
address.

Gord.
-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Aug 17 15:06:07 2007

This archive was generated by hypermail 2.1.8 : Fri Aug 17 2007 - 15:06:15 PDT