Skip to content

Commit cd5b0c0

Browse files
committed
Merge remote-tracking branch 'private/master' into gpl-reduce-TD-iterations
2 parents 27e9f59 + a4b5d14 commit cd5b0c0

File tree

18 files changed

+69
-54
lines changed

18 files changed

+69
-54
lines changed

src/cts/test/balance_levels.defok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION 5.8 ;
2-
DIVIDERCHAR "|" ;
2+
DIVIDERCHAR "/" ;
33
BUSBITCHARS "[]" ;
44
DESIGN multi_sink ;
55
UNITS DISTANCE MICRONS 2000 ;

src/dbSta/include/db_sta/dbNetwork.hh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,26 @@ class dbNetwork : public ConcreteNetwork
298298
NetTermIterator* termIterator(const Net* net) const override;
299299
const Net* highestConnectedNet(Net* net) const override;
300300
bool isSpecial(Net* net);
301+
302+
// Get the flat net (dbNet) with the Net*.
303+
// If the net is a hierarchical net (dbModNet), return nullptr
301304
dbNet* flatNet(const Net* net) const;
302-
Net* getOrFindFlatNet(const Net* net) const;
303-
dbNet* getOrFindFlatDbNet(const Net* net) const;
304-
Net* getOrFindFlatNet(const Pin* pin) const;
305-
dbNet* getOrFindFlatDbNet(const Pin* pin) const;
305+
306+
// Given a net or pin that may be hierarchical, find the corresponding flat
307+
// dbNet by traversing the netlist.
308+
// If the net is already a flat net (dbNet), it is returned as is.
309+
// If the net is a hierarchical net (dbModNet), find the associated dbNet.
310+
dbNet* findFlatDbNet(const Net* net) const;
311+
dbNet* findFlatDbNet(const Pin* pin) const;
312+
313+
// Given a net that may be hierarchical, find the corresponding flat dbNet by
314+
// traversing the netlist and return it as Net*.
315+
// If the net is already a flat net, it is returned as is.
316+
// If the net is a hierarchical net (dbModNet), find the associated dbNet and
317+
// return it as Net*.
318+
Net* findFlatNet(const Net* net) const;
319+
Net* findFlatNet(const Pin* pin) const;
320+
306321
bool hasPort(const Net* net) const;
307322

308323
////////////////////////////////////////////////////////////////

src/dbSta/src/dbNetwork.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2655,7 +2655,7 @@ Net* dbNetwork::mergedInto(Net*)
26552655

26562656
bool dbNetwork::isSpecial(Net* net)
26572657
{
2658-
dbNet* db_net = getOrFindFlatDbNet(net);
2658+
dbNet* db_net = findFlatDbNet(net);
26592659
return (db_net && db_net->isSpecial());
26602660
}
26612661

@@ -3977,15 +3977,15 @@ void dbNetwork::checkAxioms()
39773977
// If the net is already a flat net, it is returned as is.
39783978
// If the net is a hierarchical net (dbModNet), find the associated dbNet and
39793979
// return it as Net*.
3980-
Net* dbNetwork::getOrFindFlatNet(const Net* net) const
3980+
Net* dbNetwork::findFlatNet(const Net* net) const
39813981
{
3982-
return dbToSta(getOrFindFlatDbNet(net));
3982+
return dbToSta(findFlatDbNet(net));
39833983
}
39843984

39853985
// Given a net that may be hierarchical, find the corresponding flat dbNet.
39863986
// If the net is already a flat net (dbNet), it is returned as is.
39873987
// If the net is a hierarchical net (dbModNet), find the associated dbNet.
3988-
dbNet* dbNetwork::getOrFindFlatDbNet(const Net* net) const
3988+
dbNet* dbNetwork::findFlatDbNet(const Net* net) const
39893989
{
39903990
if (!net) {
39913991
return nullptr;
@@ -4010,14 +4010,14 @@ dbNet* dbNetwork::getOrFindFlatDbNet(const Net* net) const
40104010

40114011
// Find the flat net connected to the pin.
40124012
// This function handles both internal instance pins and top-level port pins.
4013-
Net* dbNetwork::getOrFindFlatNet(const Pin* pin) const
4013+
Net* dbNetwork::findFlatNet(const Pin* pin) const
40144014
{
4015-
return dbToSta(getOrFindFlatDbNet(pin));
4015+
return dbToSta(findFlatDbNet(pin));
40164016
}
40174017

40184018
// Find the flat net (dbNet) connected to the pin in the OpenDB database.
40194019
// This function handles both internal instance pins and top-level port pins.
4020-
dbNet* dbNetwork::getOrFindFlatDbNet(const Pin* pin) const
4020+
dbNet* dbNetwork::findFlatDbNet(const Pin* pin) const
40214021
{
40224022
dbNet* db_net = nullptr;
40234023
if (isTopLevelPort(pin)) {

src/est/src/EstimateParasitics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ SteinerTree* EstimateParasitics::makeSteinerTree(const Pin* drvr_pin)
993993
/*
994994
Handle hierarchy. Make sure all traversal on dbNets.
995995
*/
996-
odb::dbNet* db_net = db_network_->getOrFindFlatDbNet(drvr_pin);
996+
odb::dbNet* db_net = db_network_->findFlatDbNet(drvr_pin);
997997
Net* net = db_network_->dbToSta(db_net);
998998

999999
debugPrint(logger_, EST, "steiner", 1, "Net {}", sdc_network->pathName(net));

src/gpl/test/clust02.defok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION 5.8 ;
2-
DIVIDERCHAR "|" ;
2+
DIVIDERCHAR "/" ;
33
BUSBITCHARS "[]" ;
44
DESIGN top ;
55
UNITS DISTANCE MICRONS 1000 ;

src/gui/src/staGuiInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ sta::Net* ClockTree::getNet(const sta::Pin* pin) const
724724
{
725725
sta::Term* term = network_->term(pin);
726726
sta::Net* net = term ? network_->net(term) : network_->net(pin);
727-
return network_->getOrFindFlatNet(net);
727+
return network_->findFlatNet(net);
728728
}
729729

730730
bool ClockTree::isLeaf(const sta::Pin* pin) const

src/mpl/src/SimulatedAnnealingCore.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ void SimulatedAnnealingCore<T>::initSequencePair()
100100
return;
101101
}
102102

103-
const int sequence_pair_size
104-
= macros_to_place_ != 0 ? macros_to_place_ : macros_.size();
103+
const int sequence_pair_size = number_of_sequence_pair_macros_ != 0
104+
? number_of_sequence_pair_macros_
105+
: macros_.size();
105106

106107
int macro_id = 0;
107108

src/mpl/src/SimulatedAnnealingCore.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ class SimulatedAnnealingCore
5959

6060
virtual ~SimulatedAnnealingCore() = default;
6161

62-
void setNumberOfMacrosToPlace(int macros_to_place)
62+
void setNumberOfSequencePairMacros(int number_of_sequence_pair_macros)
6363
{
64-
macros_to_place_ = macros_to_place;
64+
number_of_sequence_pair_macros_ = number_of_sequence_pair_macros;
6565
};
6666
void setNets(const std::vector<BundledNet>& nets);
6767
void setFences(const std::map<int, Rect>& fences);
@@ -145,8 +145,7 @@ class SimulatedAnnealingCore
145145
BoundaryRegionList available_regions_for_unconstrained_pins_;
146146
ClusterToBoundaryRegionMap io_cluster_to_constraint_;
147147

148-
// Number of macros that will actually be part of the sequence pair
149-
int macros_to_place_ = 0;
148+
int number_of_sequence_pair_macros_ = 0;
150149

151150
std::vector<BundledNet> nets_;
152151
std::map<int, Rect> fences_; // Macro Id -> Fence

src/mpl/src/clusterEngine.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ void ClusteringEngine::setFloorplanShape()
171171

172172
void ClusteringEngine::searchForFixedInstsInsideFloorplanShape()
173173
{
174-
odb::Rect floorplan_shape(
175-
block_->micronsToDbu(tree_->floorplan_shape.xMin()),
176-
block_->micronsToDbu(tree_->floorplan_shape.yMin()),
177-
block_->micronsToDbu(tree_->floorplan_shape.xMax()),
178-
block_->micronsToDbu(tree_->floorplan_shape.yMax()));
174+
odb::Rect floorplan_shape = micronsToDbu(block_, tree_->floorplan_shape);
179175

180176
for (odb::dbInst* inst : block_->getInsts()) {
181177
if (inst->isFixed()
@@ -2105,7 +2101,7 @@ void ClusteringEngine::getHardMacros(odb::dbModule* module,
21052101
}
21062102

21072103
void ClusteringEngine::createOneClusterForEachMacro(
2108-
Cluster* parent,
2104+
Cluster* mixed_leaf_parent,
21092105
const std::vector<HardMacro*>& hard_macros,
21102106
std::vector<Cluster*>& macro_clusters)
21112107
{
@@ -2116,7 +2112,7 @@ void ClusteringEngine::createOneClusterForEachMacro(
21162112
single_macro_cluster->addLeafMacro(hard_macro->getInst());
21172113
macro_clusters.push_back(single_macro_cluster.get());
21182114

2119-
incorporateNewCluster(std::move(single_macro_cluster), parent);
2115+
incorporateNewCluster(std::move(single_macro_cluster), mixed_leaf_parent);
21202116
}
21212117
}
21222118

src/mpl/src/clusterEngine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class ClusteringEngine
219219
void mapMacroInCluster2HardMacro(Cluster* cluster);
220220
void getHardMacros(odb::dbModule* module,
221221
std::vector<HardMacro*>& hard_macros);
222-
void createOneClusterForEachMacro(Cluster* parent,
222+
void createOneClusterForEachMacro(Cluster* mixed_leaf_parent,
223223
const std::vector<HardMacro*>& hard_macros,
224224
std::vector<Cluster*>& macro_clusters);
225225
void classifyMacrosBySize(const std::vector<HardMacro*>& hard_macros,

0 commit comments

Comments
 (0)