Skip to content

Commit 98a18de

Browse files
committed
gpl: fix conflicts with concurring open versus recently merged PR
Signed-off-by: Augusto Berndt <[email protected]>
2 parents 094ed25 + 3ed3271 commit 98a18de

27 files changed

+1672
-1017
lines changed

.bazelrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ test --build_tests_only
7575
build --jobs=200
7676

7777
# Enable local disk caching to supplement the remote cache.
78-
# The location can be overridden by setting the OPENROAD_BAZEL_CACHE env variable.
79-
build --disk_cache=$(OPENROAD_BAZEL_CACHE:-~/.cache/bazel-disk-cache)
78+
build --disk_cache=~/.cache/bazel-disk-cache
79+
build --repository_cache=~/.cache/bazel-repository-cache
8080

8181
# --- CI Settings (write access) ---
8282
build:ci --remote_cache=https://storage.googleapis.com/openroad-bazel-cache
@@ -94,5 +94,7 @@ build:openroad-dev --remote_upload_local_results=false
9494
# Developers need the actual output files to run and use them.
9595
build:openroad-dev --remote_download_toplevel
9696
build:openroad-dev --google_default_credentials=true
97+
build:openroad-dev --disk_cache=/workspace/.cache/bazel-disk-cache
98+
build:openroad-dev --repository_cache=/workspace/.cache/bazel-repository-cache
9799

98100
try-import %workspace%/user.bazelrc

etc/DependencyInstaller.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ _installCommonDev() {
6464
cmakeVersionSmall=${cmakeVersionBig}.6
6565
pcreVersion=10.42
6666
pcreChecksum="37d2f77cfd411a3ddf1c64e1d72e43f7"
67-
swigVersion=4.1.0
68-
swigChecksum="794433378154eb61270a3ac127d9c5f3"
67+
swigVersion=4.3.0
68+
swigChecksum="9f74c7f402aa28d9f75e67d1990ee6fb"
6969
boostVersionBig=1.86
7070
boostVersionSmall=${boostVersionBig}.0
7171
boostChecksum="ac857d73bb754b718a039830b07b9624"
@@ -587,16 +587,13 @@ Then, rerun this script.
587587
EOF
588588
exit 1
589589
fi
590-
brew install bison boost cmake eigen flex fmt groff libomp or-tools pandoc pyqt5 python spdlog tcl-tk zlib
590+
brew install bison boost cmake eigen flex fmt groff libomp or-tools pandoc pyqt5 python spdlog tcl-tk zlib swig
591591

592592
# Some systems need this to correctly find OpenMP package during build
593593
brew link --force libomp
594594

595595
# Lemon is not in the homebrew-core repo
596596
brew install The-OpenROAD-Project/lemon-graph/lemon-graph
597-
598-
# Install swig 4.1.1
599-
_installHomebrewPackage "swig" "c83c8aaa6505c3ea28c35bc45a54234f79e46c5d" "s/"
600597
}
601598

602599
_installDebianCleanUp() {

src/dbSta/src/dbSta.cc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ class dbStaCbk : public dbBlockCallBackObj
166166
void inDbBTermSetSigType(dbBTerm* bterm, const dbSigType& sig_type) override;
167167

168168
private:
169+
// for inDbInstSwapMasterBefore/inDbInstSwapMasterAfter
170+
bool swap_master_arcs_equiv_ = false;
171+
169172
dbSta* sta_;
170173
dbNetwork* network_ = nullptr;
171174
Logger* logger_;
@@ -724,7 +727,10 @@ void dbSta::deleteInstance(Instance* inst)
724727

725728
void dbSta::replaceCell(Instance* inst, Cell* to_cell, LibertyCell* to_lib_cell)
726729
{
727-
Sta::replaceCell(inst, to_cell, to_lib_cell);
730+
// do not call `Sta::replaceCell` as sta's before/after hooks are called
731+
// from db callbacks
732+
NetworkEdit* network = networkCmdEdit();
733+
network->replaceCell(inst, to_cell);
728734
}
729735

730736
void dbSta::deleteNet(Net* net)
@@ -923,20 +929,25 @@ void dbStaCbk::inDbInstSwapMasterBefore(dbInst* inst, dbMaster* master)
923929
LibertyCell* to_lib_cell = network_->libertyCell(network_->dbToSta(master));
924930
LibertyCell* from_lib_cell = network_->libertyCell(inst);
925931
Instance* sta_inst = network_->dbToSta(inst);
926-
if (sta::equivCells(from_lib_cell, to_lib_cell)) {
932+
933+
swap_master_arcs_equiv_ = sta::equivCellsArcs(from_lib_cell, to_lib_cell);
934+
935+
if (swap_master_arcs_equiv_) {
927936
sta_->replaceEquivCellBefore(sta_inst, to_lib_cell);
928937
} else {
929-
logger_->error(STA,
930-
1000,
931-
"instance {} swap master {} is not equivalent",
932-
inst->getConstName(),
933-
master->getConstName());
938+
sta_->replaceCellBefore(sta_inst, to_lib_cell);
934939
}
935940
}
936941

937942
void dbStaCbk::inDbInstSwapMasterAfter(dbInst* inst)
938943
{
939-
sta_->replaceEquivCellAfter(network_->dbToSta(inst));
944+
Instance* sta_inst = network_->dbToSta(inst);
945+
946+
if (swap_master_arcs_equiv_) {
947+
sta_->replaceEquivCellAfter(sta_inst);
948+
} else {
949+
sta_->replaceCellAfter(sta_inst);
950+
}
940951
}
941952

942953
void dbStaCbk::inDbNetDestroy(dbNet* db_net)

src/gpl/src/graphics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void Graphics::reportSelected()
350350
if (selected_ == kInvalidIndex) {
351351
return;
352352
}
353-
logger_->report("Inst: {}", nbc_->getGCellByIndex(selected_)->name());
353+
logger_->report("Inst: {}", nbc_->getGCellByIndex(selected_)->getName());
354354

355355
if (np_) {
356356
auto wlCoeffX = np_->getWireLengthCoefX();
@@ -365,7 +365,7 @@ void Graphics::reportSelected()
365365
wlGrad.x,
366366
wlGrad.y,
367367
weight,
368-
gPin->pin()->name());
368+
gPin->pin()->getName());
369369
}
370370

371371
FloatPoint wlGrad = nbc_->getWireLengthGradientWA(

0 commit comments

Comments
 (0)