Retention Cells in UPF: A Comprehensive Guide
Retention cells are critical components in low-power design, enabling registers to retain their state across power-gating events. This article covers the types, UPF syntax, and common interview questions regarding retention strategies.
1. What is a Retention Cell?
Retention cells are special flip-flops or latches that have multiple power supplies. They are typically used as shadow registers to retain their value even if the block in which they reside is shut down.
2. Types of Retention Cells
Master/Slave-Alive Retention
In this architecture, the retained value is held in the master or slave latch itself. The retention element is part of the functional data path. This approach avoids extra control pins but can impact functional timing and leakage.
Balloon-Style Retention
In balloon-style retention, the retained value is held in an additional latch (the "balloon latch") outside the functional data path. This minimizes timing impact on the critical path.
Dual-Pin vs. Single-Pin vs. Zero-Pin
- Dual-Pin: Uses two separate control signals for save and restore operations. Can be level or edge-sensitive.
- Single-Pin: Uses a single control signal. Save and restore occur on opposite levels/edges (e.g., Save High, Restore Low).
- Zero-Pin: No explicit control signal. Save/Restore is triggered by the power domain state change (NORMAL to CORRUPT and vice versa).
3. Timing and Power Sequencing
Understanding the timing relationship between the clock, save/restore signals, and power switches is crucial for correct implementation.
4. UPF Syntax for Retention
Below is the standard UPF command to define a retention strategy:
set_retention retention_strategy
-domain power_domain
[-retention_power_net retention_power_net]
[-retention_ground_net retention_ground_net]
[-retention_supply retention_supply_set]
[-elements objects]
[-exclude_elements exclude_objects]
[-save_signal {save_signal save_sense}]
[-restore_signal {restore_signal restore_sense}]
[-save_condition {boolean_function}]
[-restore_condition {boolean_function}]
[-retention_condition {boolean_function}]
[-update]
[-use_retention_as_primary]
Example Usage
set_retention dummy1_retention -domain VDD \
-retention_supply_set VDD_DPSLP \
-retention_condition { /DUT/design/signal1 } \
-elements { reg1* reg2* }
map_retention_cell dummy1_retention \
-domain VDD -lib_cells CELL1
5. Interview Questions on Retention & Low Power
Q1: Main Difference: Balloon vs. Master/Slave-Alive?
A: In Balloon-style, an extra shadow latch sits outside the functional data path, minimizing timing overhead. In Master/Slave-Alive, the functional latch itself is powered by an always-on supply, avoiding extra pins but potentially impacting functional timing and leakage.
Q2: Why must the clock be held inactive during save/restore?
A: If the clock toggles during power-off/on, latches may become transparent or enter an unknown ('X') state, corrupting saved data or overwriting restored values before normal operation resumes.
Q3: Power-Down Sequence Order?
A: 1. Stop clocks & assert Save. 2. Enable Isolation cells. 3. Turn off Power Switches. (Power-up is the reverse).
Q4: Retention vs. Isolation Cells?
A: Isolation cells clamp outputs to known values (0/1) to prevent crowbar current in active blocks. Retention cells preserve internal sequential state across power-down and restore it upon wake-up.
Q5: What if the Always-On supply (VRET) is turned off?
A: The shadow latch loses power and enters an 'X' state. Upon power-up, the restore operation loads this 'X' into the functional register, causing functional failure.
Q6: Role of -retention_condition?
A: It specifies a Boolean condition that must be true for the retention strategy to safely hold state. Verification tools check that this condition holds throughout the power-down period.
Q7: Level Shifter vs. Isolation Cell?
A: Level Shifters are for signals crossing between two active power domains with different voltages. Isolation Cells are for signals crossing from a shut-down domain to an active one to prevent floating inputs.
Q8: Purpose of Always-On (AON) Buffers?
A: AON cells remain powered when the surrounding domain is off. They route critical control signals (save/restore, isolation enable) through powered-down blocks without signal loss.
Q9: Why Daisy-Chain Power Switches?
A: Turning on all switches simultaneously causes massive in-rush current spikes, leading to IR drop and ground bounce. Daisy-chaining turns them on sequentially to limit peak current.
Good explanation thank you
ReplyDelete