16
1 SensitivityBased Leakage Optimization Software User Guide Version 0.4.3 Release 2011.8 VLSI CAD Laboratory UC San Diego http://vlsicad.ucsd.edu

Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

  • Upload
    vukien

  • View
    239

  • Download
    9

Embed Size (px)

Citation preview

Page 1: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 1 

 

 

 

 

 

Sensitivity‐Based Leakage Optimization 

Software User Guide  

 

Version 0.4.3 

Release 2011.8 

 

 

 

 

 

 

VLSI CAD Laboratory 

UC San Diego 

http://vlsicad.ucsd.edu 

   

Page 2: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 2 

 

Contents 

1.  Introduction .............................................................................................................................. 3 

2.  Getting Started ......................................................................................................................... 4 

Preparations .............................................................................................................................................. 4 

Environment file ........................................................................................................................................ 4 

Command file ............................................................................................................................................ 6 

3.  Leakage Power Optimization Flow ......................................................................................... 11 

4.  Timing Closure Flow ............................................................................................................... 13 

5.  Appendix A. Setup File (Example) .......................................................................................... 14 

6.  Appendix B. Environment File (Example) ............................................................................... 15 

7.  Appendix C. Command File (Example) ................................................................................... 16 

 

   

Page 3: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 3 

 

1. Introduction 

This document describes how to use the SensOpt software to optimize leakage power and timing 

requirements in digital design.  SensOpt performs post‐layout stage cell swapping using multi‐Vt and 

multi‐Lgate cells based on the sensitivity function. SensOpt is able to size cells with logical equivalents 

and provides an ECO flow. SensOpt supports Multi‐Mode Multi‐Corner (MMMC) feature, which allows a 

timing analysis with multiple constraints and libraries.   

   

Page 4: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 4 

 

2. Getting Started 

SensOpt exploits Synopsys PrimeTime (or Extreme DA GoldTime) in static timing analysis and uses 

Cadence SOC Encounter in ECO flow.   To run SensOpt, PrimeTime (v2004.12 or higher) or GoldTime 

(v2010.06 or higher) should be available.  SOC Encounter (v7.1 or higher) is required for ECO flow of cell 

sizing case. 

Preparations 

Before running SensOpt, the paths and licenses for PrimeTime (or GoldTime) and SOC Encounter should 

be prepared. A path for SensOpt binary can be specified by the following command in c‐shell:  

 An example of setup file is in Appendix A (also in <install_directory>/SensOpt/tutorial/env.csh>).    

SensOpt software is executed with the following command: 

 

<environment file> is used to set environment variables and library information. <command file> 

contains information of input/output files and command options. 

Environment File 

In the environment file, following information is specified. 

 

 Example of environment file is in Appendix B (also in <install_directory>/SensOpt/tutorial/<test_case> 

/test.env).  

-home <install_directory/SensOpt> -dbpath <directory path of .db files> -db <.db library files> -libpath <directory path of .lib files> -lib <.lib library files> -lef <.lef files of standard library and macro cells> -capw <capacitance table for SOC Encounter (cworst)> # required only for ECO -capb <capacitance table for SOC Encounter (cbest)> # required only for ECO -suffix [<name suffix for multi-Vt or mulit-Lgate libraries> ] -mmmcEnv <MMMC environment file> # required only for MMMC mode

% SensOpt -env <environment file> -f <command file>

% set path=(<install_directory>/SensOpt/bin $path)

Page 5: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 5 

 

Home directory (‐home) 

Install directory of SensOpt should be specified with “‐home” option. 

Library path and files (‐dbpath, ‐db, ‐libpath, ‐lib) 

Synopsys DB (.db) and liberty (.lib) files are specified with this option. Multi‐Vt and multi‐Lgate libraries 

can be specified by adding libraries repeatedly (please see Appendix B). 

LEF files (‐lef) 

Library Exchange Format (LEF) files are provided with “‐lef” option. The LEF is used at OpenAccess and 

SOCEncounter in SensOpt flow.  

Capacitance table (‐capw, ‐capb) 

Capacitance tables for worst and best corner cases are provided with “‐capw” and “‐capb” options. 

When the cell swap is performed without ECO case, the capacitance table will not be required (This 

information is required only for SOC Encounter). 

Suffix of library cell name (‐suffix) 

Naming convention for multi‐Vt and munti‐Lgate cells is specified with “‐suffix” option. During the 

optimization flow, cell swap (Vt assignment and CD biasing) is performed with this naming convention – 

SensOpt replaces suffix patterns to find candidate cells for the cell swap. For example, four kinds of 2 

input AND gate (AN2D0) cells can be specified with different suffixes ‐ [_LVT], [_NVT_N05], [_NVT_P05] 

and [_HVT]. In this case, AN2D0_LVT, AN2D0_NVT_N05 (NVT with ‐5ns CD biasing), AN2D0_NVT_P05 

(NVT with +5ns CD biasing) and AND2D0_HVT cells can be swapped with each other during the 

optimization. The suffix pattern allows NULL case with “‐suffix []” and can be used as a prefix pattern. 

Example) LVT_AN2D0, AN2D0 and HVT_AN2D0 case:  –suffix [LVT_], ‐suffix [], ‐suffix [HVT_]   

MMMC environment file (‐mmmcENV) 

Different libraries and SDC files can be specified in MMMC environment file (please see Appendix B). 

MMMC analysis mode is enable by “‐mmmc” option in the command file. 

 

 

 

   

Page 6: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 6 

 

Command File 

In the command file, following information is specified. 

 Example of environment file is in Appendix C (also in <install_directory>/SensOpt/tutorial/<test_case> 

/test.env). In the command file, design name (‐c) is required and four input files (.v, .def, .spef, .sdc) 

should be provided. All other options can be optional. 

-mode mode for SensOpt (1 ~ 4) # default: 1(leakage optimization) -op option of cell swap or sizing (1 | 2) # default: 1(cell swap) -c <design name> # top-level instance name -v <Verilog input file> # default: {design name}.v -def <DEF input file> # default: {design name}.def -spef <SPEF input file> # default: {design name}.spef -sdc <SDC files> # default: {design name}.sdc -ck <clock port name> # default: clk -n number of swaps before STA (integer) # default: 0 (optional) -sf sensitivity function (1~4) # default: 1 (optional) -opt_effort optimization effort (high | medium | low) # default: medium (optional) -hold check option for hold time violation (0 | 1) # default: 1 (optional) -maxTr check option for max transition violation (0 | 1) # default: 1 (optional) -g guardband during optimization (unit: ns) # default: 0.0 (optional) -rpt <report output file> # default: result.rpt -vout <netlist output file> # default: {design name}_eco.v -defout <DEF output file> # default: {design name}_eco.def -spefout <SPEF output file> # default: {design name}_eco.spef -mmmc enable MMMC mode # default: false -eco enable SOCE ECO procedure # default: false -noPTPX disable PrimeTime-PX feature # default: false (enable PT-PX) -PTSI enable PrimeTime-SI feature # default: false (disable PT-SI) -useGT use GoldTime in static timing analysis # default: false (use PrimeTime) -dont_touch_inst <instance> -dont_touch_cell <cell name>

  

Page 7: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 7 

 

Mode for SensOpt (‐mode) 

1: leakage optimization  

2: timing closure 

3: leakage optimization + timing closure 

4: fix max‐transition violation  

10: leakage optimization (B. Zahn SNUG 2008 method)  

Option for SensOpt (‐op) 

1: use cell swapping method with multi‐Vt and multi‐Lgate libraries. Multi‐libraries are specified with “‐

lib” and “‐suffix” options in the environment file.  (See Appendix B.)  

2: use cell sizing method with logical equivalent cells. The logical equivalent cells are recognized from 

Liberty (.lib) files – ‘footprint’ information. 

Number of swaps (‐n) 

If the value is larger than ‘1’, SensOpt performs multiple swaps at a time to expedite runtime. If the 

value is ‘0’ (default), SensOpt performs multiple swaps as many as possible. With multiple swaps at a 

time, runtime can be improved significantly.  

Optimization effort (‐opt_effort) 

The “‐opt_effort” option controls optimization effort. Using higher effort value will allow optimization to 

run longer, which can lead to better leakage reduction QoR. “high”, “medium” and “low” effort can be 

selected (default: medium). 

Sensitivity function (‐sf) 

During the leakage optimization and timing closure, cell swap is performed according to the cell 

sensitivity. Each sensitivity function can be selected as following table 

sensitivity option  description for sensitivity function (leakage optimization) 

1  Δleakage slack  

2  Δleakage / ∆delay 

3  Δleakage slack / ∆delay 

4  Δleakage / ∆slack 

sensitivity option  description for sensitivity function (timing closure) 

1  Δslack / δ slack WNS  

2  Δslack / δ slack WNS ∆leakage  

 

Page 8: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 8 

 

Δleakage: the change (improvement) of leakage power after a cell is swapped 

Δdelay: the change of cell delay (maximum delay of each timing arc) after a cell is swapped 

slackmin: the minimum slack among all timing arcs in a cell after a cell is swapped 

Δslack: the change of minimum cell slack after a cell is swapped 

WNS: worst negative slack of current design 

δ: small positive value 

Check option for hold time and max transition violation (‐hold, ‐maxTr) 

If the option is specified as ‘1’, the violation is considered during leakage and timing optimization. 

 Guardband option (‐g) 

The guardband delay (unit: ns) is considered during the optimization. After cell swapping, if slack of the 

cell is less than guardband value, the swap is restored.   

Output files (‐rpt, ‐vout, ‐defout, ‐spefout) 

Report file and design output files are generated with the name in this option. 

MMMC mode (‐mmmc) 

MMMC analysis is enable with “‐mmmc” option. 

ECO operation (‐eco) 

With “‐eco” option, ECO operation is performed automatically with SOCE. If this option is not enabled, 

SensOpt just provides cell swap list (eco.tcl) with SOCE ECO format.  

PT‐PX operation (‐noPTPX) 

SensOpt obtains the leakage result from PrimeTime‐PX (default). With “‐noPTPX” option, SensOpt 

calculates the leakage power from liberty (.lib) files. If you have no license for a PrimeTime‐PX feature, 

this option should be specified. If ‘‐useGT’ is set, this option is automatically set. 

PT‐SI operation (‐PTSI) 

With “‐PTSI” option, SensOpt enables PrimeTime SI feature, which makes a crosstalk analysis with the 

cross‐coupled capacitance information.  If you have no license for a PrimeTime‐SI feature, this option 

should not be specified. If ‘‐useGT’ is set, this option is automatically reset. 

STA option (‐useGT) 

SensOpt can change a static timing analyzer with “‐useGT” option. Without this option, SensOpt uses 

PrimeTime in static timing analysis (default). If “‐useGT” is specified in the command file, SensOpt uses 

GoldTime in STA.  

Page 9: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 9 

 

Don’t touch cell (‐dont_touch_cell) 

Specified library cells are not touched during cell swap or sizing operation. Wildcard (*) can be used in 

the cell name. This command can be repeated to specify cells. 

Don’t touch instance (‐dont_touch_inst) 

Specified instances are not touched during cell swap or sizing operation. Wildcard (*) can be used in the 

instance name. Entire instances in a sub‐module can be specified also with the wildcard character (ex. ‐

dont_touch_inst   mod‐A/*). This command can be repeated to specify instances. 

   

Page 10: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 10 

 

Design Data ‐ Inputs 

Input type  Description 

LEF The LEF file contains technology, cell boundary and pin data. A LEF description is required for each cell in the library and macro cells. 

Synopsys DB and liberty files 

Synopsys DB (.db) and liberty (.lib) files contain timing and power characterization data for cell library. 

SDC The SDC file contains timing constraint information that drives optimization decisions. 

SPEF The SPEF file contains segment level parasitic information that is used for delay calculation during optimization. 

Verilog The Verilog netlist contains connectivity information used during timing analysis. 

Capacitance table  The capacitance table is used for RC extraction in the SOC Encounter. 

Design Data ‐ Outputs 

Out type  Description 

Reports  SensOpt generates output report files (including reports on timing and power). 

ECO script SensOpt generates ECO scripts (eco.tcl for SOCE and swaplist.tcl for PrimeTime and GoldTime) which can be used at SOC Encounter directly. 

Verilog The optimized Verilog file generated by SensOpt. (NOTE: This version of SensOpt can write a flattened‐netlist only. In a hierarchical netlist case, output netlist should be generated alternatively from ECO lists ‐ eco.tcl, swaplist.tcl) 

 

   

Page 11: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 11 

 

3. Leakage Power Optimization Flow 

In leakage optimization mode, SensOpt analyzes the entire design and reduces leakage power while 

satisfying design performance constrains – i.e., setup time, hold time and max transition. 

Open Access(lef2oa, def2oa)

cell library(. lef)

design (.def)

design (.v, .spef)

PrimeTime(or GoldTime)

SensOptOA db

Tcl socket

I/F

1. read design2. sensitivity calculation3. swap cells and check timing

- multi-Vt cell- multi-Lgate cell- logical equivalent cell (resize)

4. write netlist result or swap list

design out (.v)

SOC Encounter(optional )

ECOresults

 

Figure 1. SensOpt optimization flow 

Figure 1 describes the optimization flow of SensOpt. SensOpt reads design from OpenAccess and 

performs optimization base on sensitivity of each cell. To reduce power, SensOpt downsizes cells with 

two methods – 1. cell swap with multi‐Vt or multi‐Lgate libraries, and 2. cell sizing with logical equivalent 

cells. During the optimization, timing and power information is updated from PrimeTime (or GoldTime) – 

via Tcl sockets (TCP connections). After finishing the optimization, ECO flow is performed if cells are 

sized with the logical equivalent cells. 

 

Page 12: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 12 

 

Algorithm 1 shows the detail heuristic of leakage optimization. In the code, SSTA is a standard static 

timing analysis and ISTA(c) is an incremental STA after cell c is changed. Algorithm 2 shows an 

implementation for one of sensitivity function. 

Cell swap with multi‐Vt or multi‐Lgate libraries (‐op 1) 

SensOpt performs post‐layout stage cell swapping using multi‐Vt and multi‐Lgate cells. To swap with 

other library cells, all libraries should be provided with “‐db” and “‐lib” option in the environment file. 

And, the naming convention should be provided with “‐suffix” option. In downsizing procedure (line 10 

in Algorithm 1), cell will be swapped according this suffix naming convention. For example, if _LVT, _NVT 

and _HVT suffixes are provided, AN2D0_NVT cell will be downsized with AN2D0_HVT cell. In the cell 

swap case, ECO flow is not required. 

Cell size with logical equivalent (‐op 2) 

SensOpt is able to size cells with logical equivalents and provides an ECO flow. Logical equivalent cells 

are recognized from Synopsys Liberty (.lib) file. In the downsizing procedure, cell is re‐sized with a 

smaller cell. For example, AN2D4_NVT cell will be downsized with AN2D2_NVT cell since AN2D4_* and 

AN2D2_* have same foot print in the liberty (.lib) file. After finishing the optimization, SensOpt 

generates ECO list (eco.tcl) and executes ECO procedure automatically with Cadence SOC Encounter. 

MMMC analysis (‐mmmc) 

SensOpt supports Multi‐Mode Multi‐Corner (MMMC) feature also in timing analysis. If the MMMC mode 

is enabled with “‐mmmc” option, additional PrimeTime (or GoldTime) sockets are opened and timing 

violation (setup, hold and max transition) is checked in each PrimeTime (or GoldTime) socket. In the 

additional sockets, different libraries (for different condition) and different SDC files (for different mode) 

can be loaded. Libraries and SDC files for each socket can be specified with “‐mmmcEnv” option in the 

environment file. 

   

Page 13: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 13 

 

4. Timing Closure Flow 

SensOpt can repair timing violations with cell swap or cell sizing method. Timing closure flow of SensOpt 

is similar to its leakage optimization flow. SensOpt upsizes cells in the critical paths with a negative 

timing slack. This timing closure flow can be used after the leakage optimization when the timing 

violation is produced during the leakage optimization. 

Algorithm 3 presents pseudocode of the timing closure. 

   

In the timing closure flow, SensOpt does not support cell sizing with logical equivalents and only cell 

swap is used. It is because that cell sizing to the larger cell makes ECO side effects (the cell should be 

placed in other space and this can make timing violation). 

SensOpt can also repair max transition violation with cell swap or cell sizing method (‐mode 4). 

Page 14: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 14 

 

5. Appendix A. Setup File (Example) 

 

setenv LM_LICENSE_FILE [email protected]     # license setup for PrimeTime and SOCE 

setenv PRIMETIME /home/tool/synopsys/PrimeTime/C‐2009.06‐SP2 

setenv EXTREME_DA /home/tool/extreme‐da/goldtime‐2010.06.r1 

setenv ENCOUNTER /home/tool/cadence/SOC81 

setenv SENSOPT   /home/tool/SensOpt 

setenv OA_PATH   /home/tool/SensOpt/oa 

setenv LD_LIBRARY_PATH /home/tool/SensOpt/oa/linux_rhel21_32/opt:$LD_LIBRARY_PATH 

set path=($PRIMETIME/bin $path) 

set path=($PRIMETIME/lib $path) 

set path=($EXTREME_DA/bin $path) 

set path=($ENCOUNTER/bin $path) 

set path=($OA_PATH/bin $path) 

set path=($SENSOPT/bin $path) 

 

Page 15: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 15 

 

6. Appendix B. Environment File (Example) 

 

* Naming suffix should be provided in order of delay – from faster cells to slower (low power) cells. 

* ‐capw, ‐capb information is needed only for cell sizing (‐op 2 in the command file) + SOCE ECO flow.  

* MMMC environment file (mmmc_bst.env) 

 

* If you are using GoldTime in STA, ‘‐libpath’ and ‘‐lib’ should be specified instead of ‘‐dbpath’ and ‘‐db’. 

‐name    mmmc_bst 

‐dbpath   /home/ TOOL/SensOpt/tutorial/libraries/db/bst 

‐db    LVT_P00.db 

‐db     NVT_P00.db 

‐db     HVT_P00.db 

‐sdc    test.mmmc_bst.sdc 

‐home     /home/TOOL/SensOpt 

‐dbpath   /home/ TOOL/SensOpt/tutorial/libraries/db/wst 

‐db     LVT_P00.db 

‐db     NVT_P00.db 

‐db     HVT_P00.db 

‐libpath   /home/ TOOL/SensOpt/tutorial/libraries/lib/wst 

‐lib     LVT_P00.lib 

‐lib     NVT_P00.lib 

‐lib     HVT_P00.lib 

‐lef     /home/TOOL/SensOpt/tutorial/libraries/lef/LVT_P00.lef 

‐lef     /home/TOOL/SensOpt/tutorial/libraries/lef/NVT_P00.lef 

‐lef     /home/TOOL/SensOpt/tutorial/libraries/lef/HVT_P00.lef 

‐lef    /home/TOOL/SensOpt/tutorial/libraries/lef/register_files.lef 

‐capw    /home/TOOL/SensOpt/tutorial/libraries/cap/cworst.captable 

‐capb    /home/TOOL/SensOpt/tutorial/libraries/cap/cbest.captable 

‐suffix    [_LVT_P00] 

‐suffix    [_NVT_P00] 

‐suffix    [_HVT_P00] 

‐mmmcEnv  mmmc_bst.env 

‐mmmcEnv  mmmc_wst_scan.env 

‐dont_touch_cell   AOI* 

Page 16: Sensitivity Based Leakage Optimization Software User Guidevlsicad.ucsd.edu/SIZING/software/SensOpt-UsersGuide-v0.4.3.pdf · SensOpt exploits Synopsys PrimeTime ... Library Exchange

 16 

 

7. Appendix C. Command File (Example) 

 

‐mode    1 

‐op     1 

‐c     lsu_stb_ctl 

‐ck     rclk 

‐def     lsu_stb_ctl.def 

‐spef     lsu_stb_ctl.spef 

‐v     lsu_stb_ctl.v 

‐sdc     lsu_stb_ctl.sdc 

‐n     0 

‐sf     1 

‐hold     1 

‐maxTr    1 

‐g     0.01 

‐rpt    result.rpt 

‐vout    lsu_stb_ctl_eco.v 

‐defout   lsu_stb_ctl_eco.def 

‐spefout  lsu_stb_ctl_eco.spef 

‐mmmc