Skip to content

Commit 128cb11

Browse files
authored
Merge pull request #8524 from gadfort/dpl-remove-pad-fillers
dpl: remove pad and block masters from filler placement before placing
2 parents bb2b36f + f9648d1 commit 128cb11

File tree

8 files changed

+1300
-1
lines changed

8 files changed

+1300
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ bazel-OpenROAD
6565
projectview.bazelproject
6666
.bsp/
6767
.bazelbsp/
68+
/buildifier

src/dpl/include/dpl/Opendp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ class Opendp
277277
DbuPt initialLocation(const Node* cell, bool padded) const;
278278
int disp(const Node* cell) const;
279279
// Place fillers
280+
dbMasterSeq filterFillerMasters(const dbMasterSeq& filler_masters) const;
280281
MasterByImplant splitByImplant(const dbMasterSeq& filler_masters);
281282
void setGridCells();
282283
dbMasterSeq& gapFillers(dbTechLayer* implant,

src/dpl/src/FillerPlacement.cpp

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,47 @@ Opendp::MasterByImplant Opendp::splitByImplant(
4949
return mapping;
5050
}
5151

52+
dbMasterSeq Opendp::filterFillerMasters(const dbMasterSeq& filler_masters) const
53+
{
54+
// Remove fillers that cannot be used
55+
dbMasterSeq filtered_masters = filler_masters;
56+
57+
if (logger_->debugCheck(DPL, "filler", 2)) {
58+
debugPrint(logger_,
59+
DPL,
60+
"filler",
61+
1,
62+
"Starting fillers: {}",
63+
filtered_masters.size()) for (auto* master : filtered_masters)
64+
{
65+
debugPrint(logger_, DPL, "filler", 2, " {}", master->getName());
66+
}
67+
}
68+
69+
// Remove fillers with PAD or BLOCK classes
70+
filtered_masters.erase(std::remove_if(filtered_masters.begin(),
71+
filtered_masters.end(),
72+
[](dbMaster* master) -> bool {
73+
return master->isPad()
74+
|| master->isBlock();
75+
}),
76+
filtered_masters.end());
77+
78+
if (logger_->debugCheck(DPL, "filler", 2)) {
79+
debugPrint(logger_,
80+
DPL,
81+
"filler",
82+
1,
83+
"Final filterered fillers: {}",
84+
filtered_masters.size()) for (auto* master : filtered_masters)
85+
{
86+
debugPrint(logger_, DPL, "filler", 2, " {}", master->getName());
87+
}
88+
}
89+
90+
return filtered_masters;
91+
}
92+
5293
void Opendp::fillerPlacement(const dbMasterSeq& filler_masters,
5394
const char* prefix,
5495
bool verbose)
@@ -58,7 +99,9 @@ void Opendp::fillerPlacement(const dbMasterSeq& filler_masters,
5899
adjustNodesOrient();
59100
}
60101

61-
auto filler_masters_by_implant = splitByImplant(filler_masters);
102+
const auto filtered_masters = filterFillerMasters(filler_masters);
103+
104+
auto filler_masters_by_implant = splitByImplant(filtered_masters);
62105

63106
for (auto& [layer, masters] : filler_masters_by_implant) {
64107
std::sort(masters.begin(),

src/dpl/test/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ COMPULSORY_TESTS = [
3333
"fillers8",
3434
"fillers9",
3535
"fillers9_verbose",
36+
"fillers10",
3637
"fragmented_row01",
3738
"fragmented_row02",
3839
"fragmented_row03",
@@ -193,6 +194,9 @@ filegroup(
193194
"fillers1": [
194195
"simple01.def",
195196
],
197+
"fillers10": [
198+
"simple09.def",
199+
],
196200
"fillers2": [
197201
"simple01.def",
198202
],

src/dpl/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ or_integration_tests(
3434
fillers8
3535
fillers9
3636
fillers9_verbose
37+
fillers10
3738
fragmented_row01
3839
fragmented_row02
3940
fragmented_row03

src/dpl/test/fillers10.defok

Lines changed: 1215 additions & 0 deletions
Large diffs are not rendered by default.

src/dpl/test/fillers10.ok

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
3+
[INFO ODB-0128] Design: single_cell
4+
[INFO ODB-0130] Created 2 pins.
5+
[INFO ODB-0131] Created 1 components and 4 component-terminals.
6+
[INFO ODB-0132] Created 2 special nets and 2 connections.
7+
[INFO ODB-0133] Created 2 nets and 2 connections.
8+
Placement Analysis
9+
---------------------------------
10+
total displacement 2003.3 u
11+
average displacement 2003.3 u
12+
max displacement 2003.3 u
13+
original HPWL 2002.3 u
14+
legalized HPWL 6009.1 u
15+
delta HPWL 200 %
16+
17+
[INFO DPL-0001] Placed 1128 filler instances.
18+
Filler usage:
19+
FILLCELL_X1: 1
20+
FILLCELL_X32: 1124
21+
FILLCELL_X8: 3
22+
No differences found.

src/dpl/test/fillers10.tcl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# filler_placement for simple09 with block included as filler
2+
source "helpers.tcl"
3+
read_lef Nangate45/Nangate45.lef
4+
read_lef Nangate45/fakeram45_64x7.lef
5+
read_def simple09.def
6+
detailed_placement
7+
filler_placement -verbose "fake* FILL*"
8+
check_placement
9+
10+
set def_file [make_result_file fillers10.def]
11+
write_def $def_file
12+
diff_file $def_file fillers10.defok

0 commit comments

Comments
 (0)