The auto sleep mode automatically uses the function provided by the SLEEP pin in an automated manner. To determine when to go to sleep and when to wake up, the UltraRAM looks ahead in terms of RAM access.
When the EN_AUTO_SLEEP_MODE attribute is set to TRUE, the AUTO_SLEEP_LATENCY attribute defines the number of clock cycles the enable and global address inputs EN_A, EN_B, ADDR_A[25:15], and ADDR_B[25:15] have to arrive prior to other inputs. This lookahead information is used to decide when the UltraRAM can go to sleep. The EN_A/B and ADDR_A/B[25:15] are internally delayed to implement this feature. The number of clock cycles required for the enable and global address signals to arrive early is set with the AUTO_SLEEP_LATENCY attribute, which can take values between 3 – 15. Therefore, for the UltraRAM to go into sleep mode, a minimum number of consecutive inactive clock cycles is required that is defined by the value of the AUTO_SLEEP_LATENCY attribute.
The number of sleep cycles achieved is calculated with this formula:
- If the number of consecutive inactive cycles is < AUTO_SLEEP_LATENCY, then the number of sleep cycles = 0.
- If the number of consecutive inactive cycles is ≥ AUTO_SLEEP_LATENCY, then the number of consecutive sleep cycles = the number of consecutive inactive cycles – 3.
- An inactive cycle is defined as a cycle where there is no RD/WR operation from either port.
For example, to obtain sleep cycles in any five or more consecutive cycles of inactivity, set the AUTO_SLEEP_LATENCY to five.
Once in auto sleep mode, the output of the OREG retains the old value for only one clock cycle. The data can be reset to 0 in the very next cycle or later depending on when the UltraRAM enters sleep mode. If there are no other pipeline registers enabled after OREG, the design must use the register output read data only during the last valid clock cycle. If there are other consecutive pipeline registers, then those pipeline registers will hold the last read data.
The auto sleep mode is most effective for large chain sizes or any chain with very little activity. While there is a default for this attribute, the application determines the effective power savings of this feature based on activity, latency, and other needs of the application. If AUTO_SLEEP_LATENCY is too low, the UltraRAM goes into sleep and wake-up too often, which can cause more power to be consumed. If it is too high, then the maximum of amount of power might not be saved.