How do you create a power switch with create_power_switch, and what are its input/output/ control ports?
From PDVerse Low-Power Physical Design Mentor Guide · pdVerse Mentor Guide
Explanation
create_power_switch declares a virtual (abstract) power-switch instance within a domain's scope. It gates an always-on input supply through to a switched output supply under the direction of one or more control signals, optionally with an acknowledge handshake confirming the switch has settled.
Implementation Walkthrough
Basic form: create_power_switch -domain -output_supply_port {port net} -input_supply_port {port net} -control_port {port net} on_state {name supply_net expr} -off_state {name expr}, optionally adding -control_sense high -ack_port {SLEEPO PWRCTL_ACK} -ack_delay {SLEEPO 1}. Mychip's real switch is: create_power_switch PD_COP_SW domain PD_COP -input_supply_port {VDDG VDD1p0} -output_supply_port {VDD VDD1p0_SW} -control_port {SLEEP U_PC/PSE} -ack_port {SLEEPOUT U_PC/PSE_ACK} -ack_delay {SLEEPOUT 10} -on_state {SW_on VDDG !SLEEP} -off_state {SW_off SLEEP}.
Command
create_power_switch PD_COP_SW -domain PD_COP -input_supply_port {VDDG
VDD1p0} -output_supply_port {VDD VDD1p0_SW} -control_port {SLEEP U_PC/
PSE} -ack_port {SLEEPOUT U_PC/PSE_ACK} -ack_delay {SLEEPOUT 10} on_state {SW_on VDDG !SLEEP} -off_state {SW_off SLEEP}Switch-by-switch
-domain: the domain hosting the switch; -input_supply_port {port
net}: a switch-internal input port bound to an always-on supply net;
-output_supply_port {port net}: the switched output port/net that
becomes the domain's actual switched rail; -control_port {port net}:
the sleep/enable control input, bound to a control net; -ack_port
{port net}: an acknowledge output signaling the switch has settled;
-ack_delay {port delay}: the modeled delay before the ack becomes
valid; -on_state {name supply_net expr}: names the on condition,
which input supply feeds through, and the boolean expression (e.g. !
SLEEP) required; -off_state {name expr}: names the off condition and
its boolean expression.Expected Tool Behavior
An abstract switch object is declared, queryable via query_power_switch, and later mapped to a real library cell with map_power_switch; the output_supply_port net becomes the domain's switched primary power net referenced in set_domain_supply_net.
Example
PD_COP_SW in Mychip switches VDD1p0 (always-on input, port VDDG) to VDD1p0_SW (switched output, port VDD), controlled by U_PC/PSE with acknowledge U_PC/PSE_ACK.
Common Mistake
Creating the abstract switch but never calling map_power_switch afterward -- the switch remains an unmapped virtual/GTECH construct with no real silicon implementation.
Likely Error Or Warning
A simple (non-hierarchical) name is required for the switch unless set_app_options -name mv.upf.input_enforce_simple_names -value false is set.
Debugging Approach
Use query_power_switch / query_map_power_switch to inspect the declared switch and any library-cell mapping applied to it.
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.
Continue practising