Skip to content

Commit a058e24

Browse files
committed
Merge remote-tracking branch 'origin/master' into 3dblx-port
2 parents 39c023e + 12f5d70 commit a058e24

Some content is hidden

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

45 files changed

+1337
-207
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.1
1+
8.5.0

MODULE.bazel

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,8 @@ git_override(
1818
remote = "https://github.com/bazelbuild/rules_scala",
1919
)
2020

21-
bazel_dep(name = "rules_verilator", version = "5.034")
22-
single_version_override(
23-
module_name = "rules_verilator",
24-
registry = "https://raw.githubusercontent.com/Pinata-Consulting/ascenium-registry/683f93e670a04f8d3d47316c42d197d8ac095a00/",
25-
version = "5.034",
26-
)
27-
28-
single_version_override(
29-
module_name = "verilator",
30-
registry = "https://raw.githubusercontent.com/Pinata-Consulting/ascenium-registry/683f93e670a04f8d3d47316c42d197d8ac095a00/",
31-
version = "5.034.ar.1",
32-
)
33-
34-
single_version_override(
35-
module_name = "systemc",
36-
registry = "https://raw.githubusercontent.com/Pinata-Consulting/ascenium-registry/683f93e670a04f8d3d47316c42d197d8ac095a00/",
37-
version = "3.0.1",
38-
)
21+
bazel_dep(name = "rules_verilator", version = "0.1.0")
22+
bazel_dep(name = "verilator", version = "5.036.bcr.3")
3923

4024
# Not all boost libs are available at the latest version yet, so use a
4125
# slightly older one that has all we need.
@@ -162,7 +146,7 @@ bazel_dep(name = "bazel-orfs")
162146
# To bump version, run: bazelisk run @bazel-orfs//:bump
163147
git_override(
164148
module_name = "bazel-orfs",
165-
commit = "b2ea891b7a20e806f7a80b97523b9065d498b3ac",
149+
commit = "287262398210ecc368e8cee1fbefddb02ac2e2f3",
166150
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
167151
)
168152

@@ -171,10 +155,10 @@ orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
171155
# To bump version, run: bazelisk run @bazel-orfs//:bump
172156
orfs.default(
173157
# Official image https://hub.docker.com/r/openroad/orfs/tags
174-
image = "docker.io/openroad/orfs:v3.0-4338-g23bfbc7f2",
158+
image = "docker.io/openroad/orfs:v3.0-4350-g4e47ad013",
175159
# Use OpenROAD of this repo instead of from the docker image
176160
openroad = "//:openroad",
177-
sha256 = "59fa14cf42c9d2ebf388e77e45cee79ba1ae7dae24cf7fe8a004d6b37d160968",
161+
sha256 = "2e09979b7ab7f8e797b50ad8baec1e26d66205ea5bd6ec1b4ddfc7b4e924eb2b",
178162
)
179163
use_repo(orfs, "com_github_nixos_patchelf_download")
180164
use_repo(orfs, "docker_orfs")

MODULE.bazel.lock

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

src/OpenRoad.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ proc place_inst { args } {
430430
}
431431

432432
if { [info exists keys(-name)] } {
433-
set inst_name [lindex $keys(-name) 0]
433+
set inst_name $keys(-name)
434434
} else {
435435
utl::error ORD 57 "-name is a required argument to the place_cell command."
436436
}

src/cts/src/TechChar.cpp

Lines changed: 53 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -942,18 +942,23 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
942942
// can be placed and...
943943
//...the number of topologies (combinations of buffers, considering only 1
944944
// drive) that can exist.
945+
945946
const unsigned numberOfNodes
946947
= setupWirelength / options_->getWireSegmentUnit();
947948
const unsigned numberOfTopologies = 1 << numberOfNodes;
948949
std::vector<SolutionData> topologiesVector;
949950
odb::dbNet* net = nullptr;
950951
// clang-format off
951-
debugPrint(logger_, CTS, "tech char", 1, "createPatterns WL:{} #nodes:{}"
952-
"#topo:{}", setupWirelength, numberOfNodes, numberOfTopologies);
952+
debugPrint(logger_, CTS, "tech char", 1, "*createPatterns for #nodes = {}"
953+
" #topologies = {}", setupWirelength, numberOfNodes, numberOfTopologies);
953954
// clang-format on
954955
// For each possible topology...
955956
for (unsigned solutionCounterInt = 0; solutionCounterInt < numberOfTopologies;
956957
solutionCounterInt++) {
958+
debugPrint(
959+
logger_, CTS, "tech char", 1, "**topology {}", solutionCounterInt + 1);
960+
std::stringstream tmp;
961+
tmp << "***IN ";
957962
// Creates a bitset that represents the buffer locations.
958963
const std::bitset<5> solutionCounter(solutionCounterInt);
959964
int wireCounter = 0;
@@ -983,20 +988,24 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
983988
// Not a buffer, only a wire segment.
984989
nodesWithoutBuf++;
985990
// clang-format off
986-
debugPrint(logger_, CTS, "tech char", 1, " wire at node:{} topo:{}",
991+
debugPrint(logger_, CTS, "tech char", 2, "***wire at node : {}",
987992
nodeIndex, solutionCounterInt);
988993
// clang-format on
989994
} else {
990995
// Buffer, need to create the instance and a new net.
991996
nodesWithoutBuf++;
997+
for (int i = 0; i < nodesWithoutBuf - 1; i++) {
998+
tmp << "-- ";
999+
}
1000+
tmp << "-> ";
9921001
// Creates a new buffer instance.
9931002
const std::string bufName = fmt::format("buf_{}_{}_{}",
9941003
setupWirelength,
9951004
solutionCounter.to_string(),
9961005
wireCounter);
9971006
// clang-format off
998-
debugPrint(logger_, CTS, "tech char", 1, " buffer {} at node:{} "
999-
"topo:{}", bufName, nodeIndex, solutionCounterInt);
1007+
debugPrint(logger_, CTS, "tech char", 2, "***buffer {} at node : {}"
1008+
, bufName, nodeIndex, solutionCounterInt);
10001009
// clang-format on
10011010
odb::dbInst* bufInstance
10021011
= odb::dbInst::create(charBlock_, charBuf_, bufName.c_str());
@@ -1020,11 +1029,6 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
10201029
// Updates the topology wih the new instance and the current topology
10211030
// (as a vector of strings).
10221031
topology.instVector.push_back(bufInstance);
1023-
// clang-format off
1024-
debugPrint(logger_, CTS, "tech char", 1, " topo instVector size:{} "
1025-
"node:{} topo:{}", topology.instVector.size(), nodeIndex,
1026-
solutionCounterInt);
1027-
// clang-format on
10281032
topology.topologyDescriptor.push_back(
10291033
std::to_string(nodesWithoutBuf * options_->getWireSegmentUnit()));
10301034
topology.topologyDescriptor.push_back(charBuf_->getName());
@@ -1041,6 +1045,11 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
10411045
odb::dbBPin* outPortPin = odb::dbBPin::create(outPort);
10421046
// Updates the topology with the output port, old new, possible instances
10431047
// and other attributes.
1048+
for (int i = 0; i < nodesWithoutBuf; i++) {
1049+
tmp << "-- ";
1050+
}
1051+
tmp << "OUT";
1052+
debugPrint(logger_, CTS, "tech char", 1, tmp.str());
10441053
topology.outPort = outPortPin;
10451054
if (isPureWire) {
10461055
topology.instVector.push_back(nullptr);
@@ -1194,7 +1203,7 @@ TechChar::ResultData TechChar::computeTopologyResults(
11941203
const float pinArrival = openStaChar_->vertexArrival(
11951204
outPinVert, sta::RiseFall::fall(), charPathAnalysis_);
11961205
results.pinArrival = pinArrival;
1197-
// Computations for output slew.
1206+
// Computations for output slew. Avg of rise and fall slew.
11981207
const float pinRise = openStaChar_->vertexSlew(
11991208
outPinVert, sta::RiseFall::rise(), sta::MinMax::max());
12001209
const float pinFall = openStaChar_->vertexSlew(
@@ -1333,7 +1342,7 @@ void TechChar::updateBufferTopologies(TechChar::SolutionData& solution)
13331342
odb::dbInst* inst = solution.instVector[nodeIndex];
13341343
inst->swapMaster(newMaster);
13351344
// clang-format off
1336-
debugPrint(logger_, CTS, "tech char", 1, "**updateBufferTopologies swap "
1345+
debugPrint(logger_, CTS, "tech char", 1, "***updateBufferTopologies swap "
13371346
"from {} to {}, index:{}", oldMaster->getName(),
13381347
newMaster->getName(), nodeIndex);
13391348
// clang-format on
@@ -1344,6 +1353,10 @@ void TechChar::updateBufferTopologies(TechChar::SolutionData& solution)
13441353

13451354
std::vector<size_t> TechChar::getCurrConfig(const SolutionData& solution)
13461355
{
1356+
if (solution.isPureWire) {
1357+
debugPrint(logger_, CTS, "tech char", 1, "**currConfig is a pure wire");
1358+
return {};
1359+
}
13471360
std::vector<size_t> config;
13481361
for (auto inst : solution.instVector) {
13491362
size_t masterID = cellNameToID(inst->getMaster()->getName());
@@ -1352,11 +1365,11 @@ std::vector<size_t> TechChar::getCurrConfig(const SolutionData& solution)
13521365

13531366
if (logger_->debugCheck(CTS, "tech char", 1)) {
13541367
std::stringstream tmp;
1355-
tmp << "currConfig: ";
1368+
tmp << "**currConfig: ";
13561369
for (unsigned i : config) {
13571370
tmp << i << " ";
13581371
}
1359-
logger_->report(tmp.str());
1372+
debugPrint(logger_, CTS, "tech char", 1, tmp.str());
13601373
}
13611374
return config;
13621375
}
@@ -1368,7 +1381,7 @@ size_t TechChar::cellNameToID(const std::string& masterName)
13681381
return std::distance(masterNames_.begin(), masterIter);
13691382
}
13701383

1371-
// Find a buffer config that is monotonic from current buffer config
1384+
// Find a buffer config that is monotonic from current buffer config.
13721385
std::vector<size_t> TechChar::getNextConfig(
13731386
const std::vector<size_t>& currConfig)
13741387
{
@@ -1392,11 +1405,11 @@ std::vector<size_t> TechChar::getNextConfig(
13921405

13931406
if (logger_->debugCheck(CTS, "tech char", 1)) {
13941407
std::stringstream tmp;
1395-
tmp << "nextConfig: ";
1408+
tmp << "**nextConfig: ";
13961409
for (unsigned i : nextConfig) {
13971410
tmp << i << " ";
13981411
}
1399-
logger_->report(tmp.str());
1412+
debugPrint(logger_, CTS, "tech char", 1, tmp.str());
14001413
}
14011414

14021415
return nextConfig;
@@ -1426,15 +1439,15 @@ void TechChar::swapTopologyBuffer(SolutionData& solution,
14261439
topologyIndex++) {
14271440
const std::string topologyS = solution.topologyDescriptor[topologyIndex];
14281441
// clang-format off
1429-
debugPrint(logger_, CTS, "tech char", 1, "**topo:{} topoIdx:{}",
1442+
debugPrint(logger_, CTS, "tech char", 1, "***topo:{} topoIdx:{}",
14301443
topologyS, topologyIndex);
14311444
// clang-format on
14321445
if (!(std::find(masterNames_.begin(), masterNames_.end(), topologyS)
14331446
== masterNames_.end())) {
14341447
if (topologyCounter == nodeIndex) {
14351448
solution.topologyDescriptor[topologyIndex] = newMasterName;
14361449
// clang-format off
1437-
debugPrint(logger_, CTS, "tech char", 1, "**soln topo descript at "
1450+
debugPrint(logger_, CTS, "tech char", 1, "***soln topo descript at "
14381451
"{} set to {}", topologyIndex, newMasterName);
14391452
// clang-format on
14401453
break;
@@ -1561,6 +1574,8 @@ void TechChar::create()
15611574
int64_t topologiesCreated = 0;
15621575
for (unsigned setupWirelength : wirelengthsToTest_) {
15631576
// Creates the topologies for the current wirelength.
1577+
debugPrint(
1578+
logger_, CTS, "tech char", 1, "Wirelength = {}", setupWirelength);
15641579
std::vector<SolutionData> topologiesVector
15651580
= createPatterns(setupWirelength);
15661581
// Creates an OpenSTA instance.
@@ -1572,9 +1587,8 @@ void TechChar::create()
15721587
int topoIndex = 0;
15731588
for (SolutionData solution : topologiesVector) {
15741589
// clang-format off
1575-
debugPrint(logger_, CTS, "tech char", 1, "create WL:{} of {}, "
1576-
"topo:{} of {}", setupWirelength, wirelengthsToTest_.size(),
1577-
topoIndex, topologiesVector.size());
1590+
debugPrint(logger_, CTS, "tech char", 1, "*genrate combinations for "
1591+
"topology: {} of {}", topoIndex + 1, topologiesVector.size());
15781592
// clang-format on
15791593
topoIndex++;
15801594
// Gets the input and output port (as terms, pins and vertices).
@@ -1610,15 +1624,15 @@ void TechChar::create()
16101624
r1,
16111625
c1,
16121626
piExists);
1627+
1628+
// clang-format off
1629+
debugPrint(logger_, CTS, "tech char", 1, "*# bufs = {}; "
1630+
"# nodes with buf = {}",
1631+
masterNames_.size(), solution.instVector.size());
1632+
// clang-format on
16131633
// For each possible buffer combination (different sizes).
16141634
unsigned buffersUpdate
16151635
= getBufferingCombo(masterNames_.size(), solution.instVector.size());
1616-
// clang-format off
1617-
debugPrint(logger_, CTS, "tech char", 1, "create #bufs={} "
1618-
"#soln.instVector.size={}, #bufUpdate={}, #topo={}",
1619-
masterNames_.size(), solution.instVector.size(),
1620-
buffersUpdate, topologiesCreated);
1621-
// clang-format on
16221636

16231637
if (buffersUpdate == 0) {
16241638
continue;
@@ -1737,14 +1751,15 @@ void TechChar::create()
17371751
unsigned TechChar::getBufferingCombo(size_t numBuffers, size_t numNodes)
17381752
{
17391753
// check if this has been computed already
1740-
std::stringstream tmp;
17411754
std::pair iPair(numBuffers, numNodes);
17421755
auto iter = bufferingComboTable_.find(iPair);
17431756
if (iter != bufferingComboTable_.end()) {
1744-
if (logger_->debugCheck(CTS, "tech char", 1)) {
1745-
tmp << "Monotonic entries (hashed): " << iter->second << '\n';
1746-
logger_->report(tmp.str());
1747-
}
1757+
debugPrint(logger_,
1758+
CTS,
1759+
"tech char",
1760+
1,
1761+
"**Monotonic entries are already hashed: {}",
1762+
iter->second);
17481763
return iter->second;
17491764
}
17501765

@@ -1762,6 +1777,8 @@ unsigned TechChar::getBufferingCombo(size_t numBuffers, size_t numNodes)
17621777

17631778
unsigned numMonotonic = 0;
17641779
for (const auto& row : matrix) {
1780+
std::stringstream tmp;
1781+
tmp << "**";
17651782
for (size_t val : row) {
17661783
if (logger_->debugCheck(CTS, "tech char", 1)) {
17671784
tmp << val << " ";
@@ -1773,15 +1790,10 @@ unsigned TechChar::getBufferingCombo(size_t numBuffers, size_t numNodes)
17731790
}
17741791
numMonotonic++;
17751792
}
1776-
if (logger_->debugCheck(CTS, "tech char", 1)) {
1777-
logger_->report(tmp.str());
1778-
}
1779-
}
1780-
if (logger_->debugCheck(CTS, "tech char", 1)) {
1781-
tmp << "Monotonic entries: " << numMonotonic;
1782-
logger_->report(tmp.str());
1793+
debugPrint(logger_, CTS, "tech char", 1, tmp.str());
17831794
}
1784-
1795+
debugPrint(
1796+
logger_, CTS, "tech char", 1, "**Monotonic entries: {}", numMonotonic);
17851797
// insert new result into hash table
17861798
bufferingComboTable_[iPair] = numMonotonic;
17871799
return numMonotonic;

src/dbSta/include/db_sta/dbNetwork.hh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,26 @@ class dbNetwork : public ConcreteNetwork
251251
Instance* instance(const Pin* pin) const override;
252252
Net* net(const Pin* pin) const override;
253253
void net(const Pin* pin, dbNet*& db_net, dbModNet*& db_modnet) const;
254+
255+
///
256+
/// Get a dbNet connected to the input pin.
257+
/// - If both dbNet and dbModNet are connected to the input pin,
258+
/// this function returns the dbNet.
259+
/// - NOTE: If only dbModNet is connected to the input pin, this
260+
/// function returns nullptr. If you need to get the dbNet corresponding to
261+
/// the dbModNet, use findFlatDbNet() instead.
262+
///
254263
dbNet* flatNet(const Pin* pin) const;
264+
265+
///
266+
/// Get a dbModNet connected to the input pin.
267+
/// - If both dbNet and dbModNet are connected to the input pin,
268+
/// this function returns the dbModNet.
269+
/// - If only dbNet is connected to the input pin, this function returns
270+
/// nullptr.
271+
///
255272
dbModNet* hierNet(const Pin* pin) const;
273+
256274
dbITerm* flatPin(const Pin* pin) const;
257275
dbModITerm* hierPin(const Pin* pin) const;
258276
dbBlock* getBlockOf(const Pin* pin) const;

src/gpl/src/replace-py.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ using gpl::Replace;
2828
%include "gpl/Replace.h"
2929

3030
namespace std {
31+
#ifndef SWIG_VECTOR_INT
32+
#define SWIG_VECTOR_INT
3133
%template(IntVector) vector<int>;
34+
#endif
3235
}

0 commit comments

Comments
 (0)