@@ -456,6 +456,7 @@ int GlobalRouter::repairAntennas(odb::dbMTerm* diode_mterm,
456456 diode_mterm,
457457 ratio_margin,
458458 num_threads);
459+ updateDbCongestion ();
459460 }
460461 if (violations) {
461462 IncrementalGRoute incr_groute (this , block_);
@@ -1674,6 +1675,12 @@ bool GlobalRouter::hasAvailableResources(bool is_horizontal,
16741675 return cap > 0 ;
16751676}
16761677
1678+ // Find the position of the middle of a GCell closest to the position
1679+ odb::Point GlobalRouter::getPositionOnGrid (const odb::Point& real_position)
1680+ {
1681+ return grid_->getPositionOnGrid (real_position);
1682+ }
1683+
16771684void GlobalRouter::updateResources (const int & init_x,
16781685 const int & init_y,
16791686 const int & final_x,
@@ -2431,6 +2438,10 @@ void GlobalRouter::saveGuides()
24312438 int offset_y = grid_origin_.y ();
24322439
24332440 bool guide_is_congested = is_congested_ && !allow_congestion_;
2441+
2442+ int net_with_jumpers, total_jumpers;
2443+ net_with_jumpers = 0 ;
2444+ total_jumpers = 0 ;
24342445 for (odb::dbNet* db_net : block_->getNets ()) {
24352446 auto iter = routes_.find (db_net);
24362447 if (iter == routes_.end ()) {
@@ -2439,6 +2450,7 @@ void GlobalRouter::saveGuides()
24392450 Net* net = db_net_map_[db_net];
24402451 GRoute& route = iter->second ;
24412452
2453+ int jumper_count = 0 ;
24422454 if (!route.empty ()) {
24432455 db_net->clearGuides ();
24442456 for (GSegment& segment : route) {
@@ -2487,14 +2499,26 @@ void GlobalRouter::saveGuides()
24872499 db_net, layer, layer, box, guide_is_congested);
24882500 if (is_jumper) {
24892501 guide->setIsJumper (true );
2502+ jumper_count++;
24902503 }
24912504 }
24922505 }
24932506 }
2507+ if (jumper_count) {
2508+ total_jumpers += jumper_count;
2509+ net_with_jumpers++;
2510+ }
24942511 auto dbGuides = db_net->getGuides ();
24952512 if (dbGuides.orderReversed () && dbGuides.reversible ())
24962513 dbGuides.reverse ();
24972514 }
2515+ debugPrint (logger_,
2516+ GRT,
2517+ " jumper_insertion" ,
2518+ 2 ,
2519+ " Remaining jumpers {} in {} repaired nets after GRT" ,
2520+ total_jumpers,
2521+ net_with_jumpers);
24982522}
24992523
25002524void GlobalRouter::writeSegments (const char * file_name)
0 commit comments