verilator/test_regress/t/t_tri_pullup.v

31 lines
673 B
Systemverilog
Raw Normal View History

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2008 Lane Brooks
// SPDX-License-Identifier: CC0-1.0
2009-01-06 17:03:57 +01:00
2026-03-10 02:38:29 +01:00
// verilog_format: off
2009-01-06 17:03:57 +01:00
module top (input A, input OE, output X, output Y, output Z);
2026-03-10 02:38:29 +01:00
pullup p1(Z);
assign Z = OE ? A : 1'bz;
2009-01-06 17:03:57 +01:00
2026-03-10 02:38:29 +01:00
pulldown p2(Y);
assign Y = OE ? A : 1'bz;
2009-01-06 17:03:57 +01:00
2026-03-10 02:38:29 +01:00
pass pass(.A(A), .OE(OE), .X(X));
pullup_module p(X);
2009-01-06 17:03:57 +01:00
endmodule
module pass (input A, input OE, inout X);
2026-03-10 02:38:29 +01:00
io io(.A(A), .OE(OE), .X(X));
2009-01-06 17:03:57 +01:00
endmodule
module io (input A, input OE, inout X);
2026-03-10 02:38:29 +01:00
assign X = (OE) ? A : 1'bz;
2009-01-06 17:03:57 +01:00
endmodule
module pullup_module (output X);
2026-03-10 02:38:29 +01:00
pullup p1(X);
2009-01-06 17:03:57 +01:00
endmodule