Skip to content

Commit ded1d1d

Browse files
committed
pdn: add bazel BUILD
Signed-off-by: Matt Liberty <[email protected]>
1 parent 2a546b0 commit ded1d1d

File tree

3 files changed

+92
-38
lines changed

3 files changed

+92
-38
lines changed

BUILD.bazel

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ OPENROAD_LIBRARY_DEPS = [
6767
"//src/mpl",
6868
"//src/odb",
6969
"//src/pad",
70+
"//src/pdn",
7071
"//src/ppl",
7172
"//src/psm",
7273
"//src/rcx",
@@ -240,15 +241,6 @@ tcl_encode(
240241
namespace = "drt",
241242
)
242243

243-
tcl_encode(
244-
name = "pdngen_tcl",
245-
srcs = [
246-
"src/pdn/src/pdn.tcl",
247-
],
248-
char_array_name = "pdn_tcl_inits",
249-
namespace = "pdn",
250-
)
251-
252244
tcl_encode(
253245
name = "openroad_tcl",
254246
srcs = [":tcl_util"] + [
@@ -291,23 +283,6 @@ tcl_wrap_cc(
291283
],
292284
)
293285

294-
tcl_wrap_cc(
295-
name = "pdngen_swig",
296-
srcs = [
297-
"src/pdn/src/PdnGen.i",
298-
":error_swig",
299-
"//src/odb:swig_imports",
300-
],
301-
module = "pdn",
302-
namespace_prefix = "pdn",
303-
root_swig_src = "src/pdn/src/PdnGen.i",
304-
swig_includes = [
305-
"src/odb/src/swig/common",
306-
"src/odb/src/swig/tcl",
307-
"src/pdn/src",
308-
],
309-
)
310-
311286
tcl_wrap_cc(
312287
name = "openroad_swig",
313288
srcs = [

bazel/build_helper.bzl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ OPENROAD_BINARY_SRCS_WITHOUT_MAIN = [
2323
#TritonRoute
2424
":triton_route_swig",
2525
":triton_route_tcl",
26-
#PDNGen
27-
":pdngen_tcl",
28-
":pdngen_swig",
2926
#RMP
3027
":rmp_swig",
3128
":rmp_tcl",
@@ -40,8 +37,6 @@ OPENROAD_LIBRARY_HDRS_INCLUDE = [
4037
#TritonRoute
4138
"src/drt/include/triton_route/*.h",
4239
"src/drt/src/db/infra/*.hpp",
43-
#PDNGen
44-
"src/pdn/include/pdn/*.hh",
4540
#RMP
4641
"src/rmp/src/*.h",
4742
"src/rmp/include/rmp/*.h",
@@ -65,9 +60,6 @@ OPENROAD_LIBRARY_INCLUDES = [
6560
"src/drt/include/triton_route",
6661
"src/drt/src",
6762
"src/drt/include",
68-
#PDNGen
69-
"src/pdn/include",
70-
"src/pdn/include/pdn",
7163
#RMP
7264
"src/rmp/include",
7365
#dft
@@ -99,10 +91,6 @@ OPENROAD_LIBRARY_SRCS_INCLUDE = [
9991
"src/drt/src/**/*.h",
10092
"src/drt/src/**/*.cpp",
10193
"src/drt/src/**/*.cc",
102-
#PDNGen
103-
"src/pdn/src/*.cc",
104-
"src/pdn/src/*.cpp",
105-
"src/pdn/src/*.h",
10694
#RMP
10795
"src/rmp/src/*.cpp",
10896
#dft

src/pdn/BUILD

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright (c) 2025, The OpenROAD Authors
3+
4+
load("//bazel:tcl_encode_or.bzl", "tcl_encode")
5+
load("//bazel:tcl_wrap_cc.bzl", "tcl_wrap_cc")
6+
7+
package(
8+
default_visibility = ["//:__subpackages__"],
9+
features = ["layering_check"],
10+
)
11+
12+
cc_library(
13+
name = "pdn",
14+
srcs = [
15+
"src/MakePdnGen.cc",
16+
"src/PdnGen.cc",
17+
"src/connect.cpp",
18+
"src/connect.h",
19+
"src/domain.cpp",
20+
"src/domain.h",
21+
"src/grid.cpp",
22+
"src/grid.h",
23+
"src/grid_component.cpp",
24+
"src/grid_component.h",
25+
"src/power_cells.cpp",
26+
"src/power_cells.h",
27+
"src/renderer.cpp",
28+
"src/renderer.h",
29+
"src/rings.cpp",
30+
"src/rings.h",
31+
"src/shape.cpp",
32+
"src/shape.h",
33+
"src/sroute.cpp",
34+
"src/sroute.h",
35+
"src/straps.cpp",
36+
"src/straps.h",
37+
"src/techlayer.cpp",
38+
"src/techlayer.h",
39+
"src/via.cpp",
40+
"src/via.h",
41+
"src/via_repair.cpp",
42+
"src/via_repair.h",
43+
":swig",
44+
":tcl",
45+
],
46+
hdrs = [
47+
"include/pdn/MakePdnGen.hh",
48+
"include/pdn/PdnGen.hh",
49+
],
50+
copts = [
51+
"-Wno-missing-braces", # from TCL swigging
52+
],
53+
includes = [
54+
"include",
55+
],
56+
deps = [
57+
"//:ord",
58+
"//src/gui",
59+
"//src/odb",
60+
"//src/utl",
61+
"@boost.geometry",
62+
"@boost.polygon",
63+
"@tk_tcl//:tcl",
64+
],
65+
)
66+
67+
tcl_encode(
68+
name = "tcl",
69+
srcs = [
70+
"src/pdn.tcl",
71+
],
72+
char_array_name = "pdn_tcl_inits",
73+
namespace = "pdn",
74+
)
75+
76+
tcl_wrap_cc(
77+
name = "swig",
78+
srcs = [
79+
"src/PdnGen.i",
80+
"//:error_swig",
81+
],
82+
module = "pdn",
83+
namespace_prefix = "pdn",
84+
root_swig_src = "src/PdnGen.i",
85+
swig_includes = [
86+
"src/pdn/src",
87+
],
88+
deps = [
89+
"//src/odb:swig",
90+
],
91+
)

0 commit comments

Comments
 (0)