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
Parameter | Type | Description |
---|
powerunit | string | Specifies 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.
|
frequnit | string | Specifies 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.
|
opmode | string | Specifies 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).
|
opcond | string | Specifies 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.
|
toggle | boolean | Specifies 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 Type | Description |
---|
None | None |
Error Codes
Error Code | Description |
---|
None | Parameter 'powerunit' has illegal value. |
None | powerunit: Invalid argument value: 'value' (expecting W, mW or uW). |
None | frequnit: Invalid argument value: 'value' (expecting Hz, KHz or MHz). |
None | opmode: Invalid argument value: 'value' (expecting Active, Static or Flash*Freeze). |
None | opcond: Invalid argument value: 'value' (expecting Best, Typical or Worst). |
None | toggle: 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}