mattvenn / openlane_summary

Apache License 2.0
19 stars 8 forks source link

Antenna summary fails because of OpenROAD report change #11

Open algofoogle opened 1 year ago

algofoogle commented 1 year ago

tl;dr

  1. summary.py can't find the antenna report (*antenna.rpt) because I think it's now in a different path:
    • *I think the actual file it might need is `log/signoff/antenna.log`**
    • Instead it's looking for reports/signoff/*antenna.rpt, but the only file I see generated in there is *antenna_violators.rpt. I don't know what THAT file is meant to have in it, but it's empty for the test I did (see below for details).
  2. Even if it did find this file, however, the report format has changed too much as of OpenROAD commit 09f6d33 from Nov 2022
  3. It can't ever report "no antenna file, did the run finish?" because Line 254 is unreachable: the call to check_path will exit() first.

(Maybe the OpenROAD team should implement an unchanging JSON format for consumption by toolchains, keeping it separate from these other human-readable files).

Details

Discovered via Zero to ASIC Course project 4.1, when I try to get the summary of the antenna report:

zerotoasic@zerotoasic:~/asic_tools/openlane$ summary.py --design zipdiv --antenna
/home/zerotoasic/asic_tools/openlane/designs/zipdiv/runs/*
using latest run:
/home/zerotoasic/asic_tools/openlane/designs/zipdiv/runs/RUN_2023.02.23_11.07.49
file not found: /home/zerotoasic/asic_tools/openlane/designs/zipdiv/runs/RUN_2023.02.23_11.07.49/reports/signoff/*antenna.rpt

This in turn means --summary incorrectly yields antenna_violations: -1, thinking there is no report, but I believe there is, now in another path, and with an updated file format too.

Per this (and incidentally also outdated OpenROAD Antenna Rule Checker doco), the old file format that summary.py is expecting in reports/signoff/*antenna.rpt resembles this:

  _1438_  (sky130_fd_sc_hd__clkbuf_1)  A
[1]  met1:
  PAR:   79.50  Ratio:    0.00       (Area)
  PAR:  400.02*  Ratio:  400.00       (S.Area)
  CAR:   79.58  Ratio:    0.00       (C.Area)
  CAR:  400.10  Ratio:    0.00       (C.S.Area)

...but the closest equivalent I can find is log/signoff/*-antenna.log which is now quite different:

  Pin: _1810_/C (sky130_fd_sc_hd__or3_1)
    Layer: met1
      Partial area ratio:  152.71
      Required ratio:    0.00 (Gate area) 
      Partial area ratio:  772.11
      Required ratio:  400.00 (Side area) (VIOLATED)      <=== Note "VIOLATED" instead of asterisk, too.
      Cumulative area ratio:  152.71
      Required ratio:    0.00 (Cumulative area) 
      Cumulative area ratio:  772.11
      Required ratio:    0.00 (Cumulative side area) 

NOTE: I see another file called reports/signoff/*-antenna_violators.rpt, but I don't know what that file is for, and though I have "(VIOLATED)" shown above, my *-antenna_violators.rpt file is empty.

If my interpretation of all this is correct, then summary.py would need changes on both of these 2 lines: https://github.com/mattvenn/openlane_summary/blob/8f7386028e248080180994d042d561b24c7cd169/summary.py#L249-L250 (Note also that check_path does an exit() in this case, so we never get to Line 254).

More critically, this will also need to be reworked: https://github.com/mattvenn/openlane_summary/blob/c54c4d74f7e3c26a4432c62b797c8185c49d479d/summary.py#L70-L82

algofoogle commented 1 year ago

There is likely more to this that I'm not yet familiar with, which may support or invalidate my bug report above.

Certainly, summary.py --design xyz --antenna can't find an antenna report, but also metrics.csv is saying no antenna check was run, but there are at least some artefacts of the check happening in my run.

mattvenn commented 1 year ago

thanks for reporting this. I'll get the script updated.