RE: [sv-bc] Are modport port directions enforced?

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Mon Feb 26 2007 - 17:23:19 PST
Steven,

So in your opinion every interface data object made available by a
modport is accessible with ref/inout semantics depending on its kind,
and the input/output qualifiers in the modport declaration are merely
restrictions?  

Under that interpretation, what restrictions would the output qualifier
impose?  What would be the point of using 'output' in a modport
declaration versus simply picking up the default ref/inout semantics for
the kind of the data object?

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Steven Sharp
Sent: Monday, February 26, 2007 3:48 PM
To: fm@cadence.com; Mark.Hartoog@synopsys.COM; sv-bc@eda-stds.org
Subject: RE: [sv-bc] Are modport port directions enforced?


>From: "Mark Hartoog" <Mark.Hartoog@synopsys.com>

>When you instantiate the module, there is an implicit continuous 
>assignment to the input port. If there is another continuous or 
>procedural assignment inside the module to the port, then that violates

>the one continuous assignment or one or more procedural assignment 
>rules for variables. This is covered in section 6.7 and 11.5.

Mark,

Are you actually suggesting that an interface passed through hierarchy
will create an implicit continuous assignment for each port that it is
passed through, for any object declared in a modport? 

If so, are you suggesting that there is an implicit continuous assign
between the interface and each module that references it, existing in
parallel?  Each module would be making a copy of the original variable
in the interface.  Or are you suggesting that there is an implicit
continuous assignment in series at each port that the interface passes
through, as there would be for a variable passed through a port without
the interface?  Each module would be making a copy of the variable that
its parent used, which might be a copy of its parent's version, etc.

Neither of these fits my understanding of interfaces.  My understanding
was that all these modules were accessing the exact same variable: the
original one in the interface.  It seems pretty clear that this is how
an interface without modports behaves.  It was my understanding that a
modport simply restricted access, rather than changing the entire
mechanism by which the interface was accessed.

If the accesses to variables in the interface are to the original
variable, then there is no implicit continuous assignment.  A write to
the variable would be a write to the original variable, not to a copy
that is being driven by an implicit continuous assignment.  If there are
no explicit continuous assignments to the original variable anywhere,
then that write would be perfectly legal by the LRM.

Steven Sharp
sharp@cadence.com


--
This message has been scanned for viruses and dangerous content by
MailScanner, 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 Feb 26 17:23:48 2007

This archive was generated by hypermail 2.1.8 : Mon Feb 26 2007 - 17:24:03 PST