Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate the clock in some STA reports #2134

Merged
merged 6 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/variables_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
LIB_SYNTH_COMPLETE_NO_PG
LIB_SYNTH_MERGED
LIB_SYNTH_NO_PG
_PROPAGATE_ALL_CLOCKS
"""
gpio_variables = """
USE_GPIO_ROUTING_LEF
Expand Down
5 changes: 5 additions & 0 deletions scripts/base.sdc
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ set_clock_transition $::env(SYNTH_CLOCK_TRANSITION) [get_clocks $::env(CLOCK_POR
puts "\[INFO\]: Setting timing derate to: [expr {$::env(SYNTH_TIMING_DERATE) * 100}] %"
set_timing_derate -early [expr {1-$::env(SYNTH_TIMING_DERATE)}]
set_timing_derate -late [expr {1+$::env(SYNTH_TIMING_DERATE)}]

if { [info exists ::env(_PROPAGATE_ALL_CLOCKS)] && $::env(_PROPAGATE_ALL_CLOCKS) } {
puts "\[INFO\]: Propagating all clocks"
set_propagated_clock [all_clocks]
}
8 changes: 8 additions & 0 deletions scripts/openroad/common/io.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ proc read_sdc_wrapper {} {
puts stderr $errmsg
exit 1
}
if { [info exists ::env(_PROPAGATE_ALL_CLOCKS)] && $::env(_PROPAGATE_ALL_CLOCKS) } {
set matches [exec bash -c "{ grep set_propagated_clock $sdc_in | grep -v '#.*set_propagated_clock'; } || true"]
if { $matches == "" } {
puts "\[INFO\]: No (un)set_propagated_clock found in $sdc_in"
puts "\[INFO\]: Propagating all clocks"
set_propagated_clock [all_clocks]
}
}
}


Expand Down
18 changes: 18 additions & 0 deletions scripts/openroad/sta/multi_corner.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,22 @@ if { [file tail [info nameofexecutable]] == "openroad" } {
puts "area_report_end"
}

puts "check_nonpropagated_clocks"

foreach clock [all_clocks] {
if { ![get_property $clock propagated] } {
puts "[get_property $clock full_name]"
}
}

puts "check_nonpropagated_clocks_end"

foreach clock [all_clocks] {
report_clock_properties $clock
report_clock_latency -clock $clock
report_clock_min_period -clocks [get_property $clock name]
}

puts "report_clock_end"

write -no_global_connect
2 changes: 2 additions & 0 deletions scripts/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ def reports_from_logs(self):
("_sta.skew.rpt", "skew_report"),
("_sta.summary.rpt", "summary_report"),
("_sta.power.rpt", "power_report"),
("_sta.nonpropagated.rpt", "check_nonpropagated_clocks"),
("_sta.clock.rpt", "report_clock"),
]

for name, log in [
Expand Down
2 changes: 1 addition & 1 deletion scripts/tcl_commands/cts.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ proc run_cts {args} {
scrot_klayout -layout $::env(CURRENT_DEF) -log $::env(cts_logs)/screenshot.log

if { [info exists ::env(CTS_REPORT_TIMING)] && $::env(CTS_REPORT_TIMING) } {
run_sta -estimate_placement -no_save $::env(cts_results) -log $::env(cts_logs)/cts_sta.log
run_sta -propagate_all_clocks -estimate_placement -no_save $::env(cts_results) -log $::env(cts_logs)/cts_sta.log
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/tcl_commands/routing.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ proc global_routing_fastroute {args} {
-indexed_log [index_file $::env(routing_logs)/global_write_netlist.log]

TIMER::timer_stop
run_sta -no_save -log $::env(routing_logs)/grt_sta.log
run_sta -propagate_all_clocks -no_save -log $::env(routing_logs)/grt_sta.log

exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "global routing - openroad"
}
Expand Down Expand Up @@ -439,7 +439,7 @@ proc run_resizer_design_routing {args} {

TIMER::timer_stop
exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "resizer design optimizations - openroad"
run_sta -estimate_global -no_save -log $::env(routing_logs)/rsz_design_sta.log
run_sta -propagate_all_clocks -estimate_global -no_save -log $::env(routing_logs)/rsz_design_sta.log
} else {
puts_info "Skipping Global Routing Resizer Design Optimizations."
}
Expand All @@ -459,7 +459,7 @@ proc run_resizer_timing_routing {args} {

TIMER::timer_stop
exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "resizer timing optimizations - openroad"
run_sta -estimate_global -no_save -log $::env(routing_logs)/rsz_timing_sta.log
run_sta -propagate_all_clocks -estimate_global -no_save -log $::env(routing_logs)/rsz_timing_sta.log
} else {
puts_info "Skipping Global Routing Resizer Timing Optimizations."
}
Expand Down
9 changes: 9 additions & 0 deletions scripts/tcl_commands/sta.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ proc run_sta {args} {
-netlist_in
-blackbox_check
-no_save
-propagate_all_clocks
}
parse_key_args "run_sta" args arg_values $options flags_map $flags

Expand All @@ -43,6 +44,12 @@ proc run_sta {args} {
set corner_prefix "Multi-Corner"
}

if { [info exists flags_map(-propagate_all_clocks)] } {
set ::env(_PROPAGATE_ALL_CLOCKS) 1
} else {
set ::env(_PROPAGATE_ALL_CLOCKS) 0
}

set ::env(PROCESS_CORNER) nom
set process_corner_postfix ""
if { [info exists arg_values(-process_corner)]} {
Expand Down Expand Up @@ -121,6 +128,7 @@ proc run_sta {args} {
blackbox_modules_check $log
}
unset ::env(STA_MULTICORNER)
set ::env(_PROPAGATE_ALL_CLOCKS) 0
unset -nocomplain ::env(ESTIMATE_PARASITICS)
TIMER::timer_stop
exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "sta - openroad"
Expand Down Expand Up @@ -171,6 +179,7 @@ proc run_parasitics_sta {args} {
lappend sta_flags -log $log_name
lappend sta_flags -process_corner $process_corner
lappend sta_flags -multi_corner
lappend sta_flags -propagate_all_clocks
lappend sta_flags -save_to $directory
lappend sta_flags -tool sta

Expand Down
Loading