Skip to content

Commit 154f14a

Browse files
committed
Merge branch 'master' into rsz-improved-slew-fixing
2 parents 2d0c7cf + 88a8f4c commit 154f14a

File tree

254 files changed

+8265
-2812
lines changed

Some content is hidden

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

254 files changed

+8265
-2812
lines changed

.gemini/config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
memory_config:
2+
disabled: false
3+
code_review:
4+
pull_request_opened:
5+
help: false
6+
summary: false
7+
code_review: true
8+
include_drafts: true

MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ bazel_dep(name = "bazel-orfs")
146146
# To bump version, run: bazelisk run @bazel-orfs//:bump
147147
git_override(
148148
module_name = "bazel-orfs",
149-
commit = "287262398210ecc368e8cee1fbefddb02ac2e2f3",
149+
commit = "1e862b169d97dc0fec5db106559640886e7fd7d0",
150150
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
151151
)
152152

@@ -155,10 +155,10 @@ orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
155155
# To bump version, run: bazelisk run @bazel-orfs//:bump
156156
orfs.default(
157157
# Official image https://hub.docker.com/r/openroad/orfs/tags
158-
image = "docker.io/openroad/orfs:v3.0-4350-g4e47ad013",
158+
image = "docker.io/openroad/orfs:v3.0-4367-g79b6a48ab",
159159
# Use OpenROAD of this repo instead of from the docker image
160160
openroad = "//:openroad",
161-
sha256 = "2e09979b7ab7f8e797b50ad8baec1e26d66205ea5bd6ec1b4ddfc7b4e924eb2b",
161+
sha256 = "0d0dd3d8d346360a71f6325ce776a984c5a6296fc6e51956b53f136e1dd13462",
162162
)
163163
use_repo(orfs, "com_github_nixos_patchelf_download")
164164
use_repo(orfs, "docker_orfs")

MODULE.bazel.lock

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/OpenRoad.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ void OpenRoad::read3Dbx(const std::string& filename)
496496
odb::ThreeDBlox parser(logger_, db_, sta_);
497497
parser.readDbx(filename);
498498
parser.check();
499+
db_->triggerPostRead3Dbx(db_->getChip());
499500
}
500501

501502
void OpenRoad::read3DBloxBMap(const std::string& filename)

src/OpenRoad.tcl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,14 @@ proc cpu_count { } {
320320
return [ord::cpu_count]
321321
}
322322

323-
sta::define_cmd_args "global_connect" {}
324-
proc global_connect { } {
325-
[ord::get_db_block] globalConnect
323+
sta::define_cmd_args "global_connect" { [-force] [-verbose] }
324+
proc global_connect { args } {
325+
sta::parse_key_args "global_connect" args \
326+
keys {} \
327+
flags {-force -verbose}
328+
329+
sta::check_argc_eq0 "add_global_connection" $args
330+
[ord::get_db_block] globalConnect [info exists flags(-force)] [info exists flags(-verbose)]
326331
}
327332

328333
sta::define_cmd_args "clear_global_connect" {}

src/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,16 @@ add_global_connection -net VSS -pin_pattern {^VSSE$}
263263
The `global_connect` command is used to connect power and ground pins on design instances to the appropriate supplies.
264264

265265
```
266-
global_connect
266+
global_connect [-force] [-verbose]
267267
```
268268

269+
##### Options
270+
271+
| Switch Name | Description |
272+
| ----- | ----- |
273+
| `-force` | If specified, global connections will overwrite existing connections |
274+
| `-verbose` | If specified, report the number of connections made and skipped. |
275+
269276
#### Clear global connection rules
270277

271278
The `clear_global_connect` command is used remove all defined global connection rules.

src/cts/src/TechChar.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
950950
odb::dbNet* net = nullptr;
951951
// clang-format off
952952
debugPrint(logger_, CTS, "tech char", 1, "*createPatterns for #nodes = {}"
953-
" #topologies = {}", setupWirelength, numberOfNodes, numberOfTopologies);
953+
" #topologies = {}", numberOfNodes, numberOfTopologies);
954954
// clang-format on
955955
// For each possible topology...
956956
for (unsigned solutionCounterInt = 0; solutionCounterInt < numberOfTopologies;
@@ -1051,9 +1051,6 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
10511051
tmp << "OUT";
10521052
debugPrint(logger_, CTS, "tech char", 1, tmp.str());
10531053
topology.outPort = outPortPin;
1054-
if (isPureWire) {
1055-
topology.instVector.push_back(nullptr);
1056-
}
10571054
topology.isPureWire = isPureWire;
10581055
topology.netVector.push_back(net);
10591056
topology.nodesWithoutBufVector.push_back(nodesWithoutBuf);
@@ -1478,6 +1475,7 @@ std::vector<TechChar::ResultData> TechChar::characterizationPostProcess()
14781475
unsigned maxResultCapacitance = 0;
14791476
unsigned minResultSlew = std::numeric_limits<unsigned>::max();
14801477
unsigned maxResultSlew = 0;
1478+
14811479
std::vector<ResultData> convertedSolutions;
14821480
for (ResultData solution : selectedSolutions) {
14831481
if (solution.pinSlew <= options_->getMaxCharSlew()) {
@@ -1530,6 +1528,7 @@ std::vector<TechChar::ResultData> TechChar::characterizationPostProcess()
15301528
convertedSolutions.push_back(convertedResult);
15311529
}
15321530
}
1531+
15331532
// Sets the min and max values and returns the result vector.
15341533
minSlew_ = minResultSlew;
15351534
maxSlew_ = maxResultSlew;
@@ -1631,10 +1630,10 @@ void TechChar::create()
16311630
masterNames_.size(), solution.instVector.size());
16321631
// clang-format on
16331632
// For each possible buffer combination (different sizes).
1634-
unsigned buffersUpdate
1633+
unsigned buffersCombinations
16351634
= getBufferingCombo(masterNames_.size(), solution.instVector.size());
16361635

1637-
if (buffersUpdate == 0) {
1636+
if (buffersCombinations == 0) {
16381637
continue;
16391638
}
16401639

@@ -1697,12 +1696,13 @@ void TechChar::create()
16971696
}
16981697
}
16991698
// If the solution is not a pure-wire, update the buffer topologies.
1700-
if (!solution.isPureWire) {
1699+
if (!solution.isPureWire && buffersCombinations > 1) {
17011700
updateBufferTopologies(solution);
17021701
}
1703-
// For pure-wire solution buffersUpdate == 1, so it only runs once.
1704-
buffersUpdate--;
1705-
} while (buffersUpdate != 0);
1702+
// For pure-wire solution buffersCombinations == 1, so it only runs
1703+
// once.
1704+
buffersCombinations--;
1705+
} while (buffersCombinations != 0);
17061706
}
17071707
openStaChar_.reset(nullptr);
17081708
}

src/dbSta/src/dbNetwork.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ DbInstanceNetIterator::DbInstanceNetIterator(const Instance* instance,
415415

416416
// Keep track of flat nets that are already represented by a mod_net
417417
// to avoid returning both.
418-
std::set<dbNet*> handled_flat_nets;
418+
std::unordered_set<dbNet*> handled_flat_nets;
419419
for (dbModNet* mod_net : mod_nets) {
420420
dbNet* flat_net = network_->findRelatedDbNet(mod_net);
421421
if (flat_net) {
@@ -425,7 +425,7 @@ DbInstanceNetIterator::DbInstanceNetIterator(const Instance* instance,
425425

426426
// Collect dbNets from children dbInsts' pins that are not already
427427
// handled.
428-
std::set<dbNet*> flat_nets_set;
428+
std::unordered_set<dbNet*> flat_nets_set;
429429
for (dbInst* child_inst : module->getInsts()) {
430430
for (dbITerm* iterm : child_inst->getITerms()) {
431431
dbNet* flat_net = iterm->getNet();
@@ -447,6 +447,9 @@ DbInstanceNetIterator::DbInstanceNetIterator(const Instance* instance,
447447
}
448448
}
449449
flat_nets_vec_.assign(flat_nets_set.begin(), flat_nets_set.end());
450+
// Sort these nets so their order is determinisitc
451+
std::ranges::sort(
452+
flat_nets_vec_, {}, [](auto const* net1) { return net1->getId(); });
450453
}
451454
} else {
452455
//

src/drt/src/TritonRoute.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,14 @@ void TritonRoute::initDesign()
572572
|| db_->getChip()->getBlock() == nullptr) {
573573
logger_->error(utl::DRT, 151, "Database, chip or block not initialized.");
574574
}
575+
const bool design_exists = getDesign()->getTopBlock() != nullptr;
575576
io::Parser parser(db_, getDesign(), logger_, router_cfg_.get());
576-
if (getDesign()->getTopBlock() != nullptr) {
577+
if (design_exists) {
577578
parser.updateDesign();
578-
return;
579+
} else {
580+
parser.readTechAndLibs(db_);
581+
parser.readDesign(db_);
579582
}
580-
parser.readTechAndLibs(db_);
581-
parser.readDesign(db_);
582583
auto tech = getDesign()->getTech();
583584

584585
if (!router_cfg_->VIAINPIN_BOTTOMLAYER_NAME.empty()) {
@@ -628,9 +629,11 @@ void TritonRoute::initDesign()
628629
router_cfg_->REPAIR_PDN_LAYER_NAME);
629630
}
630631
}
631-
parser.postProcess();
632-
db_callback_->addOwner(db_->getChip()->getBlock());
633-
initGraphics();
632+
if (!design_exists) {
633+
parser.postProcess();
634+
db_callback_->addOwner(db_->getChip()->getBlock());
635+
initGraphics();
636+
}
634637
}
635638

636639
void TritonRoute::initGraphics()
@@ -1277,7 +1280,7 @@ void TritonRoute::setUnidirectionalLayer(const std::string& layerName)
12771280
"Non-routing layer {} can't be set unidirectional",
12781281
layerName);
12791282
}
1280-
design_->getTech()->setUnidirectionalLayer(dbLayer);
1283+
router_cfg_->unidirectional_layers_.insert(dbLayer);
12811284
}
12821285

12831286
void TritonRoute::setParams(const ParamStruct& params)

src/drt/src/db/tech/frTechObject.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ class frTechObject
5959
{
6060
return viaRuleGenerates_;
6161
}
62-
bool hasUnidirectionalLayer(odb::dbTechLayer* dbLayer) const
63-
{
64-
return unidirectional_layers_.find(dbLayer) != unidirectional_layers_.end();
65-
}
6662
bool hasMaxSpacingConstraints() const
6763
{
6864
for (const auto& layer : layers_) {
@@ -126,10 +122,6 @@ class frTechObject
126122
}
127123
return nullptr;
128124
}
129-
void setUnidirectionalLayer(odb::dbTechLayer* dbLayer)
130-
{
131-
unidirectional_layers_.insert(dbLayer);
132-
}
133125

134126
// forbidden length table related
135127
bool isVia2ViaForbiddenLen(int tableLayerIdx,
@@ -406,8 +398,6 @@ class frTechObject
406398
ByLayer<std::array<bool, 4>> viaForbiddenThrough_;
407399
bool hasVia2viaMinStep_ = false;
408400
bool hasCornerSpacingConstraint_ = false;
409-
// unidirectional layers
410-
std::set<odb::dbTechLayer*> unidirectional_layers_;
411401

412402
friend class FlexRP;
413403
};

0 commit comments

Comments
 (0)