21.9.48 smartpower_set_preference

Description

This Tcl command sets the following preferences: power unit, frequency unit, operating mode, operating conditions, and toggle. These preferences can also be set from the preferences dialog box.

Note: Running the script with invalid argument it will trigger a warning message: Ignoring invalid argument 'argname'.
smartpower_set_preference [-powerunit "W | mW | uW"] \
                          [-frequnit "Hz | KHz | MHz"] \
                          [-opcond "Best | Typical | Worst"] \
                          [-opmode "Active | Static"] \
                          [-toggle "TRUE | FALSE"]

Arguments

ParameterTypeDescription
powerunitstringSpecifies the unit in which power is set. The acceptable values for this argument are the following:
  • W - The power unit is set to watts.
  • mW - The power unit is set to milliwatts.
  • uW - The power unit is set to microwatts.
frequnitstringSpecifies the unit in which frequency is set. The acceptable values for this argument are the following:
  • H - The frequency unit is set to hertz.
  • kHz - The frequency unit is set to kilohertz.
  • MHz - The frequency unit is set to megahertz.
opmodestringSpecifies the operating mode. The acceptable values for this argument are the following:
  • active - The operating mode is set to active.
  • static - The operating mode is set to static.
  • Flash*Freeze - The operating mode is set to Flash*Freeze (RTG4, SmartFusion 2 and IGLOO 2).
opcondstringSpecifies the operating condition. The acceptable values for this argument are the following:
  • worst - The operating condition is set to worst-case.
  • typical - The operating condition is set to typical case.
  • best - The operating condition is set to best case.
togglebooleanSpecifies the toggle. The acceptable values for this argument are the following:
  • TRUE, true or 1 - The toggle is set to true.
  • FALSE, false or 0 - The toggle is set to false.
Return TypeDescription
NoneNone

Error Codes

Error CodeDescription
NoneParameter 'powerunit' has illegal value.
Nonepowerunit: Invalid argument value: 'value' (expecting W, mW or uW).
Nonefrequnit: Invalid argument value: 'value' (expecting Hz, KHz or MHz).
Noneopmode: Invalid argument value: 'value' (expecting Active, Static or Flash*Freeze).
Noneopcond: Invalid argument value: 'value' (expecting Best, Typical or Worst).
Nonetoggle: Invalid argument value: 'value' (expecting TRUE, 1, true, FALSE, 0 or false).

Supported Families

PolarFire®
SmartFusion® 2
RTG4™
IGLOO® 2

Example

This example sets the frequency of the power unit to "watts", the frequency unit to "Hz", the operating mode to "active", the operating condition to "typical", and the toggle to "true":

smartpower_set_preference -powerunit {w} \
                              -frequnit {hz} \
                              -opmode {active} \
                              -opcond{typical} \
                              -toggle {true}