iEDA-Script
iEDA-Script
1 Module Division and Description
iEDA-Script: a specialized script for iEDA, used for testing, evaluating, and analyzing data. The main tool flow of the iEDA-Script is as follows:
Figure 1: iEDA Tool Flow
scripts
โโโ design #iEDA flows for different designs
โ โโโ ispd18 #tbd
โ โโโ sky130_gcd #flow of gcd in sky130
โ โโโ iEDA
โ โโโ iEDA_config # iEDA parameters configuration files
โ โโโ README.md
โ โโโ result # iEDA result output files
โ โโโ run_iEDA_gui.py # Python3 script for running all iEDA flow with GUI layout
โ โโโ run_iEDA.py # Python3 script for running all iEDA flow
โ โโโ run_iEDA.sh # POSIX shell script for running all iEDA flow
โ โโโ script # TCL script files
โโโ foundry
โ โโโ README.md
โ โโโ sky130 # SkyWater Open Source PDK
โ โโโ lef # lef files
โ โโโ lib # lib files
โ โโโ sdc # sdc files
โ โโโ spef # folder for spef files if needed
โโโ hello.tcl # Test running iEDA
Module Description
The script directory contains all the physical backend design scripts and result analysis and evaluation scripts required for the different designs, and the modules are divided into subdirectories based on the flow and functionality. The flow scripts can be called by the top-level automatic running scripts (run_iEDA.py, run_iEDA.sh) or can be run independently.
Figure 2: iEDA-Script Project Directory Structure, with run_iEDA.py as the main script
scripts/design/sky130_gcd/script
โโโ DB_script # Data process flow scripts
โ โโโ db_init_lef.tcl # initialize lef
โ โโโ db_init_lib_drv.tcl # initialize lib only for flow of drv
โ โโโ db_init_lib_fixfanout.tcl # initialize lib only for flow of fix fanout
โ โโโ db_init_lib_hold.tcl # initialize lib only for flow of optimize hold
โ โโโ db_init_lib_setup.tcl # initialize lib only for flow of optimize setup
โ โโโ db_init_lib.tcl # initialize lib for common flow
โ โโโ db_init_sdc.tcl # initialize sdc
โ โโโ db_init_spef.tcl # initialize spef
โ โโโ db_path_setting.tcl # set paths for all processing technology files, including TechLEF๏ผLEF, Lib, sdc and spef
โ โโโ run_db_checknet.tcl # check net connectivity based on data built by DEF (.def) and LEF (.lef & .tlef)
โ โโโ run_db_report_evl.tcl # report wire length and congestion based on data built by DEF (.def) and LEF (.lef & .tlef)
โ โโโ run_db.tcl # test building data by DEF (.def) and LEF (.lef & .tlef)
โ โโโ run_def_to_gds_text.tcl # transform data from DEF (.def) to GDSII (.gdsii)
โ โโโ run_def_to_verilog.tcl # transform data from DEF (.def) to netlist (.v)
โ โโโ run_netlist_to_def.tcl # transform data from netlist (.v) to DEF (.def)
โ โโโ run_read_verilog.tcl # test read verilog file (.v)
โโโ iCTS_script # CTS flow scripts
โ โโโ run_iCTS_eval.tcl # report wire legnth for CTS result
โ โโโ run_iCTS_STA.tcl # report CTS STA
โ โโโ run_iCTS.tcl # run CTS
โโโ iDRC_script # DRC(Design Rule Check) flow scipts
โ โโโ run_iDRC_gui.tcl # show GUI for DRC result
โ โโโ run_iDRC.tcl # run DRC
โโโ iFP_script # Floorplan flow scripts
โ โโโ module # submodule for Floorplan scripts
โ โ โโโ create_tracks.tcl # create tracks for routing layers
โ โ โโโ pdn.tcl # create pdn networks
โ โ โโโ set_clocknet.tcl # set clock net
โ โโโ run_iFP.tcl # run Floorplan
โโโ iGUI_script # GUI flow scipts
โ โโโ run_iGUI.tcl # run GUI
โโโ iNO_script # NO(Netlist Optimization) flow scipts
โ โโโ run_iNO_fix_fanout.tcl # run Fix Fanout
โโโ iPL_script # Placement flow scripts
โ โโโ run_iPL_eval.tcl # report congestion statistics and wire legnth for Placement result
โ โโโ run_iPL_filler.tcl # run standard cell filler
โ โโโ run_iPL_gui.tcl # run gui flow that shows Global Placement Processing result
โ โโโ run_iPL_legalization_eval.tcl # report congestion statistics and wire legnth for Legalization result
โ โโโ run_iPL_legalization.tcl # run Cell Legalization
โ โโโ run_iPL.tcl # run Placement
โโโ iRT_script # Routing flow scripts
โ โโโ run_iRT_DRC.tcl # run DRC for Routing result
โ โโโ run_iRT_eval.tcl # report wire legnth for Routing result
โ โโโ run_iRT_STA.tcl # run STA for Routing result
โ โโโ run_iRT.tcl # run Routing
โโโ iSTA_script # STA flow scripts
โ โโโ init_iSTA.tcl # STA initialization
โ โโโ report_iSTA.tcl # report STA result
โ โโโ run_iSTA.tcl # run STA
โโโ iTO_script # TO(Timing Optimization) flow script
โโโ run_iTO_drv_STA.tcl # run STA for DRV result
โโโ run_iTO_drv.tcl # run DRV
โโโ run_iTO_hold_STA.tcl # run STA for Fix Hold Violation result
โโโ run_iTO_hold.tcl # run Fix Hold Violation
โโโ run_iTO_setup_STA.tcl # run STA for Fix Setup Violation result
โโโ run_iTO_setup.tcl # run Fix Setup Violation
2 Flow Running Process
After setting up iEDA and the PDK, you can choose to run the sky130_gcd flow scripts either automatically using the top-level running scripts (run_iEDA.py, run_iEDA.sh) or run them independently. All the results are saved in the script/design/sky130_gcd/result directory.
The general process for running a single point tool is as follows:
Step 1 Path Setting
First of all, the process environment path must be configured. To facilitate the search and configuration of path parameters, the paths of TechLEF, LEF, Lib, sdc, and spef are uniformly configured in the file ./script/DB_script/db_path_setting.tcl
for the script. The details are shown in the following table:
Function | Configuration Command | Reference TCL Example |
---|---|---|
Set TechLef Path | set TECH_LEF_PATH xxx | set TECH_LEF_PATH "./lef/sky130_fd_sc_hs.tlef" |
Set Lef Path | set LEF_PATH xxx | set LEF_PATH./lef/sky130_ef_io__com_bus_slice_10um.lef |
Set Lib Path | set LIB_PATH xxx | set LIB_PATH./lib/sky130_dummy_io.lib |
Set Fix Fanout Lib Path | set LIB_PATH_FIXFANOUT xxx | set LIB_PATH_FIXFANOUT./lib/sky130_dummy_io.lib |
Set Fix DRV Violation Lib Path | set LIB_PATH_DRV xxx | set LIB_PATH_DRV./lib/sky130_dummy_io.lib |
Set Fix Hold Violation Lib Path | set LIB_PATH_HOLD xxx | set LIB_PATH_HOLD./lib/sky130_dummy_io.lib |
Set Fix Setup Violation Lib Path | set LIB_PATH_SETUP xxx | set LIB_PATH_SETUP./lib/sky130_dummy_io.lib |
Set SDC Path | set SDC_PATH xxx | set SDC_PATH "./sdc/gcd.sdc" |
Set SPEF Path | set SPEF_PATH xxx | set SPEF_PATH "./spef/xxx.spef" |
Step 2 Configuration Point Tool Config
The parameter settings Config of all point tools are in the path ./iEDA_config
. You can check the Input and Output List in the later chapters to modify the corresponding point tool Config file.
Step 3 Read.def Design File
Taking CTS as an example, execute the def_init
command to read the result after layout.
#===========================================================
## read def
#===========================================================
def_init -path./result/iPL_result.def
After steps 1 - 3, the data of Tech LEF, LEF, and DEF files will be loaded, which is a prerequisite for the startup of the point tool.
Step 4 Start Point Tool
Taking CTS as an example, execute the run_cts
command to start the CTS process.
#===========================================================
## run CTS
#===========================================================
run_cts -config./iEDA_config/cts_default_config.json
Step 5 Save Point Tool Running Results
Taking CTS as an example, after the point tool process is completed, the running results of the point tool are saved in the path ./result/
.
#===========================================================
## Save def
#===========================================================
def_save -path./result/iCTS_result.def
#===========================================================
## Save netlist
#===========================================================
netlist_save -path./result/iCTS_result.v -exclude_cell_names {}
Step 6 Output Report
Taking CTS as an example, after the data is stored, the overall report related to the design result will be output, and the report path is stored in ./result/report/
.
#===========================================================
## report
#===========================================================
report_db -path "./result/report/cts_db.rpt"
Step 7 Exit
#===========================================================
## Exit
#===========================================================
flow_exit
The above steps are the general process of executing a single point tool. Among them, steps 1 - 3 initialize the configuration and database and are necessary steps. After step 4, various point tools or module commands can be flexibly connected as needed.