The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.6k stars 556 forks source link

report_clock_skew_metric fails with float OverflowError #2268

Closed antonblanchard closed 2 years ago

antonblanchard commented 2 years ago

I starting hitting this after an update to ORFS - commit 90afa768f292 ("metrics: add clock skew report"). The attached test case fails with:

Error: floorplan.tcl, 101 OverflowError in method 'metric_float', argument 2 of type 'float'

Clock skew metrics before CTS seem of little use, but we probably shouldn't fall in a heap. I added:

puts [worst_clock_skew -setup]
puts [worst_clock_skew -hold]

and I get:

1.0000000190432691e+42
1.0000000190432691e+42

That's a lot of skew.

Test case: floorplan_multiply_adder_asap7_base_2022-09-14_14-55.tar.gz

maliberty commented 2 years ago

@vvbandeira We should move clock_skew inside the include_erc block of report_metrics.

rovinski commented 2 years ago

I am running into this as well. It's preventing me from running very simple designs for the upcoming tutorial.

Even with removing the offending commands, I see:

==========================================================================
check_antennas
--------------------------------------------------------------------------
[WARNING ANT-0011] -report_violating_nets is deprecated.
[INFO GRT-0043] No OR_DEFAULT vias defined.
[INFO ANT-0002] Found 0 net violations.
[INFO ANT-0001] Found 0 pin violations.
[INFO FLW-0007] clock clk period 5.000000
[INFO FLW-0008] Clock clk period -950000041162928859976620080891667939328.000
[INFO FLW-0009] Clock clk slack 1000000043329398871556523614962693701632.000
[ERROR STA-0414] period '-9.500000411629289e+38' is not a positive float.
Error: write_ref_sdc.tcl, 34 STA-0414
maliberty commented 2 years ago

I'll fix the flow to not report clock skew before cts is run. I'll leave this for @jjcherry56 to give a more reasonable result if someone does run it manually.

jjcherry56 commented 2 years ago

It doesn't have anything to do with running cts and moving report_clock_skew will not help. The issue is there are no capture registers to measure skew to, just output pins, which the command reports: % report_clock_skew Clock clk No launch/capture paths found.

I updated opensta to return 0 in this case but did not update openroad.

jjcherry56 commented 2 years ago

@rovinski it looks like you don't have any clock constraints at all.

maliberty commented 2 years ago

Leaving this open until sta is updated

rovinski commented 2 years ago

@jjcherry56 My case was actually that there was a clock constraint, but there were no input/output constraints and no reg->reg paths, only in->reg and reg->out. https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/594 fixes Error: floorplan.tcl, 101 OverflowError in method 'metric_float', argument 2 of type 'float' and https://github.com/The-OpenROAD-Project/OpenSTA/commit/18f11a302958ea6814cd1d711a18ec3eab3c1184 fixes [ERROR STA-0414] period '-9.500000411629289e+38' is not a positive float.. Adding input/output constraints also fixes the second error. Thanks!