Skip to content

Commit f194f73

Browse files
committed
Merge branch 'master' into latest_working_branch
2 parents f5b77e9 + 1015e1f commit f194f73

File tree

134 files changed

+11179
-3384
lines changed

Some content is hidden

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

134 files changed

+11179
-3384
lines changed

docker/Dockerfile.binary

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ FROM $copyImage AS copyfrom
1212

1313
FROM $fromImage
1414

15-
COPY --from=copyfrom /OpenROAD/build/src/openroad /usr/bin/.
15+
COPY --from=copyfrom /OpenROAD/build/bin/openroad /usr/bin/.
1616

1717
ENTRYPOINT [ "openroad" ]

docs/user/Build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Please refer to the instructions for installing prebuilt binaries
5050
## Build Locally
5151

5252
The default build type is `RELEASE` to compile optimized code.
53-
The resulting executable is in `build/src/openroad`.
53+
The resulting executable is in `build/bin/openroad`.
5454

5555
Optional CMake variables passed as `-D<var>=<value>` arguments to CMake are show below.
5656

etc/DockerHelper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ _test() {
144144
_create
145145
fi
146146
if [[ "${testTarget}" == "smoke" ]]; then
147-
docker run --rm "${imagePath}" bash -c './build/src/openroad -help'
147+
docker run --rm "${imagePath}" bash -c './build/bin/openroad -help'
148148
else
149149
docker run --rm "${imagePath}" "./docker/test_wrapper.sh" "${compiler}" "ctest --test-dir build -j ${numThreads}"
150150
fi

jenkins/Jenkinsfile.nightly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ node {
4747
stage("Run ${name}") {
4848
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
4949
timeout(time: 8, unit: 'HOURS') {
50-
sh "python3 src/drt/test/run-ispd.py --program ${WORKSPACE}/build/src/openroad --tests ispd${ispd_year}_test${test_to_run}";
50+
sh "python3 src/drt/test/run-ispd.py --program ${WORKSPACE}/build/bin/openroad --tests ispd${ispd_year}_test${test_to_run}";
5151
}
5252
}
5353
}

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ add_executable(openroad
289289
${OPENROAD_SOURCE}
290290
)
291291

292+
set_target_properties(openroad PROPERTIES
293+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
294+
)
295+
292296
target_compile_options(openroad
293297
PRIVATE
294298
-Wextra -pedantic -Wcast-qual

src/README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ write_db filename
156156

157157
| Switch Name | Description |
158158
| ----- | ----- |
159-
| `filename` | Path to the file to be read, if the filename ends with `.gz` the file will be comprssed using gzip. |
159+
| `filename` | Path to the file to be written, if the filename ends with `.gz` the file will be compressed using gzip. |
160160

161161
### Examples
162162
```
@@ -195,6 +195,32 @@ write_abstract_lef -bloat_factor 3 reg1_abstract.lef
195195
write_abstract_lef -bloat_occupied_layers reg1_abstract.lef
196196
```
197197

198+
## Write CDL netlist
199+
200+
To export the CDL netlist to disk.
201+
202+
``` tcl
203+
write_cdl
204+
-masters list_of_cdl_files
205+
[-include_fillers]
206+
filename
207+
```
208+
### Options
209+
210+
| Switch Name | Description |
211+
| ----- | ----- |
212+
| `-masters` | List of CDL netlist dependencies. |
213+
| `[-include_fillers]` | Export fillers to the CDL netlist |
214+
| `filename` | Path to the file to be written, if the filename ends with `.gz` the file will be compressed using gzip. |
215+
216+
### Examples
217+
```
218+
write_cdl -master {netlist1.cdl netlist2.cdl ...} -include_fillers netlist.cdl
219+
220+
# To write a database file with gzip compression.
221+
write_cdl -master {netlist1.cdl netlist2.cdl ...} -include_fillers netlist.cdl.gz
222+
```
223+
198224
### Global Connections
199225

200226
#### Add global connections

src/cts/src/CtsOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ class CtsOptions : public odb::dbBlockCallBackObj
350350
std::string dummyload_prefix_ = "clkload";
351351
MasterCount dummy_count_;
352352
bool repairClockNets_ = false;
353-
NdrStrategy ndrStrategy_ = NdrStrategy::NONE;
353+
NdrStrategy ndrStrategy_ = NdrStrategy::HALF;
354354
};
355355

356356
} // namespace cts

src/cts/src/TritonCTS.cpp

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ std::vector<int> TritonCTS::getAllClockTreeLevels(Clock& clockNet)
15821582
std::set<int> uniqueLevels;
15831583

15841584
clockNet.forEachSubNet([&](ClockSubNet& subNet) {
1585-
if (!subNet.isLeafLevel()) {
1585+
if (!subNet.isLeafLevel() && subNet.getTreeLevel() != -1) {
15861586
uniqueLevels.insert(subNet.getTreeLevel());
15871587
}
15881588
});
@@ -1704,13 +1704,19 @@ void TritonCTS::writeClockNDRsToDb(TreeBuilder* builder)
17041704
int defaultWidth = layer->getWidth();
17051705
layerRule->setSpacing(defaultSpace * 2);
17061706
layerRule->setWidth(defaultWidth);
1707-
// clang-format off
1708-
debugPrint(logger_, CTS, "clustering", 1, " NDR rule set to layer {} {} as "
1709-
"space={} width={} vs. default space={} width={}",
1710-
i, layer->getName(),
1711-
layerRule->getSpacing(), layerRule->getWidth(),
1712-
defaultSpace, defaultWidth);
1713-
// clang-format on
1707+
1708+
debugPrint(logger_,
1709+
CTS,
1710+
"clustering",
1711+
1,
1712+
" NDR rule set to layer {} {} as space={} width={} vs. default "
1713+
"space={} width={}",
1714+
i,
1715+
layer->getName(),
1716+
layerRule->getSpacing(),
1717+
layerRule->getWidth(),
1718+
defaultSpace,
1719+
defaultWidth);
17141720
}
17151721

17161722
int clkNets = 0;
@@ -1732,12 +1738,14 @@ void TritonCTS::writeClockNDRsToDb(TreeBuilder* builder)
17321738
break;
17331739
}
17341740

1735-
logger_->info(CTS,
1736-
202,
1737-
"Non-default rule {} for double spacing has been applied to {} "
1738-
"clock nets",
1739-
ruleName,
1740-
clkNets);
1741+
debugPrint(logger_,
1742+
CTS,
1743+
"clustering",
1744+
1,
1745+
"Non-default rule {} for double spacing has been applied to {} "
1746+
"clock nets",
1747+
ruleName,
1748+
clkNets);
17411749
}
17421750

17431751
std::pair<int, int> TritonCTS::branchBufferCount(ClockInst* inst,

src/cts/test/balance_levels.defok

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,44 @@ BUSBITCHARS "[]" ;
44
DESIGN multi_sink ;
55
UNITS DISTANCE MICRONS 2000 ;
66
DIEAREA ( 0 0 ) ( 200000 200000 ) ;
7+
NONDEFAULTRULES 3 ;
8+
- CTS_NDR_0
9+
+ LAYER metal1 WIDTH 140 SPACING 260
10+
+ LAYER metal2 WIDTH 140 SPACING 280
11+
+ LAYER metal3 WIDTH 140 SPACING 280
12+
+ LAYER metal4 WIDTH 280 SPACING 560
13+
+ LAYER metal5 WIDTH 280 SPACING 560
14+
+ LAYER metal6 WIDTH 280 SPACING 560
15+
+ LAYER metal7 WIDTH 800 SPACING 1600
16+
+ LAYER metal8 WIDTH 800 SPACING 1600
17+
+ LAYER metal9 WIDTH 1600 SPACING 3200
18+
+ LAYER metal10 WIDTH 1600 SPACING 3200
19+
;
20+
- CTS_NDR_1
21+
+ LAYER metal1 WIDTH 140 SPACING 260
22+
+ LAYER metal2 WIDTH 140 SPACING 280
23+
+ LAYER metal3 WIDTH 140 SPACING 280
24+
+ LAYER metal4 WIDTH 280 SPACING 560
25+
+ LAYER metal5 WIDTH 280 SPACING 560
26+
+ LAYER metal6 WIDTH 280 SPACING 560
27+
+ LAYER metal7 WIDTH 800 SPACING 1600
28+
+ LAYER metal8 WIDTH 800 SPACING 1600
29+
+ LAYER metal9 WIDTH 1600 SPACING 3200
30+
+ LAYER metal10 WIDTH 1600 SPACING 3200
31+
;
32+
- CTS_NDR_2
33+
+ LAYER metal1 WIDTH 140 SPACING 260
34+
+ LAYER metal2 WIDTH 140 SPACING 280
35+
+ LAYER metal3 WIDTH 140 SPACING 280
36+
+ LAYER metal4 WIDTH 280 SPACING 560
37+
+ LAYER metal5 WIDTH 280 SPACING 560
38+
+ LAYER metal6 WIDTH 280 SPACING 560
39+
+ LAYER metal7 WIDTH 800 SPACING 1600
40+
+ LAYER metal8 WIDTH 800 SPACING 1600
41+
+ LAYER metal9 WIDTH 1600 SPACING 3200
42+
+ LAYER metal10 WIDTH 1600 SPACING 3200
43+
;
44+
END NONDEFAULTRULES
745
COMPONENTS 368 ;
846
- CELL/CKGATE BUF_X1 + PLACED ( 100000 100000 ) N ;
947
- clkbuf_0_CELL\/clk2 CLKBUF_X3 + SOURCE TIMING + PLACED ( 103228 140117 ) N ;
@@ -381,16 +419,16 @@ PINS 1 ;
381419
+ FIXED ( 100000 199860 ) N ;
382420
END PINS
383421
NETS 39 ;
384-
- CELL/clk2 ( clkbuf_0_CELL\/clk2 A ) ( CELL/CKGATE Z ) + USE CLOCK ;
385-
- clk ( PIN clk ) ( clkbuf_regs_0_clk A ) ( clkbuf_0_clk A ) + USE CLOCK ;
386-
- clk_regs ( clkbuf_regs_0_clk Z ) ( clkbuf_0_clk_regs A ) + USE CLOCK ;
422+
- CELL/clk2 ( clkbuf_0_CELL\/clk2 A ) ( CELL/CKGATE Z ) + USE CLOCK + NONDEFAULTRULE CTS_NDR_2 ;
423+
- clk ( PIN clk ) ( clkbuf_regs_0_clk A ) ( clkbuf_0_clk A ) + USE CLOCK + NONDEFAULTRULE CTS_NDR_0 ;
424+
- clk_regs ( clkbuf_regs_0_clk Z ) ( clkbuf_0_clk_regs A ) + USE CLOCK + NONDEFAULTRULE CTS_NDR_1 ;
387425
- clknet_0_CELL\/clk2 ( clkbuf_4_15__f_CELL\/clk2 A ) ( clkbuf_4_14__f_CELL\/clk2 A ) ( clkbuf_4_13__f_CELL\/clk2 A ) ( clkbuf_4_12__f_CELL\/clk2 A ) ( clkbuf_4_11__f_CELL\/clk2 A ) ( clkbuf_4_10__f_CELL\/clk2 A ) ( clkbuf_4_9__f_CELL\/clk2 A )
388426
( clkbuf_4_8__f_CELL\/clk2 A ) ( clkbuf_4_7__f_CELL\/clk2 A ) ( clkbuf_4_6__f_CELL\/clk2 A ) ( clkbuf_4_5__f_CELL\/clk2 A ) ( clkbuf_4_4__f_CELL\/clk2 A ) ( clkbuf_4_3__f_CELL\/clk2 A ) ( clkbuf_4_2__f_CELL\/clk2 A ) ( clkbuf_4_1__f_CELL\/clk2 A )
389-
( clkbuf_4_0__f_CELL\/clk2 A ) ( clkbuf_0_CELL\/clk2 Z ) + USE CLOCK ;
390-
- clknet_0_clk ( clkbuf_1_0__f_clk A ) ( clkbuf_0_clk Z ) + USE CLOCK ;
427+
( clkbuf_4_0__f_CELL\/clk2 A ) ( clkbuf_0_CELL\/clk2 Z ) + USE CLOCK + NONDEFAULTRULE CTS_NDR_2 ;
428+
- clknet_0_clk ( clkbuf_1_0__f_clk A ) ( clkbuf_0_clk Z ) + USE CLOCK + NONDEFAULTRULE CTS_NDR_0 ;
391429
- clknet_0_clk_regs ( clkbuf_4_15__f_clk_regs A ) ( clkbuf_4_14__f_clk_regs A ) ( clkbuf_4_13__f_clk_regs A ) ( clkbuf_4_12__f_clk_regs A ) ( clkbuf_4_11__f_clk_regs A ) ( clkbuf_4_10__f_clk_regs A ) ( clkbuf_4_9__f_clk_regs A )
392430
( clkbuf_4_8__f_clk_regs A ) ( clkbuf_4_7__f_clk_regs A ) ( clkbuf_4_6__f_clk_regs A ) ( clkbuf_4_5__f_clk_regs A ) ( clkbuf_4_4__f_clk_regs A ) ( clkbuf_4_3__f_clk_regs A ) ( clkbuf_4_2__f_clk_regs A ) ( clkbuf_4_1__f_clk_regs A )
393-
( clkbuf_4_0__f_clk_regs A ) ( clkbuf_0_clk_regs Z ) + USE CLOCK ;
431+
( clkbuf_4_0__f_clk_regs A ) ( clkbuf_0_clk_regs Z ) + USE CLOCK + NONDEFAULTRULE CTS_NDR_1 ;
394432
- clknet_1_0__leaf_clk ( CELL/CKGATE A ) ( clkbuf_1_0__f_clk Z ) + USE CLOCK ;
395433
- clknet_4_0__leaf_CELL\/clk2 ( clkload15 A ) ( ff162 CK ) ( ff163 CK ) ( ff164 CK ) ( ff165 CK ) ( ff180 CK ) ( ff181 CK )
396434
( ff182 CK ) ( ff183 CK ) ( ff184 CK ) ( clkbuf_4_0__f_CELL\/clk2 Z ) + USE CLOCK ;

src/cts/test/simple_test.ok

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
[INFO CTS-0015] Created 3 clock nets.
3535
[INFO CTS-0016] Fanout distribution for the current clock = 8:2..
3636
[INFO CTS-0017] Max level of the clock tree: 1.
37-
[INFO CTS-0202] Non-default rule CTS_NDR_0 for double spacing has been applied to 2 clock nets
3837
[INFO CTS-0098] Clock net "clk"
3938
[INFO CTS-0099] Sinks 16
4039
[INFO CTS-0100] Leaf buffers 0

0 commit comments

Comments
 (0)