Re: [sv-bc] Modport expression examples

From: <jonathan.bromley_at_.....>
Date: Mon Dec 01 2008 - 02:47:10 PST
> In Draft 7a, 25.5.4 has the following examples of modport expressions:
[...]
> The first example is 
>   const int x=1;
>   modport A (output .P(r[3:0]), input .Q(x), R);
> I question this for two reasons. First, x is of type int, which is a
> 2-state type.
> The rules state that "input int x" should not be legal because it 
> defaults to a net type and 2-state types are not allowed to be nets,
> so the keyword "var" should need to be added.

Yes, but where?  That's another reason why I want a way to declare 
a modport separately, as a stand-alone "data type", with the full 
type and direction of each item explicit in the modport itself.

[...]
> It looks to me as though the author of the example got confused 
> about the explicit port declaration syntax, as often happens, and 
> related to it like a port connection, not like a port declaration.

Easily done.  A modport is an abstraction of part of a 
port list, making it especially absurd that the modport must
of necessity be defined inside an interface - where its item's
directions are precisely the opposite of what you might expect.

-- 
Jonathan Bromley
Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, 
UK
Tel: +44 (0)1425 471223                   Email: 
jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573                           Web: 
http://www.doulos.com

This message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Dec 1 02:48:11 2008

This archive was generated by hypermail 2.1.8 : Mon Dec 01 2008 - 02:48:55 PST