How can we retain the state of some of the registers in the design? How do we deal with memory state?
Let me try to explain each one of them based on my recent design experience.
For regular logic blocks, there are multiple ways to wake up faster without losing much information.
- Use retention flops to save the state of some important registers, for example the state of the control block, which forms the heart of the whole system.
- If the chip is aimed for at-speed testing, the scan chains of the design can be used to scan out the data to an external memory and scan it back in after wake-up. This may not be as fast as using retention flops.
- There are many more possible methods.
Again, with respect to retention flops, there were questions about how many types of retention flops are available. I have seen 3 types.
- Single save/restore pin retention latch (slave latch being always on)
- Single pin balloon latch
- Dual pin balloon latch
Pros and cons of single pin versus dual pin retention flops:
Advantages of single pin:
- Minimal area impact
- Single signal controls retention
Disadvantages of single pin:
- Performance impact on the register
- Hold time requirements for the input data
Advantages of dual pin:
- Minimal leakage power
- Minimal performance impact compared to the single pin design
- Minimal dependency on the clock for the control signals
Disadvantages of dual pin:
- Area impact
- More complex system design
- More buffer network and always-on (AON) network required
Why retention is needed at all
Power gating cuts the supply to a block when it is idle, which removes almost all of its leakage. The catch is that every flip-flop in the block loses its value. When the block powers up again it must either start from reset, which can mean a long reinitialization by software, or get its old state back. Retention is the way to get the state back quickly: a small part of each chosen flop stays powered and holds the bit while the rest of the block is off.
How a retention flop works, in outline
A retention flop is an ordinary flip-flop plus a tiny storage element on an always-on supply. Before power-down, a save signal copies the flop's value into that element (or, in the slave-always-on style, the slave latch itself stays powered). The main supply is switched off. After power returns, a restore signal copies the value back, and the flop carries on as if nothing happened. A balloon latch is the name for that extra always-on latch hanging off the side of the flop.
What to retain, and what to rebuild
Retention flops are larger and need an always-on supply and control network, so designers retain only what is expensive to rebuild: state machine registers, configuration registers, counters that track time, and pointers. Datapath pipeline registers and caches are usually allowed to lose their contents.
Memories are a separate decision. Their contents can be lost and reloaded, copied out before power-down, or kept by leaving the memory array powered while its periphery is switched off, which many memory designs offer as a retention or sleep mode.
Deep dive: the numbers and details
This part holds the power-down sequence, area figures, a sizing example, the UPF description and a comparison with scan-based save and restore. Skip it if the overview is all you need.
The power-down and power-up sequence
- Stop the clock to the block (for most retention styles the clock must be held at a defined level).
- Assert the save signal, so the retention elements capture the flop values.
- Enable isolation on the block's outputs, so powered-down outputs do not float into always-on logic.
- Switch off the block's supply.
- To wake up: switch the supply on and wait for it to settle.
- Assert restore, so the retained values are copied back into the flops.
- Release isolation, then restart the clock.
Getting this order wrong is the classic retention bug: for example, a reset that reaches the flops after restore wipes out the restored state, or a clock edge during save corrupts it.
Single control versus save and restore pins
The single-pin and dual-pin styles in the original list map directly onto how the power intent is written. The DVCon paper Future Proofing Power Intent Specification through UPF 4.0 for Evolving Advanced State Retention Strategies (authors from Texas Instruments, Synopsys and others) shows a single-control balloon-latch strategy in UPF 3.1, where one signal, RET, does both jobs: its rising edge saves and its falling edge restores.
set_retention ret -domain PD_V4 -save_signal {RET posedge} \
-restore_signal {RET negedge}
The paper notes that a retention element that tolerates clock activity while RET is asserted lets the system power off its clock tree drivers, at the cost of extra power and area in each retention element. A dual-pin style uses separate save and restore signals, which gives the controller more freedom in sequencing at the cost of a second always-on control net to every retention flop.
Area: what the extra latch costs
The cost depends on the library. One published data point is Texas Instruments' patent US7639056B2, "Ultra low area overhead retention flip-flop for power-down applications" (filed 2005). It gives a conventional flip-flop area of about 11.59 square microns in its example, and reports that a retention version with 3 additional transistors is about 14.5 percent larger, and a 2-transistor version about 10 percent larger. The same patent notes that the balloon latch, also called a shadow latch, is typically powered by a separate always-on supply. Check the actual cell areas in your own library before deciding how many flops to retain.
Worked example: selective retention
The numbers here are illustrative, using the patent's figures.
- A block has 100,000 flops, of which 2,000 hold control and configuration state.
- Retaining all 100,000 flops at 14.5 percent overhead on 11.59 square microns adds 100,000 x 11.59 x 0.145, about 168,000 square microns, or 0.17 square millimeters.
- Retaining only the 2,000 control flops adds about 3,400 square microns, fifty times less, and the always-on control network only has to reach 2,000 cells.
The trade-off is wake-up work: the other 98,000 flops come back in their reset state, so the design must be able to restart its datapath from reset while the control state is restored.
Retention flops versus scan-based save and restore
The second method in the original list reuses the scan chains. Its cost is time. Suppose the 2,000 state bits sit on 10 scan chains of 200 flops, shifted at 50 MHz: shifting out takes 200 cycles, or 4 microseconds, and shifting back in takes the same, plus the time to write and read the external or always-on memory. A retention flop restores in a single control pulse. Scan save and restore needs no special cells, though, so it suits blocks that power down rarely or where area matters more than wake-up time.
| Method | Area cost | Wake-up time | Always-on resources |
|---|---|---|---|
| Retention flops (single pin) | Low to moderate per flop | One restore pulse | One control net plus retention supply |
| Retention flops (dual pin) | Higher per flop | One restore pulse | Two control nets plus retention supply |
| Scan save and restore | None in the flops | Chain length divided by shift rate, each way | Storage for the saved bits |
| No retention (reset and reload) | None | Software reinitialization time | None |
Interview angle
Typical questions are "Which registers would you retain, and why?", "What is the order of save, isolation and power-off?", "What happens if reset arrives after restore?" and "What are the trade-offs between single-pin and dual-pin retention flops?" The lists at the top of this post and the sequence above answer all four.


Your comments will be moderated before it appears here.