Surya, >It seems to me, the names should be previously declared before usage of modport. Why? -- Brad -----Original Message----- From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Surya Pratik Saha Sent: Monday, January 28, 2008 4:16 AM To: sv-ec@eda.org; sv-bc@eda.org Subject: [sv-ec] Is modport variable allowed to be declared later? Hi, As per LRM (section 20.4 Modports) *All of the names used in a modport declaration shall be declared by the same interface as the modport itself. In particular, the names used shall not be those declared by another enclosing interface, and a modport dec-laration shall not implicitly declare new ports. *It seems to me, the names should be previously declared before usage of modport. With that consideration, following case should fail: interface intf ; modport master ( input cl ); int cl = 1; endinterface module mod; intf fg(); mod1 md1(fg.master); int x; initial begin x = fg.cl; end endmodule module mod1(intf.master ms); int x; initial x = ms.cl; endmodule Note 'cl' is declared later after modport declaration 'master'. But some simulators are passing the case. -- Regards Surya -- 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 Jan 28 15:52:54 2008
This archive was generated by hypermail 2.1.8 : Mon Jan 28 2008 - 15:53:21 PST