[sv-bc] RE: [sv-ec] Is modport variable allowed to be declared later?

From: Rich, Dave <Dave_Rich_at_.....>
Date: Mon Jan 28 2008 - 16:08:06 PST
> -----Original Message-----
> From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org]
On
> Behalf Of Brad Pierce
> Sent: Monday, January 28, 2008 3:51 PM
> To: sv-ec@server.eda.org; sv-bc@server.eda.org
> Subject: RE: [sv-ec] Is modport variable allowed to be declared later?
> 
> Surya,
> 
> >It seems to me, the names should be previously declared before usage
of
> modport.
> 
> Why?
[DR] To be compliant with the LRM.

Mantis 2106 leaves little room for a different interpretation: "A
variable declaration shall precede any statements within a procedural
block and shall precede any simple reference (non-hierarchical) to that
variable"

A modport declaration requires a simple reference (non-hierarchical) to
a variable.

Now it may be the case that this rule is not needed for a modport, but
that would be an exception that provides no benefit. It's much safer to
keep a rule like this simple with no exceptions.

Dave


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Jan 28 16:08:41 2008

This archive was generated by hypermail 2.1.8 : Mon Jan 28 2008 - 16:08:50 PST