Powerartist: Quick Start Guide
Powerartist: Quick Start Guide
Command-Line Flow 2
3
4
Quick Start Guide 5
Disclaimer
Apache Design, Inc. makes no warranty of any kind, expressed or implied, with
respect to software or documentation, its quality, or performance. The information
in this document is subject to change without notice and does not represent a
commitment on the part of Apache Design, Inc.
Main: 408.457.2000
Fax: 408.428.9569
[email protected]
[email protected]
www.apache-da.com
Introduction
This Quick Start Guide focuses on the PowerArtist command-line flow, which is
designed to allow you to specify all inputs and commands in a single Tcl command
file. This method is good for new users to learn the tool and for expert users to set-
up batch runs.
To get started, it is recommended that you use the Tcl command-line flow templates
in the following PowerArtist installation area:
$POWERTHEATER_ROOT/examples/command_files
You can also use the scripts for the tutorials in the following location:
$POWERTHEATER_ROOT/tutorial/analysis
or
$POWERTHEATER_ROOT/tutorial/reduction
You can use these templates as a starting point when setting up PowerArtist on a
new design. The Elaborate and CalculatePower commands are two typical
commands that you would use in a PowerArtist command file. For example:
CalculatePower -average_report_file design.rpt
Alternatively, you could specify the options to a few of the total command set
implemented by PowerArtist using the pt_set command, which is similar to the Tcl
“set” command. For example, you could specify the following command combination:
pt_set average_report_file design.rpt
CalculatePower
> ptshell
ptshell % source run_Analysis_setup.tcl
ptshell % Elaborate
Specify a Tcl script, containing all commands and options, using the -tcl option on
the ptshell command line.
For example, for power analysis you could specify the following:
ptshell -tcl run_Analysis.tcl
To run power reduction and RTL rewrite, you also need to specify the -artist
option:
ptshell -artist -tcl run_Reduction.tcl
global env
AddLibrary SYNOPSYS ww_synopsys
AddLibrary STD ww_std
AddLibrary IEEE ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/standard_93.vhd \
-93 yes -library ww_std
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/std_1164.vhd \
-93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/syn_arit.vhd \
-93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/syn_unsi.vhd \
-93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/syn_textio.vhd \
-93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/syn_attr.vhd \
-93 yes -library ww_synopsys
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/syn_misc.vhd \
-93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src numeric_bit.vhd \
-93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/ \
numeric_std.vhd\ -93 yes -library ww_ieee
CompileFile -type vhdl -file $env(POWERTHEATER_ROOT)/pthdl_src/timing_p.vhd \
-93 yes -library ww_ieee
For Verilog designs, the common way of specifying Verilog files is to specify a
start-up file (that contains a list of Verilog files) using the following command-line
option:
-verilog_startup_file file_name
Example
-verilog_startup_file top.vc
Sample Verilog Start up File
+incdir+../rtl/include
+define+SYNTHESIS
../rtl/top.v
-y ../verilog_dir
-v cell.v
Specify the name of the scenario file to be created using the following option:
-scenario_file scn_file_name
If you have a gate-level design, specify a gate-level netlist using the following
option:
-gate_level_netlist true
Write the power database by specifying the following option:
-elaborate_write_power_db true
Specify the name for the log file for the Elaborate run using the following option:
-elaborate_log Elaborate.log
Elaborate \
-elaborate_write_power_db true \
-elaborate_log ElaborateBatch.log \
-power_db_name Batch.pdb \
-scenario_file Batch.scn \
-top txrx \
-verilog_2001 true \
-verilog_startup_file txrx.vc
When you see this warning, you must carefully examine the cause of the missing
instances. Using an activity file with poor activity coverage may not give realistic
power numbers. PowerArtist can propagate activity through such instances
missing activity data. If you are convinced you can use activity propagation
through these instances to calculate power, then specify the following option:
-mixed_sim_prob_estimation true
Here, the vector analysis traces the average frequency of the defined instance
groups.
GenerateActivityWaveforms \
-activity_file ../design_data/rtl_sim/activities.vcd \
-activity_waveform_group_list { top core pci rxchan txchan } \
-activity_waveform_graph_type frequency_per_interval \
-activity_waveform_interval_size 15160ps \
-activity_waveform_number_of_intervals 400 \
-activity_waveform_start_time 6014730ps \
-fsdb_output_file top_activity.fsdb \
-activity_waveform_log GenerateActivityWaveforms.log \
-scenario_file top.scn \
-top_instance txrx_tst.top1
Mixed-Vt Setup
If you want to run a mixed-Vt power analysis, do the following setup before running
the CalculatePower command.
Specify the libraries that you want to use for cell selection:
SetLibrary -instance inst_name(s) -library lib_name(s)
Example
SetLibrary -instance top -library {hvt_library lvt_library}
Note that you must specify the logical library name, which is specified in the .libs
using library() attribute.
Classify cells into different Vt types:
Cells are placed into different Vt categories in the .lib using the following
attributes:
— At the library level:
default_threshold_voltage_group : "string" ;
— At the cell level:
threshold_voltage_group : "string" ;
The string value specifies the voltage threshold type.
If the .libs do not contain these attributes, categorize the cells using the
SetVoltageThreshold command.
SetVoltageThreshold -group threshold_group -pattern cell_pattern_list
Example
SetVoltageThreshold -group LVT -pattern { *_TL1 *_TL2 }
SetVoltageThreshold -group HVT -pattern { *_TH }
Specify the mixed-vt percentage for cell selection using the SetVT command:
SetVT -mode percentage -instance {instance_list}
-vt_group {threshold_group_list}
Example
SetVT -mode percentage -instance {top.block1 top.block2} -vt_group
{HVT:70 LVT:30}
4. A default wire load model shipped with PowerArtist (also covered in the User
Guide)
You must specify a GAF file when running either an average power analysis or
power reduction. The GAF file is an intermediate file generated when the activity
file is parsed. This allows you to run multiple power analysis and reductions
without the runtime overhead of parsing the simulation file again. The GAF file
contains average frequency information for all named nets and power arcs in the
design.
To use a GAF generated by a previous run, specify the following option:
-use_existing_gaf true
To specify the name of the scenario file you created when you elaborated the
design, use the following option:
-scenario_file scn_file_name
To specify start and finish times for the simulation window for the average analysis
use the following options:
-start_time time
-finish_time time
The time values need to be an integer that can be in any of these units: fs, ps, ns,
us, ms and s.
Example
-start_time 10us
-finish_time 11us
You can identify the start_time and finish_time by looking at the activity-over-time
waveform generated using vector analysis.
To control the output of the report file for an average analysis, use the following
option:
-average_report_options options
Commonly used reporting options include:
0—prints net switching power (internal load power) in a separate section
p—reports power for all hierarchical parent instances
c—reports power due to register clock pin switching in the “Clock Power” section.
By default, it is reported as part of the register power.
g—reports frequencies of named nets
a—reports area information
V—reports power per supply
Note that you can specify a concatenated list of options to the -
average_report_options option
-average_report_options 0pg
To specify the average power report file name, use the following option:
-average_report_file report_file_name
To have PowerArtist write out a power database (PDB) file, use the following
option:
-average_power_db true
To specify the name of the power database (PDB) file, use the following option:
-power_db_name name.pdb
The default pdb name is top_level_model.pdb.
To run gate-level power analysis in high effort mode (arc-based mode)—which
produces higher accuracy with longer run times—specify the following option:
-arc_based_estimation true
In pin-based estimation, accuracy is compromised by about 5%, but it provides
better performance.
To specify the log file name for your average run, use the following option:
-calculate_log calculate_average.log
To specify the active clock edge which defines the start point of first interval, use
the following option:
-active_edge (positive | negative | auto
To specify the number of clock cycles that constitute an interval, use the following
option:
-num_clock_cycles integer
The following options are required to setup power-per-interval analysis for a gate-
level design:
To specify a gate level netlist use the following option:
-gate_level_netlist true
To specify the interval size in time units, use the following option:
-interval_size float
Specify the instances that you want to monitor for flop clock activity:
MonitorToggleInstances -instance instance_name(s)
Add the following option to your CalculatePower command:
-flop_clock_activity file_name_prefix
This option specifies a prefix for the flop clock activity output files. The prefix “fca”
is commonly used.
As you would for any time-based run, be sure to specify the -num_clock_cycles and
-reference_clock_name options to CalculatePower as well.
You must specify this command before the ReducePower command in your script.
Specify the minimum bit-width of a candidate register for the Prism PowerBot
using the following command:
SetDatapathWidth width
The default minimum bit width is 8. You must specify this command before the
ReducePower command in your script.
To run power reduction, you need to specify the ReducePower command with the
appropriate options. The following list provides the options that are most commonly
used.
To specify the class of reductions you want to run, use the following option:
-reduction_classes all | linter | logic | memory | clock
ReducePower \
-activity_file ../design_data/rtl_sim/txrx_sleep.vcd.gz \
-reduction_report_file Batch.srpt \
-reduction_overwrite_power_db true \
-default_output_load 3.9e-11 \
-finish_time 12135580ps \
-gaf_file Batch.gaf \
-reduction_log ReducePowerBatch.log \
-power_db_name Batch.pdb \
-save_clock_trees_netlist true \
-scenario_file Batch.scn \
-start_time 6071580ps \
-top_instance txrx_tst.top1 \
-wireload_library hvt \
RewriteRTL \
-elaborate_write_power_db true \
-rewrite_log RTLRewriteBatch.log \
-output_rtl_dir_name ./rewrite.Batch \
-power_db_name $design.Batch.pdb \
-rewrite_report_file rewriteBatch.rpt \
-top txrx_tst.top1 \
-verilog_2001 true \
-verilog_startup_file txrx.vc