Skip to content

Commit 4a40ed9

Browse files
committed
[Infra]: install Yosys in VTR_ROOT/Yosys, in addition to the
build folder to have access to executables for using in VTR scripts (similar to other tools in VTR) Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 32d455c commit 4a40ed9

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ ODIN_II/usefull_tools/**/track_completed
100100
*.o
101101
*.a
102102

103+
#
104+
#Yosys exec dir
105+
#
106+
Yosys
107+
103108
#
104109
#Python
105110
#

libs/EXTERNAL/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ endif()
1818
# Yosys is compiled only if the user ask for it
1919
if(${ODIN_USE_YOSYS} OR ${WITH_YOSYS})
2020
add_subdirectory(libyosys)
21+
22+
# In addition to libyosys in the build folder, we copy the libyosys directory
23+
# into a temporary folder in the VTR root, name Yosys, to have access to Yosys
24+
# execs for using in VTR scripts (similar to VPR/vpr or ODIN_II/odin_II)
25+
add_custom_target(vtr-yosys ALL
26+
DEPENDS yosys
27+
COMMAND ${CMAKE_COMMAND} -E
28+
remove_directory ${VTR_SOURCE_DIR}/Yosys/
29+
COMMAND ${CMAKE_COMMAND} -E
30+
make_directory ${VTR_SOURCE_DIR}/Yosys/
31+
COMMAND ${CMAKE_COMMAND} -E
32+
copy_directory ${CMAKE_CURRENT_BINARY_DIR}/libyosys ${VTR_SOURCE_DIR}/Yosys/
33+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
34+
2135
endif()
2236

2337
if(${VTR_ENABLE_CAPNPROTO})

libs/EXTERNAL/libyosys/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ add_dependencies(libyosys yosys)
4444
# specify where the library is and where to find the headers
4545
set_target_properties(libyosys
4646
PROPERTIES PREFIX "" #Avoid extra 'lib' prefix
47-
IMPORTED_LOCATION ${LIB_FILE}
47+
IMPORTED_LOCATION ${BINARY_LIB_FILE}
4848
INTERFACE_INCLUDE_DIRECTORIES ${YOSYS_INCLUDE_DIRS})
4949

5050

vtr_flow/scripts/python_libs/vtr/paths.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
odin_output_on_error_path = odin_path / "regression_test" / ".library" / "output_on_error.conf"
1818

1919
# YOSYS paths
20-
yosys_exe_path = root_path / "libs" / "EXTERNAL" / "libyosys" / "yosys"
20+
yosys_path = root_path / "Yosys"
21+
yosys_exe_path = yosys_path / "bin" / "yosys"
2122
yosys_lib_path = vtr_flow_path / "misc" / "yosyslib"
2223
yosys_script_path = yosys_lib_path / "synthesis.tcl"
2324

0 commit comments

Comments
 (0)