Skip to content

Commit cd919e6

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project/OpenROAD into odb_journal
2 parents d52fc33 + 001ccd6 commit cd919e6

41 files changed

Lines changed: 206 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bazel/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ RUN apt-get -y update \
2929
python3 \
3030
python3-yaml \
3131
time
32+
33+
RUN groupadd -g 9000 user \
34+
&& useradd -u 9000 -g 9000 -m -s /bin/bash user
35+
USER user

src/OpenRoad.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include "dft/MakeDft.hh"
3535
#include "dpl/MakeOpendp.h"
3636
#include "dpl/Opendp.h"
37+
#include "drt/MakeTritonRoute.h"
38+
#include "drt/TritonRoute.h"
3739
#include "dst/Distributed.h"
3840
#include "dst/MakeDistributed.h"
3941
#include "est/EstimateParasitics.h"
@@ -81,8 +83,6 @@
8183
#include "stt/MakeSteinerTreeBuilder.h"
8284
#include "tap/MakeTapcell.h"
8385
#include "tap/tapcell.h"
84-
#include "triton_route/MakeTritonRoute.h"
85-
#include "triton_route/TritonRoute.h"
8686
#include "upf/MakeUpf.h"
8787
#include "utl/CallBackHandler.h"
8888
#include "utl/Logger.h"

src/dpl/include/dpl/Opendp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class Opendp
147147

148148
using MasterByImplant = std::map<odb::dbTechLayer*, dbMasterSeq>;
149149

150-
using YCoordToGap = std::map<DbuY, std::vector<GapInfo*>>;
150+
using YCoordToGap = std::map<DbuY, std::vector<std::unique_ptr<GapInfo>>>;
151151

152152
friend class OpendpTest_IsPlaced_Test;
153153
friend class Graphics;
@@ -290,7 +290,7 @@ class Opendp
290290
void insertDecapInPos(odb::dbMaster* master,
291291
const DbuX& pos_x,
292292
const DbuY& pos_y);
293-
void insertDecapInRow(const std::vector<GapInfo*>& gaps,
293+
void insertDecapInRow(const std::vector<std::unique_ptr<GapInfo>>& gaps,
294294
DbuY gap_y,
295295
DbuX irdrop_x,
296296
DbuY irdrop_y,
@@ -333,7 +333,7 @@ class Opendp
333333
bool have_fillers_ = false;
334334

335335
// Decap placement.
336-
std::vector<DecapCell*> decap_masters_;
336+
std::vector<std::unique_ptr<DecapCell>> decap_masters_;
337337
int decap_count_ = 0;
338338
YCoordToGap gaps_;
339339

src/dpl/src/DecapPlacement.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <algorithm>
55
#include <map>
6+
#include <memory>
67
#include <string>
78
#include <vector>
89

@@ -83,7 +84,8 @@ void Opendp::prepareDecapAndGaps()
8384
// Sort decaps cells in descending order
8485
std::sort(decap_masters_.begin(),
8586
decap_masters_.end(),
86-
[](const DecapCell* decap1, const DecapCell* decap2) {
87+
[](const std::unique_ptr<DecapCell>& decap1,
88+
const std::unique_ptr<DecapCell>& decap2) {
8789
return decap1->capacitance > decap2->capacitance;
8890
});
8991

@@ -92,11 +94,11 @@ void Opendp::prepareDecapAndGaps()
9294
int gaps_count = 0;
9395
// Sort each gap vector for X position
9496
for (auto& it : gaps_) {
95-
std::sort(it.second.begin(),
96-
it.second.end(),
97-
[](const GapInfo* gap1, const GapInfo* gap2) {
98-
return gap1->x < gap2->x;
99-
});
97+
std::sort(
98+
it.second.begin(),
99+
it.second.end(),
100+
[](const std::unique_ptr<GapInfo>& gap1,
101+
const std::unique_ptr<GapInfo>& gap2) { return gap1->x < gap2->x; });
100102
gaps_count += it.second.size();
101103
}
102104

@@ -166,19 +168,20 @@ void Opendp::insertDecapCells(const double target, IRDropByPoint& psm_ir_drops)
166168
total_cap);
167169
}
168170

169-
void Opendp::insertDecapInRow(const std::vector<GapInfo*>& gaps,
171+
void Opendp::insertDecapInRow(const std::vector<std::unique_ptr<GapInfo>>& gaps,
170172
const DbuY gap_y,
171173
const DbuX irdrop_x,
172174
const DbuY irdrop_y,
173175
double& total,
174176
const double& target)
175177
{
176178
// Find gap in same row and x near the ir drop
177-
auto find_gap = std::lower_bound(
178-
gaps.begin(),
179-
gaps.end(),
180-
irdrop_x,
181-
[](const GapInfo* elem, const DbuX& value) { return elem->x < value; });
179+
auto find_gap
180+
= std::lower_bound(gaps.begin(),
181+
gaps.end(),
182+
irdrop_x,
183+
[](const std::unique_ptr<GapInfo>& elem,
184+
const DbuX& value) { return elem->x < value; });
182185
// if this row has free gap with x <= xpoint <= x + width
183186
if (find_gap != gaps.end()
184187
&& ((*find_gap)->x + (*find_gap)->width) >= irdrop_x

src/dpl/src/Opendp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "dpl/OptMirror.h"
1919
#include "graphics/DplObserver.h"
2020
#include "infrastructure/Coordinates.h"
21+
#include "infrastructure/DecapObjects.h"
2122
#include "infrastructure/Grid.h"
2223
#include "infrastructure/Objects.h"
2324
#include "infrastructure/Padding.h"

src/drt/BUILD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ cc_library(
194194
"src/ta/FlexTA_rq.cpp",
195195
],
196196
hdrs = [
197-
"include/triton_route/TritonRoute.h",
197+
"include/drt/TritonRoute.h",
198198
],
199199
copts = [
200200
"-Isrc/drt/src",
@@ -225,7 +225,7 @@ cc_library(
225225
cc_library(
226226
name = "ui",
227227
srcs = [
228-
"include/triton_route/TritonRoute.h",
228+
"include/drt/TritonRoute.h",
229229
"src/AbstractGraphicsFactory.h",
230230
"src/GraphicsFactory.cpp",
231231
"src/GraphicsFactory.h",
@@ -256,7 +256,7 @@ cc_library(
256256
":tcl",
257257
],
258258
hdrs = [
259-
"include/triton_route/MakeTritonRoute.h",
259+
"include/drt/MakeTritonRoute.h",
260260
],
261261
copts = [
262262
"-Isrc/drt/src",
@@ -312,7 +312,7 @@ tcl_wrap_cc(
312312
python_wrap_cc(
313313
name = "swig-py",
314314
srcs = [
315-
"include/triton_route/TritonRoute.h",
315+
"include/drt/TritonRoute.h",
316316
"src/TritonRoute-py.i",
317317
"//:error_swig-py",
318318
],
File renamed without changes.
File renamed without changes.

src/drt/src/DesignCallBack.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@
33

44
#include "DesignCallBack.h"
55

6+
#include "drt/TritonRoute.h"
67
#include "frDesign.h"
78
#include "odb/db.h"
8-
#include "triton_route/TritonRoute.h"
99

1010
namespace drt {
1111

12-
static inline int defdist(odb::dbBlock* block, int x)
13-
{
14-
return x * (double) block->getDefUnits()
15-
/ (double) block->getDbUnitsPerMicron();
16-
}
17-
1812
void DesignCallBack::inDbPreMoveInst(odb::dbInst* db_inst)
1913
{
2014
auto design = router_->getDesign();
@@ -43,9 +37,6 @@ void DesignCallBack::inDbPostMoveInst(odb::dbInst* db_inst)
4337
}
4438
int x, y;
4539
db_inst->getLocation(x, y);
46-
auto block = db_inst->getBlock();
47-
x = defdist(block, x);
48-
y = defdist(block, y);
4940
inst->setOrigin({x, y});
5041
inst->setOrient(db_inst->getOrient());
5142
router_->addInstancePAData(inst);

src/drt/src/MakeTritonRoute.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// Copyright (c) 2020-2025, The OpenROAD Authors
33

4-
#include "triton_route/MakeTritonRoute.h"
4+
#include "drt/MakeTritonRoute.h"
55

66
#include <memory>
77
#include <utility>
88

99
#include "GraphicsFactory.h"
1010
#include "dr/FlexDR_graphics.h"
11+
#include "drt/TritonRoute.h"
1112
#include "pa/FlexPA_graphics.h"
1213
#include "ta/FlexTA_graphics.h"
1314
#include "tcl.h"
14-
#include "triton_route/TritonRoute.h"
1515
#include "utl/decode.h"
1616

1717
extern "C" {

0 commit comments

Comments
 (0)