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

Grt: Jumper insertion improvement #6627

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
af2a526
grt: update jumper insertion to improve the position of the jumpers
luis201420 Jan 9, 2025
8089acd
Merge remote-tracking branch 'origin' into grt_jumper_insertion_updates
luis201420 Jan 13, 2025
39f9a0f
grt: rename variables and set const variables
luis201420 Jan 14, 2025
297cda6
Merge remote-tracking branch 'origin' into grt_jumper_insertion_updates
luis201420 Jan 20, 2025
eb7434b
grt: ignore jumper insertion to smaller segments
luis201420 Jan 21, 2025
e96ef52
Merge remote-tracking branch 'origin' into grt_jumper_insertion_updates
luis201420 Jan 28, 2025
58da420
grt: ignore jumper insertion to segments of size 5 GCells
luis201420 Jan 28, 2025
a056c69
grt: fix bug when checking the position of the vias to insert jumper
luis201420 Jan 28, 2025
0719c67
grt: Remove old jumper insertion implementation
luis201420 Jan 30, 2025
66cfa01
grt: Remove commented code and add clarifying comments
luis201420 Jan 30, 2025
30ea024
grt: Clean up commented code and improve the structure of jumper inse…
luis201420 Jan 30, 2025
38f43b3
Merge remote-tracking branch 'origin' into grt_jumper_insertion_updates
luis201420 Jan 30, 2025
0c67add
grt: ignore jumper insertion for segments smaller than 5 GCells
luis201420 Jan 31, 2025
7ef563a
Merge remote-tracking branch 'origin' into grt_jumper_insertion_updates
luis201420 Feb 3, 2025
e9b80ed
grt: add requested changes
luis201420 Feb 3, 2025
2c97770
grt: update repair_antenna4 test
luis201420 Feb 3, 2025
5d366f0
grt: add the requested modifications
luis201420 Feb 7, 2025
4cf7419
Merge remote-tracking branch 'origin' into grt_jumper_insertion_updates
luis201420 Feb 7, 2025
897c431
grt: remove multiple assignments in one line
luis201420 Feb 7, 2025
3e61111
grt: change the function name for better readability
luis201420 Feb 7, 2025
e78133f
update unit test metrics
luis201420 Feb 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/grt/include/grt/GlobalRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class GlobalRouter : public ant::GlobalRouteSource
const int& pos_x,
const int& pos_y,
const int& layer_level);
odb::Point getPositionOnGrid(const odb::Point& real_position);
int repairAntennas(odb::dbMTerm* diode_mterm,
int iterations,
float ratio_margin,
Expand Down
24 changes: 24 additions & 0 deletions src/grt/src/GlobalRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ int GlobalRouter::repairAntennas(odb::dbMTerm* diode_mterm,
diode_mterm,
ratio_margin,
num_threads);
updateDbCongestion();
}
if (violations) {
IncrementalGRoute incr_groute(this, block_);
Expand Down Expand Up @@ -1674,6 +1675,12 @@ bool GlobalRouter::hasAvailableResources(bool is_horizontal,
return cap > 0;
}

// Find the position of the middle of a GCell closest to the position
odb::Point GlobalRouter::getPositionOnGrid(const odb::Point& real_position)
{
return grid_->getPositionOnGrid(real_position);
}

void GlobalRouter::updateResources(const int& init_x,
const int& init_y,
const int& final_x,
Expand Down Expand Up @@ -2431,6 +2438,10 @@ void GlobalRouter::saveGuides()
int offset_y = grid_origin_.y();

bool guide_is_congested = is_congested_ && !allow_congestion_;

int net_with_jumpers, total_jumpers;
net_with_jumpers = 0;
total_jumpers = 0;
for (odb::dbNet* db_net : block_->getNets()) {
auto iter = routes_.find(db_net);
if (iter == routes_.end()) {
Expand All @@ -2439,6 +2450,7 @@ void GlobalRouter::saveGuides()
Net* net = db_net_map_[db_net];
GRoute& route = iter->second;

int jumper_count = 0;
if (!route.empty()) {
db_net->clearGuides();
for (GSegment& segment : route) {
Expand Down Expand Up @@ -2487,14 +2499,26 @@ void GlobalRouter::saveGuides()
db_net, layer, layer, box, guide_is_congested);
if (is_jumper) {
guide->setIsJumper(true);
jumper_count++;
}
}
}
}
if (jumper_count) {
total_jumpers += jumper_count;
net_with_jumpers++;
}
auto dbGuides = db_net->getGuides();
if (dbGuides.orderReversed() && dbGuides.reversible())
dbGuides.reverse();
}
debugPrint(logger_,
GRT,
"jumper_insertion",
2,
"Remaining jumpers {} in {} repaired nets after GRT",
total_jumpers,
net_with_jumpers);
}

void GlobalRouter::writeSegments(const char* file_name)
Expand Down
Loading