Skip to content

Commit eb96090

Browse files
Merge pull request #10157 from The-OpenROAD-Project-staging/TR-guides-bottom-routing-layer
DRT: handle guides below the bottom routing layer
2 parents 18ef4b6 + 696da28 commit eb96090

File tree

11 files changed

+39
-9
lines changed

11 files changed

+39
-9
lines changed

src/drt/src/io/GuideProcessor.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,7 @@ bool GuideProcessor::isValidGuideLayerNum(odb::dbGuide* db_guide,
653653
= getDesign()->getTopBlock()->getGCellIdx(guide_rect.ll())
654654
== getDesign()->getTopBlock()->getGCellIdx(guide_rect.ur());
655655
if (!one_gcell_guide) {
656-
// TODO: uncomment this when GRT issue is solved
657-
// error = true; // not a valid via access guide
656+
error = true; // not a valid via access guide
658657
}
659658
}
660659
// else I don't know how many gcells the guide spans
@@ -1201,7 +1200,11 @@ void GuideProcessor::genGuides_split(
12011200
auto end_idx = intv.upper();
12021201
std::set<frCoord> split_indices;
12031202
// hardcode layerNum <= VIA_ACCESS_LAYERNUM not used for GR
1204-
if (via_access_only && layer_num <= router_cfg_->VIA_ACCESS_LAYERNUM) {
1203+
const bool via_only
1204+
= layer_num < router_cfg_->BOTTOM_ROUTING_LAYER
1205+
|| (via_access_only
1206+
&& layer_num <= router_cfg_->VIA_ACCESS_LAYERNUM);
1207+
if (via_only) {
12051208
// split by pin
12061209
split::splitByPins(pin_helper,
12071210
layer_num,

src/drt/test/ispd18_sample.defok

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ NETS 11 ;
9696
NEW Metal1 ( 101400 83410 ) VIA12_1C
9797
NEW Metal2 ( 95400 73530 ) RECT ( -70 -442 70 0 ) ;
9898
- net1235 ( inst4183 A ) ( inst4132 Y ) + USE SIGNAL
99-
+ ROUTED Metal2 ( 103000 83030 ) ( * 87590 )
100-
NEW Metal3 ( 98600 83030 ) ( 103000 * )
101-
NEW Metal2 ( 98600 76950 ) ( * 83030 )
99+
+ ROUTED Metal2 ( 103000 84930 ) ( * 87590 )
100+
NEW Metal1 ( 98600 84930 ) ( 103000 * )
101+
NEW Metal2 ( 98600 76950 ) ( * 84930 )
102102
NEW Metal1 ( 103000 87590 ) VIA12_1C
103-
NEW Metal2 ( 103000 83030 ) VIA23_1C
104-
NEW Metal2 ( 98600 83030 ) VIA23_1C
103+
NEW Metal1 ( 103000 84930 ) VIA12_1C
104+
NEW Metal1 ( 98600 84930 ) VIA12_1C
105105
NEW Metal1 ( 98600 76950 ) VIA12_1C_V ;
106106
- net1236 ( inst2908 D ) ( inst2591 Y ) + USE SIGNAL
107107
+ ROUTED Metal3 ( 85800 76950 ) ( 102600 * )

src/drt/test/ispd18_sample.ok

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[WARNING DRT-0160] Warning: Metal6 does not have viaDef aligned with layer direction, generating new viaDef Via6_FR.
88
[WARNING DRT-0160] Warning: Metal7 does not have viaDef aligned with layer direction, generating new viaDef Via7_FR.
99
[INFO DRT-0167] List of default vias:
10+
Layer Via1
11+
default via: VIA12_1C
1012
Layer Via2
1113
default via: VIA23_1C
1214
Layer Via3

src/drt/test/ispd18_sample.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
gr = design.getGlobalRouter()
1414
gr.readGuides("testcase/ispd18_sample/ispd18_sample.input.guide")
1515

16+
block = design.getBlock()
17+
block.setMinRoutingLayer(1)
18+
block.setMaxRoutingLayer(9)
19+
1620
drc_file = helpers.make_result_file("ispd18_sample.output.drc.rpt")
1721
maze_file = helpers.make_result_file("ispd18_sample.output.maze.log")
1822
guide_coverage_file = helpers.make_result_file("ispd18_sample.coverage.csv")

src/drt/test/ispd18_sample.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "helpers.tcl"
33
read_lef testcase/ispd18_sample/ispd18_sample.input.lef
44
read_def testcase/ispd18_sample/ispd18_sample.input.def
55
read_guides testcase/ispd18_sample/ispd18_sample.input.guide
6+
set_routing_layers -signal Metal1-Metal9
67
detailed_route -output_drc [make_result_file ispd18_sample.output.drc.rpt] \
78
-output_maze [make_result_file ispd18_sample.output.maze.log] \
89
-output_guide_coverage [make_result_file ispd18_sample.coverage.csv] \

src/drt/test/ispd18_sample_incr.ok

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[WARNING DRT-0160] Warning: Metal6 does not have viaDef aligned with layer direction, generating new viaDef Via6_FR.
88
[WARNING DRT-0160] Warning: Metal7 does not have viaDef aligned with layer direction, generating new viaDef Via7_FR.
99
[INFO DRT-0167] List of default vias:
10+
Layer Via1
11+
default via: VIA12_1C
1012
Layer Via2
1113
default via: VIA23_1C
1214
Layer Via3

src/drt/test/ispd18_sample_incr.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "helpers.tcl"
33
read_lef testcase/ispd18_sample/ispd18_sample.input.lef
44
read_def testcase/ispd18_sample/ispd18_sample.input.def
55
read_guides testcase/ispd18_sample/ispd18_sample.input.guide
6+
set_routing_layers -signal Metal1-Metal9
67
detailed_route -output_drc [make_result_file ispd18_sample.output.drc.rpt] \
78
-output_maze [make_result_file ispd18_sample.output.maze.log] \
89
-output_guide_coverage [make_result_file ispd18_sample.coverage.csv] \

src/drt/test/run-ispd.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ def gen_files(work_dir, ispd_year, design, drv_min, drv_max):
7676
read_lef {bench_dir}/{design}/{design}.input.lef
7777
read_def {bench_dir}/{design}/{design}.input.def
7878
read_guides {bench_dir}/{design}/{design}.input.guide
79+
set bottom_layer ""
80+
set top_layer ""
81+
foreach layer [[ord::get_db_tech] getLayers] {{
82+
if {{ [$layer getType] == "ROUTING" }} {{
83+
if {{ $bottom_layer == "" }} {{
84+
set bottom_layer [$layer getName]
85+
}}
86+
set top_layer [$layer getName]
87+
}}
88+
}}
89+
set_routing_layers -signal $bottom_layer-$top_layer
7990
detailed_route -output_maze {design_dir}/{design}.output.maze.log \\
8091
-output_drc {design_dir}/{design}.output.drc.rpt \\
8192
-verbose {verbose}

src/drt/test/single_step.ok

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[WARNING DRT-0160] Warning: Metal6 does not have viaDef aligned with layer direction, generating new viaDef Via6_FR.
88
[WARNING DRT-0160] Warning: Metal7 does not have viaDef aligned with layer direction, generating new viaDef Via7_FR.
99
[INFO DRT-0167] List of default vias:
10+
Layer Via1
11+
default via: VIA12_1C
1012
Layer Via2
1113
default via: VIA23_1C
1214
Layer Via3

src/drt/test/single_step.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
gr = design.getGlobalRouter()
1414
gr.readGuides("testcase/ispd18_sample/ispd18_sample.input.guide")
1515

16+
block = design.getBlock()
17+
block.setMinRoutingLayer(1)
18+
block.setMaxRoutingLayer(9)
19+
1620
drc_file = helpers.make_result_file("single_step.output.drc.rpt")
1721
maze_file = helpers.make_result_file("single_step.output.maze.log")
1822

0 commit comments

Comments
 (0)