In Draft 7a, 25.5.4 has the following examples of modport expressions: interface I; logic [7:0] r; const int x=1; bit R; modport A (output .P(r[3:0]), input .Q(x), R); modport B (output .P(r[7:4]), input .Q(2), R); endinterface I'm in doubt about the Q ports. 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. Second, because x is declared as const. How can a module input be const? x is the internal name of the port, whereas Q is the external name. Similarly, modport B (output .P(r[7:4]), input .Q(2), R); This looks wrong also. The input port Q is an alias for "2", which does not make sense either. In fact, none of the tools I checked allowed this syntax: module m(.Q(2)); 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. For input port connections, you could say that x or 2 drive Q, but as input port declarations, it is reversed. Comments? Thanks, Shalom Shalom Bresticker Intel Jerusalem LAD DA +972 2 589-6582 +972 54 721-1033 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Dec 1 01:24:14 2008
This archive was generated by hypermail 2.1.8 : Mon Dec 01 2008 - 01:30:09 PST