Tristate Description Using Combinatorial Always Block Coding Example (Verilog) - Tristate Description Using Combinatorial Always Block Coding Example (Verilog) - 2022.2 English - UG901

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2022-11-16
Version
2022.2 English

Filename: tristates_1.v

// Tristate Description Using Combinatorial Always Block

// File: tristates_1.v

//

module tristates_1 (T, I, O);

input  T, I;

output O;

reg    O;

always @(T or I)

begin

if (~T)

O = I;

else

O = 1'bZ;

end

endmodule