Commit 0fe62b1
committed
drt: limit detailed-route grid graph to the routing-layer range
FlexGridGraph::initTracks() added every routing layer in the tech to the grid,
sizing nodes_, the per-node arrays (prevDirs_/srcs_/dsts_/guides_), and the
maze search bounds across the full layer stack. Routing edges and access vias
are already capped at TOP_ROUTING_LAYER, so layers above it were dead weight.
Skip routing layers above TOP_ROUTING_LAYER so the grid graph spans only the
routing range. Default TOP_ROUTING_LAYER is INT_MAX, so this is a no-op unless
the top routing layer is explicitly lowered.
Once the grid is trimmed it no longer spans the full layer stack, so maze-cost
init must not assume every tech layer maps to a grid node. initMazeCost_fixedObj
and initMazeCost_terms looped over the whole stack and called
getMazeZIdx(layerNum) for routing layers above TOP_ROUTING_LAYER, returning an
out-of-range z that the cost path dereferenced (getLayerNum -> zCoords_[z]),
crashing on platforms with fixed shapes or instance pins above the top routing
layer (e.g. ihp-sg13g2, with PDN and sg13g2_io pins on TopMetal above Metal5).
Guard both so fixed-shape costing skips layers outside the grid's
[getMinLayerNum, getMaxLayerNum] span. The skip is before any cost call, and is
a no-op when the grid spans every routing layer. (The setBlocked/setGuide paths
in initMazeCost_planarTerm, modBlockedEdgesForMacroPin and the guide helper are
already bounds-checked, so they need no change.)
Verified:
- gt2n gcd: at the tech-top layer the routed DB is bit-identical to before
(true no-op); with the top routing layer lowered to M5, detailed-route wall
time dropped ~10% and peak memory ~14%, 0 DRC.
- ihp-sg13g2 gcd (fixedObj) and i2c-gpio-expander (terms) crashed before the
guard and route DRC-clean after it.
Signed-off-by: mrg <mrg@ucsc.edu>1 parent 065077a commit 0fe62b1
2 files changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2722 | 2722 | | |
2723 | 2723 | | |
2724 | 2724 | | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
2725 | 2733 | | |
2726 | 2734 | | |
2727 | 2735 | | |
2728 | 2736 | | |
2729 | 2737 | | |
2730 | 2738 | | |
2731 | 2739 | | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
2732 | 2744 | | |
2733 | 2745 | | |
2734 | 2746 | | |
| |||
2894 | 2906 | | |
2895 | 2907 | | |
2896 | 2908 | | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
2897 | 2915 | | |
2898 | 2916 | | |
2899 | 2917 | | |
2900 | 2918 | | |
2901 | 2919 | | |
2902 | 2920 | | |
2903 | 2921 | | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
2904 | 2926 | | |
2905 | 2927 | | |
2906 | 2928 | | |
| |||
2971 | 2993 | | |
2972 | 2994 | | |
2973 | 2995 | | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
2974 | 3002 | | |
2975 | 3003 | | |
2976 | 3004 | | |
2977 | 3005 | | |
2978 | 3006 | | |
2979 | 3007 | | |
2980 | 3008 | | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
2981 | 3013 | | |
2982 | 3014 | | |
2983 | 3015 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
474 | 485 | | |
475 | 486 | | |
476 | 487 | | |
| |||
0 commit comments