This simple example shows how to instantiate a tri-state buffer in Verilog HDL using the keyword bufif1. The output type is tri. The buffer is instantiated by bufif1 with the variable name b1.
For more information on using this example in your project, refer to the How to use Verilog HDL examples section on the Verilog web page.
module Tristate (in, oe, out); input in, oe; output out; tri out; bufif1 b1(out, in, oe); endmodule