1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2024 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
module M #(
parameter int P = 12,
parameter int Q = 13
) (
input wire i,
output wire o
);
assign o = i;
endmodule
module N #(
parameter int P = 12
) (
input wire i,
output wire o
);
assign o = i;
endmodule
module t (/*AUTOARG*/);
wire i1, o1, i2, o2, i3, o3, i4, o4, i5, o5, i6, o6;
// All of these have superfluous commas after the first parameter.
// All of the N instances produced a PINNOTFOUND error, however as reported in issue #4979,
// none of the M instances do when they should. The copmma after the first parameter is not
// allowed in verilog.
M #(.P(13),) m1(
.i(i1),
.o(o1)
);
M #(14,) m2 (
.i(i2),
.o(o2)
);
M #(14,) m3 (
.i(i3),
.o(o3)
);
N #(.P(13),) n1(
.i(i4),
.o(o4)
);
N #(14,) n2 (
.i(i5),
.o(o5)
);
N #(14,) n3 (
.i(i6),
.o(o6)
);
endmodule
|