RE: [sv-bc] Access using external names for unnamed generate blocks

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Dec 10 2008 - 02:27:05 PST
Hi,

The tool giving an error is conforming to the standard.
Tools passing are being lenient.

In addition to the sentence you quoted, which is in section 27.4 in Draft 8, other relevant passages are:

23.6:
"Unnamed generate blocks are exceptions. They create branches that are visible only from within the block and within any hierarchy instantiated by the block. See Clause 27 for a discussion of unnamed generate blocks." 

and
"Objects declared in automatic tasks and functions are exceptions and cannot be accessed by hierarchical name references. Objects declared in unnamed generate blocks are also exceptions. They can be referenced by hierarchical names only from within the block and within any hierarchy instantiated by the block."

23.9:
"If an identifier is referenced with a hierarchical name, the path can start with a module name, interface name, program name, checker name, instance name, task, function, named block, or named generate block."

27.3:
"Names in instantiated named generate blocks can be referenced hierarchically as described in 23.6."

27.6:
"Although an unnamed generate block has no name that can be used in a hierarchical name, it needs to have a name by which external interfaces can refer to it."

Shalom


> I have a query  regarding External names for unnamed generate blocks .
> According to LRM IEEE Std 1364-2005 section 12.4.1 Loop 
> generate constructs
> 
> "If the generate block is not named, the declarations within 
> it cannot be referenced using hierarchical names other than 
> from within the hierarchy instantiated by the generate block itself."
> 
> Is the testcase given below valid ?
> 
> module top(input clk);
> integer dummy;
> genvar i;
> generate
>  for(i=0; i<2; i=i+1) begin
>    localparam tmp = 2;
>  end
>  wire [3:0] tmp2 ;
>  assign tmp2 = genblk1[1].tmp;  // is this hierarchical 
> reference valid endgenerate
> 
> always @(clk)
>  dummy = genblk1[1].tmp; // is this hierarchical reference valid
> 
> endmodule
> 
> Some standard tools are passing while others are giving the 
> following error :
>            "Implicit name not allowed in hierarchical name, 
> 'genblk1[1]' "
> 
> Thanks,
> Sarani 
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Dec 10 02:29:43 2008

This archive was generated by hypermail 2.1.8 : Wed Dec 10 2008 - 02:30:16 PST