verilator/test_regress/t/t_interface_param1.v

55 lines
933 B
Systemverilog
Raw Normal View History

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2014 Jie Xu
// SPDX-License-Identifier: CC0-1.0
//bug692
2026-03-08 23:26:40 +01:00
module t ( /*AUTOARG*/
// Inputs
clk
);
input wire clk;
wire [31:0] result;
test_if #(.ID(3)) s ();
sub_test U_SUB_TEST (
s.a.b,
result
); // the line causing error
endmodule : t
// ---------------------------------------------------------------------------
2026-03-08 23:26:40 +01:00
module sub_test (
input [31:0] b,
output [31:0] c
);
assign c = b;
endmodule
// ---------------------------------------------------------------------------
2026-03-08 23:26:40 +01:00
interface test_if #(
parameter ID = 0
) ();
2026-03-08 23:26:40 +01:00
typedef struct packed {
logic a;
logic [31:0] b;
} aType;
2026-03-08 23:26:40 +01:00
aType a;
2026-03-08 23:26:40 +01:00
typedef struct packed {
logic c;
logic [31:0] d;
} bType;
2026-03-08 23:26:40 +01:00
bType b;
2026-03-08 23:26:40 +01:00
modport master(input a, output b);
endinterface