forked from The-OpenROAD-Project/OpenROAD-flow-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopen.tcl
More file actions
71 lines (62 loc) · 2.07 KB
/
Copy pathopen.tcl
File metadata and controls
71 lines (62 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
source $::env(SCRIPTS_DIR)/util.tcl
# Read liberty files
source $::env(SCRIPTS_DIR)/read_liberty.tcl
# Read def
if {[env_var_exists_and_non_empty DEF_FILE]} {
# Read lef
log_cmd read_lef $::env(TECH_LEF)
log_cmd read_lef $::env(SC_LEF)
if {[env_var_exists_and_non_empty ADDITIONAL_LEFS]} {
foreach lef $::env(ADDITIONAL_LEFS) {
log_cmd read_lef $lef
}
}
set input_file $::env(DEF_FILE)
log_cmd read_def $input_file
} else {
set input_file $::env(ODB_FILE)
log_cmd read_db $input_file
}
proc read_timing {input_file} {
set result [find_sdc_file $input_file]
set design_stage [lindex $result 0]
set sdc_file [lindex $result 1]
if {$sdc_file == ""} {
set sdc_file $::env(SDC_FILE)
}
log_cmd read_sdc $sdc_file
if [file exists $::env(PLATFORM_DIR)/derate.tcl] {
source $::env(PLATFORM_DIR)/derate.tcl
}
source $::env(PLATFORM_DIR)/setRC.tcl
if {$design_stage >= 4} {
# CTS has run, so propagate clocks
set_propagated_clock [all_clocks]
}
if {$design_stage >= 6 && [file exist $::env(RESULTS_DIR)/6_final.spef]} {
log_cmd read_spef $::env(RESULTS_DIR)/6_final.spef
} elseif {$design_stage >= 5} {
if { [log_cmd grt::have_routes] } {
log_cmd estimate_parasitics -global_routing
} else {
puts "No global routing results available, skipping estimate_parasitics"
puts "Load $::global_route_congestion_report for details"
}
} elseif {$design_stage >= 3} {
log_cmd estimate_parasitics -placement
}
# Warm up OpenSTA, so clicking on timing related buttons reacts faster
set _tmp [log_cmd find_timing_paths]
}
if {[ord::openroad_gui_compiled]} {
set db_basename [file rootname [file tail $input_file]]
gui::set_title "OpenROAD - $::env(PLATFORM)/$::env(DESIGN_NICKNAME)/$::env(FLOW_VARIANT) - ${db_basename}"
}
if {[env_var_equals GUI_TIMING 1]} {
puts "GUI_TIMING=1 reading timing, takes a little while for large designs..."
read_timing $input_file
if {[gui::enabled]} {
log_cmd gui::select_chart "Endpoint Slack"
log_cmd gui::update_timing_report
}
}