找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 305|回复: 2

[转帖] siliconsmart教程

[复制链接]

5

主题

0

回帖

60

积分

实习生

积分
60
发表于 2023-9-20 16:50:35 | 显示全部楼层 |阅读模式
网络上教程不多,搜索的多是一两个人的教程,各个网站互相拷贝,在摸索学习过程中,记录下基本的使用教程。

准备基本资料
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:
  1. foreach i (`cat Cell.list`)
  2. echo $i
  3. #print the path of gds
  4. echo LAYOUT PATH "<Your_Path>/standcells.gds">Header.conf
  5. #print one of cell name list in this loop
  6. echo LAYOUT PRIMARY "$i">>Header.conf
  7. #set the path of translated spice
  8. echo PEX NETLIST "<Your_Path>/subckts/$i.sp"HSPICE 1 LAYOUTNAMES >>Header.conf
  9. #include calibre xrc command file
  10. echo INCLUDE "calibre.rcx">Header.conf
  11. #begin to run calibre pex
  12. source runpex.script
  13. end
复制代码

runpex.script:

  1. #remove temp directory of previous cell
  2. rm -rf svdb
  3. rm -rf template
  4. #begin to translate gds to spice netlist
  5. calibre-xrc -phdb-nowait-turbo Header.conf tee pexrunlog_phdb.log
  6. calibre -xrc-pdb-rcc-64 -nowait-turbo Header.conf tee pexrunlog_pdb.log
  7. 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设定文件:

  1. #configure.tcl
  2. #See SiliconSmart User Guide Appendix B for a complete list of parameters and definitions

  3. #################################
  4. # OPERATING CONDITIONS DEFINITION
  5. #################################
  6. #
  7. # Create one or more operation conditions here.  Example:
  8. #
  9.     create_operating_condition tt_3p3v_25c
  10.     set_opc_process tt_3p3v_25c {
  11.         {.lib "<your path>/models/gl018.l" tt_3v}
  12.     }
  13.     add_opc_supplies tt_3p3v_25c VDD 3.3
  14.     add_opc_grounds tt_3p3v_25c GND 0.0
  15.     set_opc_temperature tt_3p3v_25c 25
  16. #


  17. #################################
  18. # GLOBAL CONFIGURATION PARAMETERS
  19. #################################
  20. define_parameters default {

  21.     # List of operating conditions as defined by create_operation_condition
  22.     set active_pvts { tt_3p3v_25c }

  23.     # If using IBIS, one operating condition must be specified in ibis_typ_pvt
  24.     # set ibis_typ_pvt tt_3p3v_25c

  25.     # FINESIM
  26. #    set simulator finesim
  27. #    set simulator_cmd {finesim_spice -w <input_deck> -o <listing_file> >&/dev/null}

  28.     # FINESIM EMBEDDED
  29.     # set simulator finesim_embedded

  30.     # HSPICE
  31.      set simulator hspice
  32.      set simulator_cmd {hspice <input_deck> -o <listing_file>}

  33.     # HSPICE (client/server mode)
  34.     # set simulator hspice_cs
  35.     # set simulator_cmd {hspice -CC <input_deck> -port <port_num> -o <listing_file>}
  36.    
  37.     # SPECTRE
  38.     # set simulator spectre6
  39.     # set simulator_cmd {spectremdl -tab -batch <mdl_file> -design <input_deck> <listing_file> >&/dev/null}
  40.    
  41.     # ELDO
  42.     # set simulator eldo
  43.     # set simulator_cmd {eldo -compat -i <input_deck> > <listing_file> >&/dev/null}

  44.     # MSIM
  45.     # set simulator msim
  46.     # (csh)
  47.     # set simulator_cmd {msim -hsp -i <input_deck> -o <listing_file> >&/dev/null}
  48.     # (sh)
  49.     # set simulator_cmd {msim -hsp -i <input_deck> -o <listing_file> 2>/dev/null}
  50.    

  51.     # Default simulator options for Finesim, Hspice, Spectre, Msim, and Eldo
  52.     set simulator_options {
  53.         "common,finesim: finesim_mode=spicehd finesim_method=gear finesim_speed=0 finesim_dvmax=0.1"
  54.        
  55.         "common,hspice: probe=1 runlvl=5 numdgt=7 measdgt=7 acct=1 nopage"
  56.        
  57.         "common,spectre6: compression=yes step=10ps maxstep=1ns relref=allglobal"
  58.         "common,spectre6: method=trap lteratio=4 gmin=1e-18 autostop=0 save=none"

  59.         "common,msim: probe=1 accurate=1"
  60.        
  61.         "common,eldo: gmindc=1n gmin=1p itl1=500 ingold=1 numdgt=4 measout=0 cptime=18000 relvar=0.01"
  62.         "op,eldo: dv=0.5 method=gear"
  63.         "tran,eldo: brief=0 relvar=0.001"
  64.         "optimize,eldo: lvltim=3 relvar=0.001"
  65.         "power,eldo: method=gear"
  66.     }

  67. # Constraint settings:
  68.         # independent/dependent/dependent-setup/dependent-hold
  69.         set constraint_mode dependent
  70.        
  71.         set smc_constraint_style relative-degradation
  72.         set smc_degrade 0.1
  73.         set path_constraint_mode off
  74.        
  75.     # Simulation resolution
  76.     set time_res_high 1e-12
  77.     set time_res_low 100e-12
  78.    
  79.     set nochange_variance [expr $time_res_high * 4.0]
  80.     set nochange_threshold 0.1

  81.     # Controls which supplies are measured for power consumption
  82.     set power_meas_supplies { VDD }

  83.     # list of ground supplies used (required for Functional Recognition)
  84.     set power_meas_grounds { GND }

  85.         set power_stabilization_threshold 0.05
  86.         set power_stabilization_threshold_absolute 1e-12
  87.        
  88.         set model_negative_constraints true
  89.         set model_negative_delays true
  90.         set model_significant_digits 4
  91.         set model_ecsm_cin false
  92.         set liberty_cap_unit "1pf"
  93.         set Liberty_time_unit "1ns"
  94.         set liberty_increasing_delay_with_load off
  95.         set liberty_increasing_delay_with_slew off
  96.         set liberty_max_capacitance 0
  97.         set liberty_max_transition 0
  98.         set liberty_leakage_power_unit "1mW"
  99.         set model_mpw_attribute false
  100.        
  101.     # specifies which multi-rail format to be used in Liberty model; none, v1, or v2.
  102.     set liberty_multi_rail_format v2

  103.     # LOAD SHARE PARAMETERS
  104.     #  job_scheduler: 'lsf' (Platform), 'grid' (SunGrid), or 'standalone' (local machine)
  105.     set job_scheduler standalone
  106.     set run_list_maxsize 1
  107.     set normal_queue "lsf_queue_name"
  108.     set scheduler_poll_time 10
  109. }


  110. ############################
  111. # DEFAULT PINTYPE PARAMETERS
  112. ############################
  113. pintype default {

  114.     set logic_high_name VDD
  115.     set logic_high_threshold 0.7

  116.     set logic_low_name GND
  117.     set logic_low_threshold 0.3

  118.     set prop_delay_level 0.5
  119.     set prop_delay_current 0.1
  120.    
  121.     set driver_rise_time 10e-12
  122.     set driver_fall_time 10e-12

  123.     # Number of slew and load indices
  124.     # (when importing with -use_default_slews -use_default_loads)
  125.     set numsteps_slew 6
  126.     set numsteps_load 6
  127.     set constraint_numsteps_slew 3

  128.     # Operating load ranges
  129.     set smallest_load 3e-15
  130.     set largest_load 6e-13

  131.     # Operating slew ranges
  132.     set smallest_slew 20e-12
  133.     set largest_slew 3e-9
  134.     set max_tout 1.0e-9

  135.     # Automatically determine largest_load based on max_tout; off or on
  136.     set autorange_load off

  137.     # Noise of points in for noise height
  138.     set numsteps_height 8

  139.     # Input noise width.
  140.     set numsteps_width 5

  141.     # driver model: pwl, emulated, active, active-waveform, custom
  142.     set driver_mode emulated

  143.     # driver cell name (relevant only when driver_mode is "active")
  144.     set driver pwl
  145. }


  146. #####################################
  147. # LIBERTY MODEL GENERATION PARAMETERS
  148. #####################################
  149. define_parameters liberty_model {
  150.     # Add Liberty header attributes here for use with "model -create_new_model"
  151.     set delay_model "table_lookup"
  152.     set default_fanout_load 1.0
  153.     set default_inout_pin_cap 9999
  154.     set default_input_pin_cap 9999
  155.     set default_output_pin_cap 0.0
  156.     set default_cell_leakage_power 0.0
  157.     set default_leakage_power_density  0.0
  158.    
  159.     set slew_lower_threshold_pct_rise 30.0
  160.     set slew_lower_threshold_pct_fall 30.0
  161.     set slew_upper_threshold_pct_rise 70.0
  162.     set slew_upper_threshold_pct_fall 70.0
  163.    
  164.     set input_threshold_pct_fall 50.0
  165.     set input_threshold_pct_rise 50.0
  166.     set output_threshold_pct_fall 50.0
  167.     set output_threshold_pct_rise 50.0
  168. }


  169. #######################
  170. # VALIDATION PARAMETERS
  171. #######################
复制代码

其中各个option不在细述。

run.tcl

  1. set char_point testcase1
  2. create ${char_point}
  3. exec cp config/configure.tcl ${char_point}/config/
  4. set_location ${char_point}
  5. set cells {INV1 NAND2}
  6. import -liberty lib/.lib -netlist_dir subckts/netlists -ext .sp
  7. exec cp config/INV1.inst ${char_point}/control/INV1.inst
  8. exec cp config/NAND2.inst   ${char_point}/control/NAND2.inst
  9. configure -timing  $cells
  10. characterize $cells
  11. #characterize all
  12. 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. 我们将在最短时间内删除。

36

主题

463

回帖

445

积分

技术员

积分
445
发表于 2023-12-30 21:14:07 | 显示全部楼层
谢谢分享

0

主题

1

回帖

23

积分

实习生

积分
23
发表于 2024-2-28 10:44:01 | 显示全部楼层
谢谢分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|EDA1024技术论坛

GMT+8, 2024-4-20 11:05 , Processed in 0.044282 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表