IntermediateQuestion 10 of 20Source PDF page 64

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

From PDVerse Low-Power Physical Design Mentor Guide · pdVerse Mentor Guide

Explanation

set_retention declares which state elements (typically flip-flops) in a domain need retention hardware, and which dedicated always-on retention power/ground net backs the save-latch so their contents survive while the domain's primary supply is off.

Implementation Walkthrough

The general form: set_retention -domain -retention_power_net retention_ground_net [-elements {list}]. Mychip's PD_COP_RET uses the always-on VDD1p0 as its retention_power_net and restricts the strategy to specific registers: -elements {U_COP/reg1 U_COP/pc U_COP/int_state}.

Command

set_retention PD_COP_RET -domain PD_COP -retention_power_net VDD1p0 elements {U_COP/reg1 U_COP/pc U_COP/int_state}

Switch-by-switch

-domain: the domain the strategy applies to; -retention_power_net / -retention_ground_net: the always-on backup supply keeping the savelatch alive during shutdown; -elements: restricts the strategy to specific state elements rather than every flop in the domain. A fuller syntax adds -exclude_elements, -retention_supply (a supplyset based alternative), -no_retention, -save_condition/restore_condition/-retention_condition, -update, use_retention_as_primary, and -applies_to {flop|latch|any}.

Expected Tool Behavior

create_mv_cells maps the selected flops to retention-capable library cells (via map_retention_cell), wiring them to the retention power/ ground net in addition to the domain's normal primary supply.

Example

PD_COP_RET in Mychip retains U_COP/reg1, U_COP/pc, and U_COP/ int_state on the always-on VDD1p0 rail while PD_COP's primary rail VDD1p0_SW is switched off.

Common Mistake

Using the domain's own switched primary net as the retention power net instead of an always-on net -- this removes power from the save-latch at exactly the moment it needs to hold state.

Likely Error Or Warning

set_retention_elements requires retaining ALL elements in a declared critical list, or none -- a partial match is treated as an error. Separately, an explicit UPF-013 error occurs when updating a retention strategy's -applies_to after compile_fusion has already run, or when changing an already-used -applies_to to a different value.

Debugging Approach

Run report_mv_cells -retention (and -retention_clamp for zero-pinstyle cells) to confirm which cells were actually inferred/mapped as retention cells.

Visual explanationLow-power context: How do you write a retention strategy with set_retention, and what supplies…
Low-power context: How do you write a retention strategy with set_retention, and what supplies…A three-step concept map summarizes the focus, core answer, and practical verification for How do you write a retention strategy with set_retention, and what supplies does it need?Question focusHow do you write aretention strategy withset_retention, and whatsupplies…Core answerset_retention declareswhich state elements(typically flip-flops)in a domain need…Verify in practiceset_retention PD_COP_RET-domain PD_COP-retention_power_netVDD1p0 elements…Understand → explain the mechanism → verify the assumptions

Continue learning free

Get a practical low-power chapter

Receive the existing “Low Power and Multivoltage Fundamentals” PDF chapter and its download link by email.