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.63k stars 563 forks source link

MegaBoom global route failure whittled down from 2 hours to 2 minutes #6197

Closed oharboe closed 6 days ago

oharboe commented 1 week ago

2 minute version untar https://drive.google.com/file/d/1n8HLtXfi1kVHnY_KREUMH6mQxsUNQEQ1/view?usp=sharing

10 minute version untar https://drive.google.com/file/d/1LQ8fz3nJNmCcPdnlijQzfBXnqobIbkp2/view?usp=sharing

./run-me-BoomTile-asap7-base.sh

Result after ca. 10 minutes(before deltaDebug.py this took 2 hours):

OpenROAD v2.0-17048-g82450fd6f
[INFO GRT-0020] Min routing layer: M2
[INFO GRT-0021] Max routing layer: M7
[INFO GRT-0022] Global adjustment: 0%
[INFO GRT-0023] Grid origin: (0, 0)
[INFO GRT-0043] No OR_DEFAULT vias defined.
[INFO GRT-0088] Layer M1      Track-Pitch = 0.0360  line-2-Via Pitch: 0.0360
[INFO GRT-0088] Layer M2      Track-Pitch = 0.0390  line-2-Via Pitch: 0.0360
[INFO GRT-0088] Layer M3      Track-Pitch = 0.0360  line-2-Via Pitch: 0.0360
[INFO GRT-0088] Layer M4      Track-Pitch = 0.0480  line-2-Via Pitch: 0.0480
[INFO GRT-0088] Layer M5      Track-Pitch = 0.0480  line-2-Via Pitch: 0.0480
[INFO GRT-0088] Layer M6      Track-Pitch = 0.0640  line-2-Via Pitch: 0.0640
[INFO GRT-0088] Layer M7      Track-Pitch = 0.0640  line-2-Via Pitch: 0.0640
[INFO GRT-0019] Found 0 clock nets.
[INFO GRT-0001] Minimum degree: 2
[INFO GRT-0002] Maximum degree: 26
[INFO GRT-0003] Macros: 72
[INFO GRT-0043] No OR_DEFAULT vias defined.
[INFO GRT-0004] Blockages: 355617

[INFO GRT-0053] Routing resources analysis:
          Routing      Original      Derated      Resource
Layer     Direction    Resources     Resources    Reduction (%)
---------------------------------------------------------------
M1         Vertical            0             0          0.00%
M2         Horizontal   178295747      55261905          69.01%
M3         Vertical     205720165      82464924          59.91%
M4         Horizontal   150863923      60490642          59.90%
M5         Vertical     150863923      55027785          63.52%
M6         Horizontal   109719890      39742731          63.78%
M7         Vertical     109719890      54845130          50.01%
---------------------------------------------------------------

[INFO GRT-0101] Running extra iterations to remove overflow.
[INFO GRT-0197] Via related to pin nodes: 412593
[INFO GRT-0198] Via related Steiner nodes: 25896
[INFO GRT-0199] Via filling finished.
[INFO GRT-0111] Final number of vias: 634696
[INFO GRT-0112] Final usage 3D: 9999901

[INFO GRT-0096] Final congestion report:
Layer         Resource        Demand        Usage (%)    Max H / Max V / Total Overflow
---------------------------------------------------------------------------------------
M1                   0             0            0.00%             0 /  0 /  0
M2            55261905       3387271            6.13%             0 /  0 /  0
M3            82464924       3448650            4.18%             0 /  0 /  0
M4            60490642        349547            0.58%             1 /  0 /  2
M5            55027785        284363            0.52%             0 /  1 /  1
M6            39742731        288589            0.73%             1 /  0 /  2
M7            54845130        337393            0.62%             0 /  0 /  0
---------------------------------------------------------------------------------------
Total        347833117       8095813            2.33%             2 /  1 /  5

[INFO GRT-0018] Total wirelength: 4524909 um
[INFO GRT-0014] Routed nets: 39671
[ERROR GRT-0116] Global routing finished with congestion. Check the congestion regions in the DRC Viewer.

Congestion report, only 5 global route congestion DRC markers:

image

Doesn't look particularly congested...

image

Aha... I have seen this before in designs I can't share. The router has a difficulty running wires horizontally a bit to create vertical space. The macros end up with a progressively congested left edge:

image

One can see wires from pins on macros placed at the perimiter creating long vertical/horizontal areas of congestion in RUDY:

image

These are the global route congestion areas for the pre-deltaDebug(2 hours) global route failure:

image

(Unrelated to github issue, but just FYI, I've started a test that reduces the die area from 2000x2000 to 1500x1500. This could improve routing as there's no longer vast amounts of open space: https://github.com/The-OpenROAD-Project/megaboom/pull/208)

Originally posted by @oharboe in https://github.com/The-OpenROAD-Project/megaboom/issues/205#issuecomment-2482216537

eder-matheus commented 6 days ago

@oharboe Looking at the 2 min test case, I think the issue is related to the routing layer adjustment used.

The regions near the macros would already have less resources due to the routing obstructions of the macro. When using 0.45 of adjustments, we are reducing these low resources even more, making these regions hard for the router.

0.45 seems to high for this design, so I would suggest try reducing it to 0.2, which was the value that I was able to finish the complete design.

Unfortunatelly, this configuration is sensible and tuning is necessary, but we have plans to make GRT smarter and not rely only in this configuration to handle congestion (see https://github.com/The-OpenROAD-Project/OpenROAD/issues/5423).

oharboe commented 6 days ago

@eder-matheus Sounds good. I hope the test case is/was useful.

If this testcase is superfluous, then close this issue?

eder-matheus commented 6 days ago

@eder-matheus Sounds good. I hope the test case is/was useful.

If this testcase is superfluous, then close this issue?

Surely it is! I've saved both tar files that you attached, so we can use them in the future to test GRT improvements.