Return to previous page Advance to next page
LogiBLOX Guide
Chapter 3: Understanding Attributes

Inverting and Decoding Masks for Gated Modules

The INVERSION MASK and DECODE MASK attributes specify individually inverted or masked inputs and are available on Type 1, Type 2, and INVERT Simple Gates modules.

Table 3_3 Inversion and Decode Masks Summary

Attribute
Decode Input Value (default)
Invert Input Value
INVERSION MASK
0
1
DECODE MASK
1
0

The INVERSION MASK and DECODE MASK attributes use different polarities to achieve the same effect.

You can specify the inversion mask or the decode mask using any of the radices specified in the “Data Values” section in this chapter.

The default value is chosen to be intuitive and, therefore, depends on the nature of the module.

Type 1 Modules: One Input Bus

As an example, on a 5-bit Type 1 AND Gate with inputs 01011 and INVERSION MASK = 2#10010#, Bits 1 and 4 are inverted (bit 4 is the most significant bit). The resulting values are 11001. The DECODE MASK achieves the same result with opposite polarities. If DECODE MASK=2#01101#, Bits 1 and 4 are inverted and the resulting values are 11001.

Figure 3.1 5-Input Type 1 AND Gate Using INVERSION MASK

Type 2 Modules: One Input Bus and One Input Signal

On a Type 2 AND Gate, only the input bus is affected by the INVERSION MASK, as shown in the following figure.

Figure 3.2 Type 2 AND Gate Using INVERSION MASK

INVERT Module

If you do not define INVERSION MASK, all signals connected to the INVERT module are inverted. If you specify INVERSION MASK, the outputs of the INVERT module are determined by the bit pattern of INVERSION MASK. For each bit in the INVERSION MASK that is 1, the corresponding bit in the bus is not inverted (in other words, the bit retains its original value).

You can specify the value of the INVERSION MASK in any base. Refer to the “Data Values” section for more information.

Figure 3.3 5-Input INVERT Using INVERSION MASK