UPF command syntax

In this article, we will discuss about few important UPF command syntax that is used here to write an UPF for a given power intent.

create_power_switch

It is used to define a switch required in a gated power domain.

Syntax:

create_power_switch switch_name
– domain domain_name
– input_supply_port port_name supply_net_name
– output_supply_port port_name supply_net_name
– control_port port_name net_name
– on_state state_name input_supply_port {Boolean_function}

Argument Brief Description
switch_name It is just the switch name, thus the user can give any name.
– domain domain_name The domain containing the switch.
– input_supply_port port_name  supply_net_name The input supply port of the switch and the net where this port is connected.
– output_supply_port port_name  supply_net_name The output supply port of the switch and the net where this port is connected.
– control_port port_name  net_name The control port of the switch and the net where this port is connected.
– on_state state_name  input_supply_port  {Boolean_function} A user defined state, the input supply port for which this is defined and the corresponding Boolean function.

set_isolation

It is used to specify the elements in the domain to isolate using the specified strategy. You can check here, why we need isolation.

Syntax:

set_isolation isolation_name
– domain domain_name
– isolation power_net net_name | isolation_ground_net net_name | isolation_power_net net_name -isolation_ground_net net_name | no_isolation
– elements list
– clamp_value < 0 | 1 | latch | Z >
– applies_to < inputs | outputs | both >

Argument Brief Description
isolation_name It is just the isolation strategy name, thus the user can give any name.
– domain domain_name The domain where the strategy is applied.
– isolation power_net net_name | isolation_ground_net net_name | isolation_power_net net_name -isolation_ground_net net_name | no_isolation The supply net(s) used to supply the isolation logic inferred by this isolation strategy.
– elements list A list of ports/nets to which strategy is applied.
– clamp_value < 0 | 1 | latch | Z > The value to which the ports mentioned in the list will be clamped.
Default is 0.
– applies_to < inputs | outputs | both > Whether the domain’s input ports or output ports or both are isolated.
Default is outputs.

set_isolation_control

It is used to specify the control signals for a previously defined isolation strategy.

Syntax:

set_isolation_control isolation_name
– domain domain_name
– isolation_signal signal_name
– isolation_sense < high | low >
– isolation < self | parent | sibling | fanout | automatic >

Argument Brief Description
isolation_name Correponding isolation strategy name.
– domain domain_name The domain where the strategy is applied.
– isolation_signal signal_name The control signal that causes the specified element to drive its clamp value.
– isolation_sense < high | low > It specified whether the isolation is enabled when the isolation control signal is high or low.
– isolation < self | parent | sibling | fanout | automatic > Where the isolation cells are placed in the logic hierarchy.
Default is automatic.

set_level_shifter

It is used to specify a level shifter strategy for signals crossing from one voltage domain to another. You can check here why we need level shifters.

Syntax:

set_level_shifter level_shifter_name
– domain domain_name
– elements list
– applies_to < inputs | outputs | both >
– threshold value
– rule < low_to_high | high_to_low | both >
– location < self | parent | sibling | fanout | automatic >

Argument Brief Description
level_shifter_name It is just the level shifter strategy name, thus the user can give any name.
– domain domain_name The domain where the strategy is applied.
– elements list A list of ports/nets to which strategy is applied.
– applies_to < inputs | outputs | both > Whether the domain’s input ports, output ports, or both are level shifted.
Default is both.
– threshold value The voltage (V) threshold for determining when level shifters are required.
Default is 0.
– rule < low_to_high | high_to_low | both > Which type of level shifters are required.
Default is both.
– isolation < self | parent | sibling | fanout | automatic > Where the level shifter is placed in the logic hierarchy.
Default is automatic.

set_retention

It is used to specify the elements in the domain to retain its value when power is gated.

Syntax:

set_retention retention_name
– domain domain_name
– retention_power_net net_name
– retention_ground_net net_name
– elements list

Argument Brief Description
retention_name It is just the retention strategy name, thus the user can give any name.
– domain domain_name The domain where the strategy is applied.
– retention_power_net net_name The supply net used to supply the retention logic inferred by this retention strategy.
– retention_ground_net net_name The ground net used to supply the retention logic inferred by this retention strategy.
– elements list A list of registers to which strategy is applied.

set_retention_control

It is used to specify the control signals for a previously defined retention strategy.

Syntax:

set_retention_control retention_name
– domain domain_name
– save_signal signal < high | low >
– restore_signal signal < high | low >

Argument Brief Description
retention_name Corresponding retention strategy name.
– domain domain_name The domain where the strategy is applied.
– save_signal signal < high | low > The control signal that causes the register to save its state before power is gated. And if it is an active low or active high signal.
– restore_signal signal < high | low > The control signal that causes the register to restore its saved state after power is back. And if it is an active low or active high signal.

NOTE: Normally the save_signal and restore_signal is same but with different active levels. This same signal is connected to the SLEEP port of the retention cell, discussed here.

add_port_state

It is used specify the value the supply nets or ports can take on. These values are referred to as port states.

Syntax:

add_port_state port_name
– state(s) {name   < voltage | off >}

Argument Brief Description
port_name The name of the already defined port, whose state(s) we are specifying.
– state(s) {name < voltage | off >} User defined state name(s) and its value.

create_pst

It is used to create a power state table with a specific ordering of supply nets. Power state table basically defines the combination of states that can exist at the same time during operation of the design.

Syntax:

create_pst table_name
– supplies list

Argument Brief Description
table_name User defined power state table name.
– supplies list The list of supply nets or ports to include in each power state of the design.

add_pst_state

It is used to define the states of each of the supply nets for one possible state of the design.

Syntax:

add_pst_state state_name
– pst table_name
– state supply_states

Argument Brief Description
state_name User defined power state name.
– pst table_name The power state table to which this state applies.
– state supply_states The list of supply nets state names [defined in add_port_state command], listed in same order as that of -supplies listed in the create_pst command.