Skip to content

Commit 875a5f0

Browse files
authored
Merge pull request #81 from siliconcompiler/rm-sub
remove dependence on openroad
2 parents 097e633 + 4a1baa7 commit 875a5f0

File tree

109 files changed

+77265
-27
lines changed

Some content is hidden

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

109 files changed

+77265
-27
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "siliconcompiler"]
2-
path = siliconcompiler
3-
url = ../siliconcompiler

CMakeLists.txt

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,6 @@ find_package(PythonLibs)
1313
find_package(PythonExtensions)
1414
find_package(Cython REQUIRED)
1515

16-
set(TOOLS_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/siliconcompiler/siliconcompiler/toolscripts/_tools.py)
17-
18-
execute_process(
19-
COMMAND python3 ${TOOLS_SCRIPT} --tool openroad --field git-url
20-
OUTPUT_VARIABLE openroad_URL
21-
)
22-
string(STRIP ${openroad_URL} openroad_URL)
23-
execute_process(
24-
COMMAND python3 ${TOOLS_SCRIPT} --tool openroad --field git-commit
25-
OUTPUT_VARIABLE openroad_COMMIT
26-
)
27-
string(STRIP ${openroad_COMMIT} openroad_COMMIT)
28-
29-
include(FetchContent)
30-
FetchContent_Declare(openroad
31-
GIT_REPOSITORY ${openroad_URL}
32-
GIT_TAG ${openroad_COMMIT}
33-
CONFIGURE_COMMAND ""
34-
BUILD_COMMAND ""
35-
)
36-
3716
# Needed to find *.pxd file
3817
include_directories(${CMAKE_CURRENT_LIST_DIR}/sc_leflib)
3918

@@ -62,9 +41,8 @@ if(NOT WIN32)
6241
target_compile_options(_leflib PRIVATE -Wall -Werror -Wno-error=deprecated-declarations)
6342
endif()
6443

65-
FetchContent_Populate(openroad)
6644
# Stuff to include Si2 LEF library
67-
set(LEF_DIR ${openroad_SOURCE_DIR}/src/odb/src/lef)
45+
set(LEF_DIR ${CMAKE_CURRENT_LIST_DIR}/lef)
6846

6947
# this lets us include lef headers
7048
include_directories(${LEF_DIR}/lef)

lef/CMakeLists.txt

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# BISON and ZLIB are required to compile LEF/LEF Parsers.
2+
find_package(BISON REQUIRED)
3+
find_package(ZLIB)
4+
5+
bison_target(lef_parser
6+
${CMAKE_CURRENT_SOURCE_DIR}/lef/lef.y
7+
${CMAKE_CURRENT_BINARY_DIR}/lef_parser.cpp
8+
COMPILE_FLAGS "--name-prefix=lefyy"
9+
)
10+
11+
############################################################
12+
# Create a library for LEF
13+
############################################################
14+
add_library(lef
15+
lef/crypt.cpp
16+
lef/lefiArray.cpp
17+
lef/lefiCrossTalk.cpp
18+
lef/lefiDebug.cpp
19+
lef/lefiEncryptInt.cpp
20+
lef/lefiLayer.cpp
21+
lef/lefiMacro.cpp
22+
lef/lefiMisc.cpp
23+
lef/lefiNonDefault.cpp
24+
lef/lefiProp.cpp
25+
lef/lefiPropType.cpp
26+
lef/lefiTBExt.cpp
27+
lef/lefiUnits.cpp
28+
lef/lefiVia.cpp
29+
lef/lefiViaRule.cpp
30+
lef/lef_keywords.cpp
31+
lef/lefrCallbacks.cpp
32+
lef/lefrData.cpp
33+
lef/lefrReader.cpp
34+
lef/lefrSettings.cpp
35+
lef/lefwWriterCalls.cpp
36+
lef/lefwWriter.cpp
37+
${BISON_lef_parser_OUTPUT_SOURCE}
38+
)
39+
40+
add_library(lefzlib
41+
lefzlib/lefzlib.cpp
42+
)
43+
44+
set_target_properties(lef lefzlib
45+
PROPERTIES
46+
# python regression requirement
47+
POSITION_INDEPENDENT_CODE ON
48+
)
49+
50+
# include directory settings
51+
target_include_directories(lef
52+
PUBLIC
53+
lef
54+
PRIVATE
55+
${CMAKE_CURRENT_BINARY_DIR} # for lef_parser.hpp
56+
)
57+
58+
target_include_directories(lefzlib
59+
PUBLIC
60+
lef
61+
lefzlib
62+
)
63+
target_link_libraries(lefzlib
64+
PUBLIC
65+
ZLIB::ZLIB
66+
)
67+
68+
target_compile_options(lef
69+
PRIVATE
70+
$<$<CXX_COMPILER_ID:GNU>:-Wno-class-memaccess>
71+
)

lef/LICENSE.TXT

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2012 - 2017, Cadence Design Systems
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

lef/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lefdefReadme.txt

lef/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Si2 LEF parser 5.8-p027 with CMake support
2+
3+
See lefdefReadme.txt
4+
5+
Source files:
6+
https://github.com/The-OpenROAD-Project/OpenROAD.git
7+
0fbd4d94c81ef070249ad9d9037a740d0c6e58fa

0 commit comments

Comments
 (0)