IntermediateQuestion 10 of 60

How do you write a retention strategy with set_retention, and what supplies does it need?

From PDVerse Low-Power Physical Design Mentor Guide, part of the pdVerse Mentor Guide

Short Answer

set_retention (UPF) names which registers in a shutdown domain must keep their state, which supply keeps that state alive, and which signals save and restore it. The register needs two supplies: the switched primary for normal operation and a retention supply that stays on while the primary is off. In IEEE 1801-2015 you give that supply as a set with -retention_supply and put the save and restore signals on the same command.

Technical Reference DiagramHow do you write a retention strategy with set_retention, and what supplies does it need?

Technical Explanation

  • Elements: -elements lists instances or registers; without it, the strategy covers every sequential cell in the domain.
  • Retention supply: -retention_supply SS_AON powers the shadow storage and the save and restore control. It must stay on while PD_COP is off.
  • Signals: -save_signal {U_PC/SAVE high} -restore_signal {U_PC/NRESTORE low} give each net and its active level or edge.
  • Legacy form (still accepted by ICC2/PT): -retention_power_net VDD1p0 -retention_ground_net GND, with signals on set_retention_control (UPF).
  • In ICC2, giving only the legacy power net makes the primary ground the retention ground.
  • Mapping: map_retention_cell (UPF) limits which library cells may implement the strategy.
  • IEEE 1801-2015 makes it an implementation error to leave the retention supply unspecified.
# [UPF]  mychip.upf
set_retention PD_COP_RET -domain PD_COP -retention_supply SS_AON -elements {U_COP/reg1 U_COP/pc U_COP/int_state} -save_signal {U_PC/SAVE high} -restore_signal {U_PC/NRESTORE low}
map_retention_cell PD_COP_RET -domain PD_COP -lib_cells {RET_DFF_X1}
# Legacy form (still accepted by ICC2/PT), signals move to set_retention_control
set_retention PD_COP_RET -domain PD_COP -retention_power_net VDD1p0 -retention_ground_net GND -elements {U_COP/reg1 U_COP/pc U_COP/int_state}
# [ICC2]  icc2_shell
create_mv_cells
report_mv_cells -retention

What To Check

  • The retention supply is on in every state where PD_COP is off.
  • The element list covers the state software expects after wake-up, and nothing more.
  • Save and restore nets come from always-on logic.
  • The mapped cells really are retention cells with matching save and restore pins.

Command Checks & Actions

UPF (design.upf)set_retention PD_COP_RET -domain PD_COP -retention_supply SS_AON -elements {U_COP/reg1 U_COP/pc U_COP/int_state}

Pick the registers and their always-on retention supply

UPF (design.upf)map_retention_cell PD_COP_RET -domain PD_COP -lib_cells {RET_DFF_X1}

Restrict the retention cells the tool may use

ICC2 (icc2_shell)create_mv_cells

Implement the strategies before placement

ICC2 (icc2_shell)report_mv_cells -retention

List the retention registers and their mapped cells

Healthy, Suspicious & Hard-stop Results

  • Healthy (illustrative): report_mv_cells -retention lists exactly the PD_COP_RET registers, each mapped to a retention cell on SS_AON.
  • Suspicious (illustrative): Far more retention flops than expected because -elements was left out, so every PD_COP flop retains.
  • Hard stop: The retention supply resolves to SS_COP or VDD1p0_SW, so the saved state dies with the domain.

Common Mistake

The Trap: Using the domain's own switched supply as the retention supply, for example -retention_supply SS_COP.

  • The shadow latch powers down with PD_COP, so every register restores garbage after wake-up.

What The Interviewer Is Testing

  • Do you know retention needs a second, always-on supply?
  • Can you write the 1801-2015 form and read the legacy one?

Follow-up Question & Model Response

"Why not retain every register in PD_COP?"

Candidate Model Response: Each retention flop is bigger than a plain flop and leaks from the always-on supply for the whole off period. Most state can be rebuilt by reset or reloaded by software faster than you think. Retain only what software cannot cheaply rebuild, such as the program counter and interrupt state. Leaving -elements out retains everything, which is rarely what you want.

Practical Example

Design Scenario: (illustrative; RET_DFF_X1 is an illustrative cell name) PD_COP has 12,000 flops but only 300 hold state that software cannot rebuild: reg1, pc and int_state. PD_COP_RET retains just those, mapped to RET_DFF_X1 with its shadow latch on SS_AON at 1.0 V. When VDD1p0_SW turns off, only the 300 shadow latches leak. U_PC pulses SAVE high before shutdown and NRESTORE low after the rail is back.

Low-Power & UPF Handbook

Read the complete low-power guide library covering power domains, level shifters, isolation clamps, state retention, and UPF signoff verification.

Offline PDF Bundle

Want all 1109 questions offline?

Get the complete 4-book PDF bundle (PnR, STA, MMMC, Low Power) with a clickable table of contents - no ads, no internet needed.

See what's inside the bundle
Low-Power VLSI & UPF Handbook โ€” nine chaptersLow-Power & UPFDomains, isolation, retention, and multivoltage UPF.