PowerArtistUserGuide Academic
PowerArtistUserGuide Academic
PowerArtistUserGuide Academic
2
User Guide 3
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
Table of Contents
Specifying Default Output Load Capacitance Using a Command Option .... 213
Using Back-Annotated Wiring Capacitances for Local Nets ........................ 213
Specifying Wire Load Models....................................................................... 213
Using Apache Default Wire Load Models for Capacitance Analysis ............ 216
Using PACE Technology Files During Power Analysis (Beta) ................................ 217
Using Clock Distribution Network Models .................................................... 217
Understanding Priorities and Precedence When Using PACE Models ........ 218
Using the SetClockGatingStyle Command................................................... 218
Additional Guidelines for Using PACE Models............................................. 219
Understanding Output File Changes due to PACE Models.......................... 219
Estimating Pin Capacitance .................................................................................... 220
Handling Voltages in Liberty Format ....................................................................... 221
Handling Designs with Multiple Libraries ................................................................ 221
Handling Designs with Multiple Power Supplies ..................................................... 223
Creating a Virtual Supply.............................................................................. 223
Assigning a Virtual Supply to a Hierarchical Instance .................................. 223
Liberty Power Supply Support...................................................................... 224
Running RTL Mixed-Vt Power Analysis .................................................................. 225
Critical Liberty Leakage Attributes................................................................ 225
Categorizing Cells for Multiple Vts ............................................................... 226
Default Cell Selection for Mixed-Vt Analysis ................................................ 227
Sample Mixed-Vt Flow and Tcl File .............................................................. 227
Understanding Mixed-Vt Analysis Results in the Report File ....................... 228
Setting up Clock Power Analysis ............................................................................ 229
Commands for Clock Power Analysis .......................................................... 229
How Clock Power Analysis Works ............................................................... 230
Controlling Forward Clock Tracing ............................................................... 231
Setting up Clock Gating for Power Analysis............................................................ 233
Clock Gating Flow for Power Analysis ......................................................... 233
Performing Enhanced Clock Gating ............................................................. 234
Library Modeling of Integrated Clock Cells................................................... 235
Setting up Clock Gating for Power Reduction......................................................... 235
Clock Gating Flow for Power Reduction....................................................... 235
Clock Gating Algorithm................................................................................. 236
Hierarchical Clock Gating............................................................................. 238
Inferring Buffer Trees for Nets with High Fanout .......................................... 238
Controlling the Precision of the Data in the Etcl File .................................... 435
Generating the Etcl File................................................................................ 435
Using a Name Mapped Flow ........................................................................ 436
Generating a Power-Based Etcl File ....................................................................... 438
Automatically Selecting the Highest Activity Clock Cycle............................. 438
Manually Selecting Single or Multiple Clock Cycles of Interest .................... 439
Chapter 1
Introduction
This chapter provides instructions to enable you to install the software and have
access to the PowerArtist application. You will need to perform the following three
steps:
1. Install the software on one of the supported operating systems.
2. Install and point to the appropriate licenses.
3. Set a critical environment variable to point to the installation directory.
Note that you can install multiple platform distributions in the same directory, as
further discussed in the following section.
Distribution Tree
The Apache PowerArtist distribution is organized so that executables for multiple
platforms can be installed in the same location. For example, you could install the
Linux version in the same directory as the Solaris version, with no duplication of
data. Therefore, platform-specific files are kept under directories with the following
platform-specific names:
linux—for 32-bit Linux, RHEL 4 and RHEL 5
linux-x86_64—for 64-bit Linux for Opteron, RHEL 4, RHEL 5 and SUSE 9 and 10
sunsol64—for 64-bit SunSol OS 10
Note, however, that the PATH environment variable must include the
$POWERTHEATER_ROOT/bin directory. It need not have any platform-specific
path elements, because a platform-independent script will invoke the correct
excutable.
The PowerArtist distribution consists of the following directories:
bin—contains the executables. Set your PATH to include this directory.
doc—contains the PDF documentation and the release notes.
examples—contains some user examples as well as some examples oriented
toward library developers.
lbin—contains administrative programs that you will not want in your PATH. This
includes the FLEXlm administration utilities and the PowerArtist license server.
lib—contains library files needed by the power tools.
misc—contains the source to the wwvmkr VHDL makefile program.
pthdl_src—contains VHDL source files for the IEEE, STD, Synopsys and Vital
libraries for the HDL analyzer, pthdl (run by the Elaborate command).
scripts—contains
sfl_lib—contains the SFL model file (sfl_lib.dat) and generic technology library
information.
tutorial—contains files for running both command-line and GUI-based tutorials in
PowerArtist.
vhdl_src—contains VHDL source files for the IEEE, STD, Synopsys and Vital
libraries for the legacy VHDL analyzer, wwvhdl.
PowerArtist Licensing
This section includes the procedure for installing licenses and provides information
on various licensing topics, including troubleshooting tips. Note that the software
version number (for example, 2011.1) used in the following examples will change
with every software release. Furthermore, these examples assume that you installed
the PowerArtist distribution tar kit in the /pkg directory.
/pkg/sequence/2011.1/PowerTheater/lbin/lmgrd \
-c /pkg/sequence/2011.1/PowerTheater/lib/license.dat \
-l /pkg/sequence/2011.1/PowerTheater/lbin/lmgrd.log
The first number, 2012.10, is the last supported build date for programs using this
feature. In this case, all programs built on or before October, 2012 will be allowed to
check out this feature. This is often referred to as the “maintenance end date”,
indicating that no new software built after this date will run with this license feature.
The second date, 15-feb-2012, is the last day this feature can be checked out. In this
case, no programs will be allowed to check out this feature after February 15, 2012.
This is often referred to as the expiration date.
Chapter 2
Introduction
The PowerArtist shell (ptshell) is a fully functional Tcl shell, from which all other
PowerArtist commands must be invoked. You can use any standard Tcl command
inside of this shell. When you start up the shell, you will be informed as to which
product you are running, and then receive a ptshell prompt. Once you get the
prompt, you can run any of the PowerArtist commands.
Syntax
Options
-artist
Consumes a license at the PowerArtist level. You will get a ptshell prompt with this
option.
-SOC
Consumes a license at the SOC level. You will get a ptshell prompt with this
option. This is the default. If you have no sptSOC license and you have specified
neither the -artist or -SOC options, ptshell will attempt to consume an sptArtist
license.
-cmd tcl_command
Executes the specified Tcl command and then exits with the result.
-tcl tcl_file
Sources a file containing Tcl commands and then exits with the result. These
commands may also include PowerArtist commands.
-wait
Waits for the appropriate product license to become available rather than exiting
immediately with a message indicating that a license is not available.
Example 1
ptshell
This command invokes the PowerArtist shell. At the resulting ptshell prompt, you
may type any Tcl command or PowerArtist command. This does not specify a license
level so -SOC is assumed. Therefore, you will be able to execute all PowerArtist-PT
commands. You will not, for example, be able to perform a power reduction analysis.
Example 2
ptshell -artist
This command invokes the PowerArtist shell. The -artist option allows you to run all
PowerArtist features (including power reduction analysis and RTL rewrite).
Example 3
Example 4
ptshell -artist
ptshell % source Elaborate.tcl
This series of commands does the same thing as the command in example 3. except
that you will remain in the ptshell when the Elaborate script is complete. that it does
not exit the ptshell.
Example 5
ptshell
ptshell % source ptSourceFiles.tcl
ptshell % Elaborate -scenario_file my.scn -top top -synlib_files
{mylib.lib}
ptshell % exit
When you type ptshell followed by a carriage return, you get a ptshell prompt, which
defaults to “ptshell %”. You can type a sequence of commands at this point.
Example 6
ptshell
ptshell % help command
As in example 5, when you type ptshell followed by a carriage return, you get a
ptshell prompt. You can then type “help command” at the ptshell prompt to print a list
of commands that you can use in a PowerArtist command file/Tcl script.
Example 7
Example 8
PowerArtist-PT
This is the recommended way to invoke the PowerArtist-PT PowerCanvas if you
want (or have) only the analysis capabilities of the PowerCanvas GUI.
Example 9
PowerArtist
This is the recommended way to invoke the PowerArtist PowerCanvas with full
analysis and reduction capabilities.
ptshell Features
The ptshell is a fully functional Tcl shell from which you can invoke any standard Tcl
command. In addition, ptshell supports a set of TCSH-like features for command
editing, file completion, and more. The ptshell has the following features:
Command-line help for command file commands.
— You can type “help command_name” such as “help CalculatePower”. You can
specify a partial command name with standard glob-style wild cards such as
“help Calc*” or “help *db*”.
— You can type “command_name -help” such as “Elaborate -help” in the ptshell to
get a list of options for the Elaborate command.
— You can generate an alphabetical list of all accepted PowerArtist Tcl commands
(or pt_set variables) by typing “help command” (or “help variable”) at the ptshell
prompt.
An auto-generated history file—As each PowerArtist command is executed, it is
echoed into a ptshell.history file in your current working directory. This allows you
to run Tcl programs that execute commands that are then captured in the history
file. You can then source this file (using the Tcl source command) to re-run the
exact sequence of commands.
Command/file name completion with the Tab key—the shell will expand a
command to the next unique character and provide a list of all possible
commands/file names to complete the entry.
Command-line editing—use the left and right arrows, control characters and
escape sequences to edit the current command on the command line. The
following table lists the keystroke combinations and their associated actions.
Recalling commands from history—use the up and down arrows to scroll through
commands that were previously executed in the current session. By default, 20
commands are saved in history. Use “history keep 50” to increase the history size
to 50.
An initialization file (.ini) file that allows you to customize your ptshell run (see the
next section for details).
different levels. The shell sources the .ini files in the following order (the last one
taking precedence over previously read files):
1. $POWERTHEATER_ROOT/ptshell.ini (default .ini file)
This default .ini file is read first. Further .ini files (if present) will modify the settings
in this file.
2. $HOME/ptshell.ini file, if present, is read next.
You can use this .ini file to customize the shell for you as a user.
3. $PWD/ptshell.ini file, if present, is read next.
You can use this .ini file to customize the shell for a particular run.
4. The file pointed to by the $PTSHELL_INI variable, if present, is read last.
You will typically use this .ini file to customize the shell for a particular project.
#++++++++++++++++++++++++++++++++++++
# Sample Initialization File
#++++++++++++++++++++++++++++++++++++
set ptshLogFile my_ptshell.log
set ptshKeyFile my_ptshell.key
set ptshPrompt “my_ptshell %”
#++++++++++++++++++++++++++++++++++++
Chapter 3
Introduction
This tutorial shows you how to run both average and time-based power analysis
using a batch flow and a PowerCanvas flow. It includes the following types of
analyses: full-chip, block-level, clock gating, mixed-vt, voltage_islands, power gating
and gate-level full chip. Running power analysis is a simple three-step process, as
shown by the following graphic:
Verilog/VHDL Power-Characterized
Source Libraries
Simulation
2. Run Vector Analysis GenerateActivityWaveforms
Activity
Power Database
(OADB) Power Reports
PowerCanvas
The main steps in this power analysis flow are controlled by the following commands:
Tutorial Organization
The following topics are covered in this tutorial:
Copying the PowerArtist Tutorial Files
Understanding Command File Set-Up Methods
Running an RTL Full-Chip Power Analysis Using Command Files
Viewing Power Analysis Results in the PowerCanvas
Running Full-Chip Analysis Using the PowerCanvas Wizards
Running an RTL Block-Level Power Analysis
Running Power Analysis with Clock Gating
Running a Power Analysis with a Mixed-Vt Cell Library
Running Power Analysis with Voltage Islands
Running a Power Analysis with Power Gating
Running the Full-Chip Gate-Level Power Analysis Tutorial
Understanding Power Analysis Results in the Text-Based Power Report
Summary
settings/ This file illustrates how you can establish site-wide tool
global_setting.tcl settings that are shared among users. These settings
are leveraged in all the tutorials.
For the analysis tutorials, you will need all but the /reduction directory.
full_chip Runs a full-chip RTL tutorial that shows how to run all
of the critical analyses in PowerArtist. You will be
running simulation-based analyses here.
clock_gating Shows you how to run clock gating analysis using the
full_chip design.
power_gating Shows you how to run power gating analysis using the
full-chip design.
It is recommended that you run these tutorials in the order they are listed in this
table. In addition to the tutorial sub-directories, there is also a design_data directory
that contains design data that is used by all of the analysis tutorials. It includes both
gate and RTL source files and simulation data.
This script runs the Elaborate with the -top, -elaborate_write_power_db and -
blast_regfile options specified. Alternatively, you could specify these command
options as standalone pt_set variables. You would then specify the command without
options. The following command file excerpt uses this set-up method. You would
specify these variables before the command to which they apply.
Alternative Method Sample Script
# Elaborate Design
pt_set top top
pt_set elaborate_write_power_db true
pt_set blast_regfile all
...
Elaborate
In this sample file, each of the pt_set variables specified before the Elaborate
command determine how the command will run. The Elaborate command is then
called last. Using this method, you can specify one pt_set variable that affects
multiple commands.
Note that the pt_set variable names are the same as the command options but
without the preceding dash (-), therefore, “-blast_regfile” becomes “pt_set
blast_regfile”. For a complete list of pt_set variables, see Alphabetical List of pt_set
Variables in the PowerArtist Reference Manual.
txrx.vc Verilog startup file for the full chip that tells the
HDL elaborator which Verilog files must be loaded
for your design.
As you run the tutorial, PowerArtist generates a key file and log file (both with a
“full_chip_” prefix) in your run directory. These files are useful for debugging or
recreating a previous run. For more information on these files, see Understanding
Log Files and Key Files. In addition, the ptshell prompt for this tutorial will have an
“full_chip_” prefix. Note that this .ini file overrides the default .ini file that comes
with the tarkit. For more information on the initialization file, see Customizing Your
PowerArtist Environment Using Initialization (INI) Files.
This file obtains site-wide tool settings (from the global_setting.tcl file) and reads-
in library information (from the libraries.tcl file). The libraries.tcl file contains a
series of ReadLibrary commands. Creating this type of file saves you time and
requires fewer keystrokes.
3. Open the power_aware.tcl file. This file contains different setting depending on the
type of analysis you are running. For the full-chip tutorial, this file contains clock
gating commands and MonitorInstances commands. An excerpt from this file is
shown here:
##############################################
# Clock Gating Commands
##############################################
# Instances to monitor in the design
Elaborate \
-elaborate_write_power_db true \
-elaborate_log ElaborateBatch.log \
-power_db_name $design.Batch.pdb \
-scenario_file $design.Batch.scn \
-top $design \
-verilog_2001 true \
-verilog_startup_file txrx.vc
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 6071580ps \
-fsdb_output_file top_activity.fsdb \
-log GenerateActivityWaveformBatch.log \
-scenario_file top.Batch.scn \
-top_instance txrx_tst.top1
10. Make special note of the following information in this command file:
— The CalculatePower command is set to run average analysis (-analysis_type
average). All of the -average* options are specific to this type of analysis.
— Simulation data is provided by the activities.vcd file.
The quality of the simulation data provided to PowerArtist is a major factor in the
quality of the power analysis. Accurate power analysis for typical usage of a
design requires typical simulation data. The CalculatePower command analyzes
the simulation results and generates compressed summary data in the
top.AverageBatch.gaf file. This file will then be used for power analysis in this
run and subsequent runs of CalculatePower to save time from having to re-
analyze the VCD file each time you run the software.
— It will generate a detailed vertical report of analysis results.
— It will run a modal (-mode_file) analysis using the txrx.mode file. The design in
this tutorial has different modes of operation and it useful to know the power
consumed in each mode. Typical modes of operation for chips are standby,
sleep, receive, transmit, interrupt, etc. By getting a good understanding of the
modal power of your chip, you can gain a better understanding of the battery
needs for your applications. For details on the format of the mode file, see
Mode File Format.
— The log file that this analysis generates will be named
CalculatePowerAverageBatch.log.
— The -save_clock_trees_netlist true option generates power database
schematics for the clock tree in the design. Without this setting, you will not be
able to view your clock tree in the PowerCanvas.
— The power database that this analysis generates will be named
top.AverageBatch.pdb. This is the file you will load into the PowerCanvas.
— The analysis looks for wire load models in the Liberty library with the logical
library name hvt.
— Scan flops will be used to perform analysis (this is the default behavior).
11. Open the CalculateTimeBasedPower.tcl file (as shown below). The settings in this
file run the full-chip time-based power analysis. Many of these options are
identical to those required to perform the average power calculation.
12. Make special note of the following information in this command file:
— The CalculatePower command is set to run a time-based analysis (-
analysis_type time_based). All of the -time_based* options apply to this type of
analysis.
1. If you are a returning PowerTheater user and you do not have a PowerArtist license, you
will need to invoke the PowerCanvas GUI using the PowerArtist-PT command. Note that it
does not have the full functionality of the PowerArtist license.
b. Click the top(top) instance in the left-hand pane of the hierarchy browser. Click
the + symbols next to the nested hierarchical instances to display their
instances in the right-hand pane called the power table.
6. When you are finished examining the elaborated design, exit the PowerCanvas
(select File > Exit).
7. Restart the ptshell:
% ptshell
8. Source the project_settings.tcl file again.
full_chip_ptshell % source project_settings.tcl
You must reload this file whenever you restart the ptshell in this tutorial flow.
9. Source the GenerateActivityWaveforms.tcl script to run vector analysis:
full_chip_ptshell % source GenerateActivityWaveforms.tcl
Vector Analysis shows how the activity varies over time for selected blocks in your
design. Vector Analysis should be done before power analysis to ensure that the
testbench has exercised the design as expected and can be used to identify a
suitable time window to perform power analysis. Note that additional details are
available in Analyzing Simulation Activity.
When the script is finished, you will see the following filed in your run directory:
— GenerateActivityWaveformBatch.log—This file captures log information for the
GenerateActivityWaveforms command that controls vector analysis. If you get
any unexpected results, you can look through this file to make sure that the
settings listed are those that you expected to be set.
— top_activity.fsdb—This is the FSDB file containing waveforms for the specified
groups.
10. Exit the ptshell and restart the PowerCanvas GUI.
11. Display the resulting waveforms from the vector analysis:
a. From the PowerCanvas main menu, select Tools > Waveform Viewer.
The Add Waveform Source menu appears.
b. Select top_activity.fsdb from the Files list on the right and click OK.
c. In the Waveform Name field, type an * to find all waveforms and click the
Search button.
d. Select all of the waveform names, select “Place waveforms in: One plot” and
click the Add waveform to plot area button.
The resulting waveforms show the average activity over time for the specified
groups.
Notice that the rxchan module (colored blue) has very little activity in the first
half of the simulation then turns on. The inverse happens with the txchan
instance (colored orange). This clearly indicates that the pci controller starts out
transmitting packets of information and switches to receive packets. The
average net activity in the controllers when the controller is either transmitting or
receiving is about 9 MHz and less than 1 MHz when the chip is not in that mode
of operation.
Use the cursor to highlight an individual graph. Hover on the graph legend to
minimize all but the selected graph. Hover on the graph itself to increase the
thickness of the line.
Move the cursor over a data point on a graph to display the coordinates.
Hold down the middle mouse button and drag a red rectangle to zoom in to an
area of interest.
Right-click and hold anywhere on the waveform to display a pop-up menu. Use
this menu to manipulate the waveform display. For details on all options
available, see Using the Waveform Viewer Options Menu.
Click the Tips tab at any point to see more tips on using the viewer.
12. Exit the PowerCanvas GUI and restart the ptshell.
13. Source the project_settings.tcl file again.
full_chip_ptshell % source project_settings.tcl
14. Source the power_aware.tcl file to read in the power constraints for this tutorial:
full_chip_ptshell % source power_aware.tcl
15. Source the CalculateAveragePower.tcl script to run average power analysis:
full_chip_ptshell % source CalculateAveragePower.tcl
When the script is finished, you will see the following filed in your run directory:
— CalculatePowerAverageBatch.log—This file captures log information for the
CalculatePower average run.
— top.AverageBatch.pdb—This power database now includes average power
analysis data.
— top.AverageBatch.rpt—This is the a text-based power report. For small
designs, you may find this format useful; for larger designs, you will want to use
the PowerCanvas to review the results.
16. Exit the ptshell.
17. Review and analyze the results of the average power analysis in the
PowerCanvas. For details see, Viewing Power Analysis Results in the
PowerCanvas.
18. Restart the ptshell.
19. Source the project_settings.tcl file again.
full_chip_ptshell % source project_settings.tcl
20. Source the power_aware.tcl file to read in the power constraints for this tutorial:
full_chip_ptshell % source power_aware.tcl
21. Source the CalculateTimeBasedPower.tcl script to run time-based power analysis:
full_chip_ptshell % source CalculateTimeBasedPower.tcl
When the script is finished, you will see the following files in your run directory:
— CalculatePowerTimeBasedBatch.log—This file captures log information for the
CalculatePower time-based run.
— top.TimeBasedBatch.pdb—This power database now includes time-based
power analysis data.
— top.TimeBasedBatch.rpt—This is the a text-based power report for the time-
based run.
The colorizing follows a thermal spectrum. The more power consumed, the hotter
the color (red indicating the most power consumed). The less power consumed,
the cooler the tab. Select this tab and select the data you want to view from the
list; then click the Add waveforms to plot area button to display the waveform in
the View tab.
phic
w rG a
Ne
N eed
Figure 4 Schematic Display of Module Selected in the Hierarchy
3. Notice the dynamic information display just above the schematic. This display
changes as you move your cursor over the elements in the schematic. This
display includes information such as instance name, cell name, parent, static/
dynamic/total power, clock gating status, and optimization status. From this figure,
you can see that instance t1 consumes a total of 10.63 mW of power.
4. Do a shift-double click on the border of t1 which will then show a detailed view of
its schematic.
5. Do a shift-double click again to return to a view that only shows the primary ports.
If you zoom-in, you will notice that the port stubs for single-bit pins are thinner
than the port stubs for bus ports.
6. Double-click the bus port stub for din[63:0].
7. Click the wire coming from this port that is on the outside of the instance boundary
and select Schematic > Properties. or right-click and select Properties.
8. To see all of the nets, click the + sign next to the txdin pin name.
The Properties dialog will appear as shown in the following figure.
This dialog displays the frequency, capacitance source, transition time, average
activity, etc. for each net in the bus. Once you have opened this dialog, you can
click on different areas in the schematic and the dialog will update accordingly.
You can use this dialog to view net information for both single-bit ports and bus
ports. Furthermore, you can add tabs to this dialog to display other pins, nets, or
instances. For complete details on how to use the Properties dialog, see Using the
Properties Dialog.
tree segments or you can start with the clock tree for a specific register and build the
clock tree up from there. However, to be able to view clock trees you must save them
while performing a CalculatePower or ReducePower command. Do this by specifying
the “-save_clock_trees_netlist true” option as shown in the tutorial Tcl scripts.
If you want to see the clock tree for the entire design, you must first display a wire in
the schematic that corresponds to the actual clock net. You will select the wire and
then select a menu item that will generate the full clock tree corresponding to that
highlighted wire. In the tutorial design, there are three clock nets: top.clk, top.pci_clk
and top.tclk.
You can use the following process to generate the full clock net for top.clk.
1. Erase the schematic by doing a right-click and selecting Collapse Full Schematic.
This goes back to the view with only the primary inputs displayed.
2. From the Tree display, select core1/clogic.
3. Right-click and select Show in Schematic.
4. Double-click the clk pin for core1.
This brings up a vendor gate named sclk1 (SEQPIC), which in this case is a pad
cell.
5. Select/highlight the wire that goes to that pad cell.
6. Right mouse click on that wire and select Pin > Show Clock Tree as shown in the
following figure.
This may take a few seconds. The entire clock tree will be displayed.
6. Click the clock[0] pin/stub and select Pin > Show Clock Tree from the pop-up
menu.
7. The clock tree for that register will be displayed in a separate window as shown
here:
Once you have the clock tree for this register displayed, you can build up the clock
tree by double clicking the red wires/nets.
8. Double click the red net segment going into the input of SEQCLKBUFX8MTH
buffer. You will see additional connections to the clock tree for register
core1.r1.s1.CurSt[0] as shown in the following figure:
Waveform Cross-Probing
To perform waveform cross-probing from the schematic, first make sure that the
waveform viewer is visible by selecting Tools > Waveform Viewer. Then load the
FSDB or VCD file that contains the simulation data you want to see. When you select
a pin, port or net in the schematic, PowerArtist searches the simulation data you
loaded into the Waveform Viewer for data that matches the selected object’s name.
The matches are shown in the Search field. Simply select the waveforms you want to
view and click the Add waveforms to plot area button. For more details, see Using
the Waveform Viewer.
then open the txrx.vc file. For additional information about this file, see Verilog
Startup File Format in the PowerArtist Reference manual.
4. To edit a specified input file, use the following process:
a. Click the icon to the right of the file specification. You will get an Xterm with
the editor of your choice editing the file. You can use the $EDITOR environment
variable to set the editor in advance.
b. If the input field is empty, a file browser will pop-up allowing you to choose or
enter a file name for saving the edited file.
c. Close the file browser. You get an Xterm with your file open in the editor of your
choice.
d. When you are done editing the file, simply close the editor.
Current step is
highlighted
5. Click Next.
The Top level setup screen appears. Note that you can also select the step
directly from the list of steps on the left side of the window.
6. Verify that the top-level module has been set to “top”. The top-level parameters
are used if you have Verilog defparam or VHDL generic override values you want
to put in. To add a parameter, click the Add button and then type the name of the
parameter and the value. To delete a parameter, select the parameter and value
(Ctrl-click to select multiple parameters) then click the Delete button. This is not
needed for this design.
7. Click Next.
The Library setup screen appears.
Use this screen to specify the Liberty libraries (this tutorial does not use them).
8. Click Next.
The Blackboxes screen appears.
9. Click Next.
The Analysis options screen appears.
All of the fields on this screen are populated for this tutorial. Note that since this is
an RT-level design, the “Gate level design” box is not checked.
10. Notice that there is a startup script specified for this tutorial called
project_settings.tcl. You can create any Tcl script and apply it here to inferencing.
The script can contain any number of command file Tcl commands.
11. Verify that the resulting scenario file name is set to top.scn.
12. Verify that the Power database field is set to top.pdb.
13. Click Next.
The Run the inferencing command screen appears.
14. Click the Run button to start the inferencing.
As the inferencing is running, you will see that an analysis report is printed
interactively into the large text field. Error and warning messages are printed here.
When the inferencing is complete, you will see the Done screen.
18. Locate the HDLInferencing file (use the “vi” editor to see the contents).
This file was generated by the HDL Inferencing wizard and contains all of the
commands/options/variables settings that you just ran in the tutorial. You can use
this file to generate your own Tcl command file to run future batch analyses.
You can use this screen to define groups of instances for vector analysis. It works
the same way as the DefineGroup command used in the command-based flow.
For the tutorial, there are five defined groups, all of which are checked to be
included in the analysis.
In this step, you specify input/output options and analysis options for the current
run.
4. Make note of the following input settings:
— The startup script called project_settings is specified. This Tcl file sources
another global settings Tcl file. You can specify any Tcl commands or variables
you want to apply on a site-wide or project-wide basis.
— The top instance name is the hierarchical path to the top level of the design in
the VCD file. In this case, the top instance is txrx_tst.top1.
— The VCD file used in this tutorial is ./design_data/rtl_sim/activities.vcd.
5. Make note of the following output settings:
— This vector analysis will generate an FSDB output file (top_activity.fsdb).
— It will create a file called xstates.log which contains X state net names.
6. Click Next.
This brings up the Analysis type Screen.
This is where you select the type of vector analysis to run—clock-based or time-
based. This tutorial runs a time-based analysis and so the clock-based is grayed-
out.
This screen indicates that this is a simulation-based analysis. You could also
perform a vectorless analysis or one that uses an existing GAF file or a SAIF file
as input. For more information on using SAIF, see Analyzing Average Power
Using a SAIF File.
2. Click the Next button.
The Set Global Activity File Creation Options screen appears as shown in Figure
17. This is the screen where you specify input files and other options that affect
the generation of a GAF file.
Figure 17 Average Power Analysis Wizard Set Global Activity Creation Options Screen
Figure 18 Average Power Analysis Wizard Set Power Estimation Options Screen
Figure 19 Average Power Analysis Wizard Log File and Summary Table
Figure 20 Time Based Power Analysis Wizard Design Activity Options Screen
Figure 21 Time Based Power Analysis Wizard Power Analysis Options Screen
This is the screen where you specify the parameters for the time-based analysis.
4. Verify the following analysis option settings:
— Startup script: analysis_wizard.tcl
There is a significant difference between this tutorial and the average power
tutorial. The time-based tutorial uses the analysis_wizard.tcl file. This file
sources the power_aware.tcl (which contains the clock file commands) and the
project_setting.tcl file.
— Clock definition file: blank
The clock file field is in the wizard to remind you of the importance of clock
power to an accurate power analysis. The clock-related commands are no
different from other power-aware commands and, therefore, can be included in
the startup script file, as they are here.
— Default output load capacitance: 39.00
— SPEF: blank
— Wire load library: hvt
— Reference clock: top.clk
— Active edge: Positive
— Cycles per interval: 20
8. When the analysis completes, you will see a Summary table at the end of the log
file window.
Figure 23 Time Based Power Wizard Log File and Summary Table
rxchan.vc Verilog startup file, for the rxchan block, that tells the
Verilog compiler which Verilog files must be loaded for
your design.
3. Source the Elaborate.tcl script to compile the design and create a PowerArtist
scenario file and a power database:
block_ptshell % source Elaborate.tcl
4. Source the power_aware.tcl file to read power constraints:
block_ptshell % source power_aware.tcl
5. Source the CalculatePower.tcl file to run vectorless average power analysis:
block_ptshell % source CalculatePower.tcl
6. View the results in the PowerCanvas using the following command:
PowerArtist-PT
For details on this process see, Viewing Power Analysis Results in the
PowerCanvas.
As you run the tutorial, PowerArtist generates a key file and log file (both with a
“block_” prefix) in your run directory. These files are useful for debugging or
recreating a previous run. For more information on these files, see Understanding
Log Files and Key Files. In addition, the ptshell prompt for this tutorial will have a
“block_” prefix. Note that this .ini file overrides the default .ini file that comes with
the tarkit. For more information on the initialization file, see Customizing Your
PowerArtist Environment Using Initialization (INI) Files.
2. Open the project_settings.tcl file. This file is shown here:
This file obtains site-wide tool settings (from the global_setting.tcl file) and reads-
in library information (from the libraries.tcl file). The libraries.tcl file contains a
series of ReadLibrary commands. Creating this type of file saves you time and
requires fewer keystrokes.
3. Open the power_aware.tcl file. This file contains clock gating commands, as
shown here:
##############################################
# Clock Gating Commands
4. Open the Elaborate.tcl file. The commands in this file compile your design and
perform inferencing.
Much of this script is the same as that for the full-chip tutorial with the following
differences:
— The design variable is set to “rxchan” to represent the block.
— This block is pure Verilog and therefore has only the verilog startup file
specified—rxchan.vc.
— The resulting scenario file name will be rxchan.Batch.scn.
— The resulting power database will be named rxchan.Batch.pdb.
5. Open the CalculatePower.tcl file. The variables and commands in this file run an
average power analysis on the block-level design.
-save_clock_trees_netlist true \
-vectorless_input_file $design.vaf \
-wireload_library hvt
# Clocks:
#
# Name Frequency (Hz) Duty Cycle (Default: 0.5)
#
SetNetStimulus -net rxchan.clk -frequency 6.6e+07
SetNetStimulus -net rxchan.pci_clk -frequency 6.6e+07
# Primary IOs:
#
# Name Frequency (Hz) Duty Cycle (Default: 0.5)
#
SetNetStimulus -net {rxchan.din[0]} -frequency 1.40451e+07
SetNetStimulus -net {rxchan.din[1]} -frequency 1.40451e+07
<snip>
# Other Nets:
#
# Name Frequency (Hz) Duty Cycle (Default: 0.5)
#
SetNetStimulus -net {rxchan.wr_addr[0]} -frequency 1.75861e+07
SetNetStimulus -net {rxchan.wr_addr[1]} -frequency 8.5564e+06
<snip>
# Memories:
#
# Name Avg. Frequency(Hz) of Local Nets
#
SetInstanceStimulus -instance rxchan.dpmem.m0.m1 -frequency 2.76e+07
SetInstanceStimulus -instance rxchan.dpmem.m0.m2 -frequency 2.76e+07
<snip>
This is a portion of the .vaf file. You should be very careful setting the clocks,
primary IO’s, critical signals, such as enable signals, and your memories. The
commands you will be using most often are the SetNetStimulus (for most nets)
and SetPortStimulus or SetInstanceStimulus for memories in your design.
1. Type “ptshell” to start up the PowerArtist shell. The prompt for this tutorial will be:
block_ptshell %
As soon as the ptshell starts, you will see the following additional files in your run
directory:
— block.key—Records keystrokes run as part of this tutorial. You can re-run a
session by sourcing this file.
— block.log—Records log information (inputs and outputs) for this tutorial.
capturing the output of standard out.
2. From the ptshell prompt, source the project_setting.tcl script to setup project-
specific parameters and read your libraries.
block_ptshell % source project_settings.tcl
3. Source the Elaborate script to compile the design and create a PowerArtist
scenario file and a power database for the elaborated design:
block_ptshell % source Elaborate.tcl
When the script is finished, you will see the following additional files in your run
directory:
— ElaborateBatch.log—This file captures log information for the Elaborate
command. If you get any unexpected results, you can look through this file to
make sure that the settings listed are those that you expected to be set.
— rxchan.Batch.scn—The scenario file for the block-level design. The scenario
file is a binary representation of your design.
— rxchan.Batch.pdb—At this point in the flow, this PDB file contains the design
hierarchy. You can use the PowerCanvas to explore the design hierarchy at this
point. The power analysis run will add to this file.
4. Exit ptshell:
block_ptshell % exit
5. View and analyze the elaborated block-level design in the PowerCanvas.
a. Invoke the PowerCanvas using either of the following commands:
% PowerArtist-PT
or
% PowerArtist
b. From PowerCanvas main menu, select File > Load Design.
From the file selection dialog, select the correct .pdb file (for example,
rxchan.Batch.pdb) and click OK.The hierarchy browser (at the top level) and
the collapsed schematic of the elaborated design appears.
c. Click the rxchan(rxchan) instance in the left-hand pane of the hierarchy browser.
d. Click the + symbols next to the nested hierarchical instances to display their
instances in the right-hand pane called the power table.
6. When you are finished examining the elaborated design, exit the PowerCanvas
(select File > Exit).
7. Type “ptshell” to restart the ptshell.
8. Source the project_settings.tcl file again.
block_ptshell % source project_settings.tcl
You must reload this file whenever you exit and restart the ptshell in this tutorial
flow.
9. Source the power_aware.tcl file to read power constraints for this tutorial:
block_ptshell % source power_aware.tcl
10. Source the CalculatePower.tcl file to run the block-level power analysis:
block_ptshell % source CalculatePower.tcl
When the script is finished, you will see the following additional files in your run
directory:
— CalculatePowerBatch.log—A log file for the average power analysis run. It
includes all of the command option specifications, warnings and notes
generated by the analysis engine, CPU usage, etc. for the latest run.
— rxchan.Batch.pdb—A complete power database that includes the power
analysis results, in this case, for average power analysis.
— rxchan.Batch.rpt—The power report in text format.
11. Exit the ptshell.
12. Review the power analysis results in the PowerCanvas.
##############################################
# Mixed-VT Library Commands
##############################################
### Mixed Vt specific settings showing always on Virtual Supplies
##############################################
# Clock Gating Commands
The commands shown here are required to incorporate a mixed-Vt library into a
design. It contains the SetLibrary and SetVt commands as well as several
iterations of the CreateVirtualSupply command to establish voltage domains.
These will be later leveraged as part of the power_gating tutorial. It also contains
the SetVoltageThreshold, defined here for two groups—LOW_VT and HIGH_VT.
For more explanation of the commands in this file see Sample Mixed-Vt Flow and
Tcl File.
2. Type “ptshell” to start up the PowerArtist shell. The prompt for this tutorial will be:
mixed_vt_ptshell %
3. From the ptshell prompt, source the project_setting.tcl script to setup project-
specific parameters and read your libraries.
mixed_vt_ptshell % source project_settings.tcl
4. Source the Elaborate.tcl file to compile the design and create a PowerArtist
scenario file and a power database:
mixed_vt_ptshell % source Elaborate.tcl
When the script is finished, you will see the scenario file (.scn), the power
database file (.pdb) and log files.
5. Source the power_aware.tcl file to read power constraints:
mixed_vt_ptshell % source power_aware.tcl
6. Source the CalculatePower.tcl file to run average power analysis:
mixed_vt_ptshell % source CalculatePower.tcl
When the script is finished, you will see several new files including an updated
power database (.pdb), the CalculatePower.log file and the power report file (.rpt).
7. View the results of this analysis by reviewing the top.Batch.rpt file. Locate the
“Mixed-VT cells distribution” section as shown below:
top.core1.a1
HIGH_VT 70 58
LOW_VT 30 25
---------------
Total 83
top.core1.s1
HIGH_VT 70 579
LOW_VT 30 248
---------------
Total 827
For every hierarchical instance specified using the SetVT command (in the
power_aware.tcl file) this report includes the total number of default cells selected
for each of the specified VT groups. For example, 145 default cells selected for
instance top.core1.u1 were HIGH_VT cells while 62 were LOW_VT cells. For
additional information about this section of the report, see Understanding Mixed-Vt
Analysis Results in the Report File.
##############################################
SetLibrary -instance top.core1 -library {hvt Memories}
##############################################
# Voltage Domain Commands
##############################################
# Clock Gating Commands
##############################################
# Instances to monitor in the design
The graph shows that the power of the receive channel is always zero in
transmit mode and vice-versa. PowerArtist has essentially cut-off leakage and
dynamic power for channels that are inactive in the appropriate modes.
6. Source the power_aware.tcl file to read in the power constraints for this tutorial:
full_chip_gate_ptshell % source power_aware.tcl
7. Run either an average or time-based power analysis using the corresponding Tcl
script.
8. Exit the ptshell.
9. Review the results in the PowerCanvas or the text-based power report.
Power(Watts)
Power contribution Static Dynamic Total
----- ------------ ------ ------- -----
Internal register power 4.36uW 705uW 710uW
Internal latch power 0W 0W 0W
Internal memory power 3.81mW 15.8mW 19.7mW
Other internal power 3.71uW 161uW 165uW
Total internal power 3.81mW 16.7mW 20.5mW
IP Core power 0W 0W 0W
Pad power 44.2mW 751mW 795mW
Clock power 144nW 440uW 440uW
Inferred Buffer power 139nW 4.9uW 5.04uW
Each of these categories is broken down into greater detail in the sections that
follow.
Note: (G) after either a register or 2-1 mux means this instance
is affected by clock gating.
Note: (F) after model name means power of this instance has been
forced by using SetPower command.
Note: (O) after model name means this instance has been
partially/fully optimized.
Power(Watts)
Component Model Static Dynamic Total
--------- ----- ------ ------- -----
top user 3.81mW 16.7mW 20.5mW
#1942 connect 0W 0W 0W
#1943 connect 0W 0W 0W
#1944 auto 0W 0W 0W
core1 user 3.81mW 16.7mW 20.5mW
<snip>
Total internal power 3.81mW 16.7mW 20.5mW
Logic Optimization
PowerArtist performs straightforward logic optimization to help increase accuracy.
This is becoming more important from a power analysis accuracy point of view
because more RTL code is either being generated from ESL synthesis tools or is
being designed for re-use. Both flows can result in unused registers in the design,
which can then result in unused combinational logic. The analysis tools locate
unused register bits and then trace logic to eliminate unused combinational logic.
They also optimize logic that generates constant outputs.
Optimization depends on analyzing the inferencing of a module at every instantiation;
therefore, optimization needs to happen when the power analyzers run. PowerArtist
may optimize registers only in certain instantiations—not all instantiations. In the
report, instances that have either been fully or partially optimized are marked with an
(O) after the model name. This is similar to how gated logic is marked with a (G) and
logic that has its power set by the SetPower command is marked with an (F).
The name of the pad model in the chosen technology for that pad.
The power consumed by that pad.
The load capacitance attached to the output of the pad
Power consumed by pads is often a significant fraction of total power and
PowerArtist uses specific models for each pad in a technology to accurately estimate
the power. Power is estimated using the PowerArtist-computed frequency value for
the output net, parameters of the pad, and a user-provided value for the off-chip
capacitance driven by the net if it is an output.
Net properties:
Area : 1.35e-10
Senses : 1
Frequency : 65.303MHz
Transition time : 0s
Fanout capacitance : wire 1.7675pF*;pins 45.1fF
Wire power : 1.257mW
Pin power : 32.073uW
Traced instances:
Library Clock Driven By Driven Net Driven Power (Watts) Traced
Model Level Net Number Numbers Loads Static Dynamic Total Instance
----- ----- ---------- ------- ----- ------ ------- ----- --------
BUFX20 1 0 38 1 146pW 69.1uW 69.1uW top.core1.I1
BUFX20 2 38 37 2 146pW 68.9uW 68.9uW top.core1.L2_I1
INVX12 3 37 36 1 146pW 160uW 160uW top.core1.L3_I1
INVX12 4 36 35 1 146pW 155uW 155uW
<snip>
Total power 5.54nW 232mW 2.32mW
Traced nets:
Net Frequency Transition Wire Pin Net Wire Net Pin Net
Number Time Cap Cap Power (W) Power (W)
------ --------- ---- --- --- --------- --------- ---
1 15.831MHz 0s 2.61fF* 0F 481nW 0W top.1
2 65.963MHz 0s 156fF* 70.03fF 52.2uW 23.4uW top.2
3 65.963MHz 0s 173fF* 55.98fF 57.9uW 18uW top.3
4 65.963MHz 0s 221fF* 31.63fF 74.1uW 10.6uW top.4
<snip>
Total 7.41pF 2.61pF 2.47mW 873uW
<snip>
tree. The analysis type will be either Instantiated, which means that it was traced,
or Inferred meaning clock inferencing was done.
Area occupied by the net.
Clock senses.
Frequency of the clock net.
Transition Time.
Fanout capacitance of the clock net (divided into contributions from wire and pin
capacitances).
Power consumed as the net toggles (divided as wire and pin components).
The wire load model applied to the net (the first entry is the net name, the second
entry is the wire load model applied to that net). If you assigned wire load models
to sub-nets of the clock tree, they would be listed here as well.
Descriptions of the instances that were traced as part of the clock tree, which
includes the following:
— Library Model: the Liberty model name.
— Clock Level: the depth in the clock tree for this particular instance
— Driven Net Numbers: the net numbers from the “Traced nets” section that this
instance drives. Most instances will drive one net, but some instances may
drive multiple nets. The power portion is split into static/dynamic/total just like in
the Internal Power Consumption portion of this report.
— Driven by Net Number: the net number that was traced through to get to this
particular instance. Note that the “Driven by” net may have Index 0. This means
that this is the clock net you are either inferring or tracing.
— Driven Loads: the number of loads this particular instance is driving.
— Traced Instance: the full hierarchical instance name (listed last to
accommodate a long name).
Note that if the instance is a leaf buffer that is driving only clock pins, it is marked
with an (L) in the Clock Level column.
Descriptions of each clock net in the design. This section lists every net in the
clock tree and contains the following fields:
— Net Number. this number allows you to figure out what instance drives this net
— Frequency: the toggling frequency of this net.
— Transition Time: the slew time either back-annotated or calculated by the slew
calculator, the back annotated slew values are annotated with an asterisk. The
power portion is split into Pin Power and Wire Power.
— Wire Capacitance: capacitance determine from a wire load model or a back-
annotated value. In the case of a back-annotated value, the number is
annotated with an asterisk to indicate that it was a user-specified value.
— Pin Cap: the total capacitance of the pins driven by this net.
— Net Wire Power and Net Pin Power: the total power separated into pin and wire
amounts
— Net: the full hierarchical instance name for this net.
The counts are the total number of register bits—not the number of register
instances (where an entire register bank is one instance). The sum of “Number of
gated registers” and “Number of registers gated by instantiated clock gating cells”
may not be equal to the “Total number of gated registers”. This is because a
register may have a block-level instantiated ICGC and have a local inferred ICGC
as well. The “Total number of gated registers” section includes registers that are
either gated by inferred or instantiated ICGCs or both. The “Total number of
ungated registers” section includes those registers that are not gated by either
inferred or instantiated ICGCs.
For more information on clock gating, see Setting up Clock Gating for Power
Analysis.
Also, there will be a new section called “Clock domain power consumption”. This
section records the power of all of the elements traced in the clock domain. This
includes the clock distribution network leading up to the clock inputs of flops as well
as the elements traced through the Q outputs of the flops. The format of this report is
identical to the existing “Clock Power Consumption” section. There is a new sub-
section at the top of the domain power section that provides an Instance Summary
that has a format similar to the “Total power consumption” section.
Instance Summary:
================
Power(Watts)
Static Dynamic Total
------ ------- -----
Register power 0W 920.12uW 920.12uW
Latch power 0W 0W 0W
Memory power 0W 5.7726mW 5.7726mW
IP core power 0W 0W 0W
Pad power 0W 5.9882mW 5.9882mW
Clock power 0W 6.9694mW 6.9694mW
Other power 0W 223.31uW 223.31uW
Internal load power 0W 6.4999mW 6.4999mW
Traced instances:
Library Clock Driven By Driven Net Driven Power (Watts) Traced
Model Level Net Number Numbers Loads Static Dynamic Total Instance
----- ----- ---------- ------- ----- ------ ------- ----- --------
connect 21 717 716 0 0W 0W 0W top.core1.r1.dp
connect 22 716 715 0 0W 0W 0W top.core1.r1.dp
...
In the “Traced instances” section of the report, the sequential elements will all be at
clock level 1. The clock distribution network will still be traced as part of the clock
power section of the report.
Area
This section of the text power report shows the width and height, and number of
registers and gates for each component. This report is generated if you use the “-
average_report_options a” option to CalculatePower.
7. Area
=======
Net Frequencies
This section of the text power report shows the type, glitch, and frequency for each
net. This report is generated if you use the “-average_report_options g” option to
CalculatePower.
and muxes. For vendor_gates, the cell count is the number of gates of that type in
the design.
Power(Watts)
Component Model Cell Static Dynamic Total
Count
--------- ----- ------ ------- ------- -----
top 2083 305nW 396mW 396mW
Register Power 523 76.3nW 10.1mW 10.1mW
Latch Power 0 0W 0W 0W
Summary
You can use PowerArtist power analysis at various stages of the design
implementation:
While designing your RTL
Use PowerArtist concurrently with RTL simulation to analyze power and identify
hot spots. If the design consists of mixed RTL and gate-level models, use
PowerArtist and apply simulation data as it becomes available for individual
modules or subsystems to improve the analysis accuracy for those blocks.
After synthesizing
Once you have used PowerArtist at the RT-level to decide among design
alternatives, you will begin to synthesize portions of your design. Since logic
synthesis can substantially restructure control logic to minimize area or meet
timing constraints, you might want to repeat power analysis using post-synthesis
information. This can be done on a mixed RTL and gate-level design or on a fully
synthesized gate-level netlist.
After place and route
Use PowerArtist with back-annotated capacitance values in a gate-level simulation
to use parasitic information from layout in the analysis.
Chapter 5
Introduction
This chapter provides an overview of how to use the PowerArtist graphical user
interface, called the PowerCanvas. It describes each of the menu items available
and how to use them. It does not take you through a process step-by-step. To
become familiar with how you should use the PowerCanvas, run either the
PowerArtist Tutorial Part 1: Power Analysis or the PowerArtist Tutorial Part II: Power
Reduction. You should refer to this chapter if there is a particular aspect of the
PowerCanvas that is not covered in the tutorial or you just want to know how one
particular menu item works.
For details on starting the PowerCanvas, see Using the PowerArtist Shell and
Running an RTL Full-Chip Power Analysis Using Command Files.
Chapter Organization
The following topics are covered in this chapter:
Overview of the PowerCanvas Initial View
Using the Hierarchy Browser
Using the Schematic Display
Using the Simple Reduction Dialog
Using the Linter Reductions Dialog
Using the Prism Dialog
Using the Waveform Viewer
Hierarchy
Information
Display
Schematic of
Fully Collapsed
Design
Power Table
Figure 53 Initial Power Canvas Display (Tutorial Design)
The Power Canvas has two main sections—the hierarchy browser and the
schematic display. You can use the Design menu items to change the look of the
hierarchy browser and the schematic menu to do the same for the schematic display.
For more information on the using the hierarchy browser, see Using the Hierarchy
Browser. For details on using the schematic display, see Using the Schematic
Display.
Keyboard/Mouse Key
Menu Item or Key Combination Function
Right Arrow Right Arrow key Pans to the right by half the window size
Left Arrow Left Arrow key Pans to the left by half the window size
Down Arrow Down Arrow key Pans down by half the window size
Keyboard/Mouse Key
Menu Item or Key Combination Function
Stroke-SW-Btn1 Hold down left mouse Zoom fit; fits the current window size
button and drag in
south west direction
Stroke-NE-Btn1 Hold down left mouse Zooms out; zooms out proportional to the
button and drag in north length of the stroke. The longer the stroke,
east direction the further out the zoom. As you drag the
mouse, PowerCanvas displays the value of
the zoom factor.
Stroke-Btn2 Click and hold the Pan; moves around the design
middle mouse button
Shift-Stroke-Btn1 Hold down Shift key Drag selected instance; performs a move
and click left mouse
button and drag across This move is only operational for elements
screen that are not nested inside the body of
another instance.
Click-Btn1 Single-click left mouse Select; this focuses in the schematic window
button and selects any element that is under the
mouse cursor.
Shift-Click-Btn1 Hold down Shift key Append to selection; adds clicked elements
while clicking left to your current selection
mouse button
Double-Click-Btn1 Double-click left mouse Navigate; expands the connectivity for the
button clicked object to include additional
connections.
Clicking on a net will show additional pins for
the net. Clicking on a pin will show the net
for the pin.
Shift-Double- Hold down Shift key Shows the children of the clicked instance
Click-Btn1 while double-clicking
left mouse button
Delete Delete key Removes the selected net from the view
Ctrl-Delete Hold down the Control Removes the selected instance from the
key and press the view
Delete key
PowerCanvas Dialogs
The PowerCanvas provides different dialogs that allow you to manipulate your data
in a number of ways. You can search the power database and view and edit the
source lines for selected elements.
The Find dialog allows you to search the power database for information relating to
instances, pins or nets. You control your search choice using the “Search For” pull-
down menu. Once you have done this, you enter the search criteria, controlling how
many criteria must be met using the + (add another one to the list), - (delete the last
one from the list) and Clear (clear the entire list). The criteria depend on the object
you select. If you choose instances, you can then search by name, hierarchical
name, name, cell name, total power, dynamic power and static power. If you choose
pins, you can search by hierarchical name, name, type and capacitance. If you
choose nets, you can search by hierarchical name, name, average activity,
capacitance, duty cycle, and frequency.
For name-based searches, you do not need to use wild card characters. You can
simply type in any part of the name and the find dialog will return all names that
contain that string. You can then ask for either a match (==) or not a match (!=). Also,
the name-based entries are case-insensitive. When using this dialog, it’s important
that you understand the difference between a hierarchical name and a name. A
hierarchical name is the full hierarchical path name where levels of hierarchy are
separated by a dot (.). The name is the portion of the name after the last (right-most)
dot. Assume, for example, that you have the following strings in your design:
a.b.c
a.bc
abc
A name search of using “b” as the search string will return a.bc and abc. It will not
match a.b.c because in that case “c” is the name, which does not match the pattern
“b” (0 or more name elements followed by a “b” followed by 0 or more name
elements). However, a hierarchical name search using “b” returns all three because
a.b.c matches the given pattern.
When you are searching for numeric values, the values will all be floating point
numbers but will be displayed using scientific notation. You will use the standard
relational operators to control your search (<, <=, ==, >=, >). If you do not specify a
unit when searching for a numeric value, Watts is assumed. You can specify, W
(default) mW, uW, or nW.
Once you have defined your search criteria, you will then click the Search button to
perform the search. Notice that the search button changes to a Stop button while the
search is working. If you want to stop the search at any time, you can click Stop. The
following figure shows sample search criteria with results.
If the search goes on for more than several seconds you will see a progress meter in
the status bar that indicates the percentage completion of the search.
Note: The first time you search the Instance, Net, or Pin category you will see a
“busy indicator” because the Find dialog does not know how many items are in the
design. After the first search, you will get a progress meter that indicates the percent
of the search that has been completed.
This sample search, which uses the power database from the reduction tutorial, finds
all hierarchical names (including inferred instances) that begin with u (or U) and have
a dynamic power greater than 7e-04W (or .7mW). In this example, the search criteria
matched 64 elements. You can use the Previous and Next buttons to step through
the each element in the returned list. Notice the Selection box on the bottom left of
the dialog. This box allows you to view the source for each element, the schematic
entry, or the hierarchy browser entry. Moreover, you can zoom-in on or center the
element in the schematic display. Note that you must first make the selection in this
section before clicking on an element in the returned list. Once the selection is made,
for example, “Display in source” you can then double-click any element in the list to
see the corresponding source.
Corresponding
Source
You can click on any column header in the table of returned elements to sort the
elements by either increasing or decreasing order according to that criteria. The first
time you select a header, you will get an arrow showing the direction of the sort. The
second time you select the header inverts the sort.
Add tabs to allow you to save data for items you have selected and then toggle
between them. There is no limit on the number of tabs you can create. You can
use the and icons to add or remove tabs, respectively. You can also right-click
on the dialog heading to open a pop-up menu of tab actions. This menu has three
items: New Tab, Close Tab and Close Other Tabs.
Suppress (hide) any of the columns, by right-clicking a column header and
disabling/enabling the columns from the pop-up menu that appears. To reorder the
columns, click on and drag the headers.
Cross-probe to the Apache Waveform Viewer. To do so, first open the Apache
Waveform Viewer (select Tools > Waveform Viewer). Then, right-click a net/pin
name and select Show Waveform from the pop-up menu. For full details, see the
Using the Waveform Viewer section.
Hide or change columns by right-clicking any column header and making an
appropriate selection.
Select multiple elements to display in the same tab. The following figure has three
tabs, one for each element type.
Collapses
this set of
instances
Expands subsequent
instance selections
to show all pins
Notice the different icons in the tab headings for each element. The icon
represents a net instance. The icon represents a pin. The icon represents
an instance. You can display multiple nets, pins or instances (using Ctrl-select)
within a single tab. Note, however, that you cannot display different elements in
the same tab.
Display the pins for any of the listed instances. To do so, right-click any row and
select Show Instance Pins from the pop-up menu. If the tab is already showing
pins when you right click a menu item, select Don't Show Instance Pins to view
only the information for the parent instances. If you check the Expand instances
to pins by default box, the pins will display whenever you select an instance.
Display the upstream, downstream or exclusive cones of logic for an instance pin.
To do so, simply select the appropriate entry from the right-click pop-up menu.
The following figure shows how you would display the downstream cone of logic
for the Y output pin on instance udi18.
Selected Pin
Much like the coloring of the hierarchy and power table, the SmartSource browser
color codes source lines according to the amount of power consumed by elements
inferred in that line. The color given to a line of code reflects the sum of all elements
inferred by that line. Once you select (click) a line, you can right-click to display the
pop-up menu shown in Figure 61. The three options have the following functions:
Show in --> Hierarchy: Displays the selected instance in the hierarchy browser.
Show in --> Schematic: Displays the schematic elements associated with the
selected line of source code.
Show in --> Source: Brings up the source code of the selected line. If the line
represents a module instantiation and the definition of that module exists in a file,
an additional source code browser is displayed with the editor positioned at the
line where the module definition occurs. If the line represents inferred logic, then
there is no additional source to display and the request is ignored.
You then have the choice of editing the source code. If you select the Edit button,
the line you have selected comes up in the editor that you set the first time you
selected the Edit button. The editor is placed in a read only mode. When you are
done with the browser, click the Close button.
You can use the Search box at the bottom of the browser to search for occurrences
of the string in the current file. The left and right arrow keys search forward and
backward in the file. By default, it searches for any instance.
Sorts
Instances/
Modules
Hierarchy
You can use the button (which by default shows “Power”) at the top right of the
hierarchy view to sort the data. You can sort by Power, Power Density, Instance,
Module or Area.
The power table displays the inferred instances, registers and gates that are within
the hierarchical instance (module) that is highlighted in the hierarchy view in the left-
hand pane.
probed. For details on using the Smart Source browser, see Using the Smart
Source Browser.
— Show in Schematic: Displays the selected instance in the schematic. You can
then zoom-in to get a closer look. For more information see, Using the
Schematic Display.
— Show Properties: displays the selection in the Properties dialog. For more
information, see Using the Properties Dialog.
— Colorize by: Colors the hierarchy browser by the following:
Nothing (the default). This adds no color.
Power: Colorizes the modules in the hierarchy by the power results. The
higher the power consumption, the hotter the color.
Clock Power: Colorizes the modules in the hierarchy by the clock power
results. The higher the power consumption, the hotter the color.
Power Density: Colorizes the modules in the hierarchy by power density
(power/area) as a percentage of the largest power density.
You can also select these items from the pop-up menu when you right-click on a
module in the hierarchy.
Power Table
For the selected instance, you can perform many of the same actions listed under
the Hierarchy sub-menu and the following actions that apply only to selections in
the power table (or apply differently to them):
— Show Downstream Cones: Displays the downstream cone of logic in the
schematic for the selected inferred instance in the power table.
— Show Upstream Cones: Displays the upstream cones of logic in the schematic
for the selected inferred instance in the power table. For upstream cones, you
have the following additional display choices:
Ignore Select Cones/Show Select Cones
Ignores/shows cones of logic for upstream select signals for 2-1 muxes,
unencoded muxes and tri-states.
— Colorize by: Colors the power table by the following:
Nothing (the default). This adds no color.
Power: Colorizes for power as a percentage of the parent instance.
You can also choose to hide different elements in the power table by checking the
following options:
— Hide Gates
— Hide Inferred Instances
— Hide Registers
— Hide IO Pads
By default, all elements are displayed.
You can also select these items from the pop-up menu when you right-click on the
power table.
— Collapse Children
Replaces the schematic of the child instances of the selected instance with just
the block symbol representing the parent instance.
— Show Clock Trees
Displays the clock trees for the selected instance. For details, see Basic Clock
Tree Manipulation.
— Show Downstream Cones
Displays all downstream cones of logic for the given instance.
— Show Upstream Cones
Displays all upstream cones of logic for the selected instance.
Ignore Select Cones/Show Select Cones
Ignore/shows cones of logic for upstream select signals for 2-1 muxes,
unencoded muxes and tri-states.
— Show All Pins
Displays all pins of the selected instance.
— Remove Unexpanded Pins
Removes pins that have not been expanded from the schematic view. For
example, when PowerArtist traces an instance in the schematic it does not
show all of the pins of the instances so as to provide an uncluttered view. You
can display all pins by selecting Schematic > Instance > Show All Pins. You can
then do a trace from one of those pins or invoke the pin/net dialog. If you then
want to collapse the instance to reduce clutter you can select Schematic >
Instance > Remove Unexpanded Pins.
Pin
This menu affects any pin selected in the schematic and has the following sub-
menus:
— Expand Drivers/Loads
Expands the drives/loads for the selected instance pin/port.
— Collapse Driver/Loads
Removes the drives/loads for the selected instance pin/port.
— Show Clock Tree
Displays the clock trees for the selected pin. For details, see Basic Clock Tree
Manipulation.
— Show Downstream Cone
When selected for an output pin of an instance, it generates a schematic of the
downstream cone of logic for that pin. It stops tracing at register boundaries or
primary IOs.
This will give you an idea of how long it will take to display the full design. If you
decide you no longer want to display the full schematic, simply click the stop
button.
Collapse Full Schematic
Clears the schematic view and takes you back to the original schematic, which
consists of the primary inputs and outputs.
Auto Hide Pins
When selected, this toggle suppresses the display of unconnected pins for any
subsequent schematic display. This feature is most useful when showing cones of
logic as it will not display any of the pins that are not associated with the cone.
When Tracing
This menu has two sub-menus:
— Colorize Data Path
Colorizes the data path while performing tracing.
schematic symbol body in the schematic with input ports listed on the left side and
output ports on the right hand side, as shown in the following figure.
Double clicking this element in the schematic while holding the shift key down
expands the body into its equivalent schematic. You can then do a Zoom Fit to see
the following figure.
If you have done a power analysis, you can quickly find the nets that have high
activity since they will be a non-blue color. Other elements are displayed in different
shades of the thermal spectrum indicating that some of their powers are higher than
others. If you want to see how a port of this module is connected to other modules,
simply double-click on the port.
column. Also, the name of the variable/instance associated with the reduction is
listed in this column at the lowest level.
Instance: The name of the instance inferred from the RTL.
Total Power: The total of the logic and clock power of the RTL before any
reduction takes place.
Logic Power: This is all of the power that is not clock power. This include
combinational logic, sequential logic (latches and register) and instantiated library
elements.
Clock Power: The power not including logic power. This will be the power of your
clock distribution network including any inferred buffers, inferred integrated clock
gating cells and any traced elements in your clock network.
Saved Total: The total of the logic and clock power saved after all reductions (or
the specific reduction) are applied.
Saved Logic: The power of the RTL logic that is saved per module, reduction, etc.
Saved Clock: The clock power that is saved after the reduction(s) are applied.
Pcnt Saved: The total of the logic and clock power saved as a percentage of the
total top-level power.
Ideal Saved Logic: The power of the RTL logic saved after the reductions are
applied but before subtracting the logic power required to implement the
reduction.
Ideal Saved Clock: The clock power that is saved after the reductions are applied
but before subtracting the clock power required to implement the reduction.
Area Ovrhd: The total area required to implement the reduction(s).
CGE Imp: The clock gating efficiency (CGE) improvement percentage, which is
the CGE value after reduction minus the CGE before reduction. This value is
displayed for clock-based reductions only (that is, LEC, LNR and ODC in this
dialog). The CGE for each instance of a register is displayed (see the blue text)
and the “Line” row displays the average of all its children.
Bits: The bit width of the register.
AA: The AA (auto-accepted) column indicates whether or not the reduction was
automatically accepted for rewrite. If a reduction is not auto-accepted, you can
hover your mouse over the word “No” to see a tool tip that tells you why the
reduction was not auto-accepted. Note that you can also filter on what has been
automatically accepted. In the Simple Reductions dialog, the PowerBots that can
be auto-accepted are: GMC, LNR and ODC.
Accept: Ticking this checkbox will cause reductions that can be automatically
rewritten to be scheduled (when Automatic is selected from the pull-down menu)
and will add the power saved by any accepted reduction to the power summary
table.
In the input field, enter a specific width (in characters) and click OK. The column
from which you invoked this dialog will adjust to the specified width.
If you specify a column width and check the “Set value as maximum auto-fit width”
box, the specified value becomes the maximum width to which the Auto Size
Column feature will expand. This is useful when instance names are very long
and the Auto Size Column selection would otherwise make the columns too wide.
Note that this maximum setting will persist in the PowerCanvas. If you want to
remove the maximum setting, specify a value of 0 and click OK.
Module Name
Reduction Instance
Auto-Accepted Accepted
Rewrite
The purpose of using these filters is to reduce the amount of data you are viewing at
any point in time. For example, if you want to display only those reductions that were
auto-accepted, you can filter on “Auto-Accepted is yes”:
1. Remove all filtering by clicking the cancel icon.
2. Select Reductions > Mark All Not Accepted
3. Filter on “Auto-Accepted is yes”.
4. Select Reductions > Mark All Accepted.
You can use this type of filtering to restore the auto-accepted state of the reductions
after manually accepting or rejecting reductions in the GUI and saving your changes.
The “All” in the View menu items refers to all of the items currently displayed in the
dialog (not all items in the database). If you previously filtered out some of the data,
that filtered data is not included in the “All” operation.
For example, if you want to accept all LNR reductions you can do the following:
1. Filter out all reductions other than LNR. In the Match field, select “Reduction
contains” and enter LNR in the input field. Click the magnifying icon to filter the
data.
2. Use the Shift-click method to highlight all remaining lines in the dialog.
3. Click Reductions > Mark all Accepted.
4. Select Reductions > Set All Rewrite Actions > Automatic.
5. Click the Save button to schedule the reductions.
In the simple mode, you can see there is only one “Match” filter line. This allows you
to filter on one set of criteria at a time. For example, you filter out any reductions that
do not reduce total power by a given amount. For additional information and an
example, see Filtering Reduction Results in the reduction tutorial.
In the following figure, there are two sorting fields and two filtering fields.
Selects
Sorts by Saved Total descending or
and Accepted ascending Adds a sort option
Removes last sort option
Filters on Reduction
and Module
It is important to note that sorting is hierarchical, that is, it is applied within levels.
Specifically, the sort feature is applied to the different levels in the following order:
1. Module level
2. Reduction level
3. Line level
4. Instance level
Given this sort order, if you sort on bits, you won’t necessarily get the instance with
the highest bits first.
Descending Sort on
Module Total Power
Descending Sort on
Reduction Total Power
Descending Sort on
Line Total Power
Descending Sort on
Instance Total Power
Similar to the Simple Reductions dialog, you can use the What’s This feature to get
information on each of the column headers. You can also use the Match sorting
feature to sort the data.
For details on how you can use the data in this dialog to evaluate MUX power
reduction opportunities, see Understanding the PowerCanvas Data for the MUX
Linter.
Total Power: The total power, including wasted power.
Wasted Power: The total wasted power of the RTL (per module, linter, line or
instance as applicable).
Pcnt Wasted: The total wasted power of the RTL in all instances (per module,
linter or line) as a percentage of the total module power. For modules, it does not
include child modules.
Bits: The bit width of the instance associated with the linter. Note that you will
need to expand to the line level to see this information.
Cone Power: The total average power in the exclusive cones of all instances that
experience wasted toggles (per module, linter or line).
Start Points: The maximum number of start points in the exclusive cones over all
instances that experience wasted toggles (per module, linter or line).
Accept: Ticking this checkbox will cause reductions that can be automatically
rewritten to be scheduled and for all reductions will cause the power saved to be
accumulated in the power summary table.
Click on each of the + signs at the beginning of each line to expand the results. You
can also click on a row that has a + sign and click the * key to expand that row.When
you do so, you will see that each line is color-coded, as shown in the following figure.
Saved Clock: The clock power saved by gating the clock to the register. The value
in parentheses is the total clock power saved in the chain starting from the gated
register if all of the registers in the chain were clock gated. Note that there might
not be any savings if the clock gating percentage is too low, too few register bits
are gated, or if the ICGC consumes too much power.
Ideal Saved Reg: This is the total register power saved in the chain starting from
the gated register if all of the registers in the chain were clock gated, but before
subtracting the power in the enable propagation logic. For a candidate register,
this is the register power saved by gating the clock to the register, before
subtracting the power required to propagate the enable from the upstream
registers.
Ideal Saved Clock: The total clock power saved in the chain starting from the
gated register if all of the registers in the chain were clock gated, but before
subtracting the power due to the ICGCs and additional clock buffers. For a
candidate it is the clock power saved by gating the clock to the register before
subtracting the power due to the ICGC and additional clock buffers. Note that
there might not be any savings if the clock gating percentage is too lower, too few
register bits are gated, or if the ICGC consumes too much power.
Pcnt Gated: The percentage of the time the clock to the register was clock gated.
The value is (1 - duty cycle) of the feedback MUX select signal expressed as a
percentage. For a gated register, the duty cycle is calculated from the simulation
data. For a candidate register, the duty cycle is estimated by ORing the upstream
enables. Sources that cannot be gated are ignored.
Area Ovrhd: The total area required to implement the reduction(s).
CGE Imp: The CGE improvement percentage, which is the CGE value after
reduction minus the CGE before reduction. This value is displayed for all
candidate registers. The root registers may or may not have a CGE value. If the
root register has its enable strengthened or has a generated enable (these roots
will have blue/yellow or just yellow icons) then the CGE improvement is displayed
due to the strengthening or new gating. Note that if the register is a simple user-
gated register, no CGE value is displayed since PowerArtist does not attempt to
improve the CGE for these registers.
Bits: The bit width of the register.
Opt: Indicates (by yes or no) whether you can save more power by strengthening
the gated register enable. If there are “yes” values in this column, you can switch
to the Optimal view (if you are in the Normal view) to see the extra savings. To do
this, simply select View > Analysis > Optimal (this is the default).
Gated Regs: The number of upstream gated registers from which an enable can
be propagated.
The purpose of using these filters is to reduce the amount of data you are viewing at
any point in time. Filters starting with “Any...” mean that if a condition matches any
register in a chain, the whole chain will be visible whereas filters starting with “All...”
require that all registers in a chain match the condition for the chain to be visible.
Filters starting with “Chain...” apply to the values associated with the first or gated
register in the chain which are rolled-up values for the entire chain. Your goal is to
reduce your power as much as possible with as little work as possible. There are
several approaches to this problem.
Focus on a Module
You know by reviewing the hierarchy display that one module consumes more power
than it should. You should then use the “Any Module” filter to examine that particular
module. If the module has multiple instantiations you will see data for all the
instantiations.
From the hierarchy browser again, you might realize that there is one particular
instantiation of the module that is consuming more power than the others. You can
then use the “Any Instance” filter to locate register chains involving that instance. As
an example, you could use “contains” top.core1 to focus on all the register chains
involving that module instance.
By examining the difference between the Normal and Optimal savings values, you
will be able to see the impact that an inefficient enable has on multiple registers in
your design. You can toggle between the two views using the View > Analysis menu.
The status bar at the bottom right of the dialog shows the current mode as Analysis:
type where type is Normal or Optimal (default).
The Opt?. column in the Prism dialog mean “Optimizable?”. If its value is “yes” then
this chain has an inefficient enable which you can optimize to further reduce power. If
its value is “no” then this chain has the best enable possible given the simulation
vectors used to perform the reduction analysis. The dialog displays this field for the
root (gated) register because this is the enable signal that will be leveraged through
the chain. As with other dialog columns you may filter the data using this column’s
value. For example, if you want to see only Prism opportunities that have enables
that are inefficient and can be optimized, you would filter that data using “Chain
Optimized is yes”.
Note that when you change the view between Normal and Optimal, PowerArtist
recalculates all of the values in the dialog, including roll-up values, using the
appropriate data. It also updates the summary pane.
8. Repeat this process on chains that would benefit from more efficient enables. To
do this, first define the following two filters:
a. “Chain Optimized is yes”.
b. “Any Bit greater than 2"
9. Accept all the easy chains by selecting Reductions > Mark All Chains Accepted >
Just Easy Candidates.
10. Make a note of how much the total savings has increased in the summary table. If
this amount is substantial, then modify the previous filter to:
a. “Chain Optimized is yes”.
b. “Any Accepted is yes”
11. Sort on Saved Total (by clicking the column header). You now have a list of
register chains with inefficient enables that if implemented would provide extra
power savings.
12. If there are many chains of this sort it might be useful to see if it is worth the effort
to create better enables to achieve the extra savings. To do this toggle the display
to Normal by selecting View > Analysis > Normal. Make a note of how much the
total savings in the summary table decreases. Based on this decrease, you can
decide whether you want generate better enables or just use the existing enables.
13. At this point, you are now left with things that are potentially more difficult to
implement. Follow your previously established methodologies.
76, if you selected t1/txchan the following name is added to the Waveform
Name field in the Search tab:
*.core1.t1.*
— Cross-probe wires from the schematic or Properties dialog.
If you select a wire, the name of the associated net will appear in the Waveform
Name field as:
*.full_path_to_net
Since there is a single net associated with the wire, there is no need for the .* at
the end of the name. If you select a bus, the name generated will be:
*.full_path_to_bus[*]
If you select an inferred instance or net, then no cross-probing is done to the
waveform browser since there can be no possible match in the FSDB file.
5. Once the Waveform Name entry field is filled-in, click the Search button to perform
the search. Cross-probing performs an automatic search for you. The waveforms
that are found, using the selected waveform source, will be listed in the box below
the entry field.
The following figure shows the Search tab with a list of available waveforms.
In this figure, the search pattern is *.clk which locates 30 waveforms. If your
search returns more than 100 matches, the browser displays the first 100 matches
and generates a warning that the remaining matches will not be displayed. The
Search History selector menu contains a log of all searches in the current session.
As you keep searching, this menu is updated, allowing you to quickly go back and
forth between different search results. This eliminates the need to re-invoke a
search for a given pattern. For any of the listed searches, the first number
indicates the waveform source for which the search was executed, followed by the
pattern that was entered, and finally the number of matches.
6. From the list of available waveforms, select the waveforms you would like to
display, and click the Add waveforms to plot area button. If you want to select all
of the listed waveforms, right-click on the list and select Select All.
If the external file size is large, it may take some time for the waveforms to appear.
Note that although the option appears available, you cannot place more than one
digital waveform in a single plot (it will not look right). Figure 78 shows three
waveforms in individual plots that were selected from the Properties dialog.
Waveform
name
Increases
legend width
Waveform
legend
7. Right click on any plot to bring up a menu of available operations. You can
manipulate the display using the Display Options manu. For easier viewing, the
plots in this figure were increased in width by 20% (Display Options > Increase
height of all plots by 20%). For more information on options, see Using the
Waveform Viewer Options Menu.
st0|txrx_tst.clk
Type of
waveform
Domain type Waveform name
Index of source as it exists in the source
In this figure, the waveform is a state waveform in the time domain for a waveform
called txrx_tst.clk in the first listed source (source index 0).
To take a snapshot of the current waveform view, press the “s” key or right-click on
the plot and select Snapshot from the options menu. You have the choice of either
.png or .gif formats for the saved snapshot. The default format is .png due to it’s
small file size.
Delete a plot, Delete all plots, and Delete other plots (other than the current plot).
additions immediately as you click the Find button. This is more efficient than clicking
back and forth between tabs.
If you are a new user, you might want to tear the Tips tab for quick reference while
you are viewing the waveform tab. This is also useful for comparing time-domain
waveforms on the time domain tab against their frequency spectrum counterpart on
the frequency domain tab.
Chapter 6
Introduction
This chapter describes the command-line flow for creating a scenario file for Verilog,
VHDL and mixed-language designs. The designs may be RT level, gate level or
mixed RTL and gate. The one common command that you will be using is the
Elaborate command.
The scenario file is a binary representation of the hierarchical micro architectural
netlist for your design. This chapter includes simple command examples to help you
understand the flow. More complex examples of commands can be found in the
examples/command_files directory.
You can create your scenario file from the command line (or from the PowerCanvas).
For either approach, you must first make sure the PowerArtist design environment is
set up correctly, as described in Installing and Setting Up PowerArtist.
Chapter Organization
The following topics are covered in this chapter:
Command-Line Flow for Verilog
Command-Line Flow for VHDL
Command-Line Flow for Mixed-Language Designs
Creating Your Map Files
Creating Custom VHDL Packages
Defining Libraries for Command-Line Use
HDL Advanced Topics
a. Build a mapping file that describes the names of all of your VHDL libraries and
the files you want to compile into them. For more detail, see section Creating
Your Map Files.
b. Build “Makefiles” using the mapping file generated during step a by running the
wwvmkr utility. These Makefiles define rules that compile your VHDL design
units in the correct order to meet VHDL language requirements, where all
design units must be compiled before they can be referenced. For more detail,
see section Running the wwvmkr Utility.
c. Run the ptCompileScript utility. This utility executes “make” on all of your
makefiles created in step b, determines all of the libraries and files used in your
design, generates a file, ptSourceFiles.tcl, that contains a series of CompileFile
commands that compile each of your VHDL files into the correct library in the
correct order. See Contents of the ptSourceFiles.tcl File file for a sample of what
this file looks like.
3. Generate a scenario file using the Elaborate command to analyze, elaborate, and
infer your design.
Syntax
source ptSourceFiles.tcl
Elaborate -top top_module_name -scenario_file scenario_name
where ptSourceFiles.tcl is the file generated by ptCompileFileScript,
top_module_name is the VHDL top-module name and scenario_name is the full
scenario file name.
Example
source ptSourceFiles.tcl
Elaborate -top top -scenario_file my.scn
4. At this point, the flow becomes language independent. You will use the
CalculatePower and ReducePower commands to analyze your simulation
information and either run a power analysis or perform a power reduction.
Note that you might want to create run scripts that run these commands for you
instead of entering them directly on the command line. For sample scripts, see
Running an RTL Full-Chip Power Analysis Using Command Files.
The Verilog source files must contain definitions of the modules. For example,
your Verilog source files could contain the following definition of LEAF:
name followed by the entity name and optionally append the architecture name in
parentheses:
\work_lib_name.entity_name(arch_name)
The following uses are also allowable as long as they are un-ambiguous and
represent legal VHDL references:
entity_name(arch_name)
entity_name
The instance ports must have the same ordering, size and direction as ports of the
corresponding VHDL entity. For example, your Verilog source files could contain
the following instantiation for a VHDL module, LEAF:
The VHDL source files must contain definitions of the modules. For example, your
VHDL source files could contain the following definition of LEAF:
entity LEAF is
port( I1, I2 : in bit_vector(1 downto 0 );
OUTPUT : out bit_vector(1 downto 0 ));
end;
Case Sensitivity
Case sensitivity is critical when matching design names supplied in external files like
net names in SPEF files or clock files, or instance or module names in options such
as -top. By default, the scenario database is constructed to be case sensitive if the
design is entirely in Verilog, or case insensitive if the design is VHDL or combination
of VHDL and Verilog.
If you have a mixed-language design and you make it case sensitive, all VHDL
identifiers will be expected to be upper-case and Verilog identifiers will be kept as
they were in the Verilog source files. In a mixed design, you might want to make it
case sensitive if, for example, you happened to have two Verilog identifiers that
differed only in case and you want to search for them in an application such as
power reduction (ReducePower).
AddLibrary STD
CompileFile –type vhdl –library STD -file standard.vhd
AddLibrary IEEE
CompileFile –type vhdl –library IEEE -file std_1164.vhd
AddLibrary WORK
CompileFile –type vhdl –library work -file mydesign.vhd
Now SYNOPSYS and IEEE point to the same location. The order of the parameters
is new name then old name.
Metacomment Processing
VHDL is a strongly typed language and, furthermore, since you can create many
different types, frequent use is made of functions and procedures to provide type
conversion and to overload arithmetic and Boolean operators for your defined types.
When Elaborate processes your design, it analyzes the VHDL into equivalent
hardware elements ranging from simple gates to more complex blocks such as
adders, memories etc. In many cases, sub-programs used to overload operators and
to perform type conversions etc., contain VHDL which has no practical hardware
implementation and if included in the elaboration process would impair the accuracy
of the power analysis.
For example, the conversion of a STD_LOGIC_VECTOR to an INTEGER has to be
performed with the CONV_INTEGER function to satisfy VHDL syntax and semantics,
but from a hardware point of view the two types have the same representation and
so the CONV_INTEGER function passes the STD_LOGIC_VECTOR argument bit
for bit through to the INTEGER return value. To accomplish this without interfering
with the VHDL simulation, use is made of special comments embedded in the VHDL
source code. These special comments are called metacomments and are often of
the form:
-- pragma keywords
When Elaborate encounters this metacomment, it passes the argument bit for bit to
the return value and bypasses the body of the function. You can tell Elaborate to
ignore a section of VHDL (for example, sections that might contain TEXTIO
statements) as follows:
-- pragma translate_off
.. some VHDL to ignore..
-- pragma translate_on
For your convenience, PowerArtist can handle the class of metacomments used by
Synopsys which are included in the packages they distribute. So if you use these
libraries you don’t need to be concerned about inserting your own metacomments to
ensure that the elaboration process infers appropriate hardware from your VHDL.
Then run wwvmkr and ptCompileScript just like you have done in the past.
AddLibrary STD
CompileFile -library STD -file mydir/standard.vhd
AddLibrary IEEE
CompileFile -library IEEE -file mydir/std_logic_1164.vhd
2. Create the compile script for the remainder of the design as follows:
The wwvmkr run would be identical to that used by someone using the
PowerArtist standard supplied libraries. When you run ptCompileScript with the -c
option, PowerArtist generates a ptSourceFiles.tcl file that does not contain any
information related to PowerArtist standard libraries. The -c suppresses this
output.
3. Source the compile scripts and run the Elaborate command:
Example
source myBaseFiles.tcl
source ptSourceFiles.tcl
Elaborate
Each of the sourced files must follow the format for a standard compile script. The
Elaborate command reads and processes the scripts in the listed order.
Consequently, due to VHDL semantic rules, any design unit you need defined
must appear before it is referenced. In short, your standard libraries must get
compiled before all other files and they must be in the correct order.
In the sample script in step 1, the standard.vhd file which is compiled into STD
must be compiled before std_logic_1164.vhd is compiled into IEEE. Since these
two files appear in myBaseFiles.tcl they are automatically compiled before the
files defined in ptSourceFiles.tcl.
Keep in mind that this is a standard Tcl file. You can use standard Tcl features to
locate your particular libraries using environment variables and Tcl variables. For
example, the myBaseFiles.tcl script could be re-written as:
global env
module top(in,out);
parameter size=2;
input [size-1:0] in;
output [size:0] out;
assign out = in+1;
endmodule
You could override the size parameter by adding the -param_map option to your Tcl
command file:
When PowerArtist elaborates the Verilog design, size would be set to 4. If you have
multiple parameters you want to override, you can specify a Tcl list of parameters.
For example:
You can also use the -param_map option to set generics. Take, for example, the
following VHDL fragment:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY TOP IS
GENERIC(SIZE : integer);
PORT ( AA, BB, TT : IN STD_LOGIC_VECTOR(SIZE-1 downto 0);
CC : OUT STD_LOGIC_VECTOR(SIZE-1 downto 0));
END TOP;
ARCHITECTURE A0 OF TOP IS
BEGIN
CC <= BB AND TT;
END A0;
Given this fragment, you could add the following lines to your Tcl command file to set
the SIZE parameter:
module_name.array_name
If the 2D array is used in a named block, generate statement or other named scope
in your Verilog, you must include that scope value. In this case, the name is of the
form:
module_name.scope_name.array_name
Examples
The following Verilog examples show how you would translate the names in your
Verilog to the names required in the bit blasting options. All of the examples show
how the array names would be used in the -preserve_regfile option.
Example 1: Simple use
module top(clk, wen, wadr, wdata, radr, rdata);
<snip> ....
In this case, the array name as specified with the -preserve_regfile option would be:
Elaborate -preserve_regfile top.myblock.myRam
In this case, the array name as specified with the -preserve_regfile option would be:
Elaborate -preserve_regfile top.myblock.mysubblock.myRam
genvar i;
generate
for(i = 0; i < 4; i = i+1)
begin : blk
if (wen)
myRam[wadr] = wdata[i*8+3:i*8];
rdata[i*8+3:i*8] = myRam[radr];
end // mysubblock
end // myblock
end // blk
endgenerate
In this case, the array name as specified with the -preserve_regfile option would be:
Elaborate -preserve_regfile top.blk.myblock.mysubblock.myRam
Note that the scope name for the generate block must be specified without the
[index] for each genvar iteration. The option applies to all generated copies of the
block, so that all copies of “myRam” get preserved.
If blasting does not occur, you will see Warning 2859. An example is:
Warning 2859: design.v:15 inferred regfile instance myblock:myRam
with data width of 6, address width 4.
Chapter 7
Introduction
This chapter describes the steps required before you can run power analysis or
reduction. It includes information on setting net capacitance, handling designs with
multiple power supplies and libraries and clock power specification.
Chapter Organization
The following topics are covered in this chapter:
Estimating Net Capacitances
Using PACE Technology Files During Power Analysis (Beta)
Estimating Pin Capacitance
Handling Voltages in Liberty Format
Handling Designs with Multiple Power Supplies
Running RTL Mixed-Vt Power Analysis
Setting up Clock Power Analysis
Setting up Clock Gating for Power Analysis
Setting up Clock Gating for Power Reduction
scenario file. Second, it generates a warning message for every net in the scenario
file that was not back-annotated after all back annotation files have been processed.
SetSpefFiles {file_name(s)}
This command provides the SPEF reader with all the files that you want to process
(you can specify a single SPEF file). The SPEF reader performs a rapid “read” of
these files to determine their associated design names. These design names must
later be referenced in “*DEFINE” statements following the SPEF specification.
SetTopSpef top_design_name
This command tells the SPEF reader the name of the design that forms the root of
your SPEF hierarchy. Typically, this maps to the top-level design unit in your design
hierarchy. The design name is then used to find the top-level SPEF file, which is
read. As the SPEF reader encounters *DEFINE statements, the other SPEF files are
located and read-in. This command is not required when you specify only one SPEF
file.
Sample SetSpefFiles and SetTopSpef Commands
SetSpefFiles { top.spef middle.spef bottom.spef }
SetTopSpef top
This command associates a particular SPEF file with a specific hierarchical instance
in the design. The instance name must be fully rooted (that is, it must contain the top
module name). Also, in PowerArtist, periods (.) separate levels of hierarchy.
Sample ReadParasitics Commands
ReadParasitics -path mydesign -file ../spef/mydesign.spef
ReadParasitics -path mydesign.mymodule0 -file ../spef/mymodule.spef
ReadParasitics -path mydesign.myblock1 -file ../spef/myblock.spef
Do not use the SetSpefFiles or SetTopSpef commands if you are using the
ReadParasitics command.
Important Notes
Do not use the -spef -spef_file and any of the hierarchical SPEF commands
together this will cause an error.
This reader does an incremental back-annotation. If a net already has parasitics
associated with it, the parasitics specified in the SPEF will be added to them.
If a net specified in the SPEF file is not found in the design, a warning is reported.
You should always specify output loads. This is especially true if you have pads
instantiated in your design. If you supply a default load value using the -
default_output_load option or have annotated your loads using the -load_file option,
then you will not get messages about your primary output nets. Primary input nets
will not be flagged as missing annotations since capacitances on primary inputs have
no impact on power consumption.
Applicable Design
Object Tcl Command Valid Assignment Values
For details on how to use these Tcl commands in the command file, see Estimating
Pin Capacitance.
Note
The power analyzers do not estimate the wiring capacitance of a net with no fanout. For
example, a primary output has no fanout; the only pin on the net is the driver. Therefore,
the estimators do not compute a wiring capacitance for it.
To specify a PACE technology file, you need to include the -power_tech_file command
line option to the CalculatePower command in your run script. A PACE model file will
contain both capacitance models and clock distribution network models. The capacitance
models improve capacitance estimation accuracy. Similarly, the PACE clock
distribution network models improve the modeling of distribution network topology and
improve power analysis accuracy. The models apply to a pure gate level power analysis,
mixed gate and RTL or pure RTL.
PACE models are generated by a CAD engineer using PowerArtist commands. For
details on this process, see Generating PACE Technology Files (Beta) in the PowerArtist
Library Developer Guide.
Note the following points about this run script that uses a PACE model:
The SetClockNet -frequency option is specified for all clocks in the design.
The SetAttribute commands in this script make certain that cell CKENAIAX8 is
considered as an ICGC, while buffer BUFX16 is not considered at all. You may
also set the PT_PACE_CLK_DONT_USE environment variable to false to ignore
the dont_use attribute when determining ICGCs and buffers from your Liberty
libraries. The behavior is, when you specify:
setenv PT_PACE_CLK_DONT_USE false
the “dont_use : true” Liberty attributes is ignored. When you specify:
unsetenv PT_PACE_CLK_DONT_USE
the “dont_use : true” Liberty attribute is honored.
The final line in this script is the CalculatePower specification that includes the
PACE model specification by the -power_tech_file option and other required
parameters. Note that you can also specify the -power_tech_file option to the
ReducePower command.
You will see the impact of the -structure option in two different note messages that
are printed to your log file during a power analysis:
NOTE 9937 Clock net <name> drives <int> enabled register bits.
These registers are being considered for clock gating.
<int> ICGCs (with fanout=<int>) will be used to clock
gate these.
NOTE 9944 Clock net <name> drives <int> enabled register bits.
<int> <branch|leaf> ICGCs (with fanout=<float>) were used to
clock gate <int> registers. <int> registers were left ungated.
All other parameters specified with the SetClockGatingStyle command are ignored
when using a PACE model.
Cell : BUFX12
Library : typical
Count : 1
Cell maximum fanout : 8
Buffer power: static 1pW; dynamic 32.5uW
Fanout capacitance: wire 217fF; pins 17.4fF
The actual pin capacitance values are calculated in the following manner:
min: pin capacitance = (Min_rise + Min_fall) / 2
max: pin capacitance = (Max_rise + Max_fall) / 2
avg: pin captaincies = (Min_rise + Max_rise + Min_fall + Max_fall) / 4
The value you select will determine the manner in which PowerArtist calculates pin
capacitance. PowerArtist calculates pin capacitance using the following algorithm:
1. If rise_capacitance_range and fall_capacitance_range are present then calculate
it using the min, max or avg algorithm
You have a different set of cells that you want to be considered for default cell
selection for RTL power analysis.
You synthesized your design to gates and used different libraries for various
blocks in your design.
Choices like these impact the power analysis of your chip. In PowerArtist, you can
assign Liberty libraries to hierarchical instances with libraries further down in the
hierarchy, overriding those higher in the hierarchy. All children of the hierarchical
instance inherit the library of the parent unless you specifically assign them their own
power library. You will control these choices using the SetLibrary command.
default_threshold_voltage_group : "HVT" ;
For this example, assume that the library provider has established conventions
where HVT implies high threshold voltage devices and LVT implies low threshold
voltage devices. In this case, the following example implies that unless a particular
cell has a threshold_voltage_group that cell is a high Vt device. Another example for
a mult-Vt library would be to have multiple cells with different
threshold_voltage_group attributes:
cell (NAND2_HVT) {
threshold_voltage_group : "HVT";
...
}
cell (NAND2_LVT) {
threshold_voltage_group : "LVT";
...
}
PowerArtist allows you to use Tcl commands to supply these attributes if they are
missing from your libraries using the SetVoltageThreshold command (see
Categorizing Cells for Multiple Vts next).
The SetVT command is used to assign different thresholds to hierarchical instances
in your design. The methodology is based on the assumption that most customers
have an idea of the typical spread between different Vt points in their modules. An
example command is:
In this example, all of the inferred elements that are children of top.block1 and
top.block2 will have their default cells chosen from the libraries that are to be used
for power analysis such that 70% of the default cells have a vt_group with the value
HVT and 30% have the value LVT. The standard PowerCompiler defaulting is used; if
the threshold_voltage_group is not found in a cell, then the
default_threshold_voltage_group value is used. Instances that are not children of
top.block1 and top.block2 will be assigned default cells without any consideration for
the threshold voltage attributes.
It is possible to assign the SetVT command hierarchically. For instance, if one of the
instances is top.block1.child1, this will override the percentage values set by the
top.block1 SetVT command.
Given these sample settings, any cell names matching *_TL1 or *_TL2 will have their
threshold_voltage_group value set to LVT. Additionally, any cell names matching
*_TH will have their threshold voltage string set to HVT. The wild cards supported are
the typical glob-style wild cards.
The SetVT example, in the previous section, assumes that the supplied libraries
categorize the cells based on the Liberty threshold voltage attributes. If they are not
categorized this way, you must use the SetVoltageThreshold command in addition to
the SetVT command.
Given these settings, any cells from the supplied libraries that are available for
top.block1 and top.block2 and have names that match the pattern *_TL will be
treated as part of the LVT threshold voltage group. Cells that match the pattern *_TH
will be treated as part of the HVT threshold voltage group.
Given these settings, for each of the default cells, PowerArtist searches for three
candidate cells for each of the three voltage groups in the library “mixed-vt”.
############################################
# Power Gating Commands
# rx_rq and tx_rq are sleep signals
CreateVirtualSupply -supply vdd -virtual_supply VDDRX -on top.rx_rq
CreateVirtualSupply -supply vdd -virtual_supply VDDTX -on top.tx_rq
CreateVirtualSupply -supply VDDNW -virtual_supply RX_VDDNWS -on top.rx_rq
CreateVirtualSupply -supply VDD -virtual_supply RX_VDDNWS -on top.rx_rq
If a particular default cell type could not be found from all of the specified
threshold_groups in the SetVT command, then default cells of that type will be
chosen independent of those threshold_groups, from the libraries that are set on that
hierarchical instance. The total number of those default cells selected will be shown
in an additional row where “Other VTs” is specified under the “VT Group Name”
column. For example, suppose you specified the following SetVT command:
Assume that a few default cells could not be found for threshold_groups HVT and
LVT, and therefore those cells are chosen from other VTs. In this case, the following
report would be generated.
which you want PowerArtist to infer a clock tree1. If you set SetClockNet -mode
option to “trace” the SetClockBuffer command is optional; it is required for inferred
clock trees.
Sample Usage
Assume a scenario whereby you want to trace a clock named “tclk” which has
special circuitry beginning with instance chip_top.mux21-a that you do not want to
include in the power analysis. Also assume that the wire load model WL_05x5
should be applied to chip_top.tclk and all of the sub-nets that make up this traced
clock net. Given these parameters, you would specify the following SetClockNet
command in your command file:
Furthermore, if you want to infer a clock net, pciclock, you would also include a
section similar to the following:
If you want to set a wire load model to be used for the clock net defined, you can
specify the SetNetProperty command for example:
output. To specify the default fanout for an RTL instance, you have to use the
SetCellDefaultFanout command on the default NAND cell.
Since the SetCellDefaultFanout command never overrides the value for max_fanout
in your library, if you are performing an RTL power analysis, you could do either of
the following:
Find all cells that are two-input NANDs and using wild cards in one or more
commands, set the defaults for just NAND gates.
Do a complete wild card specification on cells and libraries. For example:
SetCellDefaultFanout -cell * -library * -fanout value
If there are no drivers for the net (that is, the clock net is a primary input) clock
buffers are always inserted. Using the specified buffers and their fanouts,
PowerArtist synthesizes a clock tree using the following process:
1. It calculates the number of leaf-level buffers to be inserted based on the number
of clock pins on the net, and the specified fanout for the leaf buffer.
2. It checks the branch fanout to determine how many branch buffers are needed
and then inserts branch-level buffers to drive the leaf buffers.
Using this method, PowerArtist continues to insert branch buffers, level after level,
until a stage is reached in which a single root buffer can drive all of the next branch-
level buffers.
Example
If there are 100 pins on a primary clock net (no driver) and the leaf buffer fanout is 4,
then 25 leaf buffers are inserted at the leaf level. If the branch driver fanout is 10 and
they have to drive 25 leaf buffers, 3 branch buffers are inserted. One root driver is
then added to drive the three branch buffers.
The wiring capacitance from the root buffer to all leaf buffers is calculated using the
wire load model for the clock net on which the buffers are inserted.
Assuming the two register assignments involve a total of 3 bits, you could actually
insert an ICGC that has en1 as the enable signal. The output clock of the ICGC then
becomes the clock input to the two register banks that have feedback muxes with
en2 as one select line and and3 as the other. Assuming that en1 is not enabled
100% of the time, then the clock going to the registers is toggling less often, saving
power.
Just as synthesis tools have constraints controlling the use of weak enables, so does
PowerArtist. There are two options that control this—one to the SetClockNet
command and the other to the SetClockGatingStyle command.
In the SetClockNet, specify the following option:
-enhanced_cg true | false
The default is false. If you set this to true, weak enables will be used when
possible. This option is valid only when you have also specified “-gate_clock yes”.
If you do not specify “-gate_clock yes” and you do specify “-enhanced_cg true”,
PowerArtist will generate the following message
1594: "Clock net XXX will not be clock gated...".
In SetClockGatingStyle, you need to specify the following option:
-min_bit_width_ecg int
The combined bit width of all register banks gated with this weak enable must be
greater than or equal to this value. The default is 2 * -min_bit_width constraint.
— If the -max_bit_width option is not specified then it identifies the best fitting
candidate ICGC based on max_fanout to drive the total number of bits in the
register bank.
If no ICGC is identified that can drive all the bits, PowerArtist will build a
fanout tree based on the clock buffers specified in the clock nets file. Then
the ICGC drives the fanout tree.
The load on the net driving the ICGC is reduced by the number of bits in
the register bank. The load is then increased by one due to the added
ICGC.
— If the -max_bit_width option is specified, PowerArtist chooses an ICGC that
best fits the specified value.
PowerArtist adds as many ICGCs in parallel that are required to drive the
register bank load.
No buffer tree will ever get inferred in this case.
The load on the net driving the ICGC is reduced by the number of bits in
the register bank. The load is then increased by the total number of ICGS
added.
— If your technology library uses max_capacitance rather than max_fanout for its
ICGCs, then the max_capacitance value gets translated into a max_fanout
value by dividing the max_capacitance value by the input_capacitance of the
default flip-flop clock pin.
6. It performs an RTL average power analysis:
a. It determines the duty cycle of the select pin on the 2-1 mux driving the bits as
the duty cycle of the enable pin on the integrated clock cell.
b. It uses the gate-level power model for the integrated clock cell to calculate the
power consumed by the integrated clock cell.
c. It calculates power for the register bits that have been clock gated. The clock
activity for these register bits is derated by the duty cycle for the enable pin in
the clock gating cell. Likewise, the power for the feedback mux bits is reduced
to zero, because these feedback components are eliminated from the circuit.
7. It generates clock gating information in the power report (activities.rpt). It uses this
information while performing various reductions. Clock tree and clock gating
information is displayed in the PowerCanvas main window just above the tree
display. If you display the clock tree, which comes up in a separate window, you
can move your cursor over the different elements in the clock tree and the
dynamic display in the main window will change as you move along. This will
provide information such as Activity, Duty Cycle, Frequency, Net Capacitance, etc.
top
b1 b2
In this design, if you want to synthesize and clock gate block b2 separately from the
remainder of the design, you would use the following command:
SetClockNet -name top.clk -hierarchical top.b2 -gate_clock yes
In addition, PowerArtist can perform clock gating on selective blocks in a design
using the -instance option to the SetClockNet command.
In the same design, if you only want to clock gate block b2 but not clock gate b1,
then use the following command:
SetClockNet -name top.clk -instance top.b2 -gate_clock yes
Both the -hierarchical and -instance options accept a Tcl set of instance names. At
this time, they cannot accept wild cards.
Chapter 8
Introduction
PowerArtist has the ability to perform flexible activity analysis on time slices as small
as a clock cycle. This is called vector analysis. Analyzing your simulation activity
before you perform a power analysis allows you to:
Determine if your testbench exercises your design correctly. A testbench for
average power differs from a testbench for peak power.
Potentially detect functional flaws that are difficult to see by looking at simple
waveforms. For example, if your design should be in an “idle mode” and yet you
see significant activity, this might signal a design error.
The primary method PowerArtist uses to achieve these goals is to provide you with a
graph of activity over time. PowerArtist calculates activity data using the following
equation:
(toggle_counts_of_all_nets/number_of_nets)
Activity =
number_of_clock_cycles
(toggle_counts_of_all_nets/number_of_nets)
=
(toggles_on_clock_signal/2)
You run each simulation once while collecting activity data. Each run provides a
graph for a specific slice of the simulation time, showing the activity for selected
portions of the design on the Y axis and time on the X axis. The portions of the
design are called groups.
Each group corresponds to one line waveform on the graph, and can consist of any
number of hierarchical instances of your design. The activity analysis includes the
children of the defined instance. It averages the activities of all nets in the design
below the top level (as defined in the group). While activity is only an indicator of
power, displaying the average activity for each of the top-level blocks highlights test
suites that fail to access all blocks on the chip at once, resulting in artificially low
power results.
The term “activity” is used to describe the average activity of named nets in the
group. Named nets are nets that have been explicitly specified in a simulation and
appear in a simulation dump, which would include the boundary pins.
PowerArtist’s vector analysis tool has two modes of operation: simulation time-based
and system clock-based. In simulation time-based mode, the average activity of the
group is graphed over time. In system clock-based mode, the ratio of the average
frequency of the group to that of the clock is reported.
Chapter Organization
The following topics are covered in this chapter:
Defining Different Groups at Each Design Phase
Understanding the Design Flow with Vector Analysis
Creating Analysis Graphs
-activity_waveform_graph_type activity_per_cycle |
frequency_per_interval
Choose activity_per_cycle for clock-cycle mode or frequency_per_interval for time-
based mode. When you perform a vector analysis, you should be aligning your
intervals so that the dominant clock edge of your choice is at the first interval start
time and that each interval is some multiple of your clock period. If you choose the
activity_per_cycle mode this happens automatically for you. If you choose the
frequency_per_interval mode, you have to choose the interval start time and the
interval size carefully. The benefit of the frequency_per_interval mode is that it offers
you more flexibility if you don’t want to align your intervals with a clock edge.
This example defines four groups named top, core, pci and rxchan that will have
activity graphs generated for their associated instances.
2. Specify the GenerateActivityWaveforms command to run the vector analysis. You
will use different command options depending on the type of vector analysis you
want to run.
— Apply the following syntax to run a clock-cycle based activity analysis:
GenerateActivityWaveforms -activity_file file_name
-scenario_file file_name -top_instance inst_name
-activity_waveform_clock_name clock_name
-activity_waveform_clock_edge (pos | neg | auto)
-activity_waveform_cycles_per_interval int
-activity_waveform_graph_type activity_per_cycle
-activity_waveform_group_list group_list
-activity_waveform_log file_name
-activity_waveform_number_of_intervals int | all
-activity_waveform_start_clock_cycle int
-ptcl_output_file | -fsdb_output_file
-use_rtl_sim_data true | false
— Apply the following syntax to run a time-based activity analysis:
GenerateActivityWaveforms -activity_file file_name
-scenario_file file_name -top_instance inst_name
-activity_waveform_graph_type frequency_per_interval
-activity_waveform_group_list group_list
-activity_waveform_interval_size time
-activity_waveform_log file_name
-activity_waveform_number_of_intervals int
-activity_waveform_start_time time
-ptcl_output_file | -fsdb_output_file
-use_rtl_sim_data true | false
The following Tcl command file shows a typical set up for a time-based vector
analysis.
GenerateActivityWaveforms \
-activity_file activities.iaf \
-scenario_file txrx.scn \
-top_instance top_instance txrx_tst.top1 \
-activity_waveform_graph_type frequency_per_interval \
-activity_waveform_group_list {top core pci rxchan} \
-activity_waveform_start_time 100us \
-activity_waveform_interval_size 1ns \
-activity_waveform_number_of_intervals 1000 \
-fsdb_output_file ${topModule}_vectors_full.fsdb \
-activity_waveform_log Waveform.activity_vw.log \
3. View the resulting FSDB or PTCL file in a waveform viewer. You can use the
Apache Waveform Viewer (or the Verdi™ product from SpringSoft). A sample
waveform is shown here:
Note that this is the same waveform generated by the full-chip analysis tutorial.
For details on this flow and to try a sample run, see Running an RTL Full-Chip
Power Analysis Using Command Files section in the analysis tutorial.
Chapter 9
Introduction
You can run PowerArtist average power analysis on RTL, gate-level and mixed RTL
and gate designs. Before you run average power analysis, it is highly recommended
that you read Chapter 7, Preparing for Power Analysis, which describes prerequisite
steps you need to perform before you begin a power analysis. It is also highly
recommended that you run through PowerArtist Tutorial Part 1: Power Analysis to
learn how to run both a command-line flow and wizard-based flow (for beginners) for
average power analysis.
Chapter Organization
The following topics are covered in this chapter:
It is also recommended that you specify some additional options to control your
analysis in different ways.
To control the point in time with which to begin power analysis, you can use the
-start_time option.
To stop the conversion of simulation data before the point when the simulation
stopped, specify the stop time with the -finish_time option. This option is also
needed if simulation time ended long after the last signal toggle occurred.
Otherwise, your average power number will be incorrect.
By using -start_time and -finish_time, you can perform a variety of “what-if”
scenarios without having to re-create the simulation activity file.
If you have a gate-level design, you will need to specify the -gate_level_netlist
option. For details, see Performing Gate-Level Average Power Analysis.
If you have an IAF, VCD, or FSDB file that does not match your scenario file you
will want to run with the -mixed_sim_prob_estimation option. For details, see
Running Analysis with Incomplete Simulation Data. You will also need to specify
this option if you have a partial stimulus file. For details, see Analyzing Average
Power Using Partial Stimulus Files.
To perform mode-dependent power analysis, specify the name of the mode file
with the -mode_file option. For details see, Running a Power Analysis in Full
Simulation Mode.
Simulations of large designs could result in a significant number of signals never
leaving the X state. This is particularly true for gate-level designs. This could
severely compromise the accuracy of your results. The Transition Counting on
Nets section describes how you can control some of the effects for RTL designs.
X states in gate-level designs will most likely cause power to be underestimated
since power vectors modeled in your power library will not match transitions to
and from X states. The CalculatePower command generates a warning such as:
wwgaf: Warning 3344: wwgaf encountered 54102 signal(s) that were in
an X state for more than 10ns amount of time.
This means that an X state of duration greater than 10 ns occurred 54,102 times
during the simulation run. This could be one signal being in an X state 54102
times or 54102 signals 1 time.
Seeing this message with an unexpectedly large number of signals is an
indication that your test bench may not be sufficiently robust for performing power
analyses. The duration may be controlled by the -allowed_x_time option.
the ports of the instance. This method is somewhat faster and consumes less
memory than the arc-based method, at the cost of some accuracy. Arcs are still
monitored for the following instances:
— IO pads
— instantiated memories
— non-memory cells containing bus pins
— macro combinational cells with 11 or more pins
To enable arc monitoring for additional cells and instances when using this option,
use the MonitorArcs command. If you want PowerArtist to perform arc-based
estimation for all gate-level instances, you can specify the “-arc_based_estimation
true” option to CalculatePower.
opposed to full simulation mode in which all of the nets are assumed to have .gaf
data available.
$mode "boolean_expression"
$report file_name
$result file_name
Element Description
$report file_name This optional keyword writes a report file for this mode to the
specified file name. You can write this file to any directory by
specifying a relative or absolute file path name; however,
the “~” symbol is not supported in file path name.
$result file_name This optional keyword writes a result file for this mode to the
specified file name.
$mode top.counting_off
$report counting_off.rpt
$mode top.counting_on
$report counting_on.rpt
This file says the design is expected to be in one of two modes: counting_off or
counting_on.
The name of the mode must be the name of a signal such that when it is asserted
high, the system is assumed to be in this mode. In this case, the design is expected
to find two signals: top.counting_off and top.counting_on. The names of the signals
must be in the VCD file and be rooted at the topmost scope (or testbench scope) in
the VCD.
For this mode file, PowerArtist performs two analyses, one for each mode. The
results of the analyses are written to two separate files (counting_off.rpt and
counting_on.rpt).
A second sample mode file might be:
$mode top.sys_request&&top.interrupt
$report request-interrupt.rpt
$mode "top.sys_request&&(!top.interrupt)"
$report request-not_interrupt.rpt
$mode "(!top.sys_request)&&top.interrupt"
$report not_request-interrupt.rpt
$mode "(!top.sys_request)&&(!top.interrupt)"
$report not_request-not_interrupt.rpt
In this example, there are four modes. While processing the simulation data file,
PowerArtist monitors sys_request and interrupt. When either of these two signals
changes state, PowerArtist evaluates the various boolean expressions, determines
which one is true and allocates the energy to that mode bucket.
There are two edge cases for this method of modal power. If the simulator enters a
mode in which none of the mode signals are in a logic 1 state, the simulation activity
for those simulation periods is ignored (that is, the activity will not contribute to the
power of any mode). If more than one of the mode signals are in the 1 state at the
same time, simulation determines that the system is in the mode that appears first in
the mode file (counting_off in the first sample mode file).
Using a mode file containing n different modes results in n+1 report files. One report
file is produced and named for each mode and one report file is produced for the
entire simulation. This mode file produces a report file named for each of the modes,
counting_off.rpt and counting_on.rpt and another report file representing the entire
simulation, which is named as defined by the CalculatePower command.
To obtain the total power consumed during the two modes, you cannot add the
power consumed by each mode. Instead, you must:
1. Convert each power to energy.
2. Add the two energy values together.
3. Convert to power.
This is equivalent to computing a weighted sum (weighted by the amount of time
spent in each mode) of the two powers.
For more information on mode files and additional samples, see Mode File Format in
the PowerArtist Reference Manual.
— Descriptions of the instances and net that were traced as part of the clock tree.
— The clock tree inferencing that occurred including buffers and integrated clock
gating cells that were inferenced.
— The clock gating summary that provides statistics on the number of gated and
ungated registers and the number of integrated clock gating cells either
instantiated or inferenced in your design.
To better understand the content of this report and to see a sample, see the Clock
Domain Power Consumption section in the analysis tutorial.
Total Power Per Supply: lists each power supply used in the design with the power
consumed from each supply. This section is generated when you specify the
option “-average_report_options V” to the CalculatePower command.
To create a report where the internal and pad power are divided into their static
and dynamic components, you can specify the option
“-average_report_options s” to the CalculatePower command.
Power per supply is also reported as static and dynamic components.
Vertical Report: reports power by cell. You can generate/manipulate this section
by specifying the following CalculatePower options:
-vertical_report_instances [{inst1 inst2 inst3...}]
-detailed_veritcal_report true
-vertical_report_sort_mode alphabetical | power
1. Note that the report samples that have just one Power(Watts) column were generated
using the “f” reporting option that combines the static and dynamic power values into
one.
It is important to notice that in each case, the total power reported is the same.
The report options only change which modules are shown in the report, and do
not change the power computation.
If you specify -average_report_options a, the area estimation section will be
included in the report.
6. Area
=======
Possible net types include: Int (internal), Sync (synchronous), and PI (primary
input).
If you specify the -average_report_options t, PowerArtist prints combined static
and dynamic instance power. This is applicable to all sections in the report file.
2. Internal power consumption
=============================
Component Model Power(Watts)
--------- ----- ------------
top.core1.a1.#241 decoder 1.93uW
top.core1.dpmem.m2.m2 DP512x32 1.43mW
The following example of a vertical report includes entries for each model type
only if you request a vertical report by specifying the -vertical_report_instances
and -detailed_vertical_report options to CalculatePower:
adder_pg 2 8mW
comparator 1 1mW
decoder 1 5mW
mux21 2 6mW
register 2 4mW
========================================================
top.core2 12 36mW
Register power ...
...
Note that vertical reports do not include instances that are reported as part of
clock tree power.
Also, it is the number of instances being reported and not the number of bits. You
might have 1 register instance in the design that is 64-bit wide. The cell count will
be 1 not 64. If you performed clock gating in your design, you can obtain the
number of register bits from the Clock Gating Summary as shown here:
Notice the line “Number of registers enhanced gated by inferred clock gating
cells”. This line appears if you request enhanced clock gating be performed (using
the “-enhanced_cg true” option to the SetClockNet command. For more
information on enhanced clock gating, see Performing Enhanced Clock Gating,
Power(Watts)
Component Model Static Dynamic Total
--------- ----- ------ ------- -----
top.core1.r1.a1.#1721 xor 55.1nW 61.7nW 117nW
top.core1.r1.a1.#1722 xor 55.1nW 61.7nW 117nW
...
Total internal power 142uW 347mW 347mW
If you specify the -average_report_options d (and you provided a power diff file),
the new delta on parents in the power diff is reported for each section.
If you specify -average_report_options r (and you have provided a power diff file),
the relative percentage delta on parents in the power diff is reported for each
section.
5. Internal Power difference to abc.res
=======================================
Flow Details
PowerArtist supports the SAIF format for average power analysis only. To use a SAIF
file, you need to specify the -saif_file option to the CalculatePower command in
addition to all of the other options you normally use, for example:
CalculatePower -analysis_type average -saif_file design.saif ...
PowerArtist automatically detects when the given SAIF file uses the SDPD format
and so will perform arc-based estimation. For basic SAIF files, PowerArtist
automatically performs pin-based analysis for RTL designs (and most gate-level
designs).
In flows one and three, nothing special is required. If you are following the Palladium
flow (see Acquiring Simulation Data in Palladium Flows) CalculatePower will check
to make sure that the nets tagged as being selected in the scenario file are present
in your stimulus file. If not, CalculatePower issues a warning message.
vpxmode
// preserve original RTL register names
set naming rule "%s_reg" -register -golden
// preserve hierarchical block names in RTL signal naming
set naming rule %s %L[%d].%s %s -instance
The critical points are highlighted in red. You need to set the use_rtl_sim_data
variable to true to force the name mapping mode to occur. Notice that both the
Elaborate and CalculatePower commands are run in the gate netlist flow (that is,
they both specify the “-gate_level_netlist true” option).
The -use_rtl_sim_data option has a side effect of turning on the
-mixed_sim_prob_estimation and the -pin_based_estimation options. Without
-mixed_sim_prob_estimation turned on, missing nets will be flagged as errors.
The -pin_based_estimation option indicates that many nets are missing from the
design, so a complete arc-based power analysis is not possible.
Advanced Flows
At this point in time, PowerArtist supports name mapping files created by Conformal.
If you have Formality™ from Synopsys or have the ability to create you own name
mapping files, please contact your Apache Application Engineer who can answer
questions about how to handle such a flow. In the future, Apache plans to support
Formality.
Chapter 10
Introduction
PowerArtist allows you to obtain power and current waveforms as a function of time
for RTL, gate-level or mixed RTL and gate designs.
Before you run time-based power analysis, it is highly recommended that you read
Chapter 7, Preparing for Power Analysis, which describes prerequisite steps you
need to perform before you begin any power analysis. In addition, if you are a new
user, it is recommended that you run the full-chip tutorial. For details see, Running an
RTL Full-Chip Power Analysis Using Command Files.
Chapter Organization
The following topics are covered in this chapter:
Understanding the Inputs for a Time-Based Power Analysis
Controlling Your Time-Based Power Analysis
Understanding and Reviewing Outputs and Results of the Time-Based Analysis
Monitoring Flop Clock Activity
Although not required, you will most likely want to use the start_time and -finish_time
options. For details see, Setting Timing Windows for Time-Based Power Analysis.
-top_instance top_simulation_instance
Specifies the full hierarchical name of the top-level module in the simulation
hierarchy.
You can also run this command from the ptshell command line. The following three
examples assume that you are running with “-gate_level_netlist true” set; your
top_instance, scenario file and Liberty files have been specified. So these have not
been shown for clarity.
Example 1
Example 2
Example 3
This example shows you how to perform a time-based analysis on a design that is
not entirely gate level. In this case, you do not specify the -gate_level_netlist true
option.
using the MonitorInstances command. You have your choice of two formats: FSDB or
PTCL.
If you specified the FSDB format (by specifying the CalculatePower -fsdb_output_file
option) you can load and display the waveforms in PowerArtist using the Apache
Waveform Viewer available in the PowerCanvas (select Tools > Waveform Viewer).
A sample waveform is shown in Figure 81.
plot. You can continue measuring the distance to additional data points, or if you
are done, simply press the “r” key again to turn off the active ruler. Marked ruler(s)
will stay on the plot.
The following figure shows one measurement from a single data point.
This feature is useful for presenting data in a presentation or in printed form. If you
want to present waveform data in printed form, it is recommended that you change
the background color to white (to save ink when printing) by selecting Toggle
background color from the options menu.
For more information on how to use the waveform viewer, see Using the Waveform
Viewer.
If you specified an -interval_size that is less than 1ns for a gate-level design,
PowerArtist will perform an instantaneous power computation.
If you specified the FSDB format (using the -fsdb_output_file option) you can also
view that file in the Apache Waveform Viewer (or use Verdi to view your waveforms).
Using Results
You can use the results from a time-based power analysis in a number of ways. First,
peak power and current information can be used during the physical design process
to size your power busses. By selecting various hierarchical instances in your design
that will correspond to physical blocks, you can get a good idea of the power grid
needs on a block-by-block basis. Second, the total peak power and current values
can give you some idea of the power supply needs your chip will have. Third, by
examining areas of the waveform that have large swings in power or current from
one time step to the next, you can get an idea of any di/dt issues. The following
section describes how you can use the waveforms if you are a CoolTime user.
This example tells PowerArtist to monitor the five specified instances. It then
generates results for each hierarchical instance you specified per clock domain as a
waveform in either the PTCL or FSDB file you specify.
To use this feature you must specify the following CalculatePower options:
-analysis_type time_based
-num_clock_cycles int
-reference_clock clock_name
-flop_clock_activity file_name_prefix
The interval size is the same across all clocks and determined by the arguments to
the -reference_clock and -num_clock_cycles options. The sample results waveforms
and text file on the following pages were generated with the full-chip analysis tutorial
using the following CalculatePower options:
-analysis_type time_based
-num_clock_cycles 20
-reference_clock top.clk
-flop_clock_activity fca
Looking at the average flop clock activity in the top graph, you can see that the
transmit clock domain (t1_top.clk) in brown is active when the receive clock domain
(r1_top.clk) in green is inactive and vice-versa. You can also see that the pci clock
domain (top.pci_clk) is always on, indicating that this could be a good candidate for
clock gating. To determine whether it’s worth your time to clock gate the pci clock,
you would need to check the absolute waveforms (displayed on the bottom half of
this figure). Looking at them here, you can see that there are approximately 20 flops
being clocked in the receive block (ut0|top.core1.r1_top.pci_clk) and even more in
the transmit block (ut0|top.core1.t1_top.pci_clk). Therefore, this could indicate a
power bug. To see the exact values, you can either hover your mouse on the
waveforms or read the text report (as shown on the next page).
Instance: top
Clock: top.clk There are 453 flops defined in hierarchical instance “top” and its chil-
Number of Flops : 453 dren that are driven by top.clock. top and its children.
Flop Clock Activity:
Minimum : 206 (45.4%) There existed one or more intervals where:
Maximum : 249 (55%) the minimum # of registers whose clock toggled was 206; the maximum
Average : 230 (50.8%) was 249;
Instance: top.core1.r1
Clock: top.clk
Number of Flops : 77
Flop Clock Activity:
Minimum : 1 (1.3%)
Maximum : 13 (16.9%)
Average : 5.98 (7.77%)
Average Flop Clock Activity:
Minimum : 0.013 (1.3%)
Maximum : 0.169 (16.9%)
Average : 0.0777 (7.77%)
Clock: top.pci_clk
Number of Flops : 19
Flop Clock Activity:
Minimum : 19 (100%)
Maximum : 19 (100%)
Average : 19 (100%)
Average Flop Clock Activity:
Minimum : 1 (100%)
Maximum : 1 (100%)
Average : 1 (100%)
<snip>
Instance: top.core1.t1
Clock: top.clk
Number of Flops : 77
Flop Clock Activity:
Minimum : 1 (1.3%)
Maximum : 13 (16.9%)
Average : 7.12 (9.25%)
Average Flop Clock Activity:
Minimum : 0.013 (1.3%)
Maximum : 0.169 (16.9%)
Average : 0.0925 (9.25%)
Clock: top.pci_clk
Number of Flops : 87
Flop Clock Activity:
Minimum : 87 (100%)
Maximum : 87 (100%)
Average : 87 (100%)
Average Flop Clock Activity:
Minimum : 1 (100%)
Maximum : 1 (100%)
Average : 1 (100%)
<snip>
Chapter 11
Flow Overview
You can use PowerArtist to run a vectorless power analysis. To do so, you need to
employ the following flow:
1. Run the Elaborate command to build a scenario file.
2. Create a Vectorless Activity File (VAF) that contains the activity information.
3. Run the CalculatePower command with the “-vectorless_input_file file_name.vaf”
option.
Vectorless power analysis is a convenient way to quickly generate “what-if”
scenarios that give you a good idea of what your power may be in various situations.
Accurate power numbers come from simulation-based analysis.
Setting the Duty Cycle of Critical Control Signals that are Not Primary Inputs
Suppose that there are critical signals that are tied to a particular value that you want
to remain constant. These constant values can be controlled by supplying a duty
cycles of 0 (constant 0) or 1 (constant 1).
Example
SetNetStimulus -net {top.alu.globalEn} -duty 1
This example sets the duty cycle of top.alu.globalEn to be a constant 1. Using the
SetNetStimulus command in this way accomplishes what case analysis does for
static timing analysis.
Setting the Activity and Duty Cycle for Busses Driven by Tri-Stated Signals
If a signal has multiple drivers that are tri-states, you should set the desired activity
and duty cycle for the bus that represents the combination of all the tri-stated signals
using the SetNetStimulus command.
Following commands are trying to set frequency/activity/duty values on the same net 'N'
SetPortStimulus for inst1.p1 frequency 'f1' duty 'd1' ( command 1 : foo.vaf)
SetInstanceStimulus for inst2 frequency 'f2' duty 'd2' ( command 2 : foo.vaf)
SetInstanceStimulus for inst3 frequency 'f3' duty 'd3' ( command 3 : foo.vaf)
last specified data, frequency 'f3' duty 'd3', will be used.
Chapter 13
Introduction
You can perform functional verification of changes made to the RTL by power
reduction using one of three verification methods. You may choose to use one of the
industry-standard formal verification tools, you may use the nCompare™ utility from
SpringSoft or, you may want to perform a functional simulation of your design.
`ifdef ADS_PA_FV
assign enable = 1'b1;
`else
reg enable;
always @(posedge ck_in)
begin
enable <= next;
end
`endif
Use Model
Use the following flow to run a functional verification with a rule file:
1. Run the ReducePower command to generate a power database.
2. This step is optional. If you want to compare signal changes due to all accepted
reductions (not only those that are rewritten) you can generate a rule file at this
point by specifying the WriteReductionCompareFile (Beta) command with the “-
reduction_compare_type auto” command-line option1. You are also required to
specify the power database, the top instance name, and the name for the output
rule file. For example,
WriteReductionCompareFile -power_db_name design.pdb
-top_instance test.top
-reduction_compare_output_rule_file design.pdb.rc
-reduction_compare_type auto
You can also use the optional arguments to the WriteReductionCompareFile to
perform various functions as described here:
-reduction_compare_error_report_file error_report_file_name
Specifies the name of the file into which nCompare will output any mismatch error
messages. You can use the nce2report SpringSoft utility to generate a readable
text/html report as follows
nce2report -i error_report_file_name ...
-reduction_compare_golden_sim_file file_name
Specifies the path to the original FSDB file. If you do not specify this, PowerArtist
will use a place holder variable (set GoldenFSDB golden_fsdb_name) in the rules
file that you will later need to edit (see step 6).
1. As with all command file commands, you can use pt_set variables in your run script
instead of command-line options.
-reduction_compare_secondary_sim_file file_name
Specifies the path to the new FSDB file that you get when you re-simulate your
design using the rewritten RTL. If you do not specify this option, PowerArtist will
use a place holder variable (set SecondaryFSDB fsdb_file_name) in the rule file
that you will later need to edit (see step 6).
If you specify these options in the command, you will not need to perform hand
editing of the rule file (as described in step 6). For a full list of options, see the
WriteReductionCompareFile (Beta) command description.
If you want to generate a rule file for only the rewritten reductions, you can skip
this step.
3. Run the RewriteRTL command. You will use the resulting Verilog start up file (.vc)
with the accepted RTL changes that you accepted.
4. Run the WriteReductionCompareFile command at this point to generate a rule file
for the reductions that were rewritten by the RewriteRTL command. You can set
the “-reduction_compare_type rw” option (or not specify it at all since “rw” is the
default).
5. Re-simulate your design using the .vc file generated by the rewrite process.
This will produce the updated FSDB file that you will then specify in your rule file.
6. Perform any necessary hand editing of the rule file.
For example, you may have to add the name of the updated FSDB file in the
SecondaryFSDB variable setting.
set SecondaryFSDB <Specify_Secondary_Fsdb_Here>
You can also specify this name when you generate the rule file (if you know it
already) by specifying the -reduction_compare_secondary_sim_file option, to the
WriteReductionCompareFile command. Doing so will automatically set the
SecondaryFSDB variable in the rule file to the correct name.
7. Run the nCompare utility on the rule file using the following command:
nCompare -rule rule_file
Note: You can generate a formatted report that is easy to read in either text or
HTML format using the nce2report utility:
nce2report -i error_file ... additional_options
You can also view the results using the nWave™ tool, also from SpringSoft.
Flow Diagram
The following flow diagram illustrates the process for generating an nCompare rule
file to for functional verification of RTL changes (as detailed in the previous section).
Original
FSDB
ReducePower
pwr database
(.pdb)
RewriteRTL
WriteReductionCompareFile
rule file
.vc file
################################################################################
# Apache Design, Inc.
#
# File Type : PowerArtist/XP nCompare waveform comparison rule file
# Version : 2010.1.3PreAlpha (64 Bit Linux) 31 Aug 2010
# Design Name : top
# Date of Generation : 31 Aug, 2010 14:16:02 IST
#
# Options used -
# -power_db_name : design.pdb
# -reduction_compare_error_report_file : design.pdb.rc.nce
# -reduction_compare_golden_sim_file : test.orig.fsdb
# -reduction_compare_output_rule_file : design.pdb.rc
# -reduction_compare_secondary_sim_file : test.post.fsdb
# -reduction_compare_type : auto; all the signals due to
accepted reductions
# -top : top
# -top_instance : test.top
#
################################################################################
#
# open golden and revised simulation files
#
set GoldenFSDB test.orig.fsdb --> If this is not set, you will need to set it
before using nCompare.
set SecondaryFSDB test.post.fsdb --> If this is not set, you will need to set it
before using nCompare.
#
# set default hierarchy delimiter as "."
#
cmpSetDelimiter .
#
# set maximum errors to 1500 snd maximum per signal errors to 10
#
cmpSetCmpOption -MaxError 1500 -MaxErrorPerSignal 10
#
# compare input and output ports
#
cmpSetSignalPair test.top.clk
cmpSetSignalPair test.top.we
cmpSetSignalPair test.top.me
cmpSetSignalPair test.top.sel_mem_next
cmpSetSignalPair test.top.addr\[0\]
<snip> ...
cmpSetSignalPair test.top.qout\[31\]
#
# compare GMC registers
#
cmpSetSignalPair test.top.mem01.Q\[31\]
cmpSetSignalPair test.top.mem01.Q\[30\]
<snip> ...
cmpSetSignalPair test.top.mem01.LSI_SCAN_OUT
#
# all mismatch error messages will be output to design.pdb.rc.nce
#
cmpSetReport design.pdb.rc.nce
#
# start comparision
#
cmpCompare
Chapter 14
Introduction
Defining voltage domains and performing power gating can help to aggressively
reduce power. Early visibility into design trade-offs involving these techniques at the
RT level of abstraction can be valuable. There are two methods for exploring multiple
voltage domains and performing power gating in PowerArtist—using only PowerArtist
proprietary commands or using a combination of proprietary commands and CPF or
UPF commands. This chapter describes a method for exclusively using PowerArtist
proprietary commands to explore multiple voltage domains, define power domains
and perform either a simulation-based or a vectorless analysis of power domains.
Using Common File Formats
For information on using the CPF or UPF file formats, see Using Standard File
Formats. Note that if you intend to use UPF as input, you still need to thoroughly
read this chapter. The Using a UPF Input Flow (Beta) and Using a CPF Input Flow
(Beta) sections describe only that portion of the overall flow that UPF or CPF can
replace, the remaining steps in the flow are described only in the following sections
in this chapter.
Chapter Organization
The following topics are covered in this chapter:
Required Inputs for Power Gating
Special Option to the Elaborate Command
Setting up Your Command File for Power Gating
Performing Simulation-Based Power Analysis with Power Gating
Performing Vectorless Power Analysis with Power Gating
Understanding the Output Reports for Power Gating Analysis
Defining Libraries
To use the power gating feature, you must add the following attribute to the
appropriate Liberty library.
power_gating_cell
This is a cell-level attribute that indicates that the given cell is a retention flop or
latch. You will use the MapRetentionCell command to map a type of retention cell
specified by the value of this attribute to a particular always block.
A portion of a typical Liberty retention flip-flop cell definition might look like:
cell (retflop) {
rail_connection (PVDD, VDD);
rail_connection (PVDDC, VDDC);
power_gating_cell : LOW;
leakage_power () {
value : 2.72E+01;
when : "RET";
power_level : VDDC;
}
leakage_power () {
value : 5.91E+03;
when : "RET";
power_level : VDD;
}
leakage_power () {
value : 2.89E+01;
when : "!RET";
power_level : VDDC;
}
leakage_power () {
value : 5.89E+03;
when : "!RET";
power_level : VDD;
}
pin (RET) {
internal_power () {
power_level : VDDC;
...
}
internal_power {} {
power_level : VDD;
...
}
}
...
}
Sample Verilog
module top(....);
...
always @(posedge clock)
begin : tag1
out1 = in1;
end
Sample VHDL
out2 = in2;
end if
end process
tag3:process (clock)
begin
if (clock = '1' and clock'event) then
out3 = in3;
end if
end process
end synth;
Later sections will show how to control default cell selection so that out1 can be one
type of retention flop, out2 can be another and out3 can be a third type.
You can just add this CalculatePower command specification to the command file
you created in the following section (that includes the SetLibrary,
CreateVirtualSupply, etc. commands) or you can source that .tcl file from this one
using the “source” command.
After the Total power per supply section (not shown), there a section called “Power
Per Domain”. This section provides power numbers for each defined power domain,
both for average power and On Power. The average power is the overall average
which includes power consumption for times when the power domain is on and off.
Conversely, the “On Power” is the average power consumed only when the power
domain is switched on.
Lastly, there a section called “Power Domain Summary”. This section provides
information on the power domains set up for this design. Information includes library
names and details of the virtual supplies (including On condition setting, analysis
voltage, and static and dynamic power numbers).
Domain domain_0
----------------------
Library typical
File: ../typical.lib
Library typical1
File: ../typical1.lib
Library typical2
File: ../typical2.lib
Virtual Supply: VDDSW_0
Library Supplies:
typical1.VDD
typical2.VDD
typical3.VDD
typical4.VDD
typical.VDD
Estimation Voltage: 1.2 V (from Tcl file)
On condition: domain1_on & ! domain2_on
Average Static Power: 116.33uW
Average Dynamic Power: 23.404mW
On Static Power: 116.41uW
On Dynamic Power: 23.419mW
Virtual Supply: VDDSW_1
Library Supplies:
typical4.VDDNW
typical.VDDNW
Estimation Voltage: 1.2 V (from Tcl file)
On condition: domain1_on & domain2_on
Average Static Power: 799.43nW
Secondly, this report also includes a section called “Power Domain Summary”. This
section provides information on the power domains defined for this design.
Information includes library names and details of the virtual supplies (including On
condition setting, analysis voltage, and static and dynamic power numbers
associated with the supply).
Domain instance_1.ra2
-----------------------
Library typical
File: typical.lib
Library typical2.db
File: typical2.small.lib
Virtual Supply: VDD_typ
Library Supplies:
typical.vdd
Estimation Voltage: 2.5 V (from Tcl file)
On condition: 1
Static Power: 26.9nW
Dynamic Power: 226mW
<snip>
Domain instance_1.ra1
-----------------------
Library typical
File: typical.lib
Library typical2.db
File: typical2.small.lib
Virtual Supply: VDD_typ
Library Supplies:
typical.vdd
Estimation Voltage: 2.5 V (from Tcl file)
On condition: 1
Static Power: 26.9nW
Dynamic Power: 226mW
<snip>
Virtual Supply: VDDNSW1
Library Supplies:
typical2.db.VDDNW
Estimation Voltage: 2.5 V (from Tcl file)
On condition: 1
Static Power: 0W
Dynamic Power: 0W
Chapter 15
Introduction
PowerArtist supports three power formats:
Proprietary PowerArtist commands
CPF commands
UPF commands
The proprietary commands are a superset of the supported commands in both UPF
and CPF formats. These proprietary commands create a superset data model that
gets extended as PowerArtist supports more commands in either the CPF or UPF
standards. CPF and UPF are not translated in the proprietary commands but instead
are mapped directly to the underlying data model. This chapter describes the CPF
and UPF formats. It also includes a small section on using SDC.
Chapter Organization
The following topics are covered in this chapter:
Using a CPF Input Flow (Beta)
Using a CPF Output Flow (Beta)
Using a UPF Input Flow (Beta)
Using an SDC Input Flow
PowerArtist allows you to specify multiple voltage domains and power gating design
intent/constraints in the Common Power Format (CPF). You can perform power
gating analysis by creating multiple power domains in CPF and then providing the
nominal condition for these domains. PowerArtist performs an analysis based on the
power gating constraints that you specify. While you can mix and match CPF and the
PowerArtist proprietary commands, you can’t mix UPF and CPF commands.
end_design
set_array_naming_style string
set_cpf_version value
set_design module
set_hierarchy_separator character
set_power_unit [pW | nW | uW | mW | W]
# general commands
set_cpf_version 1.1
set_design top
set_array_naming_style \[%d\]
set_hierarchy_separator .
set_power_unit uW
#retention cells
define_state_retention_cell -cell_type CK_LOW -cells NRTCLDFFBQ_F1 -restore_function "RET"
create_state_retention_rule -name RULE1 -instances {core1.t1 core1.r1} -exclude \
{core1.t1.l1.* core1.r1.d1.*}
update_state_retention_rules -names RULE1 -cell_type CK_LOW
end_design
Domain top.PD_0
---------------
Library hvt
File: ../../libs/apache/alf/alf_common/hvt.alf
Library RETENTION_EXAMPLE_LIB
File: ../../libs/apache/alf/alf_common/retention.alf
Library Memories
File: ../../libs/apache/alf/alf_vlog/mem.alf
Virtual Supply: top.PD_0.VDDRX_new
Library Supplies:
hvt.vdd
lvt.vdd
Memories.vdd
RETENTION_EXAMPLE_LIB.vdd
Estimation Voltage: 1.1 V (from TCL file)
Average Static Power: 4.4158uW
Average Dynamic Power: 963.97uW
Domain top.PD_1
---------------
Library hvt
File: ../../libs/apache/alf/alf_common/hvt.alf
Library RETENTION_EXAMPLE_LIB
File: ../../libs/apache/alf/alf_common/retention.alf
Library Memories
File: ../../libs/apache/alf/alf_vlog/mem.alf
Virtual Supply: top.PD_1.VDDRX
Library Supplies:
hvt.vdd
lvt.vdd
Memories.vdd
RETENTION_EXAMPLE_LIB.vdd
Estimation Voltage: 1.1 V (from TCL file)
On condition: top.rx_rq
Average Static Power: 812.95uW
Average Dynamic Power: 5.3168mW
On Static Power: 2.026mW
On Dynamic Power: 13.25mW
Virtual Supply: top.PD_1.RX_VDDNWS
Library Supplies:
hvt.VDD
lvt.VDD
Memories.VDD
RETENTION_EXAMPLE_LIB.VDD
RETENTION_EXAMPLE_LIB.VDDNW
Estimation Voltage: 1.1 V (from TCL file)
On condition: top.rx_rq
Average Static Power: 380.62pW
Average Dynamic Power: 1.6759uW
On Static Power: 948.59pW
On Dynamic Power: 4.1767uW
Virtual Supply: top.PD_1.RX_VRET
Library Supplies:
RETENTION_EXAMPLE_LIB.VRET
Estimation Voltage: 1.1 V (from TCL file)
On condition: !top.rx_rq
Average Static Power: 2.2995nW
Average Dynamic Power: 57.093nW
On Static Power: 3.8404nW
On Dynamic Power: 95.354nW
Domain top.PD_2
---------------
Library hvt
File: ../../libs/apache/alf/alf_common/hvt.alf
Library RETENTION_EXAMPLE_LIB
File: ../../libs/apache/alf/alf_common/retention.alf
Library Memories
File: ../../libs/apache/alf/alf_vlog/mem.alf
Virtual Supply: top.PD_2.VDDTX
Library Supplies:
hvt.vdd
lvt.vdd
Memories.vdd
RETENTION_EXAMPLE_LIB.vdd
Estimation Voltage: 1.1 V (from TCL file)
On condition: top.tx_rq
Average Static Power: 1.1263mW
Average Dynamic Power: 7.3124mW
On Static Power: 2.0265mW
On Dynamic Power: 13.157mW
Virtual Supply: top.PD_2.TX_VDDNWS
Library Supplies:
hvt.VDD
lvt.VDD
Memories.VDD
RETENTION_EXAMPLE_LIB.VDD
RETENTION_EXAMPLE_LIB.VDDNW
Estimation Voltage: 1.1 V (from TCL file)
On condition: top.tx_rq
Average Static Power: 1.8383nW
Average Dynamic Power: 6.1384uW
On Static Power: 3.3075nW
On Dynamic Power: 11.044uW
Virtual Supply: top.PD_2.TX_VRET
Library Supplies:
RETENTION_EXAMPLE_LIB.VRET
Estimation Voltage: 1.1 V (from TCL file)
On condition: !top.tx_rq
Average Static Power: 6.0916nW
Average Dynamic Power: 739.44nW
On Static Power: 13.713nW
On Dynamic Power: 1.6646uW
Key Points
In the power domain section of this report, note the following information:
The name of a power domain specified in the CPF file is qualified with the scope
in which it is created.
The name of a virtual supply specified in the CPF file is qualified with the power
domain for which it is created.
The estimation voltage is the voltage of the power/ground nets specified with the
create_power_nets/create_ground_nets commands.
The “on condition” of the virtual supply is the on state condition of the domain if the
domain has its own on state condition. If the domain does not have its own on state
condition, then the on state condition of power/ground nets will be used.
create_global_connection
-domain domain_name
-net virtual_supply_name
-pins power_rail_name
Notes:
Generated for each virtual supply name
in the list specified with the
CreateDomain command.
The power_rail_name is the power rail
for that virtual supply.
set_array_naming_style \[%d\]
set_hierarchy_separator .
set_power_unit mW
You must have a CreateDomain command for the top-level module in the design.
Each domain—including the domain of the top-level module—must be associated
with a SetLibrary command. The SetLibrary command must have the -domain
option.
In the CreateVirtualSupply command, the supply name must not be qualified by
any library name. For example:
If you do not specify the -voltage option with the CreateVirtualSupply command,
the following will happen:
— The voltage value of the supply (power rail) corresponding to the domain’s
library set is selected as the voltage value for that net.
Example
CreateVirtualSupply -supply vdd -virtual_supply {VDD_top}
CreateDomain -name top -instance top -virtual_supply {VDD_top}
# Assume for the example that lib1 has a VDD power rail with a value of 2.5V
SetLibrary -domain {top} -library {lib1 lib2}
# Generated "create_power_nets " rule for "VDD_top" will have 2.5V as its
voltage value
create_power_nets -nets VDD_top -voltage 2.5
— For nets not associated with any Power domain, the voltage value is selected
as the first matching library supply (power rail) voltage from the libraries
specified in the in your command file.
The first virtual supply in the list of virtual supplies specified with the
CreateDomain command should have a -voltage value matching the estimation
voltage of the library set to which that domain is associated. If a primary net has a
non-matching voltage, a create_nominal_condition CPF command with the virtual
supply’s voltage value is generated. This nominal_condition will not have a
corresponding update_nominal_condition and the following warning is issued:
Warning 1556: PrimaryNet VDD_typ1, of domain PD1 has voltage 2.5,
which is different than domain's library set estimation voltage
1.5 Creating a Nominal condition NC_2 with voltage 2.5 which will
not have library set associated to it through
update_nominal_condition in cpf_out file
If you have multiple CreateVirtualSupply commands with same -virtual_supply
name, the following will happen:
— if the -supply values are different, then the same virtual supply is associated
with all of the supplies (power rail) from different CreateVirtualSupply
commands.
— the -voltage and -on values are taken only from the first CreateVirtualSupply
command.
set_cpf_version 1.0
source ../LibDef.cpf
set_design core
set_array_naming_style \[%d\]
set_hierarchy_separator .
This flow uses a combination of Unified Power Format (UPF) commands and
proprietary commands. PowerArtist allows you to specify multiple voltage domains
and power gating design intent/constraints in the UPF format. You can perform
power gating analysis by creating multiple power domains in UPF and then
establishing the power and ground supply connections for these domains. You can
selectively switch these on and off using power switches.
PowerArtist performs an analysis based on the power gating constraints that you
specify. Keep in mind that if you use UPF to define virtual supplies and power
domains, you still need to use the proprietary commands to define libraries, source
files, and other information. It is recommended that you read Analyzing the Effects of
Power Gating with Proprietary Commands before reading this section so that you
understand the scope of what UPF can replace within that greater flow.
6. To specify constraints in the UPF format, you must specify the any of the following
CalculatePower command options, depending on the type of analysis you are
performing:
-average_upf_in_file upf_file_name
-reduction_upf_in_file upf_file_name
-time_based_upf_in_file upf_file_name
An example would be:
CalculatePower -time_based_upf_in_file my.upf
add_port_state port_name {-state {name (nom | min nom max | o)} [-state ...]
set_scope inst_name
set_scope top_module/conb1
create_power_switch sw_Hamsa \
-domain PD_Hamsa \
-input_supply_port {vin VDD_core} \
-output_supply_port {vout VDD_Hamsa} \
-control_port {ctrl 0} \
-control_port {abc 1} \
-on_state {on_state vin {ctrl && abc}}
Domain top_level.PD_m1
----------------------
Library sc9_cmos11lp_base_rvt_tt_nominal_max_1p10v_25c
File: ../libs_converted/sc9_cmos11lp_base_rvt_tt_nominal_max_1p10v_25c.lib
Library sc9_cmos11lp_pmk_rvt_tt_nominal_max_1p10v_25c
File: ../libs_converted/sc9_cmos11lp_pmk_rvt_tt_nominal_max_1p10v_25c.lib
<snip>
Virtual Supply: top_level:PD_m1:VDD
Library Supplies:
sc9_cmos11lp_pmk_hvt_tt_nominal_max_1p10v_25c.VDDG
sc9_cmos11lp_pmk_rvt_tt_nominal_max_1p10v_25c.VDDG
Estimation Voltage: 1.1 V (from TCL file)
Average Static Power: 0W
Average Dynamic Power: 0W
On Static Power: 0W
On Dynamic Power: 0W
Virtual Supply: top_level:PD_m1:VSS
Library Supplies:
sc9_cmos11lp_base_hvt_tt_nominal_max_1p10v_25c.VSS
sc9_cmos11lp_base_rvt_tt_nominal_max_1p10v_25c.VSS
<snip>
Estimation Voltage: 0V (from TCL file)
Average Static Power: 0W
Average Dynamic Power: 0W
On Static Power: 0W
On Dynamic Power: 0W
Virtual Supply: top_level:PD_m1:VDD_m1
Library Supplies:
sc9_cmos11lp_base_hvt_tt_nominal_max_1p10v_25c.VDD
sc9_cmos11lp_base_rvt_tt_nominal_max_1p10v_25c.VDD
<snip>
Estimation Voltage: 1.1 V (from TCL file)
On condition: top_level.m1_power_ctrl
Average Static Power: 152.03nW
Average Dynamic Power: 17.683mW
On Static Power: 228.04nW
On Dynamic Power: 26.525mW
Key Points
In the power domain section of this report, note the following information:
The name of a power domain specified in the UPF file is qualified with the scope
in which it is created.
The name of a supply net specified in the UPF file is qualified with the scope and
domain name in which it is created.
The estimation voltage is the voltage of the UPF port to which the supply net is
connected to in the UPF file.
The “on condition” of the virtual supply is the on state condition of the output port
of the power switch to which the supply net is connected to in UPF.
The connect_supply_net command specifies the library rail connection of the
virtual supply to the library rail in that domain. This corresponds to the Library
Supplies section in the report for each virtual supply.
Additional items to note:
The rail connection of all primary power supply nets of the domains must be
present in the UPF file. This connects the library rail to the supply net for the
domain where the primary power net is the supply net.
PowerArtist does not support the power estimation of special cells such as switch
cells, isolation cells and level-shifter cells.
set_units PowerArtist uses this unit value to define units for the
rest of the numbers in the current SDC file.
set_wire_load_mode SetWireLoadMode
set_wire_load_model SetWireLoadModel
You may have to edit the resulting command file, particularly if you are using it at the
RT level of abstraction. For example, you may want to add information on clock
gating constraint to the SetClockNet command or add the SetClockGatingStyle
command that is not present in SDC files.
Note also that the ReadSDC command uses the pt_set command when generating
the command file. Using pt_set variables is an alternative technique to specifying
options to commands, in this case the CalculatePower command. It is recommended
that you not delete these and replace them with options to the CalculatePower
command.
sdc_top.pIn1 2.5e-10
sdc_top.pOut 8e-14
Chapter 16
Introduction
This chapter describes how to acquire data from a simulation testbench so that
power analysis can provide the most accurate results. PowerArtist provides the three
approaches to acquiring of simulation data, all of which produce a simulation activity
file. In general, the approach that you choose will depend on your design language
(VHDL or Verilog), the level of abstraction and the simulator you are using. If you are
doing RTL VHDL designs, you should choose either FSDB or IAF since these
formats have the capability to store the composite data structure information that is
typical of VHDL designs. If you are doing RTL Verilog, then any approach will work. If
you are doing large gate-level designs (most likely in Verilog), the FSDB format is
preferred because it more efficiently stores toggle information. In general, if you can
create an FSDB file, use that approach. It is fast, compressed, complete and
consistent across all simulators in its naming conventions.
If you have instantiated gates in your design, you need to pay particular attention to
the amount of detail you capture in your format of choice. An instantiated gate may
be as simple as a flip-flop or as complex as a memory. Simply, if it has a power
model in Liberty format it is a gate. When your simulation runs, it will monitor and
write out the nets in your design. If the instance being monitored is a gate-level
instance, some simulators do not capture the nets local to the instance. Some of
these local nets represent the ports of the instance. Whether or not ports are
monitored for gate-level instances is very critical to know when performing power
analysis.
If you are going to perform an average power analysis, then you should be
monitoring the ports of all gate-level instances. If you are going to perform a time-
based power analysis, this is not required. You lose a little accuracy when trying to
perform an analysis of tri-state gates, but the improvement in performance is quite
significant.
Chapter Organization
The following topics are covered in this chapter:
Using an FSDB Approach
Using the Standard VCD Approach
Using an IAF Approach
Acquiring Simulation Data in Palladium Flows
Troubleshooting Tips
If your design was Verilog or Verilog 2001 and you do not have fsdb2vcd in your
path, CalculatePower will generate a Warning message that lets you know you may
be missing an opportunity to improve your performance. Therefore, before running
CalculatePower, you should make sure that fsdb2vcd is in your path. Typically your
.cshrc file should include the following entry:
set path = (SPRINGSOFT_INSTALL_DIR/bin $path)
where SPRINGSOFT_INSTALL_DIR is the full path to your SpringSoft installation
directory. A specific example would be:
set path = (/system/pkg/springsoft/61v1/bin $path)
% ptshell
mknod myout p
fsdb2vcd my.fsdb -o myout &
CalculatePower -activity_file myout
$dumpvars;
$dumpfile ("your_vcd_filename");
The named pipe lets you run the simulator and a file compression program (for
example, compress or gzip) at the same time, passing data using a pipe. It is
recommended that you use gzip, because it is automatically detected by the wwgaf
conversion utility.
The Process
Use the following process to create a compressed VCD file using named pipe:
1. Edit the .v files to direct output to a file to be used as a named pipe, for example:
$dumpfile("my_pipe")
2. Compile the various files.
3. In the simulation directory, execute the following UNIX command:
mknod my_pipe p
The mknod command is located in a system directory that may not be in your
execution path, usually /etc or /usr/sbin.
4. Execute the simulator and start your compression program. Both must be done in
the background.
Example
mysim -f startup_file &
gzip < my_pipe > dump.vcd.gz &
In this example, the name of the simulator executable is mysim and gzip is your
compression program. You can delete my_pipe when the compression program is
finished. In the example the characters “<” and “>” are UNIX redirection
characters. Using these characters redirects the output of my_pipe to the input of
gzip. The output of gzip is directed into a file called dump.vcd.gz.
Note:
The wwgaf utility automatically recognizes gzip files, therefore, you do not need to pipe
gzipped files in wwgaf. If you use any other compression program, you will have to pipe
data into wwgaf, for example:
uncompress -c my_vcd_file.vcd | wwgaf -iaf -
top.in[1]
top.in[2]
top.clk
You will then write a simple script that post-processes this file into the format your
Palladium hardware requires and include the resulting file as part of your Palladium
setup environment. The resulting FSDB or VCD file will only contain the toggle
information for those nets.
This flow works for both RTL, mixed RTL and gate, and pure gate-level designs. The
following nets are monitored in your design:
Nets connected to all of the primary ports (inputs and outputs) of the design.
Nets connected to all of the ports of instantiated gates that are recognized as:
— Memories
— IO cells
— Flip-flops
— Latches
— ICGCs (Integrated Clock Gating Cells)
— Macro cells with pin counts greater than 10 and that are not flip-flops
Troubleshooting Tips
'timescale 1 ns / 1 ns
If your Verilog file does not include a specification of the simulation time, the
simulator uses a default value. For some simulators, the default is one second per
clock cycle. If your signal changes every clock cycle but the simulator time step
defaults to one second, when you import this data and run an analysis with a clock of
10 Mhz, the simulation data for the signal indicates that it changes only once per 10
million clocks. This results in a very low estimate of power for that net and the
modules it drives.
#40551
0T"
0S"
#136520
1S"
1T"
0S"
0T"
Chapter 17
Introduction
If you use Apache’s CoolTime product and want to do simulation-based voltage drop
analysis, you will need an Etcl file (also called a seed vector) generated by
PowerArtist. You can generate an Etcl file for use in CoolTime by using one of two
methods. You can generate it while performing a vector analysis (activity-based) or
while performing a time-based power analysis (power-based). The design you are
analyzing must be at the gate level of abstraction.
Chapter Organization
This chapter is divided into the following sections:
Generating an Activity-Based Etcl File
Generating a Power-Based Etcl File
For detailed information on the format of the Etcl file, see Etcl File Format in the
PowerArtist Reference Manual.
group you defined using the DefineGroup command(s). Based on the sample script,
there will be one waveform generated (for group top) in FSDB format (specified -
fsdb_output_file option).
You would then run this script using the following command:
ptshell -tcl gaw.tcl
When the analysis is complete, you will see the resulting output files
(GenerateActivityWaveformBatch.log, top_activity.fsdb, etc.) in your run directory.
ReadLibrary lib1.lib
ReadLibrary lib2.lib
GenerateEtclFile \
-activity_file ../design_data/rtl_sim/activities.vcd \
-etcl_finish_time 160ns \
-etcl_file top.etcl \
-etcl_start_time 152ns \
-mixed_sim_prob_estimation true \
-scenario_file top.Batch.scn
You would then run this script using the following command:
ptshell -tcl gef.tcl
Standard activity analysis parameters like Liberty libraries, scenario files are
required. The resulting file top.etcl is what you would pass to CoolTime.
-activity_file ../design_data/rtl_sim/activities.vcd \
-etcl_finish_time 160ns \
-etcl_file top.etcl \
-etcl_start_time 152ns \
-mixed_sim_prob_estimation true \
-scenario_file top.Batch.scn \
-use_rtl_sim_data true
ReadLibrary lib1.lib
ReadLibrary lib2.lib
The start time of the cycle of interest is 15ns and the end time is 25ns. The
etcl_file_name value is the value of the etcl_file passed as an option to the
CalculatePower command.
2. Run the GenerateEtclFile command as instructed in the activity-based flow. Here,
you will have to feed forward the data in the pcf.tcl file into the same
GenerateEtclFile command. The example here would be:
ReadLibrary lib1.lib
ReadLibrary lib2.lib
GenerateEtclFile \
-activity_file ../design_data/rtl_sim/activities.vcd \
-etcl_finish_time 25ns \
-etcl_file top.etcl \
-etcl_start_time 15ns \
-mixed_sim_prob_estimation true \
-scenario_file top.Batch.scn
The start_time (15ns) and end_time (25ns) values in the pcf.tcl file are used here
in the GenerateEtclFile command (end_time in this command is called
finish_time). The results file, top.etcl, is what you would specify to CoolTime.
Chapter 18
Introduction
This chapter describes how you can develop OpenAccess database (OADB)
applications and how to apply them in PowerArtist. Note that you can find
OpenAccess programming samples in the $POWERTHEATER_ROOT/examples/
OpenAccess directory. For a list of OADB commands, see Open Access Database
Access Utilities.
Chapter Organization
The following topics are covered in this chapter:
Introduction to OADB Programming
Using the PowerArtist API to Write an OpenAccess Application
PowerArtist Netlist Properties
Writing a Native OpenAccess Application
Apache is continually expanding the legal attributes you can retrieve off of each of
the element types. The attributes names are case sensitive and must be used
exactly as shown.
[Jay, this section should probably be changed right? Right now it reads like these
properties are only for the ptoa:: style commands. Do the new properties
Instance Properties
PowerArtist stores the following instance properties:
Float/Double Values
— Static_Power: static power for the instance (in Watts). For a hierarchical
instance, this is the sum of static power values of all of the children leaf and
hierarchical instances.
— Dynamic_Power: dynamic power for the instance in watts. For a hierarchical
instance, this is the sum of dynamic power values of all of the children leaf and
hierarchical instances.
— Total_Power: the sum of the static and dynamic power values. For a
hierarchical instance, it’s the sum of static and dynamic power values of all the
child instances (leaf as well as hierarchical) in that instance.
— Clock_Power: inferred clock tree power consumed by the instance.
— Leaf_Total_Power: the sum of the total power of all of the leaf-level instances in
the hierarchical instance. As an example, suppose that module “top” has two
children leaf-level instances top.#25 (an inferred instance) and top.mem1 (an
instantiated memory) and one child hierarchical instance, top.block1. Given this
Net Properties
PowerArtist stores the following net properties:
Float/Double Values
— Wire_Cap: estimated wire capacitance in farads
— Duty_Cycle: calculated duty cycle
— Avg_Activity: average activity value
— Frequency: frequency number in Hertz
— Transition_Time: transition time of the net
Pin Properties
PowerArtist stores the following pin properties:
Float/Double Values
— Cap: pin capacitance if the pin is an input pin; load capacitance (that is, the sum
of wire capacitance and capacitance of input load pins) if the pin is an output
pin.
Module Properties
PowerArtist stores the following module properties:
String Values
— Func_Type: module function type
— File_Name: the name of file where the module is defined
Integer Values
— File_Type: the type of HDL used to define the instance, which can have any of
the following values:
0—invalid
1—defined in a Liberty file
2—verilog
3—system verilog
4—vhdl
5—blackbox
— Func_Type: for inferred and instantiated leaf level modules
0—invalid
1—AND
2—NAND
3—NOR
4—OR
5—XOR
6—XNOR
7—INV
8—BUFFER
9—MUX
10—FULL_ADDER
11—MEMORY
12—PAD
13—FLOP
14—LATCH
15—CORE
16—HALF_ADDER
17—ICGC
— Line_Num: the line number where the module is defined in File_Name
Float/Double Values
— Area: the sum of the area of all the instances in the module
The C++ libraries are located in lib and the OpenAccess and AppDef extensions
are located in lib/oa/lib.
2. Make sure the Tcl package autoloader knows the location of these routines. While
there are several ways to do this, the easiest is to set the TCLLIBPATH
environment variable as follows:
3. Make sure that version 8.4 tclsh is in your path. For example, you could set it as:
The rest of this document assumes that you have become familiar with OpenAccess
by reading the HTML and PDF documentation as well as the short example. A critical
section for you to read in the HTML documentation is one called “Tcl Bindings for the
OpenAccess API”. That is required reading before proceeding any further.
Using a Script
You may want to consider using the Bourne shell script, ptoatclsh, that is provided in
the distribution. This script performs three separate functions:
It implements the LD_LIBRARY_PATH changes described in Step 1 and sets the
TCLLIBPATH in Step 2.
It checks to make sure that the tclsh in your path is at least version 8.4 or above.
It launches that tclsh with any parameters you pass it. A sample use would be:
> ptoatclsh
%
This would put you into the tclsh command shell. Another use would be:
ptoatclsh my.tcl
This executes the Tcl file my.tcl and returns.
4. At the beginning of your Tcl program you need to load the Tcl packages. This can
be done in the following manner:
package require oa
package require ptoa
The package command loads the Tcl command extensions into the current Tcl
interpreter. The “oa” in the first line represents the OpenAccess Tcl commands
and “ptoa” represents the PowerArtist OpenAccess Tcl commands required to
access power properties. If you just want to access netlist information, but don’t
want power properties, you can eliminate this last line. To verify that the packages
have been loaded correctly, run the following two commands:
These should return a list of supported commands. If nothing gets returned, the
packages have not loaded successfully.
5. If you want to access power properties and not just netlist information using the
standard OpenAccess data model, then you need to do one final step. Just after
you open the design, you need to do an “attach” that tells the PowerArtist routines
the location of your OpenAccess design.
Getting Started
Running a PowerArtist OADB application involves the following steps:
1. Create the power data using the CalculatePower command.
2. Launch ptshell.
3. While in the ptshell, source the power database file (.pdb) to locate the
OpenAccess database you want to analyze.
4. Run your application by sourcing the appropriate Tcl files.
The following sections describe steps 3 and 4 in more detail.
created a power database file called top.AverageBatch.pdb. The contents of the .pdb
file look similar to the following:
Now, in the directory containing top.AverageBatch.pdb, you would start the ptshell:
ptshell –artist
At this point, you will see the following type of information displayed in your Unix
window:
The return code of 0 at the end can be tested to ensure automatically that the pdb
file successfully loaded. If it did not load successfully, the return code would be 1. For
instance, you can catch the failure by doing something like the following:
The following Design Navigation Utilities are available and are fully documented (full
syntax and examples) in the PowerArtist Reference Manual:
dcd Sets the current design directory to the specified design directory
dpush Pushes the current working directory to a directory stack and then
sets the current working directory to be the design directory
dpop Pops the directory stack and sets the current design directory to the
directory that was on the top of the design stack
dirs Lists the design directory stack
dpwd Lists the current working directory
dls Lists the contents of the design directory
show Shows pseudo-Verilog for the specified instance path or module.
To view the full descriptions, simply click on the blue utility names (this will take you
to the PowerArtist Reference Manual).
getAssociatedNet Returns the path name for the net associated with the
specified pin path
getConnectedPins Returns a list of pins connected to the specified net
getSrcPin Returns the path name of the driving source pin of the
specified pin or net.eturns the path name of the driving
source pin of the specified pin or net
getSinkPins Returns a list of path names of the sink pins driven by the
specified pin (or net)
getFanout Returns a list of path names of fanout endpoints from a
specified pin
getFanin Returns a list of path names of fanin startpoints from a
specified pin.
5. Run the readReductions utility once reading all CSV files generated in the
sequence of steps 2-4.
6. Run the collateReductions command to read in the CSV files you created during
step 5 and generate a formatted report. This report allows you to determine the
best reductions to implement over all of the ReducePower scenarios you ran in
step 3.
See the PowerArtist Reference Manual for complete syntax and examples of
readReductions and collateReductions utilities.
getObject Returns the power database object for the specified the
object path
getOccObject Returns the power database occurrence object for the
specified object path
Index