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

From: Steven Sharp <sharp@cadence.com>
Date: Mon Apr 05 2010 - 10:33:50 PDT

At one point, I believe the initializers for const variables were required
to be constant expressions (meaning elaboration-time constants). This
served a useful purpose, as it prevented any simulation-time execution order
dependencies from affecting the const variable values.

At a later time, this rule was relaxed to allow other const variables to
appear in the initializers for const variables. When this happened, it
became pointless to restrict the expression at all. Allowing const
variables (and hierarchical references to const variables) allowed all
possible problems with order dependencies.

I assume that you are seeing text that was left over from the older
restriction. And implementors may be ignoring restrictions that serve
no useful purpose.

Steven Sharp
sharp@cadence.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Apr 5 10:34:19 2010

This archive was generated by hypermail 2.1.8 : Mon Apr 05 2010 - 10:34:44 PDT