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.
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.
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.
On a Type 2 AND Gate, only the input bus is affected by the INVERSION MASK, as shown in the following figure.
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.