[sv-bc] Is instance constant allowed outside class?

From: Surya Pratik Saha <spsaha@cal.interrasystems.com>
Date: Wed Mar 31 2010 - 07:18:54 PDT

Hi,
"8.18 Constant class properties" of SV 2009 LRM defines two types of
constants - global constant (initialization is must) and instance
constant (initialization is missing). Is it allowed to use that instance
constant syntax in non-class scope? For e.g.:
module top;
    const int x; // Is it allowed?
endmodule

OR
module top;
    class C;
       function f;
          const int x; // Is it allowed
       endfunction
    endclass
endmodule

Some standard tools pass both the cases. Also OVM 2.1.1 has 2nd type of
syntax usage in its source. Please let me know.

-- 
Regards
Surya
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Mar 31 07:19:49 2010

This archive was generated by hypermail 2.1.8 : Wed Mar 31 2010 - 07:20:18 PDT