| proc global_routing {args} { |
| TIMER::timer_start |
| # if {$::env(GLB_RT_OLD_FR)} { |
| # try_catch envsubst < $::env(SCRIPTS_DIR)/fastroute.rsyn > $::env(fastroute_tmp_file_tag).rsyn |
| # try_catch FRlefdef_old \ |
| # --no-gui \ |
| # --script $::env(fastroute_tmp_file_tag).rsyn \ |
| # |& tee $::env(TERMINAL_OUTPUT) $::env(fastroute_log_file_tag).log |
| # } else { |
| # try_catch envsubst < $::env(SCRIPTS_DIR)/fastroute.tcl > $::env(fastroute_tmp_file_tag).tcl |
| # cd $::env(OPENLANE_ROOT)/etc |
| # try_catch FastRoute -c 1 < $::env(fastroute_tmp_file_tag).tcl \ |
| # |& tee $::env(TERMINAL_OUTPUT) $::env(fastroute_log_file_tag).log |
| # } |
| try_catch openroad -exit $::env(SCRIPTS_DIR)/openroad/or_fastroute.tcl |& tee $::env(TERMINAL_OUTPUT) $::env(fastroute_log_file_tag)_openroad.log |
| TIMER::timer_stop |
| exec echo "[TIMER::get_runtime]" >> $::env(fastroute_log_file_tag)_runtime.txt |
| } |
| |
| proc detailed_routing {args} { |
| TIMER::timer_start |
| if {$::env(RUN_ROUTING_DETAILED)} { |
| try_catch envsubst < $::env(SCRIPTS_DIR)/tritonRoute.param > $::env(tritonRoute_tmp_file_tag).param |
| |
| try_catch TritonRoute \ |
| $::env(tritonRoute_tmp_file_tag).param \ |
| |& tee $::env(TERMINAL_OUTPUT) $::env(tritonRoute_log_file_tag).log |
| } else { |
| exec echo "SKIPPED!" >> $::env(tritonRoute_log_file_tag).log |
| } |
| TIMER::timer_stop |
| exec echo "[TIMER::get_runtime]" >> $::env(tritonRoute_log_file_tag)_runtime.txt |
| # exec dr-cu \ |
| # -lef $::env(MERGED_LEF) \ |
| # -def $::env(RESULTS_DIR)/5_cts/5_4_cts.def \ |
| # -guide $::env(RESULTS_DIR)/$::env(CURRENT_STAGE)/route.guide \ |
| # -threads [exec nproc] \ |
| # \ |
| # -output $::env(RESULTS_DIR)/$::env(CURRENT_STAGE)/6_2_route.def \ |
| # -tat 9999999 \ |
| # |& tee $::env(TERMINAL_OUTPUT) $::env(LOG_DIR)/$::env(CURRENT_STAGE)/6_2_dr-cu.log |
| set_def $::env(tritonRoute_result_file_tag).def |
| } |
| |
| proc ins_fill_cells {args} { |
| TIMER::timer_start |
| if {$::env(FILL_INSERTION)} { |
| try_catch sh $::env(SCRIPTS_DIR)/addspacers.sh $::env(CURRENT_DEF) $::env(addspacers_tmp_file_tag).def |
| } else { |
| exec echo "SKIPPED!" >> $::env(addspacers_log_file_tag).log |
| try_catch cp $::env(CURRENT_DEF) $::env(addspacers_tmp_file_tag).def |
| } |
| TIMER::timer_stop |
| exec echo "[TIMER::get_runtime]" >> $::env(addspacers_log_file_tag)_runtime.txt |
| set_def $::env(addspacers_tmp_file_tag).def |
| } |
| |
| proc run_routing {args} { |
| # |----------------------------------------------------| |
| # |---------------- 5. ROUTING ----------------------| |
| # |----------------------------------------------------| |
| set ::env(CURRENT_STAGE) routing |
| # insert fill_cells |
| ins_fill_cells |
| # fastroute global 6_routing |
| global_routing |
| |
| # detailed routing |
| detailed_routing |
| |
| ## TIMER END |
| set timer_end [clock seconds] |
| set timer_start $::env(timer_start) |
| set datetime $::env(datetime) |
| |
| set runtime_s [expr {($timer_end - $timer_start)}] |
| set runtime_h [expr {$runtime_s/3600}] |
| |
| set runtime_s [expr {$runtime_s-$runtime_h*3600}] |
| set runtime_m [expr {$runtime_s/60}] |
| |
| set runtime_s [expr {$runtime_s-$runtime_m*60}] |
| puts "Completed $::env(DESIGN_NAME)/$datetime in ${runtime_h}h${runtime_m}m${runtime_s}s" |
| set runtime_log [open $::env(REPORTS_DIR)/runtime.txt w] |
| puts $runtime_log "Completed $::env(DESIGN_NAME)/$datetime in ${runtime_h}h${runtime_m}m${runtime_s}s" |
| close $runtime_log |
| } |
| |
| proc gen_pdn {args} { |
| TIMER::timer_start |
| if {![info exists ::env(PDN_CFG)]} { |
| set ::env(PDN_CFG) $::env(OPENLANE_ROOT)/pdks/$::env(PDK)/libs.tech/openlane/common_pdn.tcl |
| } |
| #try_catch apply_pdn $::env(PDN_CFG).old \ |
| #|& tee $::env(TERMINAL_OUTPUT) $::env(pdn_log_file_tag).log |
| try_catch openroad -exit $::env(SCRIPTS_DIR)/new_pdn.tcl \ |
| |& tee $::env(TERMINAL_OUTPUT) $::env(pdn_log_file_tag).log |
| #try_catch mv $::env(TMP_DIR)/$::env(CURRENT_STAGE)/$::env(DESIGN_NAME)_post_T8.def $::env(pdn_tmp_file_tag).def |
| TIMER::timer_stop |
| exec echo "[TIMER::get_runtime]" >> $::env(pdn_log_file_tag)_runtime.txt |
| set_def $::env(pdn_tmp_file_tag).def |
| } |
| |
| |
| |
| package provide openlane 0.9 |