Application Note POCV/AOCV data generation with GoldChar© 1. Introduction In order to ensure the proper design operation across the variation space, timing verification has to be performed on all relevant combination of process and environmental parameters. The need for accurately capturing the process variations on the design side has led to investigation and deployment of new analysis techniques, such as On Chip Variations (OCV) for within-die (local) variations, and Corner Analysis for die-to-die (global) variations. Advanced OCV (OCV) is an enhanced version of the prior OCV techniques to include stage based and/or location based within-die variations. Location based effects tend to be more systematic in nature and usually are not addressed using AOCV techniques. In order to account for the stage effect in the timing analysis, the AOCV technique requires the generation of stage based derate tables which include delay derates at various number of stages. Parametric OCV (POCV) comes as an enhancement to AOCV by removing hassles and heuristics associated with the AOCV table generation process. The required inputs to POCV analysis are only the cell variations. POCV reduces the pessimism and increases the design robustness compared to traditional AOCV approaches by accounting for the on-chip variation effects within a statistical timing analysis framework. GoldChar is a characterization tool targeted for AOCV table and POCV data generation. The advantage of using GoldChar is that in the path based analysis, the AOCV results match to POCV results almost perfectly. 2. Basic GoldChar Usage GoldChar can be launched from the command line by typing goldchar <input_file>. It requires a simple input file to setup the characterization process as shown in Example 1 below. #reading library read_lib test.lib #read spice netlist and model read_spice -netlist netlists/all_circuits.sp read_spice -model models/header.mod # run characterization char_ocv -from tsmc40 -to ocv -param {parl1 par2} –cell * -dir spice_dir # output pocv format write_ocv ocv pocv.data.char -format pocv # output aocv format write_ocv ocv aocv.table.char -format aocv Example 1. GoldChar Input File GoldChar, 08/16/2011 As seen in Example 1, the tool needs a cell library file (ccs or nldm) to determine cells and slew load points for the cells. Then extracted cell netlists and the statistical model files which include local variations are required. char_ocv is the primary command which does data generation for both AOCV and POCV. It uses an internal spice simulator called pcsim to run spice decks generated for characterization. In this case the data is generated –from tsmc40 library –to ocv library, with two local variation parameters parl1 and parl2. –cell option specifies the cells for the characterization, and the –dir specifies the simulation directory. If the simulation directory already contains the required data, GoldChar uses the existing data without running the simulations. write_ocv command is used to write out the characterization data either in POCV or in AOCV format. The options of char_ocv command are listed below char_ocv [options] -from : -to : -param : -cell : -dir : -write char : -write monte : -mc : -rise_slew -rise_load -fall_slew -fall_load : : : : library name a new library which contains POCV and AOCV data local process parameters to be used in characterization name of the cell, wild chart (*) is supported directory for spice simulations write spice decks for statistical characterization to the spice directory, does not run the characterization write spice decks for Monte Carlo characterization to the spice directory, does not run the characterization runs Monte Carlo characterization, generates POCV/AOCV data user defined rise slew user defined rise load user defined fall slew user defined fall load If the user does not specify any specific slew/load combination for the characterization, the middle slew/load values from the table will be used by default. Please note that having –write option would disable any spice run for data generation, with this option char_ocv only generates the spice decks under the spice directory. After reading the libs, cell netlists and models, below are different ways or running char_ocv 1. Generating Monte Carlo spice decks under spice_dir1, no spice run: char_ocv -from tsmc40 -to ocv -param {parl1 par2} –cell * -dir spice_dir1 –write monte 2. Generating statistical characterization spice decks under spice_dir2, no spice run: char_ocv -from tsmc40 -to ocv -param {parl1 par2} –cell * -dir spice_dir2 –write char 3. Running and generating char data for AOCV/POCV using statistical characterization. The spice decks and output files are under spice_dir3. char_ocv -from tsmc40 -to ocv -param {parl1 par2} –cell * -dir spice_dir3 write_ocv ocv aocv.table.char –format aocv write_ocv ocv pocv.data.char –format pocv 4. Running and generating char data for AOCV/POCV using Monte Carlo simulation. The spice decks and output files are under spice_dir4. char_ocv -from tsmc40 -to ocv -param {parl1 par2} –cell * -dir spice_dir3 -mc write_ocv ocv aocv.table.mc –format aocv write_ocv ocv pocv.data.mc –format pocv GoldChar, 08/16/2011 2 Once char_ocv is completed the data has to be written to a file using write_ocv command. write_ocv <lib_name> <output_file> [options] -format : output file format, can be either aocv or pocv -stages : number of stages in AOCV table write_ocv supports two format options, pocv or aocv. Both AOCV tables and POCV cell variation data is generated for all arcs in the cell. AOCV table for a cell (CKINVX) would look like as in Example 2. # Apply-Cell Cell CKINVX Arc i-o RISE Coefficient 0.110211 Stage 0.110211 0.220422 0.440844 0.881687 1.76337 3.52675 7.0535 14.107 28.214 56.428 Early: 0.978297 0.984653 0.989148 0.992327 0.994574 0.996163 0.997287 0.998082 0.998644 0.999041 Late: 1.0217 1.01535 1.01085 1.00767 1.00543 1.00384 1.00271 1.00192 1.00136 1.00096 Arc i-o FALL Coefficient 0.241636 Stage 0.241636 0.483272 0.966544 1.93309 3.86618 7.73235 15.4647 30.9294 61.8588 123.718 Early: 0.967445 0.97698 0.983723 0.98849 0.991861 0.994245 0.995931 0.997123 0.997965 0.998561 Late: 1.03255 1.02302 1.01628 1.01151 1.00814 1.00575 1.00407 1.00288 1.00203 1.00144 Example 2. GoldChar AOCV table output (aocv.table.char) The Early and Late derate information is provided for each arc. Stage axis denotes effective stage count for an accurate AOCV analysis. Coefficient is the value for calculating the effective stage count. For the same cell, POCV data is given in Example 3. Apply-Cell Cell CKINVX Arc i-o RISE 0.00723449 Arc i-o FALL 0.0108516 Example 3. GoldChar POCV output (pocv.data.char) POCV analysis requires the percent rise/fall delay variation of each cell or arc. In Example 3, the percent delay variations are given for arc i-o, 0.723% for rise delay, and 1.08% for fall delay. 3. Parsing GoldChar output files for GoldTime Usage GoldChar generates arc level AOCV and POCV data including “when” conditions in library. Say, the same arc with 5 different when conditions would result in 5 Early/Late tables for rise, and another 5 tables for fall. GoldTime currently does not support arc-level AOCV tables. Therefore the data needs to be parsed to convert the tables in GT readable format using goldchar2aocv script. Usage: goldchar2aocv [options] -char <GoldChar AOCV table> GoldChar, 08/16/2011 3 Running this script on the aocv.table.char file generated in Example 2, would produce three different files: aocv.table.char.early : contains early derate tables for the cell aocv.table.char.late : contains late derate tables for the cell aocv.table.char.tcl : contains stage count adjustment coefficient for the cell In Example 4, we show all these files for the GoldChar generated AOCV table given in Example 2. Apply-Cell Early-fall Cell LPS_CKINVX36 Stage 0.2416 0.4833 0.9665 1.9331 3.8662 7.7324 15.4647 30.9294 61.8588 123.7180 Distance 0 0.9674 0.9770 0.9837 0.9885 0.9919 0.9942 0.9959 0.9971 0.9980 0.9986 Apply-Cell Early-rise Cell LPS_CKINVX36 Stage 0.1102 0.2204 0.4408 0.8817 1.7634 3.5267 7.0535 14.1070 28.2140 56.4280 Distance 0 0.9783 0.9847 0.9891 0.9923 0.9946 0.9962 0.9973 0.9981 0.9986 0.9990 Apply-Cell Late-fall Cell LPS_CKINVX36 Stage 0.2416 0.4833 0.9665 1.9331 3.8662 7.7324 15.4647 30.9294 61.8588 123.7180 Distance 0 1.0326 1.0230 1.0163 1.0115 1.0081 1.0057 1.0041 1.0029 1.0020 1.0014 Apply-Cell Late-rise Cell LPS_CKINVX36 Stage 0.1102 0.2204 0.4408 0.8817 1.7634 3.5267 7.0535 14.1070 28.2140 56.4280 Distance 0 1.0217 1.0153 1.0109 1.0077 1.0054 1.0038 1.0027 1.0019 1.0014 1.0010 set_locv_coefficient 0.1759 LPS_CKINVX36 Example 4. goldchar2aocv generated GT AOCV input files Arc-level POCV is supported however the output data still needs to be parsed to GT readable format. goldchar2pocv script does the parsing. Usage: goldchar2pocv [options] -char <GoldChar POCV table> Running this script on the pocv.data.char file given in Example 3 would produce pocv.data.char.tcl file which is given below. set_cluster -parameter random* -sigma -cell_different_sigma #Cell CKINVX set_variation -parameter random_fall_variation -sigma 0.0108516 -from i -to o -lib_cell CKINVX set_variation -parameter random_rise_variation -sigma 0.00723449 -from i -to o -lib_cell CKINVX Example 5. goldchar2pocv generated GT POCV input file GoldChar, 08/16/2011 4 4. Using the AOCV/POCV Data in GoldTime In order to run AOCV analysis in GT, user needs to read in the three files generated by goldchar2aocv script before running timing analysis. read_locv aocv.table.char.early read_locv aocv.table.char.late source aocv.table.char.tcl In the case of POCV, pocv.data.char.tcl file needs to be sourced before running POCV analysis. GoldChar, 08/16/2011 5