Skip to content

Commit b318cba

Browse files
authored
Merge pull request #10207 from The-OpenROAD-Project-staging/grt-bug-skipping-edges
grt: fix bug skipping edges in maze route 3D
2 parents 1468121 + 57ab2fa commit b318cba

35 files changed

Lines changed: 3795 additions & 3760 deletions

src/grt/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ global_route_debug
282282
[-rst]
283283
[-tree2D]
284284
[-tree3D]
285+
[-edges3D]
285286
[-saveSttInput file_name]
286287
[-net net_name]
287288
```
@@ -294,6 +295,7 @@ global_route_debug
294295
| `-rst` | Show the Rectilinear Steiner Tree generated by `grt`. |
295296
| `-tree2D` | Show the Rectilinear Steiner Tree generated by `grt` after the overflow iterations. |
296297
| `-tree3D` | Show the 3D Rectilinear Steiner Tree post-layer assignment. |
298+
| `-edges3D` | Show each edge being rerouted post-layer assignment. |
297299
| `-saveSttInput` | File name to save `stt` input of a net. |
298300
| `-net` | The name of the net name to be displayed. |
299301

src/grt/include/grt/GlobalRouter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ class GlobalRouter
276276
void setDebugRectilinearSTree(bool rectilinearSTree);
277277
void setDebugTree2D(bool tree2D);
278278
void setDebugTree3D(bool tree3D);
279+
void setDebugEdges3D(bool edges3D);
279280
void setSttInputFilename(const char* file_name);
280281

281282
void saveSttInputFile(Net* net);

src/grt/src/GlobalRouter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5801,6 +5801,10 @@ void GlobalRouter::setDebugTree3D(bool tree3D)
58015801
{
58025802
fastroute_->setDebugTree3D(tree3D);
58035803
}
5804+
void GlobalRouter::setDebugEdges3D(bool edges3D)
5805+
{
5806+
fastroute_->setDebugEdges3D(edges3D);
5807+
}
58045808
void GlobalRouter::setSttInputFilename(const char* file_name)
58055809
{
58065810
fastroute_->setSttInputFilename(file_name);

src/grt/src/GlobalRouter.i

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ void set_global_route_debug_cmd(const odb::dbNet *net,
225225
bool steinerTree,
226226
bool rectilinearSTree,
227227
bool tree2D,
228-
bool tree3D)
228+
bool tree3D,
229+
bool edges3D)
229230
{
230231
if (!gui::Gui::enabled()) {
231232
return;
@@ -241,6 +242,7 @@ void set_global_route_debug_cmd(const odb::dbNet *net,
241242
getGlobalRouter()->setDebugRectilinearSTree(rectilinearSTree);
242243
getGlobalRouter()->setDebugTree2D(tree2D);
243244
getGlobalRouter()->setDebugTree3D(tree3D);
245+
getGlobalRouter()->setDebugEdges3D(edges3D);
244246
}
245247

246248
void set_global_route_debug_stt_input_filename(const char* file_name)

src/grt/src/GlobalRouter.tcl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,29 +403,31 @@ sta::define_cmd_args "global_route_debug" {
403403
[-rst] # Show the Rectilinear Steiner Tree generated by FastRoute
404404
[-tree2D] # Show the Rectilinear Steiner Tree generated by FastRoute after overflow iterations
405405
[-tree3D] # Show The Rectilinear Steiner Tree 3D after layer assignment
406+
[-edges3D] # Show edges being rerouted during maze route 3D
406407
[-saveSttInput file_name] # Save the stt input for a net on file_name
407408
[-net name]
408409
}
409410

410411
proc global_route_debug { args } {
411412
sta::parse_key_args "global_route_debug" args \
412413
keys {-saveSttInput -net} \
413-
flags {-st -rst -tree2D -tree3D}
414+
flags {-st -rst -tree2D -tree3D -edges3D}
414415

415416
sta::check_argc_eq0 "global_route_debug" $args
416417

417418
set st [info exists flags(-st)]
418419
set rst [info exists flags(-rst)]
419420
set tree2D [info exists flags(-tree2D)]
420421
set tree3D [info exists flags(-tree3D)]
422+
set edges3D [info exists flags(-edges3D)]
421423
set db_block [ord::get_db_block]
422424

423425
if { [info exists keys(-net)] } {
424426
set net [$db_block findNet $keys(-net)]
425427
if { $net == "NULL" } {
426428
utl::error GRT 231 "Net name not found."
427429
}
428-
grt::set_global_route_debug_cmd $net $st $rst $tree2D $tree3D
430+
grt::set_global_route_debug_cmd $net $st $rst $tree2D $tree3D $edges3D
429431
if { [info exists keys(-saveSttInput)] } {
430432
set file_name $keys(-saveSttInput)
431433
grt::set_global_route_debug_stt_input_filename $file_name

src/grt/src/fastroute/include/FastRoute.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ struct DebugSetting
6262
bool rectilinearSTree = false;
6363
bool tree2D = false;
6464
bool tree3D = false;
65+
bool edges3D = false;
6566
std::unique_ptr<AbstractFastRouteRenderer> renderer;
6667
std::string sttInputFileName;
6768

@@ -265,6 +266,7 @@ class FastRouteCore
265266
void setDebugRectilinearSTree(bool rectiliniarSTree);
266267
void setDebugTree2D(bool tree2D);
267268
void setDebugTree3D(bool tree3D);
269+
void setDebugEdges3D(bool edges3D);
268270
void setSttInputFilename(const char* file_name);
269271
std::string getSttInputFileName();
270272
const odb::dbNet* getDebugNet();

src/grt/src/fastroute/src/FastRoute.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,10 @@ void FastRouteCore::setDebugTree3D(bool tree3D)
22172217
{
22182218
debug_->tree3D = tree3D;
22192219
}
2220+
void FastRouteCore::setDebugEdges3D(bool edges3D)
2221+
{
2222+
debug_->edges3D = edges3D;
2223+
}
22202224
void FastRouteCore::setDebugNet(const odb::dbNet* net)
22212225
{
22222226
debug_->net = net;

0 commit comments

Comments
 (0)