Previous

DECODER

The Decoder module converts unsigned binary data on the Select port to a 1-of-n one-hot output on the D_OUT port. The width (precision) of the Select and D_OUT ports is determined by the Bus Width attribute.

Figure 4.11 The Decoder Module

Input Pins

Select (SEL)

The data on the Select pin is converted to a one-hot value on the D_OUT port.

Connections: The Select pin is always specified. Specify its bus width by selecting the appropriate width from the Bus Width pull-down list box. The valid range of values for the bus width is 2 through 8.

Enable (ENABLE)

When the Enable Input is High, the selected Output is High. When the Enable Input is Low, the Decoder is disabled and all bits of the Output are Low. If the Enable Input is not specified, the Decoder is always enabled.

Connections: The Enable input is optional.

Output Pins

D_OUT

When enabled, one of the lines of the D_OUT port will be High (one-hot encoding). The width of the D_OUT pin is 2n, where n is the width of the Select pin.

Connections: The D_OUT pin is always specified.

Attributes

Style (STYLE)

The Style attribute is only enabled for the XC5200 device family. You can select Cascade, Maximum Speed, or Normal Gates. For more information, see the “Implementation Styles” section of the “Understanding Attributes” chapter.

For other device families, Style is always set to Normal Gates.

Next