Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfox-rushc committed Feb 14, 2024
2 parents efbd4d0 + d3defc2 commit c77d5b0
Show file tree
Hide file tree
Showing 17 changed files with 310 additions and 191 deletions.
54 changes: 41 additions & 13 deletions src/ant/test/check_grt1.ok
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,68 @@ Net: clk
Required ratio: 400.00 (Side area) (VIOLATED)


Net: req_msg[11]
Pin: _569_/A (sky130_fd_sc_hs__and2_1)
Layer: met3
Partial area ratio: 1379.24
Required ratio: 400.00 (Side area) (VIOLATED)


Net: req_msg[14]
Pin: _584_/A (sky130_fd_sc_hs__and2_1)
Layer: met3
Partial area ratio: 965.12
Required ratio: 400.00 (Side area) (VIOLATED)


Net: req_msg[15]
Pin: _589_/A (sky130_fd_sc_hs__and2_1)
Layer: met3
Partial area ratio: 1052.04
Required ratio: 400.00 (Side area) (VIOLATED)


Net: req_msg[23]
Pin: _631_/A1 (sky130_fd_sc_hs__a22oi_1)
Layer: met3
Partial area ratio: 928.40
Required ratio: 400.00 (Side area) (VIOLATED)


Net: req_msg[25]
Pin: _639_/A1 (sky130_fd_sc_hs__a22oi_1)
Layer: met3
Partial area ratio: 1095.28
Required ratio: 400.00 (Side area) (VIOLATED)


Net: req_msg[28]
Pin: _652_/A1 (sky130_fd_sc_hs__a22oi_1)
Layer: met3
Partial area ratio: 937.12
Required ratio: 400.00 (Side area) (VIOLATED)


Net: resp_msg[14]
Pin: _658_/A (sky130_fd_sc_hs__nand2_1)
Layer: met2
Partial area ratio: 506.29
Net: req_msg[31]
Pin: _664_/A1 (sky130_fd_sc_hs__a22oi_1)
Layer: met3
Partial area ratio: 598.88
Required ratio: 400.00 (Side area) (VIOLATED)


Net: resp_msg[7]
Pin: _629_/B (sky130_fd_sc_hs__nand2_1)
Net: resp_msg[14]
Pin: _658_/A (sky130_fd_sc_hs__nand2_1)
Layer: met2
Partial area ratio: 560.26
Partial area ratio: 506.29
Required ratio: 400.00 (Side area) (VIOLATED)


Net: _229_
Pin: _546_/B1 (sky130_fd_sc_hs__o21ai_1)
Layer: met2
Partial area ratio: 473.93
Net: resp_rdy
Pin: _343_/A2 (sky130_fd_sc_hs__a21oi_1)
Layer: met3
Partial area ratio: 516.42
Required ratio: 400.00 (Side area) (VIOLATED)


[INFO ANT-0002] Found 6 net violations.
[INFO ANT-0001] Found 6 pin violations.
[INFO ANT-0002] Found 10 net violations.
[INFO ANT-0001] Found 10 pin violations.
54 changes: 36 additions & 18 deletions src/grt/src/RepairAntennas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ odb::dbWire* RepairAntennas::makeNetWire(
default_vias,
false);
wire_segments.insert(seg);
} else if (prev_conn_layer == -1) {
prev_conn_layer = std::max(l1, l2);
}
} else {
// Add wire
Expand Down Expand Up @@ -285,40 +287,56 @@ void RepairAntennas::addWireTerms(Net* net,
= tech->findRoutingLayer(grouter_->getMinRoutingLayer());
odb::dbTechLayer* layer2
= tech->findRoutingLayer(grouter_->getMinRoutingLayer() + 1);
odb::dbTechLayer* h_layer
= layer1->getDirection() == odb::dbTechLayerDir::HORIZONTAL
? layer1
: layer2;
odb::dbTechLayer* v_layer
= layer1->getDirection() == odb::dbTechLayerDir::VERTICAL ? layer1
: layer2;
// create horizontal wire to connect to the pin
if (connect_to_segment && tech_layer != h_layer) {

if (connect_to_segment && tech_layer != layer2) {
// if wire to pin connects to a segment in a different layer, create a
// via to connect both wires
wire_encoder.newPath(tech_layer, odb::dbWireType::ROUTED);
wire_encoder.addPoint(grid_pt.x(), grid_pt.y());
wire_encoder.addTechVia(default_vias[grouter_->getMinRoutingLayer()]);
}
wire_encoder.newPath(h_layer, odb::dbWireType::ROUTED);
wire_encoder.addPoint(grid_pt.x(), grid_pt.y());
wire_encoder.addPoint(pin_pt.x(), grid_pt.y());
wire_encoder.addTechVia(default_vias[grouter_->getMinRoutingLayer()]);

// create vertical wire to connect to the pin
wire_encoder.newPath(v_layer, odb::dbWireType::ROUTED);
wire_encoder.addPoint(pin_pt.x(), grid_pt.y());
wire_encoder.addPoint(pin_pt.x(), pin_pt.y());
if (layer2->getDirection() == odb::dbTechLayerDir::VERTICAL) {
makeWire(wire_encoder,
layer2,
grid_pt,
odb::Point(grid_pt.x(), pin_pt.y()));
wire_encoder.addTechVia(default_vias[grouter_->getMinRoutingLayer()]);
makeWire(wire_encoder,
layer1,
odb::Point(grid_pt.x(), pin_pt.y()),
pin_pt);
} else {
makeWire(wire_encoder,
layer2,
grid_pt,
odb::Point(pin_pt.x(), grid_pt.y()));
wire_encoder.addTechVia(default_vias[grouter_->getMinRoutingLayer()]);
makeWire(wire_encoder,
layer1,
odb::Point(pin_pt.x(), grid_pt.y()),
pin_pt);
}

// create vias to reach the pin
for (int i = v_layer->getRoutingLevel() - 1; i >= conn_layer; i--) {
for (int i = layer1->getRoutingLevel() - 1; i >= conn_layer; i--) {
wire_encoder.addTechVia(default_vias[i]);
}
}
}
}
}

void RepairAntennas::makeWire(odb::dbWireEncoder& wire_encoder,
odb::dbTechLayer* layer,
const odb::Point& start,
const odb::Point& end)
{
wire_encoder.newPath(layer, odb::dbWireType::ROUTED);
wire_encoder.addPoint(start.x(), start.y());
wire_encoder.addPoint(end.x(), end.y());
}

bool RepairAntennas::pinOverlapsGSegment(
const odb::Point& pin_position,
const int pin_layer,
Expand Down
4 changes: 4 additions & 0 deletions src/grt/src/RepairAntennas.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ class RepairAntennas
odb::dbWireEncoder& wire_encoder,
std::map<int, odb::dbTechVia*>& default_vias,
bool connect_to_segment);
void makeWire(odb::dbWireEncoder& wire_encoder,
odb::dbTechLayer* layer,
const odb::Point& start,
const odb::Point& end);
bool pinOverlapsGSegment(const odb::Point& pin_position,
const int pin_layer,
const std::vector<odb::Rect>& pin_boxes,
Expand Down
42 changes: 23 additions & 19 deletions src/grt/test/repair_antennas1.defok
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ VIAS 3 ;
- via2_960x490 + VIARULE M2M3_PR + CUTSIZE 200 200 + LAYERS met2 via2 met3 + CUTSPACING 200 200 + ENCLOSURE 40 145 180 65 + ROWCOL 1 2 ;
- via3_960x490 + VIARULE M3M4_PR + CUTSIZE 200 200 + LAYERS met3 via3 met4 + CUTSPACING 200 200 + ENCLOSURE 180 60 180 145 + ROWCOL 1 2 ;
END VIAS
COMPONENTS 1366 ;
COMPONENTS 1370 ;
- ANTENNA_1 sky130_fd_sc_hs__diode_2 + PLACED ( 124800 149850 ) FS ;
- ANTENNA_2 sky130_fd_sc_hs__diode_2 + PLACED ( 141600 246420 ) N ;
- ANTENNA_3 sky130_fd_sc_hs__diode_2 + PLACED ( 143520 206460 ) N ;
- ANTENNA_4 sky130_fd_sc_hs__diode_2 + PLACED ( 156480 196470 ) FS ;
- ANTENNA_5 sky130_fd_sc_hs__diode_2 + PLACED ( 129600 83250 ) FS ;
- ANTENNA_6 sky130_fd_sc_hs__diode_2 + PLACED ( 72000 96570 ) FS ;
- ANTENNA_10 sky130_fd_sc_hs__diode_2 + PLACED ( 207360 166500 ) N ;
- ANTENNA_2 sky130_fd_sc_hs__diode_2 + PLACED ( 106560 49950 ) FS ;
- ANTENNA_3 sky130_fd_sc_hs__diode_2 + PLACED ( 169440 263070 ) FS ;
- ANTENNA_4 sky130_fd_sc_hs__diode_2 + PLACED ( 141600 246420 ) N ;
- ANTENNA_5 sky130_fd_sc_hs__diode_2 + PLACED ( 142080 59940 ) N ;
- ANTENNA_6 sky130_fd_sc_hs__diode_2 + PLACED ( 104640 203130 ) FS ;
- ANTENNA_7 sky130_fd_sc_hs__diode_2 + PLACED ( 143520 206460 ) N ;
- ANTENNA_8 sky130_fd_sc_hs__diode_2 + PLACED ( 196800 216450 ) FS ;
- ANTENNA_9 sky130_fd_sc_hs__diode_2 + PLACED ( 156480 196470 ) FS ;
- PHY_0 sky130_fd_sc_hs__decap_4 + FIXED ( 9600 9990 ) FS ;
- PHY_1 sky130_fd_sc_hs__decap_4 + FIXED ( 288000 9990 ) S ;
- PHY_10 sky130_fd_sc_hs__decap_4 + FIXED ( 9600 26640 ) N ;
Expand Down Expand Up @@ -1170,7 +1174,7 @@ COMPONENTS 1366 ;
- _395_ sky130_fd_sc_hs__inv_2 + PLACED ( 95520 159840 ) N ;
- _396_ sky130_fd_sc_hs__nor2_1 + PLACED ( 98880 159840 ) N ;
- _397_ sky130_fd_sc_hs__inv_2 + PLACED ( 97440 156510 ) FS ;
- _398_ sky130_fd_sc_hs__inv_2 + PLACED ( 104160 203130 ) FS ;
- _398_ sky130_fd_sc_hs__inv_2 + PLACED ( 101280 203130 ) FS ;
- _399_ sky130_fd_sc_hs__nor2_2 + PLACED ( 102720 193140 ) N ;
- _400_ sky130_fd_sc_hs__and2_1 + PLACED ( 103200 189810 ) FS ;
- _401_ sky130_fd_sc_hs__or2_2 + PLACED ( 98880 189810 ) FS ;
Expand Down Expand Up @@ -1431,7 +1435,7 @@ COMPONENTS 1366 ;
- _665_ sky130_fd_sc_hs__and2_1 + PLACED ( 189120 209790 ) FS ;
- _666_ sky130_fd_sc_hs__nand2_1 + PLACED ( 192960 206460 ) N ;
- _667_ sky130_fd_sc_hs__dfxtp_4 + PLACED ( 200160 126540 ) N ;
- _668_ sky130_fd_sc_hs__dfxtp_1 + PLACED ( 197760 166500 ) N ;
- _668_ sky130_fd_sc_hs__dfxtp_1 + PLACED ( 197280 166500 ) N ;
- _669_ sky130_fd_sc_hs__dfxtp_2 + PLACED ( 200160 146520 ) N ;
- _670_ sky130_fd_sc_hs__dfxtp_2 + PLACED ( 124320 106560 ) N ;
- _671_ sky130_fd_sc_hs__dfxtp_1 + PLACED ( 168960 173160 ) N ;
Expand Down Expand Up @@ -3294,7 +3298,7 @@ NETS 411 ;
- _226_ ( _542_ B ) ( _541_ Y ) + USE SIGNAL ;
- _227_ ( _543_ B ) ( _542_ Y ) + USE SIGNAL ;
- _228_ ( _548_ A ) ( _544_ Y ) + USE SIGNAL ;
- _229_ ( ANTENNA_6 DIODE ) ( _546_ B1 ) ( _545_ Y ) + USE SIGNAL ;
- _229_ ( _546_ B1 ) ( _545_ Y ) + USE SIGNAL ;
- _230_ ( _547_ B ) ( _546_ Y ) + USE SIGNAL ;
- _231_ ( _548_ B ) ( _547_ Y ) + USE SIGNAL ;
- _232_ ( _551_ A2 ) ( _549_ Y ) + USE SIGNAL ;
Expand Down Expand Up @@ -3446,11 +3450,11 @@ NETS 411 ;
( _524_ A ) ( _525_ A1 ) ( _610_ A2 ) ( _342_ A ) ( repeater4 X ) + USE SIGNAL ;
- req_msg[0] ( PIN req_msg[0] ) ( _513_ B ) + USE SIGNAL ;
- req_msg[10] ( PIN req_msg[10] ) ( _564_ B ) + USE SIGNAL ;
- req_msg[11] ( PIN req_msg[11] ) ( _569_ A ) + USE SIGNAL ;
- req_msg[11] ( PIN req_msg[11] ) ( ANTENNA_2 DIODE ) ( _569_ A ) + USE SIGNAL ;
- req_msg[12] ( PIN req_msg[12] ) ( _574_ B ) + USE SIGNAL ;
- req_msg[13] ( PIN req_msg[13] ) ( _579_ B ) + USE SIGNAL ;
- req_msg[14] ( PIN req_msg[14] ) ( _584_ A ) + USE SIGNAL ;
- req_msg[15] ( PIN req_msg[15] ) ( ANTENNA_2 DIODE ) ( _589_ A ) + USE SIGNAL ;
- req_msg[14] ( PIN req_msg[14] ) ( ANTENNA_3 DIODE ) ( _584_ A ) + USE SIGNAL ;
- req_msg[15] ( PIN req_msg[15] ) ( ANTENNA_4 DIODE ) ( _589_ A ) + USE SIGNAL ;
- req_msg[16] ( PIN req_msg[16] ) ( _602_ A1 ) + USE SIGNAL ;
- req_msg[17] ( PIN req_msg[17] ) ( _606_ A1 ) + USE SIGNAL ;
- req_msg[18] ( PIN req_msg[18] ) ( _610_ A1 ) + USE SIGNAL ;
Expand All @@ -3459,16 +3463,16 @@ NETS 411 ;
- req_msg[20] ( PIN req_msg[20] ) ( _616_ A1 ) + USE SIGNAL ;
- req_msg[21] ( PIN req_msg[21] ) ( _623_ A1 ) + USE SIGNAL ;
- req_msg[22] ( PIN req_msg[22] ) ( _627_ A1 ) + USE SIGNAL ;
- req_msg[23] ( PIN req_msg[23] ) ( _631_ A1 ) + USE SIGNAL ;
- req_msg[23] ( PIN req_msg[23] ) ( ANTENNA_5 DIODE ) ( _631_ A1 ) + USE SIGNAL ;
- req_msg[24] ( PIN req_msg[24] ) ( _635_ A1 ) + USE SIGNAL ;
- req_msg[25] ( PIN req_msg[25] ) ( _639_ A1 ) + USE SIGNAL ;
- req_msg[25] ( PIN req_msg[25] ) ( ANTENNA_6 DIODE ) ( _639_ A1 ) + USE SIGNAL ;
- req_msg[26] ( PIN req_msg[26] ) ( _643_ A1 ) + USE SIGNAL ;
- req_msg[27] ( PIN req_msg[27] ) ( _646_ A1 ) + USE SIGNAL ;
- req_msg[28] ( PIN req_msg[28] ) ( ANTENNA_3 DIODE ) ( _652_ A1 ) + USE SIGNAL ;
- req_msg[28] ( PIN req_msg[28] ) ( ANTENNA_7 DIODE ) ( _652_ A1 ) + USE SIGNAL ;
- req_msg[29] ( PIN req_msg[29] ) ( _656_ A1 ) + USE SIGNAL ;
- req_msg[2] ( PIN req_msg[2] ) ( _524_ B ) + USE SIGNAL ;
- req_msg[30] ( PIN req_msg[30] ) ( _660_ A1 ) + USE SIGNAL ;
- req_msg[31] ( PIN req_msg[31] ) ( _664_ A1 ) + USE SIGNAL ;
- req_msg[31] ( PIN req_msg[31] ) ( ANTENNA_8 DIODE ) ( _664_ A1 ) + USE SIGNAL ;
- req_msg[3] ( PIN req_msg[3] ) ( _530_ A ) + USE SIGNAL ;
- req_msg[4] ( PIN req_msg[4] ) ( _535_ A ) + USE SIGNAL ;
- req_msg[5] ( PIN req_msg[5] ) ( _540_ B ) + USE SIGNAL ;
Expand All @@ -3485,18 +3489,18 @@ NETS 411 ;
- resp_msg[11] ( PIN resp_msg[11] ) ( _648_ A ) ( _474_ Y ) + USE SIGNAL ;
- resp_msg[12] ( PIN resp_msg[12] ) ( _650_ B ) ( _475_ Y ) + USE SIGNAL ;
- resp_msg[13] ( PIN resp_msg[13] ) ( _654_ A ) ( _479_ Y ) + USE SIGNAL ;
- resp_msg[14] ( PIN resp_msg[14] ) ( ANTENNA_4 DIODE ) ( _658_ A ) ( _480_ X ) + USE SIGNAL ;
- resp_msg[14] ( PIN resp_msg[14] ) ( ANTENNA_9 DIODE ) ( _658_ A ) ( _480_ X ) + USE SIGNAL ;
- resp_msg[15] ( PIN resp_msg[15] ) ( _447_ X ) + USE SIGNAL ;
- resp_msg[1] ( PIN resp_msg[1] ) ( _604_ B ) ( _450_ X ) + USE SIGNAL ;
- resp_msg[2] ( PIN resp_msg[2] ) ( _608_ B ) ( _451_ Y ) + USE SIGNAL ;
- resp_msg[3] ( PIN resp_msg[3] ) ( _612_ B ) ( _453_ X ) + USE SIGNAL ;
- resp_msg[4] ( PIN resp_msg[4] ) ( _618_ B ) ( _454_ X ) + USE SIGNAL ;
- resp_msg[5] ( PIN resp_msg[5] ) ( _621_ B ) ( _456_ Y ) + USE SIGNAL ;
- resp_msg[6] ( PIN resp_msg[6] ) ( _625_ B ) ( _459_ X ) + USE SIGNAL ;
- resp_msg[7] ( PIN resp_msg[7] ) ( ANTENNA_5 DIODE ) ( _629_ B ) ( _462_ Y ) + USE SIGNAL ;
- resp_msg[7] ( PIN resp_msg[7] ) ( _629_ B ) ( _462_ Y ) + USE SIGNAL ;
- resp_msg[8] ( PIN resp_msg[8] ) ( _633_ B ) ( _463_ Y ) + USE SIGNAL ;
- resp_msg[9] ( PIN resp_msg[9] ) ( _637_ B ) ( _466_ Y ) + USE SIGNAL ;
- resp_rdy ( PIN resp_rdy ) ( _343_ A2 ) + USE SIGNAL ;
- resp_rdy ( PIN resp_rdy ) ( ANTENNA_10 DIODE ) ( _343_ A2 ) + USE SIGNAL ;
- resp_val ( PIN resp_val ) ( _343_ A1 ) ( _341_ X ) + USE SIGNAL ;
END NETS
END DESIGN
57 changes: 33 additions & 24 deletions src/grt/test/repair_antennas1.guideok
Original file line number Diff line number Diff line change
Expand Up @@ -2192,8 +2192,6 @@ _228_
)
_229_
(
64800 93600 79200 100800 met1
72000 93600 79200 100800 li1
64800 280800 72000 288000 li1
64800 280800 72000 288000 met1
64800 93600 72000 288000 met2
Expand Down Expand Up @@ -3882,11 +3880,14 @@ req_msg[10]
)
req_msg[11]
(
100800 50400 108000 57600 li1
100800 50400 115200 57600 met1
108000 50400 115200 57600 li1
108000 50400 115200 57600 met1
108000 14400 115200 57600 met2
108000 14400 115200 21600 met2
108000 14400 299960 21600 met3
108000 50400 280800 57600 met1
273600 50400 280800 57600 met1
273600 14400 280800 57600 met2
273600 14400 280800 21600 met2
273600 14400 299960 21600 met3
)
req_msg[12]
(
Expand All @@ -3907,10 +3908,11 @@ req_msg[13]
req_msg[14]
(
165600 259200 172800 266400 li1
165600 259200 172800 266400 met1
165600 259200 172800 273600 met2
165600 266400 172800 273600 met2
165600 266400 299960 273600 met3
165600 259200 273600 266400 met1
266400 259200 273600 266400 met1
266400 259200 273600 273600 met2
266400 266400 273600 273600 met2
266400 266400 299960 273600 met3
)
req_msg[15]
(
Expand Down Expand Up @@ -4006,11 +4008,14 @@ req_msg[24]
)
req_msg[25]
(
100800 201600 108000 208800 li1
100800 201600 115200 208800 met1
108000 201600 115200 208800 li1
108000 201600 115200 208800 met1
108000 72000 115200 208800 met2
108000 72000 115200 79200 met2
108000 72000 299960 79200 met3
108000 201600 280800 208800 met1
273600 201600 280800 208800 met1
273600 72000 280800 208800 met2
273600 72000 280800 79200 met2
273600 72000 299960 79200 met3
)
req_msg[26]
(
Expand Down Expand Up @@ -4071,10 +4076,11 @@ req_msg[30]
req_msg[31]
(
194400 216000 201600 223200 li1
194400 216000 201600 223200 met1
194400 216000 201600 244800 met2
194400 237600 201600 244800 met2
194400 237600 299960 244800 met3
194400 216000 273600 223200 met1
266400 216000 273600 223200 met1
266400 216000 273600 244800 met2
266400 237600 273600 244800 met2
266400 237600 299960 244800 met3
)
req_msg[3]
(
Expand Down Expand Up @@ -4373,11 +4379,11 @@ resp_msg[6]
)
resp_msg[7]
(
129600 86400 136800 93600 li1
129600 86400 136800 93600 met1
129600 79200 136800 93600 met2
129600 79200 136800 86400 met1
129600 79200 136800 86400 li1
129600 86400 136800 93600 li1
129600 86400 136800 93600 met1
129600 86400 136800 300130 met2
)
resp_msg[8]
Expand Down Expand Up @@ -4408,11 +4414,14 @@ resp_msg[9]
)
resp_rdy
(
201600 165600 208800 172800 li1
201600 165600 216000 172800 met1
208800 165600 216000 172800 li1
208800 165600 216000 172800 met1
208800 165600 216000 216000 met2
208800 208800 216000 216000 met2
208800 208800 299960 216000 met3
208800 165600 230400 172800 met1
223200 165600 230400 172800 met1
223200 165600 230400 216000 met2
223200 208800 230400 216000 met2
223200 208800 299960 216000 met3
)
resp_val
(
Expand Down
Loading

0 comments on commit c77d5b0

Please sign in to comment.