Skip to content

Commit cdee8c9

Browse files
committed
Merge remote-tracking branch 'private/master' into gpl-extend-max-iter-by-routability
2 parents 98a18de + e3d20c6 commit cdee8c9

File tree

96 files changed

+1405
-1267
lines changed

Some content is hidden

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

96 files changed

+1405
-1267
lines changed

src/cts/src/SinkClustering.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ using utl::Logger;
2525
class Matching
2626
{
2727
public:
28-
Matching(unsigned p0, unsigned p1) : p_0(p0), p_1(p1) {}
28+
Matching(unsigned p0, unsigned p1) : p0_(p0), p1_(p1) {}
2929

30-
unsigned getP0() const { return p_0; }
31-
unsigned getP1() const { return p_1; }
30+
unsigned getP0() const { return p0_; }
31+
unsigned getP1() const { return p1_; }
3232

3333
private:
34-
const unsigned p_0;
35-
const unsigned p_1;
34+
const unsigned p0_;
35+
const unsigned p1_;
3636
};
3737

3838
class SinkClustering

src/dft/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ a result, this should be run after placement, and after `scan_replace`.
9090
execute_dft_plan
9191
```
9292

93+
### Scan Optimization
94+
95+
**Note: This is currently not implement and this command currently operates as a
96+
nop**
97+
98+
Performs scan optimizations on the design reordering the flops of the scan
99+
chains using the latest placement information.
100+
101+
102+
```tcl
103+
scan_opt
104+
```
105+
93106
## Example scripts
94107

95108
This example will create scan chains with a max length of 10 bits mixing all the
@@ -114,6 +127,7 @@ Simply run the following script:
114127
./test/regression
115128
```
116129

130+
117131
## Limitations
118132

119133
* There are no optimizations for the scan chains. This is a WIP.

src/dft/include/dft/Dft.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class Dft
8686
// Prints to stdout
8787
void reportDftConfig() const;
8888

89+
// Performs scan optimizations on the netlist
90+
void scanOpt();
91+
8992
private:
9093
// If we need to run pre_dft to create the internal state
9194
bool need_to_run_pre_dft_;

src/dft/src/Dft.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,9 @@ std::vector<std::unique_ptr<ScanChain>> Dft::scanArchitect()
177177
return scan_architect->getScanChains();
178178
}
179179

180+
void Dft::scanOpt()
181+
{
182+
logger_->warn(utl::DFT, 14, "Scan Opt is not currently implemented");
183+
}
184+
180185
} // namespace dft

src/dft/src/dft.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,9 @@ void report_dft_config() {
119119
getDft()->reportDftConfig();
120120
}
121121

122+
void scan_opt()
123+
{
124+
getDft()->scanOpt();
125+
}
126+
122127
%} // inline

src/dft/src/dft.tcl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,15 @@ proc report_dft_config { args } {
9696
sta::parse_key_args "report_dft_config" args keys {} flags {}
9797
dft::report_dft_config
9898
}
99+
100+
101+
sta::define_cmd_args "scan_opt" { }
102+
proc scan_opt { args } {
103+
sta::parse_key_args "scan_opt" args \
104+
keys {} flags {}
105+
106+
if { [ord::get_db_block] == "NULL" } {
107+
utl::error DFT 13 "No design block found."
108+
}
109+
dft::scan_opt
110+
}

src/dpl/include/dpl/OptMirror.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ class NetBox
2424
{
2525
public:
2626
NetBox() = default;
27-
NetBox(dbNet* net, Rect box, bool ignore);
27+
NetBox(dbNet* net, const Rect& box, bool ignore);
2828
int64_t hpwl();
2929
void saveBox();
3030
void restoreBox();
31+
bool isIgnore() const { return ignore_; }
32+
dbNet* getNet() const { return net_; }
33+
const Rect& getBox() const { return box_; }
3134

35+
void setBox(const Rect& box) { box_ = box; }
36+
37+
private:
3238
dbNet* net_ = nullptr;
3339
Rect box_;
3440
Rect box_saved_;

src/dpl/src/OptMirror.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using odb::dbOrientType;
2424

2525
static dbOrientType orientMirrorY(const dbOrientType& orient);
2626

27-
NetBox::NetBox(dbNet* net, Rect box, bool ignore)
27+
NetBox::NetBox(dbNet* net, const Rect& box, bool ignore)
2828
: net_(net), box_(box), ignore_(ignore)
2929
{
3030
}
@@ -118,9 +118,9 @@ std::vector<dbInst*> OptimizeMirroring::findMirrorCandidates(
118118
unordered_set<dbInst*> existing;
119119
// Find inst terms on the boundary of the net boxes.
120120
for (NetBox* net_box : net_boxes) {
121-
if (!net_box->ignore_) {
122-
dbNet* net = net_box->net_;
123-
Rect& box = net_box->box_;
121+
if (!net_box->isIgnore()) {
122+
dbNet* net = net_box->getNet();
123+
const Rect& box = net_box->getBox();
124124
for (dbITerm* iterm : net->getITerms()) {
125125
dbInst* inst = iterm->getInst();
126126
int x, y;
@@ -204,7 +204,7 @@ int64_t OptimizeMirroring::hpwl(dbInst* inst)
204204
dbNet* net = iterm->getNet();
205205
if (net) {
206206
NetBox& net_box = net_box_map_[net];
207-
if (!net_box.ignore_) {
207+
if (!net_box.isIgnore()) {
208208
inst_hpwl += net_box.hpwl();
209209
}
210210
}
@@ -218,8 +218,8 @@ void OptimizeMirroring::updateNetBoxes(dbInst* inst)
218218
dbNet* net = iterm->getNet();
219219
if (net) {
220220
NetBox& net_box = net_box_map_[net];
221-
if (!net_box.ignore_) {
222-
net_box_map_[net].box_ = net->getTermBBox();
221+
if (!net_box.isIgnore()) {
222+
net_box_map_[net].setBox(net->getTermBBox());
223223
}
224224
}
225225
}

src/dpl/src/Optdp.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,21 @@ void Opendp::improvePlacement(const int seed,
9292
// Everything done through a script string.
9393

9494
DetailedParams dtParams;
95-
dtParams.script_ = "";
95+
dtParams.script = "";
9696
// Maximum independent set matching.
97-
dtParams.script_ += "mis -p 10 -t 0.005;";
97+
dtParams.script += "mis -p 10 -t 0.005;";
9898
// Global swaps.
99-
dtParams.script_ += "gs -p 10 -t 0.005;";
99+
dtParams.script += "gs -p 10 -t 0.005;";
100100
// Vertical swaps.
101-
dtParams.script_ += "vs -p 10 -t 0.005;";
101+
dtParams.script += "vs -p 10 -t 0.005;";
102102
// Small reordering.
103-
dtParams.script_ += "ro -p 10 -t 0.005;";
103+
dtParams.script += "ro -p 10 -t 0.005;";
104104
// Random moves and swaps with hpwl as a cost function. Use
105105
// random moves and hpwl objective right now.
106-
dtParams.script_ += "default -p 5 -f 20 -gen rng -obj hpwl -cost (hpwl);";
106+
dtParams.script += "default -p 5 -f 20 -gen rng -obj hpwl -cost (hpwl);";
107107

108108
if (disallow_one_site_gaps) {
109-
dtParams.script_ += "disallow_one_site_gaps;";
109+
dtParams.script += "disallow_one_site_gaps;";
110110
}
111111

112112
// Run the script.

src/dpl/src/PlacementDRC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ bool PlacementDRC::checkBlockedLayers(const Node* cell,
156156
for (GridY y1 = y_begin; y1 < y_end; y1++) {
157157
for (GridX x1 = x_begin; x1 < x_end; x1++) {
158158
const Pixel* pixel = grid_->gridPixel(x1, y1);
159-
if (pixel != nullptr && pixel->blocked_layers_ & cell->getUsedLayers()) {
159+
if (pixel != nullptr && pixel->blocked_layers & cell->getUsedLayers()) {
160160
return false;
161161
}
162162
}
@@ -242,4 +242,4 @@ DbuX PlacementDRC::gridToDbu(const GridX grid_x, const DbuX site_width) const
242242
return DbuX(grid_x.v * site_width.v);
243243
}
244244

245-
} // namespace dpl
245+
} // namespace dpl

0 commit comments

Comments
 (0)