palaniappan-r's picture
Add markdown sources
d59bb1b verified
# Slow detailed routing convergence
Tool: Detailed Routing
Subcategory: Performance issue
## Conversation
### oharboe
I was curious what was difficult about detailed routing for a design, so I stopped detailed routing after 4 iterations, using https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/791, then looked at 5_route_drc.rpt.
Here it seems like there is a lot of congestion at the top of macros because the power strip is running inside the halo (?) of the macro.
![image](https://user-images.githubusercontent.com/2798822/215082762-af8767ce-7118-48cb-a7a3-c9913369defc.png)
Howevever here is a macro, just like the one above where detailed routing doesn't seem to have a problem dealing with this issue:
![image](https://user-images.githubusercontent.com/2798822/215083592-634bcdef-9a15-45c7-ad5b-b34820f0a94e.png)
Perhaps nothing is wrong here and it just takes a while to do detailed routing.
Is there anything to learn or that I can do different here?
### maliberty
How many iterations does it take to complete? In general drt is the slowest step of the flow but it also looks like something is going on here.
In the lower picture the wires appear to go straight in on m5 but in the upper the go up to a higher layer and then try to drop down (which is blocked by the strap). I'm not clear why they can't go straight in from the image. Can you tell?
### oharboe
I can see the same problem on https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/tree/master/flow/designs/asap7/mock-array-big
![image](https://user-images.githubusercontent.com/2798822/215114565-abeebeab-8247-4fb0-81eb-8259fbad3390.png)
Zooming in, we can see that different metal is being used:
![image](https://user-images.githubusercontent.com/2798822/215114709-80ae1615-95c6-4bb3-bfaa-a25c3bc339b9.png)
To reproduce the image above, first build, but abort after 5 iterations in detailed routing, then load the 5_route_drc.rpt and zoom in:
```
make DESIGN_CONFIG=designs/asap7/mock-array-big/Element/config.mk generate_abstract
make DESIGN_CONFIG=designs/asap7/mock-array-big/config.mk DETAILED_ROUTE_ARGS=\"-bottom_routing_layer M2 -top_routing_layer M7 -save_guide_updates -verbose 1 -droute_end_iter 5\"
make DESIGN_CONFIG=designs/asap7/mock-array-big/config.mk
```
### maliberty
@osamahammad21 I think looking at this issue in the context of asap7/mock-array-big fits with your other drt performance work.
### maliberty
Your pins are off the routing grid:
![image](https://user-images.githubusercontent.com/761514/215116042-68838f95-3670-47af-8cc8-e03d6748a470.png)
which I guess is why the router is gyrating to hit them.
### maliberty
@osamahammad21 with the PRs from this morning this case now finishes with 0 drvs. However it reaches 2 drvs by the end of iter 4 but takes until iter 13 to reach zero. At the end of iter5 I see two cut spacing violations. They both look easy to fix, eg
![image](https://user-images.githubusercontent.com/761514/216147952-499d6ec6-11d2-4d60-b8e7-27cdf28104ef.png)
you should readily move the via to the right by one track. I guess this is a costing issue.
### antonblanchard
I missed this because it was hiding in discussions. I have noticed various issues with via spacing in drt, eg https://github.com/The-OpenROAD-Project/OpenROAD/issues/2827 and https://github.com/The-OpenROAD-Project/OpenROAD/pull/2844, so likely issues in both route cost and GC (drc).
### oharboe
Near as I know all of these issues are resolved on master.