[sv-bc] Virtual interface with modport selected

From: Surya Pratik Saha <spsaha_at_.....>
Date: Fri Jan 09 2009 - 03:45:39 PST
Hi,
Is it allowed to assign a modport to a virtual interface with/without 
modport selection?
For e.g.:
interface PBus #(parameter WIDTH=8); // A parameterized bus interface
logic req, grant;
logic [WIDTH-1:0] addr, data;
modport phy(input addr, ref data);
endinterface
module top;
PBus #(16) p16();
PBus #(32) p32();
virtual Pbus V8; // legal declaration, but no legal assignments
virtual Pbus #(16).phy v16_phy;
initial begin
v16 = p16.phy; // Is it allowed?
v16_phy = p16.phy; // Is it allowed?
end
endmodule

I can see in SV 2009 draft LRM, it is mentioned:
Only the following operations are directly allowed on virtual interface 
variables:
— Assignment ( = ) to the following:
— Another virtual interface of the same type
— An interface instance of the same type
— The special constant null

So modport should not be allowed. But I just want to reconfirm.

Another point is, the example shown there is wrong as per BNF, the 
interface declaration should be "interface PBus #(parameter WIDTH=8);" 
instead of "interface #(parameter WIDTH=8) PBus;".

-- 
Regards
Surya




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Jan 9 03:47:30 2009

This archive was generated by hypermail 2.1.8 : Fri Jan 09 2009 - 03:48:21 PST