mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 09:28:12 +02:00
major interface conversion update
- module instances with modport bindings are now inlined - support for modports in generate loops - support for generic interfaces - implied modport instance propagation - add error message for interface instances missing port list
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
interface InterfaceA;
|
||||
logic x;
|
||||
modport M(input x);
|
||||
endinterface
|
||||
|
||||
interface InterfaceB;
|
||||
logic y;
|
||||
modport N(input y);
|
||||
endinterface
|
||||
|
||||
module ModuleA(modport_a);
|
||||
InterfaceA modport_a;
|
||||
initial $display("ModuleA %b", modport_a.x);
|
||||
endmodule
|
||||
|
||||
module ModuleB(modport_b);
|
||||
InterfaceB modport_b;
|
||||
InterfaceA interface_a();
|
||||
ModuleA module_a(interface_a.M);
|
||||
initial $display("ModuleB %b", modport_b.y);
|
||||
assign interface_a.x = 0;
|
||||
endmodule
|
||||
|
||||
module ModuleC;
|
||||
InterfaceB interface_b();
|
||||
ModuleB module_b(interface_b.N);
|
||||
assign interface_b.y = 1;
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
ModuleC module_c();
|
||||
endmodule
|
||||
Reference in New Issue
Block a user