Skip to content

Commit caba2ce

Browse files
committed
Fixed errors with building with yosys submodule included and fixed executable errors.
1 parent fc07748 commit caba2ce

File tree

4 files changed

+16
-97
lines changed

4 files changed

+16
-97
lines changed

CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -420,18 +420,7 @@ if(${WITH_PARMYS}) # define cmake params to compile Yosys
420420
# else()
421421
# set(CUSTOM_BUILD_PARALLEL_LEVEL "${CMAKE_BUILD_PARALLEL_LEVEL}")
422422
# endif()
423-
# execute_process(
424-
# COMMAND ${GIT_EXECUTABLE} submodule update --init yosys
425-
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}#/yosys
426-
# RESULT_VARIABLE _submod_ret
427-
# OUTPUT_QUIET
428-
# ERROR_QUIET
429-
# )
430-
# if(NOT _submod_ret EQUAL 0)
431-
# message(FATAL_ERROR
432-
# "Failed to `git submodule update --init --recursive` in ${CMAKE_CURRENT_SOURCE_DIR}/yosys")
433-
# endif()
434-
add_subdirectory(cmake/yosys)
423+
#add_subdirectory(yosys)
435424
endif()
436425

437426
add_subdirectory(libs) #libs/CMakeLists.txt handles adding warnings flags to non-external libraries

cmake/yosys/CMakeLists.txt

Lines changed: 0 additions & 72 deletions
This file was deleted.

libs/EXTERNAL/CMakeLists.txt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ if (${WITH_PARMYS})
4343
#project(yosys_wrapper NONE)
4444

4545
# Create a target out of the library compilation result
46-
SET(YOSYS_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/yosys CACHE PATH "")
47-
SET(YOSYS_BUILD_DIR ${CMAKE_BINARY_DIR}/yosys CACHE PATH "")
46+
SET(YOSYS_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/yosys)
47+
SET(YOSYS_BUILD_DIR ${CMAKE_BINARY_DIR}/yosys)
4848

4949
set(CURRENT_CPPFLAGS "$(CPPFLAGS)-w")
5050
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
@@ -69,23 +69,25 @@ if (${WITH_PARMYS})
6969
# endif()
7070

7171
# how to build the result of the library
72-
add_custom_command(OUTPUT yosys-bin
72+
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/yosys
7373
COMMAND ${MAKE_PROGRAM} -C ${YOSYS_SRC_DIR}
7474
ENABLE_ABC=0
75-
PREFIX=${YOSYS_BUILD_DIR}
76-
COMMAND
75+
PREFIX=${CMAKE_BINARY_DIR}
76+
#> /dev/null
77+
#COMMAND
7778
# -j${CUSTOM_BUILD_PARALLEL_LEVEL}
78-
> /dev/null
79+
#> /dev/null
7980

80-
COMMAND ${MAKE_PROGRAM} -C ${YOSYS_SRC_DIR}
81-
install ENABLE_ABC=0
82-
PREFIX=${YOSYS_BUILD_DIR}
83-
> /dev/null
81+
COMMAND ${MAKE_PROGRAM}
82+
-C ${YOSYS_SRC_DIR}
83+
install
84+
ENABLE_ABC=0
85+
PREFIX=${CMAKE_BINARY_DIR}
86+
#> /dev/null
8487

8588
WORKING_DIRECTORY ${YOSYS_SRC_DIR})
8689

87-
add_custom_target(yosys ALL DEPENDS yosys-bin)
88-
90+
add_custom_target(yosys ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/yosys)
8991

9092
if (${SYNLIG_SYSTEMVERILOG})
9193

parmys/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ add_library(parmys SHARED
1919
)
2020
target_include_directories(parmys PUBLIC ${LIB_INCLUDE_DIRS})
2121
target_include_directories(parmys PUBLIC ${LIB_INCLUDE_DIRS_O})
22-
target_include_directories(parmys PUBLIC ${VTR_SOURCE_DIR}/yosys/share/include)
22+
target_include_directories(parmys PUBLIC ${VTR_SOURCE_DIR}/libs/EXTERNAL/yosys/share/include)
2323

2424
add_definitions("-D_YOSYS_")
2525
add_dependencies(parmys yosys)

0 commit comments

Comments
 (0)