2026-05-12 00:32:55 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
|
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain.
|
|
|
|
|
// SPDX-FileCopyrightText: 2026 Zhi QU
|
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
2026-05-30 21:23:02 +02:00
|
|
|
interface decoupled_ifc;
|
|
|
|
|
logic ready;
|
|
|
|
|
endinterface
|
|
|
|
|
|
2026-05-12 00:32:55 +02:00
|
|
|
module t (
|
|
|
|
|
output wire out
|
|
|
|
|
);
|
|
|
|
|
|
2026-05-12 00:39:13 +02:00
|
|
|
logic a = 1'b0; // declaration initialization
|
|
|
|
|
assign a = 1'b1; // continuous assignment
|
2026-05-12 00:32:55 +02:00
|
|
|
|
2026-05-12 00:39:13 +02:00
|
|
|
assign out = a;
|
2026-05-12 00:32:55 +02:00
|
|
|
|
2026-05-30 21:23:02 +02:00
|
|
|
// OK as two different instances
|
|
|
|
|
decoupled_ifc ifc_in ();
|
|
|
|
|
decoupled_ifc ifc_out ();
|
|
|
|
|
initial ifc_out.ready = 0;
|
|
|
|
|
assign ifc_in.ready = ifc_out.ready;
|
|
|
|
|
|
2026-05-12 00:32:55 +02:00
|
|
|
endmodule
|