0% found this document useful (0 votes)
1K views14 pages

PrimeTime PX Tutorials

Uploaded by

Chandan Mallesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views14 pages

PrimeTime PX Tutorials

Uploaded by

Chandan Mallesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Synopsys®

PrimeTime PX Tutorials
Version 000-1, June 2013
Copyright Notice and Proprietary Information
 2013 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietary
information that is the property of Synopsys, Inc. The software and documentation are furnished under a license
agreement and may be used or copied only in accordance with the terms of the license agreement. No part of the
software and documentation may be reproduced, transmitted, or translated, in any form or by any means, electronic,
mechanical, manual, optical, or otherwise, without prior written permission of Synopsys, Inc., or as expressly provided
by the license agreement.

Destination Control Statement


All technical data contained in this publication is subject to the export control laws of the United States of America.
Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility to
determine the applicable regulations and to comply with them.

Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Trademarks
Synopsys and certain Synopsys product names are trademarks of Synopsys, as set forth at
http://www.synopsys.com/Company/Pages/Trademarks.aspx.
All other product or company names may be trademarks of their respective owners.

Third Party Links


Any links to third-party websites included in this document are for your convenience only. Synopsys does not endorse
and is not responsible for such websites and their practices, including privacy practices, availability, and content.

Synopsys, Inc.
700 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com

ii
Contents
Introduction ...................................................................................................................... 4
Averaged Power Analysis Mode Tutorial ......................................................................... 4
Related Files .......................................................................................................................... 4
PrimeTime PX Script File ....................................................................................................... 5
Gate-Level Netlist ................................................................................................................................. 6
Technology Library ............................................................................................................................... 6
SDC File ............................................................................................................................................... 6
Parasitic File ......................................................................................................................................... 6
Switching Activity ................................................................................................................................. 6
Steps for Analyzing Power ..................................................................................................... 6
Changing Your Working Directory........................................................................................................ 7
Running PrimeTime PX ........................................................................................................................ 7
Viewing the Power Report .................................................................................................................... 7
Vector-Free Power Analysis Mode Tutorial ..................................................................... 8
Related Files .......................................................................................................................... 8
PrimeTime PX Script .............................................................................................................. 8
Steps for Analyzing Power ..................................................................................................... 9
Running PrimeTime PX ........................................................................................................................ 9
Viewing the Power Report .................................................................................................................... 9
Time-Based Power Analysis Mode Tutorial ................................................................... 10
Related Files ........................................................................................................................ 10
PrimeTime PX Script ............................................................................................................ 10
Steps for Analyzing Power ................................................................................................... 11
Running PrimeTime PX ...................................................................................................................... 11
Reviewing the Power Report and Waveforms ................................................................................... 12
Viewing Power Waveforms Using nWave Waveform Viewer ............................................................ 12

iii
Introduction
PrimeTime PX supports two modes of power analysis: the averaged and the time-based
power analysis mode. The tool installation directory contains tutorials for both modes of
power analysis. To use the tutorial, copy the tutorial file to your own directory and follow
the instructions in this chapter. The design used in the tutorials consists of a multiplier,
an adder, and logic to connect them. The design example, the activity data files, the
scripts, and the steps you complete to run the examples are described in the following
sections:
 Averaged Power Analysis Mode Tutorial
 Vector-Free Power Analysis Mode Tutorial
 Time-Based Power Analysis Mode Tutorial

Averaged Power Analysis Mode Tutorial


The install_dir/doc/pt/tutpx/averaged directory contains the examples for averaged
power analysis. The averaged power analysis mode is selected when you set the
variable to . This variable must be set before
specifying any power analysis command.
The following sections describe the various files used in the tutorial, the commands used
in the PrimeTime PX scripts, how you run the examples in the tool and how to view the
generated report.

Related Files
In the tutorial directory, the files listed in Table 1 are related to averaged power analysis.
Table 1 Files for the Averaged Power Analysis Tutorial
File name Description
./sim/vcd.dump.gz Value Change Dump (VCD) file
./src/hdl/gate/mac.vg Gate-level netlist of the design
./src/lib/snps/core_typ.db Technology library file
./src/hdl/gate/mac.sdc Synopsys Design Constraints (SDC) file
./src/annotate/mac.spef.gz Parasitic file
./src/annotate/mac.spef.gz VCD file
./sim/mac.saif SAIF file with switching activity
./averaged/ave_saif.tcl Averaged power analysis using switching activity
from the Switching Activity Interchange Format
(SAIF) file
./averaged/ave_vcd.tcl Averaged power analysis using switching activity

4
from the VCD file
./averaged/ave_vf.tcl Averaged power analysis using the default switching
activity

PrimeTime PX Script File


The tutorial contains three examples of Tcl scripts for the averaged power analysis mode.
Example 1 shows one such script.
Example 1 PrimeTime PX Script in the Tutorial For Averaged Power Analysis
#####################################################
# Set the Power Analysis Mode
#####################################################
set power_enable_analysis TRUE
set power_analysis_mode averaged
#####################################################
# Read and link the Gate Level Netlist
#####################################################
set search_path "../src/hdl/gate ../src/lib/snps . "
set link_library " * core_typ.db"
read_verilog mac.vg
current_design mac
link
#####################################################
# Read SDC and set transition time or annotate parasitics
#####################################################
read_sdc ../src/hdl/gate/mac.sdc
set_disable_timing [get_lib_pins ssc_core_typ/*/G]
read_parasitics ../src/annotate/mac.spef.gz
#####################################################
# check, update, or report the timing
#####################################################
check_timing
update_timing
report_timing
#####################################################
# read switching activity file
#####################################################
read_vcd -strip_path tb/macinst ../sim/vcd.dump.gz
report_switching_activity -list_not_annotated
#####################################################
# check or update or report power
#####################################################
check_power
update_power
report_power -hierarchy
quit

For more information about each command, review the remaining sections of this
chapter or check the man pages.
The commands in the script are grouped into different sections, which represent the
basic steps of power analysis. These steps are common for all types of power analysis:

5
1. Set the power analysis mode.
2. Read and link the design.
3. Set input transition and annotate parasitics.
4. Read the switching activity file.
5. Perform power analysis.

Gate-Level Netlist
PrimeTime PX supports a gate-level netlist only. The mag.vg file is a gate-level Verilog
netlist. This netlist contains leaf-level cells that are the instantiation of the library cells.
The valid formats are Verilog, VHDL, EDIF, .db, .ddc, or Milkyway. Verilog is used for
this tutorial. The netlist can be either flat or hierarchical.

Technology Library
The technology library file contains library cells. Each cell has timing, power, and
characterization information. Internal power and leakage power are in the library.

SDC File
The SDC file contains the design constraints. The driver cell information is used to
calculate the transition time on the primary inputs.

Parasitic File
The parasitic file contains the capacitance of the nets. Capacitance is one of the factors
in determining the dynamic power. You can unzip and view the file.

Switching Activity
In the averaged power analysis, you use either SAIF or VCD file formats to read the
switching activity.
A SAIF file is generated either from gate-level or RTL simulation. RTL SAIF captures
switching activity for only part of the design. PrimeTime PX propagates the partial
switching activity throughout the whole design.
You can also use the VCD file to specify the switching activity information. If you do not
specify switching activity information, the tool assumes certain defaults for the switching
activity.

Steps for Analyzing Power


For this tutorial, the working directory is ./tutpx/averaged. The search path is set based
on that directory. It should be your current directory. Before running the tutorial, verify
that PrimeTime PX has been installed.

6
Changing Your Working Directory
Change your current directory to ./tutpx/averaged. The search path setting is based on
this directory.

Running PrimeTime PX
You can run any of the example scripts, ave_saif.tcl, ave_vcd.tcl or ave_vf.tcl for the
averaged power analysis flow. For instance, to run the ave_saif.tcl script, enter the
following command:

PrimeTime PX runs in batch mode. The tool stops when all the commands in the Tcl
script have been executed.
Perform timing analysis before running the command. This improves
performance and avoids additional timing updates triggered by the switching activity
annotation commands.

Viewing the Power Report


In the averaged power analysis mode, using the SAIF file format for activity information,
the command generates the power report as shown in Example 2.
Example 2 Report Generated by the report_power Command

7
Vector-Free Power Analysis Mode Tutorial
When you select the averaged power analysis mode and do not specify any activity
information, the tool performs vector-free power analysis. In this mode, PrimeTime PX
applies the default toggle rate on the primary inputs and black box outputs and then
propagates them. If required, you can change the default toggle rate. This usage model is
useful for quick power estimation.

Related Files
In the tutorial directory, the files listed in Table 2 are related to the vector-free analysis
tutorial.
Table 2 Files for Vector-Free Tutorial
File Name Description
./averaged/ave_vf.tcl PrimeTime PX script for vector-free analysis
./src/hdl/gate/mac.vg Gate-level netlist of the design
./src/lib/snps/core_typ.db Technology library file
./src/hdl/gate/mac.sdc Synopsys Design Constraints (SDC) file
./src/annotate/mac.spef.gz Parasitic file

PrimeTime PX Script
This is a Tcl script. You specify the search path, the link and the target library, the
PrimeTime PX variables and commands for power analysis, in this script.
Example 3 PrimeTime PX Script in the Tutorial For Vector-Free Power Analysis
#####################################################
Link the Design
#####################################################
set search_path "../src/hdl/gate ../src/lib/snps . "
set link_library " * core_typ.db"

set power_enable_analysis true


set power_analysis_mode averaged
set read_verilog mac.vg
current_design mac
link
#####################################################
# set transition time / annotate parasitics
#####################################################
read_sdc ../src/hdl/gate/mac.sdc
read_parasitics ../src/annotate/mac.spef.gz
#####################################################
# power analysis
#####################################################
check_timing
update_timing

8
report_timing
update_power
report_power -hierarchy

Steps for Analyzing Power


The current working directory should be ./tutpx/averaged.

Running PrimeTime PX
To run the ave_vf.tcl script in PrimeTime PX, enter the following command:

PrimeTime PX runs in batch mode and stops when all the commands in the script have
been executed.
Perform timing analysis before running the command. This improves
performance and avoids additional timing updates triggered by the switching activity
annotation commands.

Viewing the Power Report


The power report from vector-free power analysis has the same format as the SAIF-
based report. The report shows only averaged power but not peak power.

9
Time-Based Power Analysis Mode Tutorial
The install_dir/doc/pt/tutpx/time_based contains the examples for time-based power
analysis. The time-based power analysis mode is selected when you set the
variable to . This variable must be set before
specifying any power analysis command.
The following sections describe the various files used in the tutorial, the commands used
in the PrimeTime PX scripts, how you run the examples in the tool and how to view the
generated report.

Related Files
In the tutorial directory, the files listed in Table 3 are related to the time-based power
analysis tutorial.
Table 3 Files for the Time-Based Power Analysis Tutorial
File name Description
./time_based/tim_gatevcd.tcl Script for gate-level time-based power analysis
./time_based/tim_rtlvcd.tcl Script for RTL VCD time-based power analysis
./src/hdl/gate/mac.vg Gate-level netlist of the design
./src/lib/snps/core_typ.db Technology library file
./src/hdl/gate/mac.sdc Synopsys Design Constraints (SDC) file
./src/annotate/mac.spef.gz Parasitic file
./sim/rtlvcd.dump RTL VCD file
./sim/vcd.dump.gz Gate-level VCD file

PrimeTime PX Script
The tutorial contains two Tcl script examples for the time-based power analysis mode.
Example 4 shows the various steps in time-based power analysis:
Example 4 Script Example for Time-Based Power Analysis
#####################################################
# Set the Power Analysis Mode
#####################################################
set power_enable_analysis TRUE
set power_analysis_mode time_based
#####################################################
# link design
##############################################
set search_path "../src/hdl/gate ../src/lib/snps . "
set link_library " * core_typ.db"
read_verilog mac.vg
current_design mac
link

10
#####################################################
# set transition time / annotate parasitics
#####################################################
read_sdc ../src//hdl/gate/mac.sdc
set_disable_timing [get_lib_pins ssc_core_typ/*/G]
read_parasitics ../src/annotate/mac.spef.gz
#####################################################
check_timing
update_timing
report_timing
#####################################################
# read switching activity file
#####################################################
read_vcd ../sim/vcd.dump.gz -strip_path tb/macinst
#####################################################
# analyze power
#####################################################
check_power
set_power_analysis_options -waveform_format out -waveform_output vcd
update_power
report_power
quit

The commands in the script are grouped into different sections, which represent the
basic steps of power analysis. These steps are common for all types of power analysis:
1. Set the power analysis mode.
2. Read and link the design.
3. Set input transition and annotate parasitics.
4. Read the switching activity file.
Perform power analysis.

Steps for Analyzing Power


Set the current working directory to ./tutpx/time_based.

Running PrimeTime PX
The tutorial contains two example scripts for time-based power analysis using
PrimeTime PX. You use the tim_gatevcd.tcl to run the gate-level time-based analysis
and tim_rtlvcd.tcl to run the RTL VCD time-based analysis.
To run the tim_gatevcd.tcl script, use the following command:

PrimeTime PX runs in batch mode. The tool halts when all the commands in the script
have been executed.
Perform timing analysis before running the command. This improves
performance and avoids additional timing updates triggered by the switching activity
annotation commands.

11
Reviewing the Power Report and Waveforms
At the end of the run, PrimeTime PX prints out the power report. Example 5 shows the
report which itemizes the power consumption on each hierarchical instance.
Example 5 Power Report Showing Itemized Power Consumption on Each Hierarchical Instance

Viewing Power Waveforms Using nWave Waveform Viewer


After the power analysis, a power .fsdb waveform file is saved in the current directory.
To view the file, use the waveform viewer called nWave. In the UNIX shell, enter
to start the viewer. Specify to view the usage options and their descriptions.
This viewer requires a snps_fs_nwave license.
Alternatively, in the GUI, choose Power > View Waveforms to open nWave. Figure 1
shows the waveforms for peak power analysis.

12
Figure 1 Peak Power Analysis Waveform

Figure 2 show the waveforms for and cycle accurate peak power analysis respectively.
Figure 2 Cycle Accurate Peak Power Analysis Waveform

13
Software Compatibility
The nWave waveform viewer version 2012.01p2 supports the latest FSDB library and
the fsdb2vcd utility. The FSDB library is used to output the power waveform file in the
.fsdb format, while the fsdb2vcd utility converts the .fsdb format to the VCD format.
The nWave version 2012.01p2 is backward compatible and supports previous releases of
PrimeTime PX.

14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy