set_switching_activity - 2024.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2024-11-13
Version
2024.2 English

Set switching activity on specified objects or default types

Syntax

set_switching_activity [‑toggle_rate <arg>] [‑default_toggle_rate <arg>]
    [‑type <args>] [‑all] [‑static_probability <arg>]
    [‑default_static_probability <arg>] [‑signal_rate <arg>] [‑hier]
    [‑deassert_resets] [‑quiet] [‑verbose] [<objects>...]

Usage

Name Description
[-toggle_rate] Toggle rate (%) is the rate at which the output of synchronous logic element switches compared to a given clock input. It is modeled as a percentage between 0 - 200%. A toggle rate of 100% means that on average the output toggles once during every clock cycle, changing on either the rising or falling clock edges, and making the effective output signal frequency half of the clock frequency. Default: 0.0
[-default_toggle_rate] The default toggle rate to be used in power analysis on the primary inputs of the design. The default toggle rate is set on those primary input nets whose switching activity is not specified by the user, simulation data or constraints of the design. Valid values are: 0 <= value < 200. The default value is 12.5. Default: 12.5
[-type] Specify nodes in a specific category. List of valid type values: io_output, io_bidir_enable, register, lut_ram, lut, dsp, bram_enable, bram_wr_enable, gt_txdata, gt_rxdata.
[-all] Used together with -type, set switching activity on -type nets within an instance
[-static_probability] Static probability value: 0 <= Value <= 1 Default: 0.5
[-default_static_probability] The default static probability to be used in power analysis on the design. The default static probability is set on those primary inputs whose switching activity is not specified by the user, simulation data or constraints of the design. Valid values are: 0 <= Value <= 1. The default value is 0.5. Default: 0.5
[-signal_rate] The number of times an element changed state (high-to-low and low-to-high) per second. Xilinx tools express this as millions of transitions per second (Mtr/s). Default: 0.0
[-hier] Hierarchically sets the switching activity on a hierarchical instance provided via <objects> option. This option should be used only with <objects> option
[-deassert_resets] A switch to elegantly auto deassert all set,reset,preset and clear signals that do not have conflicted polarities
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
[<objects>] Objects to set switching activity on

Categories

XDC, Power

Description

Sets the signal rate and the switching probability to be used when performing power estimation on the current synthesized or implemented design. These include simple signal rate and simple static probability on nets, ports, and pins; and state dependent static probabilities on cells.

Note: This command operates silently and does not return direct feedback of its operation.

The switching activity of a design affects both the static and dynamic power consumption. The static power is often dependent on logic state transitions, and the dynamic power is directly proportional to the toggle rate.

The set_switching_activity command can be used to specify default activity rates for the whole design, or to define the activity of one or more signals in the design or on a specified module.

The current switching activity attributes can be found by using the report_switching_activity command. The values can be set to their default values by using the reset_switching_activity command.

Note: The reset_switching_activity is used to reset switching activity for specified objects. Use the set_switching_activity -default_toggle_rate or -default_static_probability to change or reset these values.

Arguments

-toggle_rate <value> - (Optional) Specify the toggle rate (%) as the switching rate of the output of synchronous logic elements compared to a given clock input. The toggle rate is specified as a percentage between 0 - 100%. For clock and DDR signals only, the toggle rate can be specified up to 200%. A toggle rate of 100% means that on average the output toggles once during every clock cycle, changing on either the rising or falling clock edges, and making the effective output signal frequency half of the clock frequency. The default <value> is 12.5% of the clock frequency, as defined by the -default_toggle_rate option.

Note: This option must be specified with -static_probability.

-default_toggle_rate <rate> - (Optional) The default toggle rate to be used in power analysis on the primary inputs of the current design. The default toggle rate is set on the primary input nets whose switching activity is not specified by the user, simulation data, or constraints of the design. On asynchronous inputs the toggle rate is set with respect to the highest clock in the design. Valid values are: 0 <= value < 200. The default value is 12.5.

Note: This option cannot be specified with <objects> as it specifies the default toggle rate for the entire design.

-type <arg> - (Optional) The type of logic entity that the specified set_switching_activity command can be applied to. By default, the command is applied to the top-level of the current design, or to the specified <objects>. The -type option applies the command settings to the specified type of logic objects in the top-level of the current design. The -all option or -hier option can be used to modify the scope of objects the command applies to. Valid logic types include:

  • io_output - Primary outputs.
  • io_bidir_enable - Enable pin of Bidir ports.
  • register - All register outputs in the design/hierarchy specified.
  • lut - All LUT outputs in the design/hierarchy specified.
  • lut_ram - All distributed ram outputs in the design/hierarchy specified.
  • dsp - All DSP outputs in the design/hierarchy specified.
  • bram_enable - Enable pins (ENARDEN/ENBWREN) of Block RAMs.
  • bram_wr_enable - Write enables of Block RAMs (WEA/WEBWE).
  • gt_txdata - Output TX data pins of all GTs.
  • gt_rxdata - Output RX data pins of all GTs.
Note: The -type option is only valid for use when setting the -toggle_rate or the -signal_rate, and other settings are not supported.

-all - (Optional) Must be used with -type to set the switching activity on all instances in the design of the specified type of logic objects. As a default the set_switching_activity command applies to the top-level of the design or current_instance, or to the specified type of objects in that level.

-static_probability <value> - (Optional) The static switching probability for the specified <objects> to be used in power analysis. Valid values are 0 <= <value> <= 1. The default value is 0.5.

-default_static_probability <value> - (Optional) The default static probability to be used in power analysis on the current design. The default static probability is set on primary inputs whose switching activity is not specified by the user, simulation data, or constraints of the design. Valid values are 0 <= value <= 1. The default value is 0.5.

Note: This option cannot be specified with <objects> as it defines the default for the entire design. Use -static_probability to define the <value> for specific objects.

-signal_rate <value> - (Optional) The signal frequency to be used for analysis, expressed as millions of transitions per second (Mtr/s). Specifies the number of times an element changes state per second, including transitions from low-to-high and from high-to-low. The default value is 0.

Note: Must be specified with -static_probability.

-hier - (Optional) Apply the switching activity hierarchically to signals in the specified hierarchical <objects>. Without -hier, the switching activity is applied to the specified <objects>, or -type of objects at the current level of the hierarchy.

-deassert_resets - (Optional) Directs the Vivado™ tool to automatically de-assert all reset-type control signals (Set, Preset, Reset, Clear), by setting the signal static probability to 0. The tool will only de-assert control signals with non-conflicting polarities. However, if a net is connected to an active-Low and an active-High Reset pin for instance, then it will not de-assert this signal; or if a net is connected to an active-High Reset, and an active-High Set, or Enable pin, then it will not de-assert this signal.

-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

<objects> - (Optional) A list of port, pin, and net objects to which the switching activity constraint should be applied; or a list of cells when specified with -type to define logic objects.

Examples

The following example specifies a signal rate and switching probability for all ports, then reports the switching attributes for those ports:

set_switching_activity -signal_rate 55 -static_probability .33 [get_ports]
report_switching_activity [get_ports]

The following example specifies the default switching probability for the current design:

set_switching_activity -default_static_probability .75

This example sets the specified toggle rate and static probability on all registers in the hierarchy of "CPU/MEM":

set_switching_activity -type register -toggle_rate 0.4 \
   -static_probability 0.5 [get_cells CPU/MEM]

This example sets the specified toggle rate and static probability on all registers in the hierarchy of "CPU/" and underneath hierarchy:

set_switching_activity -type register -toggle_rate 0.4
   -static_probability 0.5 -hier [get_cells CPU]