RE: [sv-bc] Is number assigned to generate block reset at the end of design unit

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Mon Sep 13 2010 - 10:53:54 PDT

Saying the number will be 1, starts with 1, or reset to 1 is the same
thing.

 

A sub-scope is not the same scope as the scope that encapsulates it.
Each scope has its own counter.

 

 

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Surya Pratik Saha
Sent: Monday, September 13, 2010 4:06 AM
To: sv-bc@eda.org
Cc: Adhip Das
Subject: [sv-bc] Is number assigned to generate block reset at the end
of design unit

 

Hi,
In page 715 of 1800-2009 SV LRM, it is mentioned:
Each generate construct in a given scope is assigned a number. The
number will be 1 for the construct that appears textually first in that
scope and will increase by 1 for each subsequent generate construct in
that scope.

So is the number assigned to generate block got reset after end of
corresponding scope (say module or interface etc.)? For e.g.:

module m1;
    begin // genblk1
    end
endmodule

module m2;
    begin // is it genblk1 or genblk2 ?
    end
endmodule

If it is reset, then what will happen for a generate block inside nested
module something like:

module m1;
    begin // genblk1
    end
    module nested;
        begin // is it genblk1 or genblk2 ?
        end
    endmodule
endmodule

Please let me know.

-- 
Regards
Surya
-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean. 
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Sep 13 10:54:17 2010

This archive was generated by hypermail 2.1.8 : Mon Sep 13 2010 - 10:56:42 PDT