|
网络上教程不多,搜索的多是一两个人的教程,各个网站互相拷贝,在摸索学习过程中,记录下基本的使用教程。
准备基本资料
1). spice网表,或者gds和pex提取文件
2). sample lib文件,可以是任何其他现有的lib库。如果lib不包含你需要的cell,可以按照已有的格式添加cell,只写pin的信息,保证import的时候能够对应。
3). 对应的工艺model文件,通常用hspce的model,也可以用finesim,或者spectre。
网表提取
通常需要对很多个cell批量操作,下面说明批量生成网表的过程。
首先需要准备好celllist, 简单用ls和echo等命令生成即可。
然后编写calibre的rule脚本。
header.conf:
- foreach i (`cat Cell.list`)
- echo $i
- #print the path of gds
- echo LAYOUT PATH "<Your_Path>/standcells.gds">Header.conf
- #print one of cell name list in this loop
- echo LAYOUT PRIMARY "$i">>Header.conf
- #set the path of translated spice
- echo PEX NETLIST "<Your_Path>/subckts/$i.sp"HSPICE 1 LAYOUTNAMES >>Header.conf
- #include calibre xrc command file
- echo INCLUDE "calibre.rcx">Header.conf
- #begin to run calibre pex
- source runpex.script
- end
复制代码
runpex.script:
- #remove temp directory of previous cell
- rm -rf svdb
- rm -rf template
- #begin to translate gds to spice netlist
- calibre-xrc -phdb-nowait-turbo Header.conf tee pexrunlog_phdb.log
- calibre -xrc-pdb-rcc-64 -nowait-turbo Header.conf tee pexrunlog_pdb.log
- calibre-xrc -fmt -rcc-64 -nowait Header.conf tee pexrunlog_fmt.log
复制代码
上述脚本完成后,生成所有的spice网表在subckts目录下面。
3. 开始siliconsmart的执行流程。
目录结构:
work --config/
|-lib/
|-mylibrary/
|-subckts/
run.tcl
config目录存放configure.tcl
lib目录存放原始lib库。
subckts为spice网表目录,model通常位于pdk目录,此处不再说明。
mylibrary为生成的lib目录。
run.tcl为执行脚本。
configure.tcl为corner和lib设定文件:
- #configure.tcl
- #See SiliconSmart User Guide Appendix B for a complete list of parameters and definitions
- #################################
- # OPERATING CONDITIONS DEFINITION
- #################################
- #
- # Create one or more operation conditions here. Example:
- #
- create_operating_condition tt_3p3v_25c
- set_opc_process tt_3p3v_25c {
- {.lib "<your path>/models/gl018.l" tt_3v}
- }
- add_opc_supplies tt_3p3v_25c VDD 3.3
- add_opc_grounds tt_3p3v_25c GND 0.0
- set_opc_temperature tt_3p3v_25c 25
- #
- #################################
- # GLOBAL CONFIGURATION PARAMETERS
- #################################
- define_parameters default {
- # List of operating conditions as defined by create_operation_condition
- set active_pvts { tt_3p3v_25c }
- # If using IBIS, one operating condition must be specified in ibis_typ_pvt
- # set ibis_typ_pvt tt_3p3v_25c
- # FINESIM
- # set simulator finesim
- # set simulator_cmd {finesim_spice -w <input_deck> -o <listing_file> >&/dev/null}
- # FINESIM EMBEDDED
- # set simulator finesim_embedded
- # HSPICE
- set simulator hspice
- set simulator_cmd {hspice <input_deck> -o <listing_file>}
- # HSPICE (client/server mode)
- # set simulator hspice_cs
- # set simulator_cmd {hspice -CC <input_deck> -port <port_num> -o <listing_file>}
-
- # SPECTRE
- # set simulator spectre6
- # set simulator_cmd {spectremdl -tab -batch <mdl_file> -design <input_deck> <listing_file> >&/dev/null}
-
- # ELDO
- # set simulator eldo
- # set simulator_cmd {eldo -compat -i <input_deck> > <listing_file> >&/dev/null}
- # MSIM
- # set simulator msim
- # (csh)
- # set simulator_cmd {msim -hsp -i <input_deck> -o <listing_file> >&/dev/null}
- # (sh)
- # set simulator_cmd {msim -hsp -i <input_deck> -o <listing_file> 2>/dev/null}
-
- # Default simulator options for Finesim, Hspice, Spectre, Msim, and Eldo
- set simulator_options {
- "common,finesim: finesim_mode=spicehd finesim_method=gear finesim_speed=0 finesim_dvmax=0.1"
-
- "common,hspice: probe=1 runlvl=5 numdgt=7 measdgt=7 acct=1 nopage"
-
- "common,spectre6: compression=yes step=10ps maxstep=1ns relref=allglobal"
- "common,spectre6: method=trap lteratio=4 gmin=1e-18 autostop=0 save=none"
- "common,msim: probe=1 accurate=1"
-
- "common,eldo: gmindc=1n gmin=1p itl1=500 ingold=1 numdgt=4 measout=0 cptime=18000 relvar=0.01"
- "op,eldo: dv=0.5 method=gear"
- "tran,eldo: brief=0 relvar=0.001"
- "optimize,eldo: lvltim=3 relvar=0.001"
- "power,eldo: method=gear"
- }
- # Constraint settings:
- # independent/dependent/dependent-setup/dependent-hold
- set constraint_mode dependent
-
- set smc_constraint_style relative-degradation
- set smc_degrade 0.1
- set path_constraint_mode off
-
- # Simulation resolution
- set time_res_high 1e-12
- set time_res_low 100e-12
-
- set nochange_variance [expr $time_res_high * 4.0]
- set nochange_threshold 0.1
- # Controls which supplies are measured for power consumption
- set power_meas_supplies { VDD }
- # list of ground supplies used (required for Functional Recognition)
- set power_meas_grounds { GND }
- set power_stabilization_threshold 0.05
- set power_stabilization_threshold_absolute 1e-12
-
- set model_negative_constraints true
- set model_negative_delays true
- set model_significant_digits 4
- set model_ecsm_cin false
- set liberty_cap_unit "1pf"
- set Liberty_time_unit "1ns"
- set liberty_increasing_delay_with_load off
- set liberty_increasing_delay_with_slew off
- set liberty_max_capacitance 0
- set liberty_max_transition 0
- set liberty_leakage_power_unit "1mW"
- set model_mpw_attribute false
-
- # specifies which multi-rail format to be used in Liberty model; none, v1, or v2.
- set liberty_multi_rail_format v2
- # LOAD SHARE PARAMETERS
- # job_scheduler: 'lsf' (Platform), 'grid' (SunGrid), or 'standalone' (local machine)
- set job_scheduler standalone
- set run_list_maxsize 1
- set normal_queue "lsf_queue_name"
- set scheduler_poll_time 10
- }
- ############################
- # DEFAULT PINTYPE PARAMETERS
- ############################
- pintype default {
- set logic_high_name VDD
- set logic_high_threshold 0.7
- set logic_low_name GND
- set logic_low_threshold 0.3
- set prop_delay_level 0.5
- set prop_delay_current 0.1
-
- set driver_rise_time 10e-12
- set driver_fall_time 10e-12
- # Number of slew and load indices
- # (when importing with -use_default_slews -use_default_loads)
- set numsteps_slew 6
- set numsteps_load 6
- set constraint_numsteps_slew 3
- # Operating load ranges
- set smallest_load 3e-15
- set largest_load 6e-13
- # Operating slew ranges
- set smallest_slew 20e-12
- set largest_slew 3e-9
- set max_tout 1.0e-9
- # Automatically determine largest_load based on max_tout; off or on
- set autorange_load off
- # Noise of points in for noise height
- set numsteps_height 8
- # Input noise width.
- set numsteps_width 5
- # driver model: pwl, emulated, active, active-waveform, custom
- set driver_mode emulated
- # driver cell name (relevant only when driver_mode is "active")
- set driver pwl
- }
- #####################################
- # LIBERTY MODEL GENERATION PARAMETERS
- #####################################
- define_parameters liberty_model {
- # Add Liberty header attributes here for use with "model -create_new_model"
- set delay_model "table_lookup"
- set default_fanout_load 1.0
- set default_inout_pin_cap 9999
- set default_input_pin_cap 9999
- set default_output_pin_cap 0.0
- set default_cell_leakage_power 0.0
- set default_leakage_power_density 0.0
-
- set slew_lower_threshold_pct_rise 30.0
- set slew_lower_threshold_pct_fall 30.0
- set slew_upper_threshold_pct_rise 70.0
- set slew_upper_threshold_pct_fall 70.0
-
- set input_threshold_pct_fall 50.0
- set input_threshold_pct_rise 50.0
- set output_threshold_pct_fall 50.0
- set output_threshold_pct_rise 50.0
- }
- #######################
- # VALIDATION PARAMETERS
- #######################
复制代码
其中各个option不在细述。
run.tcl
- set char_point testcase1
- create ${char_point}
- exec cp config/configure.tcl ${char_point}/config/
- set_location ${char_point}
- set cells {INV1 NAND2}
- import -liberty lib/.lib -netlist_dir subckts/netlists -ext .sp
- exec cp config/INV1.inst ${char_point}/control/INV1.inst
- exec cp config/NAND2.inst ${char_point}/control/NAND2.inst
- configure -timing $cells
- characterize $cells
- #characterize all
- model -create_new_model -file ./mylibrary/new_typ.lib all -library_type typ
复制代码
执行:
bsub -Is siliconsmart run.tcl
或者进入siliconsmart界面:
source run.tcl
以上为基本流程,后续再详细说明如何批量处理多个corner的情况。 |
EDA1024论坛免责声明
请勿上传侵权资料及软件!
如果发现资料侵权请及时联系,联系邮件: fenxin@fenchip.com QQ: 2322712906. 我们将在最短时间内删除。
|