verilator/test_regress/t/t_lint_contassinit_bad.v

27 lines
568 B
Systemverilog
Raw Permalink Normal View History

// 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
interface decoupled_ifc;
logic ready;
endinterface
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:39:13 +02:00
assign out = a;
// 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;
endmodule