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

From: Gordon Vreugdenhil <gordonv@model.com>
Date: Tue Aug 24 2010 - 06:56:17 PDT

Any interface in which the final resolved value of the parameters
match the virtual interface parameter association should be valid.
It should not matter whether the values are defaults, associated
by name, or associated positionally. If a tool isn't matching in
such cases, the tool likely has a bug and you should report that
directly to the tool vendor.

Gord.

Kakoli Bhattacharya wrote:
> 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* <http://www.mailscanner.info/>, and is
> believed to be clean.

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Aug 24 06:56:36 2010

This archive was generated by hypermail 2.1.8 : Tue Aug 24 2010 - 06:59:34 PDT