Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support incremental detailed routing #5059

Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ant/include/ant/AntennaChecker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ class AntennaChecker
std::ofstream& report_file,
// Return values.
int& net_violation_count,
int& pin_violation_count);
int& pin_violation_count,
bool use_grt_routes);
void checkGate(dbWireGraph::Node* gate,
vector<ARinfo>& CARtable,
vector<ARinfo>& VIA_CARtable,
Expand Down
73 changes: 55 additions & 18 deletions src/ant/src/AntennaChecker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,9 @@ std::pair<bool, bool> AntennaChecker::checkWirePar(const ARinfo& AntennaRatio,
if (report_file.is_open()) {
report_file << par_report << "\n";
}
logger_->report("{}", par_report);
if (verbose) {
logger_->report("{}", par_report);
}
}
} else {
if (diff_par_violation || verbose) {
Expand All @@ -1187,7 +1189,9 @@ std::pair<bool, bool> AntennaChecker::checkWirePar(const ARinfo& AntennaRatio,
if (report_file.is_open()) {
report_file << par_report << "\n";
}
logger_->report("{}", par_report);
if (verbose) {
logger_->report("{}", par_report);
}
}
}

Expand All @@ -1204,7 +1208,9 @@ std::pair<bool, bool> AntennaChecker::checkWirePar(const ARinfo& AntennaRatio,
if (report_file.is_open()) {
report_file << par_report << "\n";
}
logger_->report("{}", par_report);
if (verbose) {
logger_->report("{}", par_report);
}
}
} else {
if (diff_psr_violation || verbose) {
Expand All @@ -1219,7 +1225,9 @@ std::pair<bool, bool> AntennaChecker::checkWirePar(const ARinfo& AntennaRatio,
if (report_file.is_open()) {
report_file << par_report << "\n";
}
logger_->report("{}", par_report);
if (verbose) {
logger_->report("{}", par_report);
}
}
}
}
Expand Down Expand Up @@ -1559,10 +1567,17 @@ void AntennaChecker::checkNet(dbNet* net,
std::ofstream& report_file,
// Return values.
int& net_violation_count,
int& pin_violation_count)
int& pin_violation_count,
bool use_grt_routes)
{
dbWire* wire = net->getWire();
if (wire) {
std::vector<int> data;
std::vector<unsigned char> op_code;
if (!use_grt_routes) {
wire->getRawWireData(data, op_code);
odb::orderWires(logger_, net);
}
vector<dbWireGraph::Node*> wire_roots;
vector<dbWireGraph::Node*> gate_nodes;
findWireRoots(wire, wire_roots, gate_nodes);
Expand Down Expand Up @@ -1599,7 +1614,9 @@ void AntennaChecker::checkNet(dbNet* net,
if (report_file.is_open()) {
report_file << net_name << "\n";
}
logger_->report("{}", net_name);
if (verbose) {
logger_->report("{}", net_name);
}

for (dbWireGraph::Node* gate : gate_nodes) {
checkGate(gate,
Expand All @@ -1611,7 +1628,12 @@ void AntennaChecker::checkNet(dbNet* net,
violation,
violated_gates);
}
logger_->report("");
if (verbose) {
logger_->report("");
}
}
if (!use_grt_routes) {
wire->setRawWireData(data, op_code);
}
}
}
Expand Down Expand Up @@ -1656,7 +1678,9 @@ void AntennaChecker::checkGate(
if (report_file.is_open()) {
report_file << mterm_info << "\n";
}
logger_->report("{}", mterm_info);
if (verbose) {
logger_->report("{}", mterm_info);
}
}

std::string layer_name = fmt::format(
Expand All @@ -1665,7 +1689,9 @@ void AntennaChecker::checkGate(
if (report_file.is_open()) {
report_file << layer_name << "\n";
}
logger_->report("{}", layer_name);
if (verbose) {
logger_->report("{}", layer_name);
}
first_pin_violation = false;
}
checkWirePar(ar, true, verbose, report_file);
Expand All @@ -1674,8 +1700,9 @@ void AntennaChecker::checkGate(
if (report_file.is_open()) {
report_file << "\n";
}

logger_->report("");
if (verbose) {
logger_->report("");
}
}
}
}
Expand Down Expand Up @@ -1709,8 +1736,9 @@ void AntennaChecker::checkGate(
if (report_file.is_open()) {
report_file << "\n";
}

logger_->report("");
if (verbose) {
logger_->report("");
}
}
}
}
Expand Down Expand Up @@ -1738,9 +1766,6 @@ int AntennaChecker::checkAntennas(dbNet* net, bool verbose)

if (use_grt_routes) {
global_route_source_->makeNetWires();
} else {
// detailed routes
odb::orderWires(logger_, block_);
}

int net_violation_count = 0;
Expand All @@ -1753,7 +1778,8 @@ int AntennaChecker::checkAntennas(dbNet* net, bool verbose)
verbose,
report_file,
net_violation_count,
pin_violation_count);
pin_violation_count,
use_grt_routes);
} else {
logger_->error(
ANT, 14, "Skipped net {} because it is special.", net->getName());
Expand All @@ -1766,7 +1792,8 @@ int AntennaChecker::checkAntennas(dbNet* net, bool verbose)
verbose,
report_file,
net_violation_count,
pin_violation_count);
pin_violation_count,
use_grt_routes);
}
}
}
Expand Down Expand Up @@ -1975,6 +2002,13 @@ vector<Violation> AntennaChecker::getAntennaViolations(dbNet* net,
dbWire* wire = net->getWire();
dbWireGraph graph;
if (wire) {
bool wire_was_oredered = net->isWireOrdered();
std::vector<int> data;
std::vector<unsigned char> op_code;
if (!wire_was_oredered) {
wire->getRawWireData(data, op_code);
odb::orderWires(logger_, net);
}
auto wire_roots = findWireRoots(wire);

vector<PARinfo> PARtable = buildWireParTable(wire_roots);
Expand Down Expand Up @@ -2008,6 +2042,9 @@ vector<Violation> AntennaChecker::getAntennaViolations(dbNet* net,
antenna_violations.push_back(antenna_violation);
}
}
if (!wire_was_oredered) {
wire->setRawWireData(data, op_code);
}
}
return antenna_violations;
}
Expand Down
24 changes: 0 additions & 24 deletions src/ant/test/ant_report.ok
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,6 @@
[INFO ODB-0128] Design: gcd
[INFO ODB-0131] Created 3 components and 24 component-terminals.
[INFO ODB-0133] Created 1 nets and 3 connections.
Net: net50
Pin: _264_/B2 (sky130_fd_sc_ms__a222oi_1)
Layer: met3
Partial area ratio: 43.13
Required ratio: 15.15 (Side area) (VIOLATED)

Layer: met2
Partial area ratio: 208.38
Required ratio: 10.00 (Side area) (VIOLATED)

Pin: output50/A (sky130_fd_sc_ms__buf_1)
Layer: met3
Partial area ratio: 43.13
Required ratio: 15.15 (Side area) (VIOLATED)

Layer: met2
Partial area ratio: 208.38
Required ratio: 10.00 (Side area) (VIOLATED)

Layer: met1
Partial area ratio: 273.94
Required ratio: 10.00 (Side area) (VIOLATED)


[INFO ANT-0002] Found 1 net violations.
[INFO ANT-0001] Found 2 pin violations.
No differences found.
7 changes: 0 additions & 7 deletions src/ant/test/check_api1.ok
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
[INFO ODB-0128] Design: gcd
[INFO ODB-0131] Created 6 components and 48 component-terminals.
[INFO ODB-0133] Created 2 nets and 6 connections.
Net: net50
Pin: output50/A (sky130_fd_sc_ms__buf_1)
Layer: met2
Partial area ratio: 419.33
Required ratio: 400.00 (Side area) (VIOLATED)


[INFO ANT-0002] Found 1 net violations.
[INFO ANT-0001] Found 1 pin violations.
violation count = 1
Expand Down
14 changes: 0 additions & 14 deletions src/ant/test/check_drt1.ok
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
[INFO ODB-0128] Design: gcd
[INFO ODB-0131] Created 6 components and 48 component-terminals.
[INFO ODB-0133] Created 2 nets and 6 connections.
Net: net50
Pin: output50/A (sky130_fd_sc_ms__buf_1)
Layer: met2
Partial area ratio: 419.33
Required ratio: 400.00 (Side area) (VIOLATED)


[INFO ANT-0002] Found 1 net violations.
[INFO ANT-0001] Found 1 pin violations.
Net: net50
Expand Down Expand Up @@ -133,13 +126,6 @@ Net: net50

[INFO ANT-0002] Found 1 net violations.
[INFO ANT-0001] Found 1 pin violations.
Net: net50
Pin: output50/A (sky130_fd_sc_ms__buf_1)
Layer: met2
Partial area ratio: 419.33
Required ratio: 400.00 (Side area) (VIOLATED)


[INFO ANT-0002] Found 1 net violations.
[INFO ANT-0001] Found 1 pin violations.
[ERROR ANT-0012] Net xxx not found.
Expand Down
70 changes: 0 additions & 70 deletions src/ant/test/check_grt1.ok
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,5 @@
[INFO ODB-0131] Created 1360 components and 6650 component-terminals.
[INFO ODB-0132] Created 2 special nets and 0 connections.
[INFO ODB-0133] Created 411 nets and 1210 connections.
Net: clk
Pin: clkbuf_0_clk/A (sky130_fd_sc_hs__clkbuf_1)
Layer: met2
Partial area ratio: 451.78
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: 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[11]
Pin: _648_/A (sky130_fd_sc_hs__nand2_1)
Layer: met1
Partial area ratio: 572.13
Required ratio: 400.00 (Side area) (VIOLATED)


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 10 net violations.
[INFO ANT-0001] Found 10 pin violations.
1 change: 1 addition & 0 deletions src/drt/include/triton_route/TritonRoute.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class TritonRoute
bool initGuide();
void prep();
void processBTermsAboveTopLayer(bool has_routing = false);
odb::dbDatabase* getDb() const { return db_; }

private:
std::unique_ptr<frDesign> design_;
Expand Down