Skip to content

Commit ea73aa2

Browse files
committed
Fix asap7 time unit scaling (ps) and pandas scalar comparison in QoR plotter
Campaign summary for PR / resuming work: - Refactored OpenSTA timing path extraction algorithm in dump_paths_native.tcl: * Computes net_delay = sum(step_arrival_increment - cell_delay) across path steps * Computes logic_delay = sum(cell_delay) * Computes min_clk_period = clock_period - slack dynamically via [all_clocks] * Formats capacitance in fF (absolute sum across steps) * Scales time metrics to ps for asap7 and ns for sky130hd based on platform detection - Refactored qor_plotter.py: * Added dynamic metric selection dropdowns and axis unit labels (ps / ns / fF) * Fixed pandas Series min/max comparison in update_plot diagonal line drawing * Direct extraction from stage CSV reports without subprocess binary dependency errors - Tested and validated on both sky130hd/gcd and asap7/gcd flows without zero-point collapse.
1 parent ee52d2a commit ea73aa2

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

‎flow/scripts/dump_paths_native.tcl‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,20 @@ foreach path_end $paths {
8888
}
8989
}
9090

91-
# Convert seconds to delay units (ns for values > 1e-11, ps for values <= 1e-11 / asap7)
91+
# Convert seconds to delay units (ps for asap7, ns for sky130hd)
92+
set is_asap7 0
93+
if {[info exists ::env(DESIGN_PLATFORM)] && [string match "*asap7*" $::env(DESIGN_PLATFORM)]} {
94+
set is_asap7 1
95+
} elseif {[string match "*asap7*" $out_file]} {
96+
set is_asap7 1
97+
}
98+
9299
if {$min_clk_period < 1e-4} {
93-
if {[string match "*asap7*" $stage_prefix] || $datapath_delay > 10.0} {
94-
# asap7 OpenSTA reports in ps directly
100+
if {$is_asap7} {
101+
# asap7 is in ps
95102
set min_clk_period [expr {$min_clk_period * 1e12}]
96103
} else {
97-
# sky130hd OpenSTA reports in ns
104+
# sky130hd is in ns
98105
set min_clk_period [expr {$min_clk_period * 1e9}]
99106
}
100107
}

‎flow/scripts/qor_plotter.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ def update_plot(self):
140140
unit_str = " (fF)"
141141

142142
# Diagonal line
143-
if not x_data.empty and not y_data.empty:
144-
min_val = min(x_data.min(), y_data.min())
145-
max_val = max(x_data.max(), y_data.max())
143+
if len(x_data) > 0 and len(y_data) > 0:
144+
min_val = float(min(x_data.min(), y_data.min()))
145+
max_val = float(max(x_data.max(), y_data.max()))
146146
self.ax.plot([min_val, max_val], [min_val, max_val], 'r--')
147147

148148
self.ax.set_xlabel(f"{x_col}{unit_str}")

0 commit comments

Comments
 (0)