mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Co-authored-by: Paul Swirhun <[email protected]>
This commit is contained in:
co-authored by
Paul Swirhun
parent
922223a9c3
commit
10935ee031
@@ -11,13 +11,13 @@ interface intf
|
||||
modport modp (input clk, rst);
|
||||
endinterface
|
||||
|
||||
module sub (intf.modp the_intf_port [4]);
|
||||
// verilator lint_off HIERPARAM
|
||||
module sub (intf.modp the_intf_port [4], intf.modp single_intf_port);
|
||||
localparam intf_foo = the_intf_port[0].FOO;
|
||||
// verilator lint_on HIERPARAM
|
||||
localparam single_foo = single_intf_port.FOO;
|
||||
|
||||
initial begin
|
||||
if (intf_foo != 4) $stop;
|
||||
if (single_foo != 4) $stop;
|
||||
end
|
||||
endmodule
|
||||
|
||||
@@ -28,10 +28,12 @@ module t (
|
||||
input clk;
|
||||
|
||||
intf the_intf [4] (.*);
|
||||
intf single_intf (.*);
|
||||
|
||||
sub
|
||||
the_sub (
|
||||
.the_intf_port (the_intf)
|
||||
.the_intf_port (the_intf),
|
||||
.single_intf_port(single_intf)
|
||||
);
|
||||
|
||||
always @(posedge clk) begin
|
||||
|
||||
Reference in New Issue
Block a user