21.9.16 smartpower_import_vcd

Description

This Tcl command imports into SmartPower a VCD file generated by a simulation tool. SmartPower extracts the frequency and probability information from the VCD.

Note: SmartPower stops importing VCD in Static mode as now VCD basically contains signal transitions and Static mode means that the device is off. VCD file generation refer to the simulation related help in libero user guide.
import_vcd -file {VCD file} \
           [-opmode {mode name}] \
           [-with_vectorless {TRUE | FALSE}] \
           [-partial_parse {TRUE | FALSE}] \
           [-start_time {decimal value}] \
           [-end_time {decimalvalue}] \
           [-auto_detect_top_level_name {TRUE | FALSE}] \
           [-top_level_name {top level name}] \
           [-glitch_filtering {false | auto | true}] \
           [-glitch_threshold {integer value}] \
           [-stop_time {decimal value}]

Arguments

Parameter Type Description
file string Absolute path to a VCD file. Value must be a file path. This parameter is mandatory.
opmode string Operating mode in which the VCD will be imported. Operating mode name "Active" by default. If the mode doesn't exist, it will be created. Value must be a string. This parameter is optional.
with_vectorless boolean Specify the method to set the frequency and probability information for signals not annotated by the VCD TRUE(default): use the vectorless analysis, FALSE: use average value computed from the VCD. Value must be a boolean. This parameter is optional.
partial_parse boolean Enable partial parsing of the VCD. Specify the Smart time and End time to partially parse the VCD file. Start time and End time need to be specified when TRUE. Value must be one of TRUE, 1, true, FALSE, 0 or false. By default is FALSE. This parameter is optional.
start_time decimal Specify the starting timestamp of the VCD extraction in ns. It must be lower than the specified end_time. It must be lower than the last timestamp in the VCD file. Value must be a positive decimal nanoseconds(ns). This parameter is optional.
end_time decimal Specify the end timestamp of the VCD extraction in ns. It must be higher than the specified start_time. Value must be a positive decimal nanoseconds(ns). This parameter is optional.
auto_detect_top_level_name boolean Enable the auto detection of the top level name in the VCD file. Top_level_name needs to be specified when FALSE. Value must be a boolean. By default is TRUE. This parameter is optional.
top_level_name string Specify the full hierarchical name of the instance of the design in the VCD file. Value must be a string. This parameter is optional.
glitch_filtering string Enable to filter pulses of short duration by specifying automatic glitch filtering or by specifying vlaue to the filtering threshold. This parameter is optional. Value must be on of the following:
  • AUTO - Enable glitch filtering with predefined threshold based on the family.
  • TRUE - Enable glitch filtering, glitch_threshold must be specified.
  • FALSE - Disable glitch filtering.
glitch_threshold integer Specify the threshold in ps below which glitches are filtered out. Value must be a positive integer. This parameter is optional.
Return Type Description
None None

Error Codes

Error Code Description
None Required parameter 'file' is missing.
None Mode "Static" is not active, please specify an active mode.
None opmode: Invalid argument value: 'mode_name' (expecting Active or Static).
None partial_parse: Invalid argument value: 'value' (expecting TRUE, 1, true, FALSE, 0 or false)
None start_time: Invalid argument value: 'time_value' (expecting decimal value).
None Parameter 'start_time' must be a positive decimal value.
None end_time: Invalid argument value: 'time_value' (expecting decimal value).
None Parameter 'end_time' must be a positive decimal value.
None Parameter 'param_name' is not defined. Valid command formatting is 'smartpower_import_vcd [-format "file format"] \ -file "VCD file" \ [-opmode "mode name"] \ [-with_vectorless "TRUE | FALSE"] \ [-partial_parse "TRUE | FALSE"] \ [-start_time "decimal value"] \ [-end_time "decimal value"] \ [-auto_detect_top_level_name "TRUE | FALSE"] \ [-top_level_name "top level name"] \ [-glitch_filtering "false | auto | true"] \ [-glitch_threshold "integer value"] \ [-stop_time {decimal value}]'

Supported Families

PolarFire®
SmartFusion® 2
RTG4™
IGLOO® 2
PolarFire SoC

Example

The Tcl command imports the power.vcd file generated by the simulator into SmartPower:

smartpower_import_vcd -file {/home/example/simulation/power.vcd}

The Tcl command extracts information between 1ms and 2ms in the simulation, and stores the information into a custom mode:

smartpower_import_vcd -file {/home/example/simulation/power.vcd} -partial_parse {TRUE} -start_time {1000000} -end_time {2000000} -opmode {power_1ms_to_2ms}