######################################### # NOTE for 2011 Fall - main script is makefile or run_pt 1. Please change the directory structure (if some files are under the project directory please do not copy them over another directory. It is waste of disk space) ex) power_scripts/ptpx_script.tcl : from : set par_source_dir $run_dir/block_deliverables/ICC to : /home/projects/courses/fall_11/ee382m-17145/project_fall_11/results/r_latest/ICC/SPF ######################################## -------------------------------------------------------------------------------- Deliverables -------------------------------------------------------------------------------- 1. Power Estimates for the Chip a. Block power estimates - PrimetimePx runs b. Top-level power estimates (clocks and routes) - PrimetimePx runs for top-level w/blackboxes for the sub-blocks, or full-run with the entire design, or estimates based on some factors. 2. Power Grid (assuming ICC and top-level P&R allows) -------------------------------------------------------------------------------- Methodology/Flow and Scripts -------------------------------------------------------------------------------- The power analysis is done mostly through PrimetimePX. PrimetimePX gives power numbers for the individual blocks. A separate script parses these numbers and applies a block activity factor. The block activity factor specifies what percentage of the time the block will be active in normal CPU operation. For, example, the instruction fetch blocks will be very active since new instructions will be fetched almost every cycle, while the debug blocks will rarely be active. The script that parses the Primetime reports and applies the block activity factors to the dynamic power portion generates a final report with all the blocks. PrimetimePX Inputs: ------------------------- 1. Technology library - *.db files (standard cell library as well as memory models) - Specified in power scripts (ptpx_dc.tcl and ptpx_par.tcl) 2. Gate-level netlists (from block owners) - *.gate.v files - Specified in power scripts (ptpx_dc.tcl and ptpx_par.tcl) 3. Design constraints (from block owners) - *.sdc(standard delay constraints) files - Specified in power scripts (ptpx_dc.tcl and ptpx_par.tcl) 4. Block Activity factors (from block owners) - Used by the power_extract_all.pl script to parse the data from the reports - Specified in the block-level scripts (block_scripts directory) 5. Switching Activity Info (need feedback from block owners) - Specified in files in switching_activity directory 6. Parasitics (after blocks run P&R in ICC) (from block owners) - *.spf files - Specfied in the parasitic power script (ptpx_par.tcl) Inputs from block owners: --------------------------- 1. Setup of technology library that they use in DC (from synthesis tcl script) - Need memory models for (immu, dmmu, ic_top, dc_top and rf) 2. Gate-level netlist from DC (.gate.v) - For runs with parasitics, need the gate-level netlist from ICC that corresponds to the *.spf files, not the gate-level netlist from DC 3. SDC constraints file dumped from DC (write_sdc -version 1.7) (.sdc) - Mainly used for extracting the 'create_clock' info 4. Switching activity info - Need feedback from block owners on switching activity for their inputs 5. Parasitics (.spf) (only after they do P&R) 6. Memory power from data sheet - Not necessary since memory .db models have power info - HOWEVER, the power distribution between internal and switching is INACCURATE... need to review the memory block outputs out of PT. Directories and Scripts: --------------------------- The top-level power directory contains this README file, a makefile and sub-directories for each release's run. It also contains a docs_primetime direcory with Primetime reference documents and user's guides. Any other files were mistakenly written out there by block owners. The makefile has targets for creating new release directories and for running PTPX in two ways (without parasitics and with parasitics). You will run without parasitics initially until the blocks run place-n-route on their blocks and can deliver gate-level netlists and *.spf files from ICC for each of their blocks. Creating a new directory: ---------------------------- 1. Update the makefile by changing the following variables: PROJECT_DIR - This is the project directory where the chip releases will be made. Under this direcotry there should be a 'results/r#/power' directory where the block owners will place gate-level verilog and sdc files. WORKING_DIR - This is the top-level power directory. OLD_REL - This is the previous chip release number. NEW_REL - This is the new chip release number for which you are creating a new directory. 2. Run the new_rel_area makefile target: > make new_rel_area This target will create the new directory and copy over the appropriate files from the previous directory. It will also create links in the new directories to the master makefile so you can keep it in a central place but use it from each release area and also the README (not necessary). Power Release Directories: ---------------------------- Each power_r# directory should have the following sub-directories and links: 1. block_deliverables - This is a link to the ".../results/r#" directory for the project. It's only here to make it easier to find the data. 2. block_scripts - This direcotry contains a tcl script for each block (.pt.tcl). These scripts are mostly the same except for the block activity factor. This script will then call the global ptpx_script.tcl script. (Keep in mind that the ptpx_script.tcl is just a link to either the ptpx_dc.tcl script (before parasitics) or ptpx_par.tcl script (with parasitics). These scripts are called for each block using the command in the makefile. 3. grid - This directory contains a grid.pl perl script that generates a grid spice netlist. 4. logs - This directory will contain logs generated from the PTPX runs. You should be able to grep for errors from the logs in this directory to see if any block runs had problems. 5. makefile - This is a link to the master makefile in the project "power" directory that will contain all the power run directories. 6. power_scripts - This directory contains three scripts: a. ptpx_dc.tcl - This is the global power script that runs PTPX power analysis. It is called from the block-level scripts. This script in turn calls the power_extract_all.pl perl script after the power analysis from PTPX is done. b. ptpx_par.tcl - This script is the same as the ptpx_dc.tcl script except that it reads in the gate-level netlists from the "results/ICC" directory instead of the "results/power" directory. It also reads in the *.spf parasitic files for the various blocks. The power analysis is the same. 7. reports - This directory will contain the results from the PTPX runs. There will also be a "final_power_report_all" (without parasitics) and/or a "final_par_power_report_all" (with parasitics) file that summarizes the power runs for each block and applies the block activity factors. 8. switching_activity - This directory contains a switching activity file for each block. This file is used to annotate toggle info for each input of every block. These files are pretty important and need to be expanded on to get more accurate results. You should consult with the block owners to add unique annotations for the various input signals. The default toggle count is defined in the global power scripts. You should refer to the Primetime PX user's guide in the docs_primetime directory for more info on the "static_probability" and "toggle_count" variables. Scripts and How to Run Them: ------------------------------ 0. Run the load module command to run PrimetimePX: > module load syn/primetime/2011 1. Each block can be run individually from the power_r# directory with the following command: > pt_shell -f block_scripts/.pt.tcl > logs/.pt.log 2. However, the makefile is used to run all the blocks consecutively: > make pt_par_all 3. Once parasitics are available for all the blocks, you can complete the makefile to run all the blocks: > make pt_par_all -------------------------------------------------------------------------------- Advice/Recommendations -------------------------------------------------------------------------------- In order to improve on previous semeseter's work, you can do the following: 1. Scrutinize the output of PrimetimePX a. Review the internal and switching power contributions to total power. From the lecture notes we know that ~50% of total power is due to dynamic switching power, and ~10-15% is due to internal power. b. Review the internal vs. switching power for the blocks with memories - There was a problem with this where this data was inaccurate. The total power may be correct, but the internal vs. swithcing power distribution did not seem right. c. Check the power densities for the various blocks to make sure the numbers look ok. Get an area estimate from the integrator and divide total power by the area. You can then analyze this data to see if it makes sense. 2. Update the switching activity files with more detailed annotations. The current switching activity files are mostly generic. Work with the block owners to annotate the various input signals for each block with more accurate "static_probability" and "toggle_count" numbers. 4. Get real numbers, or more accurate numbers, for top-level clocks and routing through ICC. 5. Work on power grid in ICC. Need to push for all blocks and top-level to run through ICC place-n-route early enough to give you time to work on this.