Skip to content

Commit cb8a913

Browse files
committed
open_synth: make it work with OpenSTA
Modify scripts so that make open_synth can work with OpenSTA, this simplifies reporting issues. Turnaround times on real test cases is long, so it is nice to have this debugged in ORFS. To examine timing of a design using OpenSTA: make OPENROAD_EXE=../tools/install/OpenROAD/bin/sta open_synth To create an OpenSTA standalone issue, run: make open_issue Tinker with run-*.sh script, create a small script, source scripts/sta-synth.tcl and create test-case. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 26bb9b2 commit cb8a913

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

flow/scripts/load.tcl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ proc load_design {design_file sdc_file} {
66
# Read liberty files
77
source $::env(SCRIPTS_DIR)/read_liberty.tcl
88

9+
# OpenSTA does not have read_lef
10+
set got_lef [expr [llength [info commands read_lef]] > 0]
911
# Read design files
1012
set ext [file extension $design_file]
1113
if {$ext == ".v"} {
12-
read_lef $::env(TECH_LEF)
13-
read_lef $::env(SC_LEF)
14-
if {[env_var_exists_and_non_empty ADDITIONAL_LEFS]} {
15-
foreach lef $::env(ADDITIONAL_LEFS) {
16-
read_lef $lef
14+
if {$got_lef} {
15+
read_lef $::env(TECH_LEF)
16+
read_lef $::env(SC_LEF)
17+
if {[env_var_exists_and_non_empty ADDITIONAL_LEFS]} {
18+
foreach lef $::env(ADDITIONAL_LEFS) {
19+
read_lef $lef
20+
}
1721
}
1822
}
1923
read_verilog $::env(RESULTS_DIR)/$design_file
@@ -24,9 +28,12 @@ proc load_design {design_file sdc_file} {
2428
error "Unrecognized input file $design_file"
2529
}
2630

27-
# Read SDC file
2831
read_sdc $::env(RESULTS_DIR)/$sdc_file
2932

33+
if {!$got_lef} {
34+
return
35+
}
36+
3037
if [file exists $::env(PLATFORM_DIR)/derate.tcl] {
3138
log_cmd source $::env(PLATFORM_DIR)/derate.tcl
3239
}

flow/scripts/read_liberty.tcl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
if {![expr [llength [info commands read_lef]] > 0]} {
2+
proc suppress_message {a b} {
3+
# not used in OpenSTA
4+
}
5+
proc unsuppress_message {a b} {
6+
# not used in OpenSTA
7+
}
8+
}
9+
110
# To remove [WARNING STA-1212] from the logs for ASAP7.
211
# /OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_SIMPLE_RVT_TT_nldm_211120.lib.gz line 13178, timing group from output port.
312
# Added following suppress_message

flow/scripts/sta-synth.tcl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
source $::env(SCRIPTS_DIR)/load.tcl
22
load_design 1_synth.v 1_synth.sdc
3+
4+
if {[env_var_equals GUI_TIMING 1]} {
5+
puts "GUI_TIMING=1 reading timing, takes a little while for large designs..."
6+
set openroad [expr [llength [info commands ord::openroad_version]] > 0]
7+
8+
if {$openroad && [gui::enabled]} {
9+
gui::select_chart "Endpoint Slack"
10+
log_cmd gui::update_timing_report
11+
} else {
12+
report_checks
13+
}
14+
}

0 commit comments

Comments
 (0)