RE: [sv-bc] Modport expression examples

From: Steven Sharp <sharp_at_.....>
Date: Mon Dec 01 2008 - 17:22:37 PST
>From: "Bresticker, Shalom" <shalom.bresticker@intel.com>

>I want to ask about the initial statement in module M.
>It has hierarchical references to the explicit port names in the modport 
declarations.
>However, in the case of explicit port declarations in modules, you cannot do 
this.
>You can only use these port names for port connections.


The port directions are as viewed from the module.

But the "hiconn/loconn" in the explicit port names are as viewed from
the interface.  The explicit port names are what the module sees, while
the port expressions are internal to the interface.

It pretty much has to work this way, so that the module can use simple
port names while accessing arbitrary expressions in the interface.  The
P in .P(E) has to be an identifier, while the expression E in parentheses
can be an expression.  So P has to be what the module sees, while E is
what the interface sees.  Unfortunately, this is like a port list as
viewed from the interface, even though the port directions are as viewed
from the module.

It would have been more consistent if the port directions were as
viewed from the interface also.  It would have been less confusing too,
since the declarations appear in the interface.  But I guess that would
have spoiled the attempt to view modports as parts of module port lists.

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 Dec 1 17:23:19 2008

This archive was generated by hypermail 2.1.8 : Mon Dec 01 2008 - 17:25:36 PST