Skip to content

Commit 6047cd6

Browse files
committed
regolden for baxel, fix underflow related but in GRT in ubunty platform
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
1 parent 63e9792 commit 6047cd6

4 files changed

Lines changed: 99 additions & 63 deletions

File tree

‎src/grt/src/fastroute/include/Graph2D.h‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <cstdint>
77
#include <functional>
8+
#include <map>
89
#include <set>
910
#include <string>
1011
#include <utility>
@@ -152,9 +153,13 @@ class Graph2D
152153
multi_array<Edge, 2> h_edges_; // The way it is indexed is (X, Y)
153154
multi_array<Cap3D, 3> v_cap_3D_; // The way it is indexed is (Layer, X, Y)
154155
multi_array<Cap3D, 3> h_cap_3D_; // The way it is indexed is (Layer, X, Y)
155-
multi_array<std::set<FrNet*>, 2>
156+
// Maps each NDR net present on an edge to whether it contributed the
157+
// inflated overflow cost when it was added. Removal must subtract exactly
158+
// what the net added, regardless of how the edge's overflow state changed
159+
// in between, otherwise the uint16_t usage/ndr_overflow underflows.
160+
multi_array<std::map<FrNet*, bool>, 2>
156161
v_ndr_nets_; // The way it is indexed is (X, Y)
157-
multi_array<std::set<FrNet*>, 2>
162+
multi_array<std::map<FrNet*, bool>, 2>
158163
h_ndr_nets_; // The way it is indexed is (X, Y)
159164
std::vector<NDRCongestion> congested_ndrs_;
160165

‎src/grt/src/fastroute/src/graph2d.cpp‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,14 @@ double Graph2D::getCostNDRAware(FrNet* net,
673673
// half the edge cost a second time in the initial routing steps. But we
674674
// only need to count once to avoid problems when managing 3D capacity
675675
if (is_net_present) {
676+
// Mirror exactly what this net added: if it contributed the inflated
677+
// overflow cost when routed, remove the same amount now. Using the
678+
// edge's current ndr_overflow state instead would remove a different
679+
// amount than was added when other nets changed that state in between,
680+
// underflowing the uint16_t usage/ndr_overflow (GRT-0228).
681+
const bool net_added_overflow = ndr_nets.find(net)->second;
676682
ndr_nets.erase(net);
677-
// If the edge already has an overflow caused by NDR net we need to remove
678-
// the big edge cost value
679-
if (edge.ndr_overflow > 0) {
683+
if (net_added_overflow) {
680684
edge.ndr_overflow--;
681685
final_edge_cost = -OVERFLOW_COST_MULTIPLIER * edgeCost;
682686
} else {
@@ -693,13 +697,17 @@ double Graph2D::getCostNDRAware(FrNet* net,
693697
// If the edge already has an overflow caused by NDR net or it will have
694698
// an overflow due to lack of capacity in a single layer, we need to add
695699
// the big edge cost value
696-
if (edge.ndr_overflow > 0 || !hasNDRCapacity(net, x, y, direction)) {
700+
const bool net_added_overflow
701+
= edge.ndr_overflow > 0 || !hasNDRCapacity(net, x, y, direction);
702+
if (net_added_overflow) {
697703
edge.ndr_overflow++;
698704
final_edge_cost = OVERFLOW_COST_MULTIPLIER * edgeCost;
699705
} else {
700706
final_edge_cost = edgeCost;
701707
}
702-
ndr_nets.insert(net);
708+
// Remember whether this net added the inflated cost so the matching
709+
// rip-up subtracts the same amount.
710+
ndr_nets[net] = net_added_overflow;
703711
updateNDRCapLayer(x, y, net, direction, edge_cost);
704712
}
705713
}

‎test/tinyRocket_nangate45.metrics‎

Lines changed: 68 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,80 @@
33
"IFP::instance_count": "23878",
44
"macro_place__wirelength": 189480,
55
"floorplan__design__io": 269,
6-
"design__io__hpwl": 54539079,
7-
"utilizatin__before__dpl": 23.443,
8-
"design__instance__displacement__total": 22905.8,
9-
"design__instance__displacement__mean": 0.944,
10-
"design__instance__displacement__max": 26.2145,
11-
"route__wirelength__estimated": 463432,
12-
"dpl__hpwl__delta": 4.19596e+07,
13-
"dpl__hpwl__delta__percent": 5,
14-
"RSZ::repair_design_buffer_count": "921",
15-
"RSZ::max_slew_slack": "20.133337381331483",
6+
"design__io__hpwl": 55444544,
7+
"utilization__before__dpl": 23.4455,
8+
"negotiation__converge__phase_1__iteration": 1,
9+
"design__instance__displacement__total": 35306.7,
10+
"design__instance__displacement__mean": 1.456,
11+
"design__instance__displacement__max": 9.003,
12+
"route__wirelength__estimated": 476066,
13+
"dpl__hpwl__delta": 6.2289e+07,
14+
"dpl__hpwl__delta__percent": 7,
15+
"RSZ::repair_design_buffer_count": "909",
16+
"RSZ::max_slew_slack": "2.267552509641266",
1617
"RSZ::max_fanout_slack": "100.0",
17-
"RSZ::max_capacitance_slack": "-47.25419564751397",
18-
"utilizatin__before__dpl": 23.6027,
19-
"design__instance__displacement__total": 321.128,
20-
"design__instance__displacement__mean": 0.013,
21-
"design__instance__displacement__max": 3.1075,
22-
"route__wirelength__estimated": 477818,
23-
"dpl__hpwl__delta": 246127,
18+
"RSZ::max_capacitance_slack": "-74.02976241603604",
19+
"utilization__before__dpl": 23.8257,
20+
"negotiation__converge__phase_1__iteration": 0,
21+
"design__instance__displacement__total": 1322.6,
22+
"design__instance__displacement__mean": 0.053,
23+
"design__instance__displacement__max": 9.017,
24+
"route__wirelength__estimated": 494534,
25+
"dpl__hpwl__delta": 602111,
2426
"dpl__hpwl__delta__percent": 0,
2527
"design__instance__count__setup_buffer": 0,
2628
"design__instance__count__hold_buffer": 0,
27-
"RSZ::worst_slack_min": "0.07943174121055835",
28-
"RSZ::worst_slack_max": "0.06607536926851511",
29+
"RSZ::worst_slack_min": "0.07374034924730763",
30+
"RSZ::worst_slack_max": "0.08353917793977905",
2931
"RSZ::tns_max": "0.0",
3032
"RSZ::hold_buffer_count": "0",
31-
"utilizatin__before__dpl": 23.6027,
33+
"utilization__before__dpl": 23.8257,
3234
"design__instance__displacement__total": 0,
3335
"design__instance__displacement__mean": 0,
3436
"design__instance__displacement__max": 0,
35-
"route__wirelength__estimated": 477818,
37+
"route__wirelength__estimated": 494534,
3638
"dpl__hpwl__delta": 0,
3739
"dpl__hpwl__delta__percent": 0,
38-
"DPL::utilization": "23.6",
39-
"DPL::design_area": "54216",
40-
"route__net": 28319,
40+
"DPL::utilization": "23.8",
41+
"DPL::design_area": "54729",
42+
"route__net": 28466,
4143
"route__net__special": 2,
42-
"global_route__vias": 193867,
43-
"global_route__wirelength": 763070,
44+
"global_route__fastroute__run_s": 0,
45+
"global_route__fastroute__initial_rsmt_s": 0.0340465,
46+
"global_route__fastroute__route_l_s": 0.0300888,
47+
"global_route__fastroute__congestion_rsmt_s": 0.0726604,
48+
"global_route__fastroute__new_route_l_s": 0.0231002,
49+
"global_route__fastroute__spiral_s": 0.0267237,
50+
"global_route__fastroute__route_z_s": 0.00499182,
51+
"global_route__fastroute__monotonic_s": 0.0889201,
52+
"global_route__fastroute__overflow_iterations_s": 94.9413,
53+
"global_route__fastroute__finalization_s": 1.506,
54+
"global_route__fastroute__snapshot_batch_route_s": 0,
55+
"global_route__fastroute__snapshot_batch_apply_s": 0,
56+
"global_route__fastroute__snapshot_batch_sync_s": 0,
57+
"global_route__fastroute__snapshot_batch_count": 0,
58+
"global_route__fastroute__snapshot_batch_nets": 0,
59+
"global_route__fastroute__snapshot_batch_wave_count": 0,
60+
"global_route__vias": 204195,
61+
"global_route__wirelength": 842910,
4462
"grt__antenna_diodes_count": 0,
4563
"grt__antenna__violating__nets": 0,
4664
"grt__antenna__violating__pins": 0,
4765
"GRT::ANT::errors": "0",
48-
"route__drc_errors__iter:0": 3666,
49-
"route__wirelength__iter:0": 566226,
50-
"route__drc_errors__iter:1": 456,
51-
"route__wirelength__iter:1": 563816,
52-
"route__drc_errors__iter:2": 251,
53-
"route__wirelength__iter:2": 563646,
54-
"route__drc_errors__iter:3": 0,
55-
"route__wirelength__iter:3": 563648,
66+
"route__drc_errors__iter:0": 4156,
67+
"route__wirelength__iter:0": 615675,
68+
"route__drc_errors__iter:1": 501,
69+
"route__wirelength__iter:1": 612616,
70+
"route__drc_errors__iter:2": 296,
71+
"route__wirelength__iter:2": 612224,
72+
"route__drc_errors__iter:3": 1,
73+
"route__wirelength__iter:3": 612203,
74+
"route__drc_errors__iter:4": 0,
75+
"route__wirelength__iter:4": 612202,
5676
"route__drc_errors": 0,
57-
"route__wirelength": 563648,
58-
"route__vias": 177183,
59-
"route__vias__singlecut": 177183,
77+
"route__wirelength": 612202,
78+
"route__vias": 183284,
79+
"route__vias__singlecut": 183284,
6080
"route__vias__multicut": 0,
6181
"DRT::drv": "0",
6282
"drt__repair_antennas__pre_repair__antenna__violating__nets": 0,
@@ -67,21 +87,24 @@
6787
"design__violations": 0,
6888
"timing__drv__floating__nets": 0,
6989
"timing__drv__floating__pins": 0,
70-
"DRT::worst_slack_min": "0.07982803533040626",
71-
"DRT::worst_slack_max": "-0.02102140743198857",
72-
"DRT::tns_max": "-0.47987082332698544",
73-
"DRT::clock_skew": "0.058519496460553384",
74-
"DRT::max_slew_slack": "30.44845602395414",
90+
"DRT::worst_slack_min": "0.07511796952637552",
91+
"DRT::worst_slack_max": "0.016136648030092373",
92+
"DRT::tns_max": "0.0",
93+
"DRT::clock_skew": "0.03327767322560543",
94+
"DRT::max_slew_slack": "-41.93588481308681",
7595
"DRT::max_fanout_slack": "100.0",
76-
"DRT::max_capacitance_slack": "-60.359503144452894",
96+
"DRT::max_capacitance_slack": "-93.90999184636199",
7797
"DRT::clock_period": "2.030000",
78-
"flow__warnings__count": 13,
98+
"flow__warnings__count": 25,
7999
"flow__errors__count": 0,
80100
"flow__warnings__count:DRT-0120": 4,
81101
"flow__warnings__count:GRT-0246": 1,
102+
"flow__warnings__count:GRT-0273": 10,
82103
"flow__warnings__count:GRT-0281": 1,
83104
"flow__warnings__count:IFP-0028": 1,
84105
"flow__warnings__count:ORD-0046": 5,
106+
"flow__warnings__count:PDN-1051": 1,
107+
"flow__warnings__count:RCX-0514": 1,
85108
"flow__warnings__count:STA-0441": 1,
86-
"flow__warnings__type_count": 6
109+
"flow__warnings__type_count": 9
87110
}

‎test/tinyRocket_nangate45.metrics_limits‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"IFP::instance_count" : "28653.6"
3-
,"DPL::design_area" : "65696.4"
3+
,"DPL::design_area" : "65674.8"
44
,"DPL::utilization" : "28.56"
5-
,"RSZ::repair_design_buffer_count" : "1118"
5+
,"RSZ::repair_design_buffer_count" : "1090"
66
,"RSZ::max_slew_slack" : "0"
7-
,"RSZ::max_capacitance_slack" : "-79.5773911733657"
7+
,"RSZ::max_capacitance_slack" : "-88.83571489924324"
88
,"RSZ::max_fanout_slack" : "0"
9-
,"RSZ::worst_slack_min" : "-0.123521102065137"
10-
,"RSZ::worst_slack_max" : "-0.06275506925071822"
9+
,"RSZ::worst_slack_min" : "-0.12925965075269236"
10+
,"RSZ::worst_slack_max" : "-0.11946082206022093"
1111
,"RSZ::tns_max" : "-484.72339999999997"
1212
,"RSZ::hold_buffer_count" : "0"
1313
,"GRT::ANT::errors" : "0"
1414
,"DRT::drv" : "0"
15-
,"DRT::worst_slack_min" : "-0.12288289034138136"
16-
,"DRT::worst_slack_max" : "-0.2204165131690773"
17-
,"DRT::tns_max" : "-484.740816513169"
18-
,"DRT::clock_skew" : "0.04931891701293598"
19-
,"DRT::max_slew_slack" : "-32.432366282086825"
20-
,"DRT::max_capacitance_slack" : "-96.73397553203307"
15+
,"DRT::worst_slack_min" : "-0.12788203047362445"
16+
,"DRT::worst_slack_max" : "-0.1868633519699076"
17+
,"DRT::tns_max" : "-484.72339999999997"
18+
,"DRT::clock_skew" : "0.03993320787072652"
19+
,"DRT::max_slew_slack" : "-50.32306177570417"
20+
,"DRT::max_capacitance_slack" : "-112.69199021563439"
2121
,"DRT::max_fanout_slack" : "0"
2222
,"DRT::clock_period" : "2.03"
2323
,"DRT::ANT::errors" : "0"

0 commit comments

Comments
 (0)