The Verilog Hardware Description Language, Fifth Edition

2.5: Inferring Tri-State Devices

2.5 Inferring Tri-State Devices

Tri-state devices are combinational logic circuits that have three output values: one, zero, and high impedance ( z). Having special, non-typical capabilities, these devices must be inferred from the description. Example 2.20 illustrates a tri-state inference.

Listing 2.20: Inferring a Tri-State Device
     module synTriState         (output reg bus,         input       in, driveEnable);         always @(*)            if (driveEnable)                   bus = in;            else bus = 1'bz;     endmodule

The always statement in this module follows the form for describing a combinational logic function. The special situation here is that a condition (in this case, driveEnable) specifies a case where the output will be high impedance. Synthesis tools infer that this condition will be the tri-state enable in the final implementation.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Logic Gates
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.