2024-03-19 11:43:06 +01:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
2026-01-27 02:24:34 +01:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain.
|
|
|
|
|
// SPDX-FileCopyrightText: 2024 Antmicro Ltd
|
2024-03-19 11:43:06 +01:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
typedef struct packed {bit x;} p_struct_t;
|
2024-03-19 11:43:06 +01:00
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
module p_mh (
|
|
|
|
|
inout p_struct_t p_i,
|
|
|
|
|
inout p_struct_t p_o
|
|
|
|
|
);
|
|
|
|
|
// OK: module p_mh (input p_struct_t p_i, output p_struct_t p_o);
|
|
|
|
|
assign p_o.x = p_i.x;
|
2024-03-19 11:43:06 +01:00
|
|
|
endmodule
|
|
|
|
|
|
|
|
|
|
module t;
|
2026-03-10 02:38:29 +01:00
|
|
|
p_struct_t p_i, p_o;
|
2024-03-19 11:43:06 +01:00
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
p_mh p_mh (
|
|
|
|
|
p_i,
|
|
|
|
|
p_o
|
|
|
|
|
);
|
2024-03-19 11:43:06 +01:00
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
initial begin
|
|
|
|
|
p_i.x = 1;
|
|
|
|
|
#1;
|
|
|
|
|
// issue #4925
|
|
|
|
|
if (p_o.x != 1'b1) $stop;
|
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
|
$finish;
|
|
|
|
|
end
|
2024-03-19 11:43:06 +01:00
|
|
|
endmodule
|