Skip to content

Commit 658a560

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenROAD into secure-fix-cts-del-modnet
Signed-off-by: Jaehyun Kim <[email protected]>
2 parents 2ba7938 + 713a212 commit 658a560

File tree

182 files changed

+294911
-1438
lines changed

Some content is hidden

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

182 files changed

+294911
-1438
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ TAGS
2121
Makefile
2222
__pycache__
2323
venv/
24+
.abc_history
2425

2526
include/ord/Version.hh
2627

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ OPENROAD_LIBRARY_DEPS = [
5050
":ord",
5151
"//src/ant",
5252
"//src/ant:ui",
53+
"//src/cgt",
5354
"//src/cts",
5455
"//src/cts:ui",
56+
"//src/cut",
5557
"//src/dbSta",
5658
"//src/dbSta:ui",
5759
"//src/dft",

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
196196
maven.install(
197197
name = "openroad_maven",
198198
artifacts = [
199-
"org.chipsalliance:chisel_2.13:7.0.0-RC3",
200-
"org.chipsalliance:chisel-plugin_2.13.16:7.0.0-RC3",
199+
"org.chipsalliance:chisel_2.13:7.0.0",
200+
"org.chipsalliance:chisel-plugin_2.13.16:7.0.0",
201201
],
202202
repositories = [
203203
"https://repo1.maven.org/maven2",

docs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ entries:
6262
title: Static Timing Analyzer (external)
6363
- file: main/src/rsz/README
6464
title: Gate Resizing
65+
- file: main/src/cgt/README
66+
title: Clock gating
6567
- file: main/src/dpl/README
6668
title: Detailed Placement
6769
- file: main/src/cts/README

include/ord/Design.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ namespace tap {
6363
class Tapcell;
6464
}
6565

66+
namespace cgt {
67+
class ClockGating;
68+
}
69+
6670
namespace cts {
6771
class TritonCTS;
6872
}
@@ -157,6 +161,7 @@ class Design
157161

158162
// Services
159163
ant::AntennaChecker* getAntennaChecker();
164+
cgt::ClockGating* getClockGating();
160165
cts::TritonCTS* getTritonCts();
161166
dft::Dft* getDft();
162167
dpl::Opendp* getOpendp();

include/ord/OpenRoad.hh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ namespace ppl {
3535
class IOPlacer;
3636
}
3737

38+
namespace cgt {
39+
class ClockGating;
40+
}
41+
3842
namespace rmp {
3943
class Restructure;
4044
}
@@ -146,6 +150,7 @@ class OpenRoad
146150
odb::dbDatabase* getDb() { return db_; }
147151
sta::dbSta* getSta() { return sta_; }
148152
sta::dbNetwork* getDbNetwork();
153+
cgt::ClockGating* getClockGating() { return clock_gating_; }
149154
rsz::Resizer* getResizer() { return resizer_; }
150155
rmp::Restructure* getRestructure() { return restructure_; }
151156
cts::TritonCTS* getTritonCts() { return tritonCts_; }
@@ -252,6 +257,7 @@ class OpenRoad
252257
mpl::MacroPlacer* macro_placer_ = nullptr;
253258
exa::Example* example_ = nullptr;
254259
grt::GlobalRouter* global_router_ = nullptr;
260+
cgt::ClockGating* clock_gating_ = nullptr;
255261
rmp::Restructure* restructure_ = nullptr;
256262
cts::TritonCTS* tritonCts_ = nullptr;
257263
tap::Tapcell* tapcell_ = nullptr;
@@ -278,5 +284,6 @@ class OpenRoad
278284

279285
int tclAppInit(Tcl_Interp* interp);
280286
int tclInit(Tcl_Interp* interp);
287+
void abcInit();
281288

282289
} // namespace ord

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ add_subdirectory(exa)
264264
add_subdirectory(fin)
265265
add_subdirectory(ppl)
266266
add_subdirectory(rmp)
267+
add_subdirectory(cgt)
267268
add_subdirectory(cts)
269+
add_subdirectory(cut)
268270
add_subdirectory(grt)
269271
add_subdirectory(tap)
270272
add_subdirectory(rcx)
@@ -328,7 +330,9 @@ target_link_libraries(openroad
328330
odbtcl
329331
rcx
330332
rmp
333+
cgt
331334
cts
335+
cut
332336
grt
333337
tap
334338
gui
@@ -409,6 +413,7 @@ if (Python3_FOUND AND BUILD_PYTHON)
409413
exa_py
410414
ppl_py
411415
tap_py
416+
cgt_py
412417
cts_py
413418
drt_py
414419
fin_py

src/Design.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ tap::Tapcell* Design::getTapcell()
273273
return getOpenRoad()->getTapcell();
274274
}
275275

276+
cgt::ClockGating* Design::getClockGating()
277+
{
278+
return getOpenRoad()->getClockGating();
279+
}
280+
276281
cts::TritonCTS* Design::getTritonCts()
277282
{
278283
return getOpenRoad()->getTritonCts();

src/Main.cc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ using std::string;
6767
X(par) \
6868
X(rcx) \
6969
X(rmp) \
70+
X(cgt) \
7071
X(stt) \
7172
X(psm) \
7273
X(pdn) \
@@ -88,6 +89,7 @@ static const char* log_filename = nullptr;
8889
static const char* metrics_filename = nullptr;
8990
static bool no_settings = false;
9091
static bool minimize = false;
92+
static bool abc_initialized = false;
9193

9294
static const char* init_filename = ".openroad";
9395

@@ -167,6 +169,12 @@ static void initPython()
167169
}
168170
#endif
169171

172+
namespace abc {
173+
// Forward declare instead of including to avoid warnings from ABC
174+
void Abc_Start();
175+
void Abc_Stop();
176+
} // namespace abc
177+
170178
static volatile sig_atomic_t fatal_error_in_progress = 0;
171179

172180
// When we enter through main() we have a single tech and design.
@@ -301,6 +309,10 @@ int main(int argc, char* argv[])
301309
// Set argc to 1 so Tcl_Main doesn't source any files.
302310
// Tcl_Main never returns.
303311
Tcl_Main(1, argv, ord::tclAppInit);
312+
313+
if (abc_initialized) {
314+
abc::Abc_Stop();
315+
}
304316
return 0;
305317
}
306318

@@ -516,6 +528,14 @@ int ord::tclInit(Tcl_Interp* interp)
516528
return tclAppInit(cmd_argc, cmd_argv, init_filename, interp);
517529
}
518530

531+
void ord::abcInit()
532+
{
533+
if (!abc_initialized) {
534+
abc::Abc_Start();
535+
abc_initialized = true;
536+
}
537+
}
538+
519539
static void showUsage(const char* prog, const char* init_filename)
520540
{
521541
printf("Usage: %s [-help] [-version] [-no_init] [-no_splash] [-exit] ", prog);

src/OpenRoad.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#endif
2121

2222
#include "ant/MakeAntennaChecker.hh"
23+
#include "cgt/MakeClockGating.h"
2324
#include "cts/MakeTritoncts.h"
2425
#include "db_sta/MakeDbSta.hh"
2526
#include "db_sta/dbNetwork.hh"
@@ -104,6 +105,7 @@ OpenRoad::~OpenRoad()
104105
deleteOpendp(opendp_);
105106
deleteGlobalRouter(global_router_);
106107
deleteRestructure(restructure_);
108+
deleteClockGating(clock_gating_);
107109
deleteTritonCts(tritonCts_);
108110
deleteTapcell(tapcell_);
109111
deleteMacroPlacer(macro_placer_);
@@ -179,6 +181,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
179181
finale_ = fin::makeFinale();
180182
global_router_ = grt::makeGlobalRouter();
181183
restructure_ = rmp::makeRestructure();
184+
clock_gating_ = cgt::makeClockGating();
182185
tritonCts_ = cts::makeTritonCts();
183186
tapcell_ = tap::makeTapcell();
184187
macro_placer_ = mpl::makeMacroPlacer();
@@ -259,6 +262,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
259262
resizer_,
260263
estimate_parasitics_,
261264
tcl_interp);
265+
cgt::initClockGating(clock_gating_, tcl_interp, logger_, sta_);
262266
initTritonRoute(detailed_router_,
263267
db_,
264268
logger_,

0 commit comments

Comments
 (0)