Skip to content

Commit 4dc64c0

Browse files
committed
Merge branch 'master' into routing
2 parents e58c217 + 5c19450 commit 4dc64c0

20 files changed

Lines changed: 1086 additions & 776 deletions

File tree

src/OpenRoad.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ set_debug_level(const char* tool_name,
417417
if (id == utl::UKN) {
418418
logger->error(utl::ORD, 15, "Unknown tool name {}", tool_name);
419419
}
420+
if (id == utl::STA) {
421+
getSta()->setDebugLevel(group, level);
422+
}
420423
logger->setDebugLevel(id, group, level);
421424
}
422425

src/ant/src/AntennaChecker.cc

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,35 +1007,15 @@ void AntennaChecker::buildLayerMaps(odb::dbNet* db_net,
10071007
upper_index = findNodesWithIntersection(
10081008
node_by_layer_map[layer_it.first->getUpperLayer()], via_it);
10091009

1010-
if (upper_index.size() <= 2) {
1011-
// connect upper -> via
1012-
for (int& up_index : upper_index) {
1013-
node_by_layer_map[layer_it.first->getUpperLayer()][up_index]
1014-
->low_adj.push_back(via_index);
1015-
}
1016-
} else if (upper_index.size() > 2) {
1017-
std::string log_error = fmt::format(
1018-
"ERROR: net {} has via on {} conect with multiple wires on layer "
1019-
"{} \n",
1020-
db_net->getConstName(),
1021-
layer_it.first->getName(),
1022-
layer_it.first->getUpperLayer()->getName());
1023-
logger_->report("{}", log_error);
1010+
// connect upper -> via
1011+
for (int& up_index : upper_index) {
1012+
node_by_layer_map[layer_it.first->getUpperLayer()][up_index]
1013+
->low_adj.push_back(via_index);
10241014
}
1025-
if (lower_index.size() == 1) {
1026-
// connect via -> lower
1027-
for (int& low_index : lower_index) {
1028-
node_by_layer_map[layer_it.first][via_index]->low_adj.push_back(
1029-
low_index);
1030-
}
1031-
} else if (lower_index.size() > 2) {
1032-
std::string log_error = fmt::format(
1033-
"ERROR: net {} has via on {} conect with multiple wires on layer "
1034-
"{} \n",
1035-
db_net->getConstName(),
1036-
layer_it.first->getName(),
1037-
layer_it.first->getLowerLayer()->getName());
1038-
logger_->report("{}", log_error);
1015+
// connect via -> lower
1016+
for (int& low_index : lower_index) {
1017+
node_by_layer_map[layer_it.first][via_index]->low_adj.push_back(
1018+
low_index);
10391019
}
10401020
via_index++;
10411021
}

src/dbSta/include/db_sta/dbSta.hh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@ class dbSta : public Sta, public odb::dbDatabaseObserver
208208
bool verbose,
209209
const char* file_name,
210210
const char* stage_name);
211+
void countInstancesByType(odb::dbModule* module,
212+
InstTypeMap& inst_type_stats,
213+
std::vector<dbInst*>& insts);
214+
void countPhysicalOnlyInstancesByType(InstTypeMap& inst_type_stats,
215+
std::vector<dbInst*>& insts);
216+
void addInstanceByTypeInstance(odb::dbInst* inst,
217+
InstTypeMap& inst_type_stats);
211218

212219
void reportTimingHistogram(int num_bins, const MinMax* min_max) const;
213220

@@ -230,14 +237,6 @@ class dbSta : public Sta, public odb::dbDatabaseObserver
230237
Cell* to_cell,
231238
LibertyCell* to_lib_cell) override;
232239

233-
void countInstancesByType(odb::dbModule* module,
234-
InstTypeMap& inst_type_stats,
235-
std::vector<dbInst*>& insts);
236-
void countPhysicalOnlyInstancesByType(InstTypeMap& inst_type_stats,
237-
std::vector<dbInst*>& insts);
238-
void addInstanceByTypeInstance(odb::dbInst* inst,
239-
InstTypeMap& inst_type_stats);
240-
241240
dbDatabase* db_ = nullptr;
242241
Logger* logger_ = nullptr;
243242

src/gpl/src/mbff.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,6 +2483,7 @@ void MBFF::ReadPaths()
24832483
20,
24842484
num_paths_,
24852485
true,
2486+
true,
24862487
-sta::INF,
24872488
sta::INF,
24882489
true,

src/gui/src/staGuiInterface.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,7 @@ void STAGuiInterface::updatePathGroups()
969969
search->makePathGroups(1, /* group count */
970970
1, /* endpoint count*/
971971
false, /* unique pins */
972+
false, /* unique edges */
972973
-sta::INF, /* min slack */
973974
sta::INF, /* max slack*/
974975
nullptr, /* group names */
@@ -1135,7 +1136,8 @@ TimingPathList STAGuiInterface::getTimingPaths(
11351136
// group_count, endpoint_count, unique_pins
11361137
max_path_count_,
11371138
one_path_per_endpoint_ ? 1 : max_path_count_,
1138-
true,
1139+
true, // unique pins
1140+
true, // unique edges
11391141
-sta::INF,
11401142
sta::INF, // slack_min, slack_max,
11411143
true, // sort_by_slack

src/pad/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ cc_library(
1515
srcs = [
1616
"src/ICeWall.cpp",
1717
"src/MakeICeWall.cpp",
18+
"src/PadPlacer.cpp",
19+
"src/PadPlacer.h",
1820
"src/RDLGui.cpp",
1921
"src/RDLGui.h",
2022
"src/RDLRoute.cpp",

src/pad/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ target_sources(pad
1616
PRIVATE
1717
src/MakeICeWall.cpp
1818
src/ICeWall.cpp
19+
src/PadPlacer.cpp
1920
src/RDLRouter.cpp
2021
src/RDLRoute.cpp
2122
src/RDLGui.cpp

src/pad/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ place_pads
228228
| Switch Name | Description |
229229
| ----- | ----- |
230230
| `-row` | Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. |
231-
| `-mode` | Select the mode to use during pad placement, choices are `bump_aligned` and `uniform`. Default will select `bump_aligned` if possible, otherwise fallback to `uniform`. |
231+
| `-mode` | Select the mode to use during pad placement, choices are `bump_aligned`, `linear`, and `uniform`. Default will select `bump_aligned` if possible, otherwise fallback to `uniform`. |
232232
| `pads` | Name of the instances in the order they should be placed (left to right for `IO_SOUTH` and `IO_NORTH` and bottom to top for `IO_WEST` and `IO_EAST`). |
233233

234234
#### Modes
@@ -241,6 +241,10 @@ In `bump_aligned` mode, the pads will be clustered near their assigned bumps to
241241

242242
<img src="./doc/image/mode_bump_aligned.png" width=450px>
243243

244+
In `linear` mode, the pads will be place starting from the bottom or left of the row next to eachother.
245+
246+
<img src="./doc/image/mode_linear.png" width=450px>
247+
244248
### Placing Pads Manually
245249

246250
To place a pad into the pad ring.

src/pad/doc/image/mode_linear.png

10.6 KB
Loading

src/pad/include/pad/ICeWall.h

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ enum class PlacementStrategy
3030
{
3131
DEFAULT,
3232
BUMP_ALIGNED,
33-
UNIFORM
33+
UNIFORM,
34+
LINEAR
3435
};
3536

3637
class ICeWall
@@ -110,19 +111,11 @@ class ICeWall
110111

111112
private:
112113
odb::dbBlock* getBlock() const;
113-
int snapToRowSite(odb::dbRow* row, int location) const;
114114

115115
std::vector<odb::dbRow*> getRows() const;
116116
std::vector<odb::dbInst*> getPadInstsInRow(odb::dbRow* row) const;
117117
std::vector<odb::dbInst*> getPadInsts() const;
118118

119-
int placeInstance(odb::dbRow* row,
120-
int index,
121-
odb::dbInst* inst,
122-
const odb::dbOrientType& base_orient,
123-
bool allow_overlap = false,
124-
bool allow_shift = false) const;
125-
126119
void makeBTerm(odb::dbNet* net,
127120
odb::dbTechLayer* layer,
128121
const odb::Rect& shape) const;
@@ -138,43 +131,6 @@ class ICeWall
138131
std::string getRowName(const std::string& name, int ring_index) const;
139132
odb::Direction2D::Value getRowEdge(odb::dbRow* row) const;
140133

141-
int64_t estimateWirelengths(odb::dbInst* inst,
142-
const std::set<odb::dbITerm*>& iterms) const;
143-
int64_t computePadBumpDistance(odb::dbInst* inst,
144-
int inst_width,
145-
odb::dbITerm* bump,
146-
odb::dbRow* row,
147-
int center_pos) const;
148-
void placePadsUniform(const std::vector<odb::dbInst*>& insts,
149-
odb::dbRow* row,
150-
const std::map<odb::dbInst*, int>& inst_widths,
151-
int pads_width,
152-
int row_width,
153-
int row_start) const;
154-
void placePadsBumpAligned(
155-
const std::vector<odb::dbInst*>& insts,
156-
odb::dbRow* row,
157-
const std::map<odb::dbInst*, int>& inst_widths,
158-
int pads_width,
159-
int row_width,
160-
int row_start,
161-
const std::map<odb::dbInst*, std::set<odb::dbITerm*>>& iterm_connections)
162-
const;
163-
std::map<odb::dbInst*, odb::dbITerm*> getBumpAlignmentGroup(
164-
odb::dbRow* row,
165-
int offset,
166-
const std::map<odb::dbInst*, int>& inst_widths,
167-
const std::map<odb::dbInst*, std::set<odb::dbITerm*>>& iterm_connections,
168-
const std::vector<odb::dbInst*>::const_iterator& itr,
169-
const std::vector<odb::dbInst*>::const_iterator& inst_end) const;
170-
void performPadFlip(odb::dbRow* row,
171-
odb::dbInst* inst,
172-
const std::map<odb::dbInst*, std::set<odb::dbITerm*>>&
173-
iterm_connections) const;
174-
std::optional<std::pair<odb::dbInst*, odb::Rect>> checkInstancePlacement(
175-
odb::dbInst* inst,
176-
odb::dbRow* row) const;
177-
178134
// Data members
179135
odb::dbDatabase* db_ = nullptr;
180136
utl::Logger* logger_ = nullptr;

0 commit comments

Comments
 (0)