[sv-bc] Query on Virtual (parameterized) interface declaration

From: Kakoli Bhattacharya <kakoli@cal.interrasystems.com>
Date: Mon Aug 23 2010 - 00:27:30 PDT

Hello,

Consider the following eg. related to virtual interface (parameterized) declaration

interface intf1 #(parameter shortint size = 3,byte val1 = 8'd4,int val2 = 1) ();

......
modport M1 (... , ....);
endinterface

module top (input var reg [1:0][7:0] in1,output reg [4:0] out1);

*intf1 #(7,4,2)I1 ();* // ordered parameter assignment used for interface instantiation

*virtual interface intf1#(.size(7),.val1(4),.val2(2)).M1 virtual1 = I1; *// named parameter assignment
 used for virtual interface declaration

....
endmodule

In the above example ordered parameter assignment is used for interface instatiation, but named
parameter assignment is used for virtual interface declaration, however the parameter values
are same.

Some of the tools are failing at analysis for this.
If named parameter assignment is used for interface instantiation also then it is passing, i.e

intf1 #(.size(7),.val2(2),.val1(4))I1 ();

If the interface is instantiated as above then passing.

Now in the LRM (Section 25.9) an eg. shows that passing different parameter values is illegal but
it is nowhere mentioned that the parameters have to be assigned in a similar manner (or have I missed
any such clause?)

Tools are also failing for the below given declaration form:

intf1 #() I1 (); // interface instantiated using default values

virtual interface intf1#(.size(3),.val1(4),.val2(1)).M1 virtual1 = I1; // declared using default values
 but it has been explicitly mentioned.

How should the tools behave for such cases?

Regards,
Kakoli

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Aug 23 00:30:26 2010

This archive was generated by hypermail 2.1.8 : Mon Aug 23 2010 - 00:33:23 PDT