Clarify detailed-route metrics for antenna repair reroutes#4133
Clarify detailed-route metrics for antenna repair reroutes#4133alokkumardalei-wq wants to merge 3 commits intoThe-OpenROAD-Project:masterfrom
Conversation
59102ae to
d877739
Compare
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
d877739 to
8606e26
Compare
a95ed76 to
ba57ebc
Compare
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
ba57ebc to
d1068de
Compare
|
Hello @AcKoucher , could you please have look when you have time and let me know your thoughts and any feedback , would happy to address those. Thank you ! |
AcKoucher
left a comment
There was a problem hiding this comment.
@eder-matheus Code-wise looks okay. I'm not sure if we want to preserve the first repair call. Thoughts?
osamahammad21
left a comment
There was a problem hiding this comment.
@AcKoucher @maliberty This is related more to ORFS and metrics than DRT.
| detailed_route {*}$all_args | ||
| incr repair_antennas_iters | ||
| } | ||
| utl::set_metrics_stage "detailedroute__{}" |
There was a problem hiding this comment.
I don't like the idea of jumping back a stage. Essentially metrics stages are designed as a stack. This should be something like .. detailedroute__post_repair__
My concern is linking some unrelated metrics, like the base wire length reported from the first detailed_route run, and the the number of final diodes. The wire length changed since then, but not updated for the detailedroute__ metric
Address review feedback: replace set_metrics_stage with
push/pop_metrics_stage for antenna repair sub-stages to
follow the stack-based convention (matching cts.tcl pattern).
This avoids jumping back to detailedroute__{} and preserves
the existing detailedroute__antenna_diodes_count metric key.
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
|
Hello @osamahammad21, thanks for the feedback. I've updated the PR to use push_metrics_stage/pop_metrics_stage instead of setting the stage directly — this follows the stack convention you mentioned, same as how cts.tcl handles it. The repair iterations get their own pushed sub-stages and pop back cleanly, so there's no more jumping back to detailedroute__{}. The existing detailedroute__antenna_diodes_count metric key is preserved. Happy to get any feedback on this further. Thank you ! |
What does this PR do?
Fixes #3651
This change makes detailed-route metrics easier to interpret when post-DRT antenna repair triggers additional reroutes.
Previously, repeated reroutes could write to the same plain detailed-route metric keys, which made it unclear which value represented the final route and which values came from antenna-repair iterations.
With this update:
pre_repairstageiter_NstageThis keeps the metrics unambiguous without breaking existing consumers that still expect the top-level
detailedroute__antenna_diodes_countfield.Validation
Validated with:
python3 -m unittest discover -s flow/test -p 'test_*.py'Expected output:
make DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk clean_route route metadata-generate metadata-checkExpected output:
make DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk clean_route route metadata-generate metadata-check [INFO DRT-0198] Complete detail routing. Total wire length = 8466 um. Total wire length on LAYER li1 = 0 um. Total wire length on LAYER met1 = 4104 um. Total wire length on LAYER met2 = 3951 um. Total wire length on LAYER met3 = 299 um. Total wire length on LAYER met4 = 110 um. Total wire length on LAYER met5 = 0 um. Total number of vias = 2678. [INFO ANT-0002] Found 0 net violations. [INFO ANT-0001] Found 0 pin violations. [INFO GRT-0012] Found 0 antenna violations. [INFO ANT-0002] Found 0 net violations. [INFO ANT-0001] Found 0 pin violations. write_db ./results/sky130hd/gcd/base/5_2_route.odb /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 /Users/alokkumardalei/Desktop/open-road-flowscripts/OpenROAD-flow-scripts/flow/util/genMetrics.py -d gcd \ -p sky130hd \ -v base \ --logs ./logs/sky130hd/gcd/base \ --reports ./reports/sky130hd/gcd/base \ --results ./results/sky130hd/gcd/base \ -o ./reports/sky130hd/gcd/base/metadata.json 2>&1 \ | tee /Users/alokkumardalei/Desktop/open-road-flowscripts/OpenROAD-flow-scripts/flow/reports/sky130hd/gcd/base/metadata-generate.log [WARN] Tag synth__design__instance__count__stdcell not found in ./reports/sky130hd/gcd/base/synth_stat.txt. Will use N/A. [WARN] Tag finish__runtime__total not found in ./logs/sky130hd/gcd/base/6_report.log. Will use N/A. [WARN] Tag finish__cpu__total not found in ./logs/sky130hd/gcd/base/6_report.log. Will use N/A. [WARN] Tag finish__mem__peak not found in ./logs/sky130hd/gcd/base/6_report.log. Will use N/A. [WARN] Tag synth__runtime__total not found in ./logs/sky130hd/gcd/base/1_2_yosys.log. Will use N/A. [WARN] Tag synth__cpu__total not found in ./logs/sky130hd/gcd/base/1_2_yosys.log. Will use N/A. [WARN] Tag synth__mem__peak not found in ./logs/sky130hd/gcd/base/1_2_yosys.log. Will use N/A. [WARN] Tag floorplan__runtime__total not found in ./logs/sky130hd/gcd/base/2_1_floorplan.log. Will use N/A. [WARN] Tag floorplan__cpu__total not found in ./logs/sky130hd/gcd/base/2_1_floorplan.log. Will use N/A. [WARN] Tag floorplan__mem__peak not found in ./logs/sky130hd/gcd/base/2_1_floorplan.log. Will use N/A. [WARN] Tag globalplace_skip_io__runtime__total not found in ./logs/sky130hd/gcd/base/3_1_place_gp_skip_io.log. Will use N/A. [WARN] Tag globalplace_skip_io__cpu__total not found in ./logs/sky130hd/gcd/base/3_1_place_gp_skip_io.log. Will use N/A. [WARN] Tag globalplace_skip_io__mem__peak not found in ./logs/sky130hd/gcd/base/3_1_place_gp_skip_io.log. Will use N/A. [WARN] Tag globalplace_io__runtime__total not found in ./logs/sky130hd/gcd/base/3_2_place_iop.log. Will use N/A. [WARN] Tag globalplace_io__cpu__total not found in ./logs/sky130hd/gcd/base/3_2_place_iop.log. Will use N/A. [WARN] Tag globalplace_io__mem__peak not found in ./logs/sky130hd/gcd/base/3_2_place_iop.log. Will use N/A. [WARN] Tag globalplace__runtime__total not found in ./logs/sky130hd/gcd/base/3_3_place_gp.log. Will use N/A. [WARN] Tag globalplace__cpu__total not found in ./logs/sky130hd/gcd/base/3_3_place_gp.log. Will use N/A. [WARN] Tag globalplace__mem__peak not found in ./logs/sky130hd/gcd/base/3_3_place_gp.log. Will use N/A. [WARN] Tag placeopt__runtime__total not found in ./logs/sky130hd/gcd/base/3_4_place_resized.log. Will use N/A. [WARN] Tag placeopt__cpu__total not found in ./logs/sky130hd/gcd/base/3_4_place_resized.log. Will use N/A. [WARN] Tag placeopt__mem__peak not found in ./logs/sky130hd/gcd/base/3_4_place_resized.log. Will use N/A. [WARN] Tag detailedplace__runtime__total not found in ./logs/sky130hd/gcd/base/3_5_place_dp.log. Will use N/A. [WARN] Tag detailedplace__cpu__total not found in ./logs/sky130hd/gcd/base/3_5_place_dp.log. Will use N/A. [WARN] Tag detailedplace__mem__peak not found in ./logs/sky130hd/gcd/base/3_5_place_dp.log. Will use N/A. [WARN] Tag cts__runtime__total not found in ./logs/sky130hd/gcd/base/4_1_cts.log. Will use N/A. [WARN] Tag cts__cpu__total not found in ./logs/sky130hd/gcd/base/4_1_cts.log. Will use N/A. [WARN] Tag cts__mem__peak not found in ./logs/sky130hd/gcd/base/4_1_cts.log. Will use N/A. [WARN] Tag globalroute__runtime__total not found in ./logs/sky130hd/gcd/base/5_1_grt.log. Will use N/A. [WARN] Tag globalroute__cpu__total not found in ./logs/sky130hd/gcd/base/5_1_grt.log. Will use N/A. [WARN] Tag globalroute__mem__peak not found in ./logs/sky130hd/gcd/base/5_1_grt.log. Will use N/A. [WARN] Overwriting Tag finish__runtime__total [WARN] Tag finish__runtime__total not found in ./logs/sky130hd/gcd/base/6_report.log. Will use N/A. [WARN] Overwriting Tag finish__cpu__total [WARN] Tag finish__cpu__total not found in ./logs/sky130hd/gcd/base/6_report.log. Will use N/A. [WARN] Overwriting Tag finish__mem__peak [WARN] Tag finish__mem__peak not found in ./logs/sky130hd/gcd/base/6_report.log. Will use N/A. /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 /Users/alokkumardalei/Desktop/open-road-flowscripts/OpenROAD-flow-scripts/flow/util/checkMetadata.py \ -m ./reports/sky130hd/gcd/base/metadata.json \ -r ./designs/sky130hd/gcd//rules-base.json 2>&1 \ | tee /Users/alokkumardalei/Desktop/open-road-flowscripts/OpenROAD-flow-scripts/flow/reports/sky130hd/gcd/base/metadata-check.log [INFO] synth__design__instance__area__stdcell pass test: 2641.2832 <= 2760 [INFO] constraints__clocks__count pass test: 1 == 1 [INFO] placeopt__design__instance__area pass test: 4055.14 <= 4161 [INFO] placeopt__design__instance__count__stdcell pass test: 483 <= 506 [INFO] detailedplace__design__violations pass test: 0 == 0 [INFO] cts__design__instance__count__setup_buffer pass test: 26 <= 44 [INFO] cts__design__instance__count__hold_buffer pass test: 0 <= 42 [INFO] cts__timing__setup__ws pass test: -1.71908 >= -2.27 [INFO] cts__timing__setup__tns pass test: -77.9556 >= -95.5 [INFO] cts__timing__hold__ws pass test: 0.490061 >= -0.055 [INFO] cts__timing__hold__tns pass test: 0 >= -0.22 [INFO] globalroute__antenna_diodes_count pass test: 0 <= 100 [INFO] globalroute__timing__setup__ws pass test: -1.91062 >= -2.42 [INFO] globalroute__timing__setup__tns pass test: -86.3301 >= -99.7 [INFO] globalroute__timing__hold__ws pass test: 0.541119 >= -0.055 [INFO] globalroute__timing__hold__tns pass test: 0 >= -0.22 [INFO] detailedroute__route__wirelength pass test: 8466 <= 9945 [INFO] detailedroute__route__drc_errors pass test: 0 <= 0 [INFO] detailedroute__antenna__violating__nets pass test: 0 <= 0 [INFO] detailedroute__antenna_diodes_count pass test: 0 <= 100 [INFO] finish__timing__setup__ws pass test: -1.80295 >= -2.28 [INFO] finish__timing__setup__tns pass test: -81.2492 >= -92.8 [INFO] finish__timing__hold__ws pass test: 0.541146 >= -0.055 [INFO] finish__timing__hold__tns pass test: 0 >= -0.22 [INFO] finish__design__instance__area pass test: 4904.7 <= 5797 Metadata check warnings: 0 All metadata rules passed (25 rules)I also verified the multi-iteration repair path with the OpenROAD
ibex_sky130hdtest, which produced separateiter_0,iter_1, anditer_2route metrics as expected.