mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-04 00:41:13 +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 @@
|
||||
typedef struct packed { logic x; } T;
|
||||
|
||||
interface Interface;
|
||||
integer x;
|
||||
function z;
|
||||
input x;
|
||||
z = ~x;
|
||||
endfunction
|
||||
endinterface
|
||||
|
||||
module Module(interface y);
|
||||
function z;
|
||||
input T y;
|
||||
z = y.x;
|
||||
endfunction
|
||||
integer x = 0;
|
||||
initial begin
|
||||
#1;
|
||||
$display("x = %b", x);
|
||||
$display("z(x) = %b", z(x));
|
||||
$display("y.x = %b", y.x);
|
||||
$display("y.z(x) = %b", y.z(x));
|
||||
$display("y.z(y.x) = %b", y.z(y.x));
|
||||
$display("y.z(z(y.x)) = %b", y.z(z(y.x)));
|
||||
end
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
Interface x();
|
||||
initial x.x = 1;
|
||||
Module y(x);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user