2015-10-23 02:13:49 +02:00
|
|
|
// DESCRIPTION: Verilator: Connecting an interface array slice to a module's portmap
|
|
|
|
|
//
|
|
|
|
|
// This file ONLY is placed into the Public Domain, for any use,
|
|
|
|
|
// without warranty, 2015 by Todd Strader.
|
2020-03-21 16:24:24 +01:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
2015-10-23 02:13:49 +02:00
|
|
|
|
|
|
|
|
interface foo_intf;
|
|
|
|
|
logic a;
|
2017-09-15 03:15:56 +02:00
|
|
|
|
|
|
|
|
modport m(input a);
|
2015-10-23 02:13:49 +02:00
|
|
|
endinterface
|
|
|
|
|
|
|
|
|
|
module foo_mod
|
|
|
|
|
(
|
2017-09-15 03:15:56 +02:00
|
|
|
foo_intf foo,
|
|
|
|
|
foo_intf.m bars[4]
|
2015-10-23 02:13:49 +02:00
|
|
|
);
|
|
|
|
|
endmodule
|
|
|
|
|
|
2025-09-13 15:28:43 +02:00
|
|
|
module t;
|
2015-10-23 02:13:49 +02:00
|
|
|
|
|
|
|
|
localparam N = 4;
|
|
|
|
|
|
|
|
|
|
foo_intf foos [N-1:0] ();
|
2017-09-15 03:15:56 +02:00
|
|
|
foo_intf bars [N] ();
|
2015-10-23 02:13:49 +02:00
|
|
|
//foo_intf foos ();
|
|
|
|
|
|
|
|
|
|
foo_mod
|
|
|
|
|
foo_mod
|
|
|
|
|
(
|
2022-05-01 16:10:00 +02:00
|
|
|
.foo (foos[2]),
|
2017-09-15 03:15:56 +02:00
|
|
|
.bars (bars)
|
2022-05-01 16:10:00 +02:00
|
|
|
//.foo (foos)
|
|
|
|
|
);
|
2015-10-23 02:13:49 +02:00
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
|
$finish;
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
endmodule
|