Skip to content

Commit edcc2e8

Browse files
authored
Merge pull request #10473 from The-OpenROAD-Project-staging/syn
Integrated synthesis tool
2 parents f602970 + 0c938e0 commit edcc2e8

93 files changed

Lines changed: 21003 additions & 33 deletions

Some content is hidden

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

.bazelignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ third-party/abc/
77
tmp
88
# standalone workspace for downstream consumer tests
99
test/downstream/
10+
# fmt ships its own BUILD.bazel assuming it is the workspace root; we overlay
11+
# fmt via new_local_repository(name="fmt"), so hide this nested package from
12+
# //... discovery (its glob(["include/fmt/*.h"]) matches nothing here).
13+
third-party/slang-elab/third_party/fmt/support/bazel/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "src/abc"]
55
path = third-party/abc
66
url = ../../The-OpenROAD-Project/abc.git
7+
[submodule "third-party/slang-elab"]
8+
path = third-party/slang-elab
9+
url = https://github.com/povik/yosys-slang

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ OPENROAD_LIBRARY_DEPS = [
130130
"//src/rsz:ui",
131131
"//src/stt",
132132
"//src/stt:ui",
133+
"//src/syn",
134+
"//src/syn:ui",
133135
"//src/tap",
134136
"//src/tap:ui",
135137
"//src/upf",

MODULE.bazel

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,22 @@ orfs.default(
215215
yosys_plugins = ["@yosys-slang//src/yosys_plugin:slang.so"],
216216
)
217217

218+
# --- External archives ---
219+
220+
new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")
221+
222+
new_local_repository(
223+
name = "fmt",
224+
build_file = "//third-party/slang-elab/third_party:fmt.BUILD",
225+
path = "third-party/slang-elab/third_party/fmt",
226+
)
227+
228+
new_local_repository(
229+
name = "slang",
230+
build_file = "//third-party/slang-elab/third_party:slang.BUILD",
231+
path = "third-party/slang-elab/third_party/slang",
232+
)
233+
218234
# --- Overrides ---
219235

220236
single_version_override(

include/ord/OpenRoad.hh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ namespace web {
130130
class WebServer;
131131
}
132132

133+
namespace syn {
134+
class Synthesis;
135+
}
136+
133137
namespace ord {
134138

135139
class dbVerilogNetwork;
@@ -184,6 +188,7 @@ class OpenRoad
184188
return estimate_parasitics_;
185189
}
186190
web::WebServer* getWebServer() { return web_server_; }
191+
syn::Synthesis* getSynthesis() { return synthesis_; }
187192

188193
// Return the bounding box of the db rows.
189194
odb::Rect getCore();
@@ -288,6 +293,7 @@ class OpenRoad
288293
dft::Dft* dft_ = nullptr;
289294
est::EstimateParasitics* estimate_parasitics_ = nullptr;
290295
web::WebServer* web_server_ = nullptr;
296+
syn::Synthesis* synthesis_ = nullptr;
291297
utl::ServiceRegistry* service_registry_ = nullptr;
292298

293299
int threads_ = 1;

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[tool.black]
2+
extend-exclude = '''
3+
^/third-party/
4+
'''
5+
force-exclude = '''
6+
^/third-party/
7+
'''

src/CMakeLists.txt

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ add_subdirectory(dft)
282282
add_subdirectory(mpl)
283283
add_subdirectory(par)
284284
add_subdirectory(est)
285+
add_subdirectory(syn)
285286
add_subdirectory(web)
286287

287288
################################################################
@@ -352,6 +353,7 @@ target_link_libraries(openroad
352353
mpl
353354
par
354355
est
356+
syn
355357
web
356358
gui
357359
cli_completer
@@ -403,33 +405,35 @@ if (Python3_FOUND AND BUILD_PYTHON)
403405
OpenSTA
404406
ifp
405407
)
406-
target_link_libraries(openroad
407-
ord_py
408-
odb_py
409-
ifp_py
410-
utl_py
411-
ant_py
412-
grt_py
413-
gpl_py
414-
dpl_py
415-
exa_py
416-
ppl_py
417-
tap_py
418-
cgt_py
419-
cts_py
420-
drt_py
421-
fin_py
422-
# ram_py
423-
rcx_py
424-
rmp_py
425-
stt_py
426-
psm_py
427-
pdn_py
428-
rsz_py
429-
dft_py
430-
par_py
431-
web_py
408+
set(OPENROAD_PYTHON_MODULES
409+
ord_py
410+
odb_py
411+
ifp_py
412+
utl_py
413+
ant_py
414+
grt_py
415+
gpl_py
416+
dpl_py
417+
exa_py
418+
ppl_py
419+
tap_py
420+
cgt_py
421+
cts_py
422+
drt_py
423+
fin_py
424+
# ram_py
425+
rcx_py
426+
rmp_py
427+
stt_py
428+
psm_py
429+
pdn_py
430+
rsz_py
431+
syn_py
432+
dft_py
433+
par_py
434+
web_py
432435
)
436+
target_link_libraries(openroad ${OPENROAD_PYTHON_MODULES})
433437

434438
else()
435439
message(STATUS "Python3 disabled")

src/Main.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ using std::string;
7777
X(rmp) \
7878
X(cgt) \
7979
X(stt) \
80+
X(syn) \
8081
X(psm) \
8182
X(pdn) \
8283
X(rsz) \
@@ -158,6 +159,7 @@ static void initPython()
158159
#undef X
159160
#undef FOREACH_TOOL
160161
#undef FOREACH_TOOL_WITHOUT_OPENROAD
162+
#undef FOREACH_SYN_PYTHON_TOOL
161163

162164
// Need to separately handle openroad here because we need both
163165
// the names "openroad_swig" and "openroad".

src/OpenRoad.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
#include "rsz/Resizer.hh"
8282
#include "sta/VerilogReader.hh"
8383
#include "stt/MakeSteinerTreeBuilder.h"
84+
#include "syn/MakeSynthesis.h"
85+
#include "syn/synthesis.h"
8486
#include "tap/MakeTapcell.h"
8587
#include "tap/tapcell.h"
8688
#include "upf/MakeUpf.h"
@@ -125,6 +127,7 @@ OpenRoad::~OpenRoad()
125127
// sta::deleteAllMemory();
126128
delete ioPlacer_;
127129
delete resizer_;
130+
delete synthesis_;
128131
delete opendp_;
129132
delete global_router_;
130133
delete restructure_;
@@ -235,6 +238,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
235238
global_router_,
236239
opendp_,
237240
estimate_parasitics_);
241+
synthesis_ = new syn::Synthesis(db_, sta_, resizer_, logger_);
238242
finale_ = new fin::Finale(db_, logger_);
239243
restructure_ = new rmp::Restructure(
240244
logger_, sta_, db_, resizer_, estimate_parasitics_);
@@ -285,6 +289,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
285289
upf::initUpf(tcl_interp);
286290
ifp::initInitFloorplan(tcl_interp);
287291
sta::initDbSta(tcl_interp);
292+
syn::initSynthesis(tcl_interp);
288293
rsz::initResizer(tcl_interp);
289294
ppl::initIoplacer(tcl_interp);
290295
gpl::initReplace(tcl_interp);

src/cts/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ target_include_directories(cts_lib
3636
PRIVATE
3737
.
3838
${LEMON_INCLUDE_DIRS}
39-
${Boost_INCLUDE_DIRS}
4039
)
4140

4241
target_include_directories(cts
4342
PUBLIC
4443
../include
4544
PRIVATE
4645
.
47-
${Boost_INCLUDE_DIRS}
4846
)
4947

5048
target_link_libraries(cts_lib
@@ -56,6 +54,7 @@ target_link_libraries(cts_lib
5654
OpenSTA
5755
stt_lib
5856
utl_lib
57+
Boost::headers
5958
)
6059

6160
target_link_libraries(cts
@@ -66,6 +65,7 @@ target_link_libraries(cts
6665
rsz_lib
6766
OpenSTA
6867
gui
68+
Boost::headers
6969
)
7070

7171
messages(

0 commit comments

Comments
 (0)