set start [clock seconds]
set_location [pwd]
set end [clock seconds]
set duration [expr $end - $start]
log_info "Elapsed time: [expr $end - $start]sec -- [format "%1.2fmins -- %1.2fhrs" [expr ($end - $start) /60.0] [expr ($end - $start) /60.0/60.0]]"
2. format
set ibis_vmeas [format "%.3f" [expr 0.5 * ${valuemix33vdd}]]
# set ibis_vinh [format "%.3f" [expr $logic_high_threshold * ${valuemix33vdd}]]
# set ibis_vinl [format "%.3f" [expr $logic_low_threshold * ${valuemix33vdd}]]
set ibis_vinh [format "%.3f" [expr 0.7 * ${valuemix33vdd}]]
set ibis_vinl [format "%.3f" [expr 0.3 * ${valuemix33vdd}]]
3.
exec sed -i "s/add_pin mem_int/#add_pin mem_int/g" $charpt/control/${cell}.inst
exec sed -i "s/add_function mem_int mem/#add_function mem_int mem/g" $charpt/control/${cell}.inst
4. copy instances to control
eval exec cp [glob special_instances/*.inst] my_library/control
5. 大寫字母轉小寫字母
foreach upper [get_cells] {
set lower [string tolower $upper]
exec cp -p ./SPICE/${lower}.spc $charp/netlists/${upper}.spc
}
6. 偵測檔案是否存在and執行另一個tcl
#specific library options in side file
if { [file exists add_sco.tcl] == 1} { source add_sco.tcl }
7. tcl 裡面呼叫sed在某個檔案內加入內容
運用在SIS中 如下例
sh cp umc_char_db_2016/inst_file/SDFMQM8T.inst $Cdir/control/SDFMQM8T.inst
exec sed -i "s/create_parameter cut_netlist/set_config_opt min_setup 2.5e-09 \\n set_config_opt max_setup -2.5e-09/i" $Cdir/control/SDFMQM8T.inst
講解: 在create_parameter cut_netlist這個字串之前加入下列兩行(之前用i 之後用a)
set_config_opt min_setup 2.5e-09
set_config_opt max_setup -2.5e-09
其中有用到換行符號 \n (先跳脫\ 在加入\n變成\\n)
Notes: 之前用i 之後用a 刪除d結果:
set_config_opt min_setup 2.5e-09
set_config_opt max_setup -2.5e-09
set_config_opt -opcond __default__ -- cut_netlist SDFMQM8T.cir
沒有留言:
張貼留言