mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-05 01:03:02 +02:00
support multi-dimensional modports
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
interface Interface;
|
||||
logic [0:1][0:2] arr;
|
||||
endinterface
|
||||
|
||||
module Module(intf);
|
||||
Interface intf [3:3][1:2];
|
||||
assign intf[3][2].arr[1] = 1;
|
||||
assign intf[3][2].arr[0][0] = 0;
|
||||
initial $display("2: %b", intf[3][2].arr);
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
Interface intf [1:1][1:2] ();
|
||||
Module mod (intf);
|
||||
assign intf[1][1].arr[1] = 6;
|
||||
assign intf[1][1].arr[0][0] = 1;
|
||||
initial $display("1: %b", intf[1][1].arr);
|
||||
endmodule
|
||||
@@ -0,0 +1,14 @@
|
||||
module top;
|
||||
if (1) begin : intf1
|
||||
wire [0:1][0:2] arr;
|
||||
end
|
||||
if (1) begin : intf2
|
||||
wire [0:1][0:2] arr;
|
||||
end
|
||||
assign intf2.arr[1] = 1;
|
||||
assign intf2.arr[0][0] = 0;
|
||||
initial $display("2: %b", intf2.arr);
|
||||
assign intf1.arr[1] = 6;
|
||||
assign intf1.arr[0][0] = 1;
|
||||
initial $display("1: %b", intf1.arr);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user