AttributesRegister Example (Cont.)
ARCHITECTURE first_attempt OF 8_bit_reg IS
IF (enable = '1') AND a'STABLE(x_setup) AND
- The following architecture is a first attempt at the register
- The use of 'STABLE is to used to detect setup violations in the data input
- What happens if a does not satisfy its setup time requirement of x_setup?
This implementation of the 8-bit register uses the 'STABLE attribute to determine if the input satisfies the setup time requirement of the register. If the setup requirement is not met, the body of the IF statement will not execute, and the value on a will not be assigned to b.
Note that although the process checks that clk and enable are ‘1’ to store the data, it does not does not consider the possibility that clk may have transitioned to ‘1’ from either ‘X’ or ‘Z’.