Skip to content

Commit 5c25523

Browse files
committed
Removing yosys to try again, this time in libs/EXTERNAL
1 parent b737ecd commit 5c25523

File tree

5 files changed

+71
-22
lines changed

5 files changed

+71
-22
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@
1010
[submodule "libs/EXTERNAL/libezgl"]
1111
path = libs/EXTERNAL/libezgl
1212
url = https://github.com/verilog-to-routing/ezgl.git
13-
[submodule "yosys"]
14-
path = yosys
15-
url = https://github.com/YosysHQ/yosys.git

CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -420,17 +420,17 @@ 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 submodule update --init --recursive
425-
WORKING_DIRECTORY ${CMAKE_CURRENT_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()
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()
434434
add_subdirectory(cmake/yosys)
435435
endif()
436436

cmake/yosys/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@ if(${CMAKE_GENERATOR} STREQUAL "Ninja")
1717
endif()
1818

1919
#Initialize yosys submodules
20-
#execute_process(
21-
# COMMAND git submodule update --init --recursive
22-
# WORKING_DIRECTORY ${YOSYS_SRC_DIR}
20+
execute_process(
21+
COMMAND git submodule update --init
22+
WORKING_DIRECTORY ${YOSYS_SRC_DIR}
2323
# RESULT_VARIABLE _submod_ret
2424
# OUTPUT_QUIET
2525
# ERROR_QUIET
26-
#)
27-
#if(NOT _submod_ret EQUAL 0)
26+
)
27+
execute_process(
28+
COMMAND ${GIT_EXECUTABLE} submodule foreach --recursive git\ submodule\ update\ --init
29+
WORKING_DIRECTORY ${YOSYS_SRC_DIR}
30+
)
31+
# if(NOT _submod_ret EQUAL 0)
2832
# message(FATAL_ERROR
2933
# "Failed to `git submodule update --init --recursive` in ${YOSYS_SRC_DIR}")
30-
#endif()
34+
# endif()
3135

3236
# how to build the result of the library
3337
add_custom_command(OUTPUT yosys-bin

libs/EXTERNAL/CMakeLists.txt

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,55 @@ endif ()
3838
# The VTR root CMakeFile initializes the WITH_PARMYS
3939
if (${WITH_PARMYS})
4040

41+
cmake_minimum_required(VERSION 3.16)
42+
43+
#project(yosys_wrapper NONE)
44+
45+
# 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 "")
48+
49+
set(CURRENT_CPPFLAGS "$(CPPFLAGS)-w")
50+
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
51+
set(CURRENT_CPPFLAGS "-w")
52+
endif()
53+
54+
#Initialize yosys submodules
55+
execute_process(
56+
COMMAND git submodule update --init
57+
WORKING_DIRECTORY ${YOSYS_SRC_DIR}
58+
# RESULT_VARIABLE _submod_ret
59+
# OUTPUT_QUIET
60+
# ERROR_QUIET
61+
)
62+
execute_process(
63+
COMMAND ${GIT_EXECUTABLE} submodule foreach --recursive git\ submodule\ update\ --init
64+
WORKING_DIRECTORY ${YOSYS_SRC_DIR}
65+
)
66+
# if(NOT _submod_ret EQUAL 0)
67+
# message(FATAL_ERROR
68+
# "Failed to `git submodule update --init --recursive` in ${YOSYS_SRC_DIR}")
69+
# endif()
70+
71+
# how to build the result of the library
72+
add_custom_command(OUTPUT yosys-bin
73+
COMMAND ${MAKE_PROGRAM} -C ${YOSYS_SRC_DIR}
74+
ENABLE_ABC=0
75+
PREFIX=${YOSYS_BUILD_DIR}
76+
COMMAND
77+
# -j${CUSTOM_BUILD_PARALLEL_LEVEL}
78+
> /dev/null
79+
80+
COMMAND ${MAKE_PROGRAM} -C ${YOSYS_SRC_DIR}
81+
install ENABLE_ABC=0
82+
PREFIX=${YOSYS_BUILD_DIR}
83+
> /dev/null
84+
85+
WORKING_DIRECTORY ${YOSYS_SRC_DIR})
86+
87+
add_custom_target(yosys ALL DEPENDS yosys-bin)
88+
89+
4190
if (${SYNLIG_SYSTEMVERILOG})
4291

4392
set(SURELOG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Surelog)
@@ -175,4 +224,4 @@ if (VPR_USE_SERVER)
175224
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sockpp/include>
176225
$<INSTALL_INTERFACE:include>
177226
)
178-
endif()
227+
endif()

yosys

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)