Dave, I don't think there's any confusion about modports resembling hierarchy. But you're right to note that the BNF specifies interface_identifier | interface_identifier . modport_identifier wherever they can appear in the syntax for port lists. Thinking of accesses to a modport or interface as an "expression" misleads one into believing that there is some fixed type for that expression, and that modports might appear in other expression contexts. Can a modport or interface be used in a modport_expression, or in a modport_simple_ports_declaration? That might be useful; if one had a large common modport list, and several minor variations, the variants would be: modport mama(a,b,c,d), aunt(mama,import foo), nana(mama, import noo); The alternative BNF seems messy and less-than-fully general, I'd rather err on the side of the BNF being too general and the text needing to restrict it to legal cases. Perhaps it would help to compile a complete list of the contexts in which a modport_identifier can be used, and add that list to section 20.4 as a syntax restriction. Rich, Dave wrote: > But a modport does not introduce a nested hierarchical scope. We don't > refer to sb_intf.slave.data or a.slave.data, just sb_intf.data or a.data > (from that same example) > > > > Dave > > > > > > ________________________________ > > From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On > Behalf Of Brad Pierce > Sent: Tuesday, April 24, 2007 11:37 PM > To: sv-bc@server.eda-stds.org; sv-ec@server.eda-stds.org > Subject: Re: [sv-bc] modport_identifier in an assignment > > > > Dave, > > > > A reference to an interface instance is parsed with > hierarchical_identifier. For example, > > > > ordered_port_connection ::= expression ::= primary ::= > hierarchical_identifier ::= 'sb_intf.slave' > > > > -- Brad > > > > ________________________________ > > From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of > Rich, Dave > Sent: Tuesday, April 24, 2007 9:31 AM > To: sv-bc@eda-stds.org; sv-ec@eda-stds.org > Subject: [sv-bc] modport_identifier in an assignment > > I've been looking through the BNF and can't find anywhere the BNF allows > you to put . modport_identifier next to an interface instance on the RHS > of a assignment. The RHS could be either an actual argument in an > argument/port list or in the assignment to a virtual interface variable. > > > > For virtual interfaces, there's no reason to add this capability other > than for redundancy, since in order to select a modport, the target must > have been declared with the specific modport_identifier. There's no BNF > to support the example in 20.8 (draft1) where there is a > modport_identifer in the assignment: > > > > v32_phy = p32.phy; > > > > For interface port connections, we have this feature where you can > specify the modport_identifier in the actual port when there is no > modport declared in the formal port. (See the example in 20.4.3) But I > can't see any BNF to support this syntax: > > > > memMod mem(sb_intf.slave); // Connect the modport to the module instance > > cpuMod cpu(sb_intf.master); > > > > > > I'd be happy to remove the feature. > > > > Dave > > > > > > David Rich > Verification Technologist > Design Verification & Test Division > Mentor Graphics Corporation > dave_rich@mentor.com > Office: 408 487-7206 > Cell: 510 589-2625 > > > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Apr 25 11:35:20 2007
This archive was generated by hypermail 2.1.8 : Wed Apr 25 2007 - 11:35:53 PDT