Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cts enable obstruction aware #5900

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
949014c
phase 1 for enhanced clock gater handling
precisionmoon Mar 15, 2024
747e4a9
phase 2 for enhanced clock gater handling
precisionmoon Mar 16, 2024
6f8bc75
implement paths on cts
arthurjolo Jul 8, 2024
1e86564
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Jul 8, 2024
5ead700
use paths arrival time for insertion delay
arthurjolo Jul 8, 2024
ff2804f
update ok files
arthurjolo Jul 8, 2024
c6b4858
remove debug prints
arthurjolo Jul 11, 2024
34311de
fix error message
arthurjolo Jul 16, 2024
9db8841
debug prints
arthurjolo Jul 16, 2024
11fc3b7
store the input clock net information on the tree builder
arthurjolo Jul 17, 2024
d97cac1
debug prints
arthurjolo Jul 18, 2024
e2c3b7f
remove debug print
arthurjolo Jul 23, 2024
20992d6
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Jul 23, 2024
58ac337
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Jul 26, 2024
079adde
format code
arthurjolo Aug 23, 2024
f541a0d
merge with master
arthurjolo Aug 23, 2024
a67c2f8
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Aug 26, 2024
17c4601
update graph information correctly
arthurjolo Aug 26, 2024
56b6154
enable obstruction awere
arthurjolo Aug 29, 2024
312780f
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Sep 3, 2024
a6a247e
rename varibles
arthurjolo Sep 5, 2024
a4bcf6c
merge to master
arthurjolo Sep 16, 2024
cf74a73
fix merge
arthurjolo Sep 16, 2024
e9da341
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Sep 23, 2024
22625ec
remove unused variables
arthurjolo Sep 24, 2024
6d95db0
remove unused variables
arthurjolo Sep 24, 2024
c1b2bb4
merge master
arthurjolo Oct 1, 2024
70c9628
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Oct 4, 2024
6c363e7
Merge branch 'master' into cts_compute_delay_paths
arthurjolo Oct 7, 2024
07c3b23
update ok fles
arthurjolo Oct 7, 2024
90d978a
clang format
arthurjolo Oct 7, 2024
5fc884f
change warning number
arthurjolo Oct 8, 2024
9f1f678
Merge branch 'master' into cts_enable_obstruction_aware
arthurjolo Oct 8, 2024
15cfa35
Compute clk arrival times
arthurjolo Oct 8, 2024
62ea732
code format
arthurjolo Oct 8, 2024
dfc20a6
address calng tidy sugestion
arthurjolo Oct 8, 2024
7096139
Merge branch 'master' into cts_enable_obstruction_aware
arthurjolo Oct 9, 2024
1fe8a42
Merge branch 'master' into cts_enable_obstruction_aware
arthurjolo Nov 18, 2024
3560496
Merge branch 'master' into cts_enable_obstruction_aware
arthurjolo Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions src/cts/include/cts/TritonCTS.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class Clock;
class dbNetwork;
class Unit;
class LibertyCell;
class Vertex;
class Graph;
} // namespace sta

namespace stt {
Expand Down Expand Up @@ -119,23 +121,27 @@ class TritonCTS
// db functions
bool masterExists(const std::string& master) const;
void populateTritonCTS();
void writeClockNetsToDb(Clock& clockNet, std::set<odb::dbNet*>& clkLeafNets);
void writeClockNetsToDb(TreeBuilder* builder,
std::set<odb::dbNet*>& clkLeafNets);
void writeClockNDRsToDb(const std::set<odb::dbNet*>& clkLeafNets);
void incrementNumClocks() { ++numberOfClocks_; }
void clearNumClocks() { numberOfClocks_ = 0; }
unsigned getNumClocks() const { return numberOfClocks_; }
void initOneClockTree(odb::dbNet* driverNet,
odb::dbNet* clkInputNet,
const std::string& sdcClockName,
TreeBuilder* parent);
TreeBuilder* initClock(odb::dbNet* net,
TreeBuilder* initClock(odb::dbNet* firstNet,
odb::dbNet* clkInputNet,
const std::string& sdcClock,
TreeBuilder* parentBuilder);
void disconnectAllSinksFromNet(odb::dbNet* net);
void disconnectAllPinsFromNet(odb::dbNet* net);
void checkUpstreamConnections(odb::dbNet* net);
void createClockBuffers(Clock& clockNet, odb::dbModule* parent);
HTreeBuilder* initClockTreeForMacrosAndRegs(
odb::dbNet*& net,
odb::dbNet*& firstNet,
odb::dbNet* clkInputNet,
const std::unordered_set<odb::dbMaster*>& buffer_masters,
Clock& ClockNet,
TreeBuilder* parentBuilder);
Expand All @@ -155,7 +161,8 @@ class TritonCTS
Clock& clockNet,
const std::vector<std::pair<odb::dbInst*, odb::dbMTerm*>>& registerSinks,
odb::dbNet*& firstNet,
odb::dbNet*& secondNet);
odb::dbNet*& secondNet,
std::string& topBufferName);
void computeITermPosition(odb::dbITerm* term, int& x, int& y) const;
void countSinksPostDbWrite(TreeBuilder* builder,
odb::dbNet* net,
Expand Down Expand Up @@ -200,11 +207,16 @@ class TritonCTS
ClockInst& dummyClock);
void printClockNetwork(const Clock& clockNet) const;
void balanceMacroRegisterLatencies();
void computeAveSinkArrivals(TreeBuilder* builder);
float getVertexClkArrival(sta::Vertex* sinkVertex, odb::dbNet* topNet, odb::dbITerm* iterm);
void computeAveSinkArrivals(TreeBuilder* builder, sta::Graph* graph);
void computeSinkArrivalRecur(odb::dbNet* topClokcNet,
odb::dbITerm* iterm,
float& sumArrivals,
unsigned& numSinks,
sta::Graph* graph);
void adjustLatencies(TreeBuilder* macroBuilder, TreeBuilder* registerBuilder);
void computeTopBufferDelay(TreeBuilder* builder);
odb::dbInst* insertDelayBuffer(odb::dbInst* driver,
int index,
const std::string& clockName,
int locX,
int locY);
Expand Down Expand Up @@ -232,6 +244,11 @@ class TritonCTS
// root buffer and sink bufer candidates
std::vector<std::string> rootBuffers_;
std::vector<std::string> sinkBuffers_;

// register tree root buffer indices
unsigned regTreeRootBufIndex_ = 0;
// index for delay buffer added for latency adjustment
unsigned delayBufIndex_ = 0;
};

} // namespace cts
2 changes: 1 addition & 1 deletion src/cts/src/CtsOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class CtsOptions
std::vector<odb::dbNet*> clockNetsObjs_;
utl::Logger* logger_ = nullptr;
stt::SteinerTreeBuilder* sttBuilder_ = nullptr;
bool obsAware_ = false;
bool obsAware_ = true;
bool applyNDR_ = false;
bool insertionDelay_ = true;
bool bufferListInferred_ = false;
Expand Down
9 changes: 9 additions & 0 deletions src/cts/src/TreeBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ class TreeBuilder
void setTopBufferDelay(float delay) { topBufferDelay_ = delay; }
odb::dbInst* getTopBuffer() const { return topBuffer_; }
void setTopBuffer(odb::dbInst* inst) { topBuffer_ = inst; }
std::string getTopBufferName() const { return topBufferName_; }
void setTopBufferName(std::string name) { topBufferName_ = name; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]

src/cts/src/TreeBuilder.h:43:

- #include <vector>
+ #include <utility>
+ #include <vector>
Suggested change
void setTopBufferName(std::string name) { topBufferName_ = name; }
void setTopBufferName(std::string name) { topBufferName_ = std::move(name); }

odb::dbNet* getTopInputNet() const { return topInputNet_; }
void setTopInputNet(odb::dbNet* net) { topInputNet_ = net; }
odb::dbNet* getDrivingNet() const { return drivingNet_; }
void setDrivingNet(odb::dbNet* net) { drivingNet_ = net; }

protected:
CtsOptions* options_ = nullptr;
Expand Down Expand Up @@ -276,6 +282,9 @@ class TreeBuilder
float aveArrival_ = 0.0;
float topBufferDelay_ = 0.0;
odb::dbInst* topBuffer_ = nullptr;
std::string topBufferName_;
odb::dbNet* drivingNet_ = nullptr;
odb::dbNet* topInputNet_ = nullptr;
};

} // namespace cts
Loading
Loading