
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 BRAMs.

   *  bram_wr_enable - Write enables of BRAMs (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] 
    

See Also:

   *  get_clocks
   *  get_nets
   *  get_ports
   *  power_opt_design
   *  report_power
   *  report_switching_activity
   *  reset_switching_activity
