diff --git a/.dockerignore b/.dockerignore index 93af49793..8240dff87 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,12 +12,12 @@ !/openfpga/openfpga !/vpr/libvpr.a !/vpr/vpr -!/yosys/share/ -!/yosys/yosys -!/yosys/yosys-abc -!/yosys/yosys-config -!/yosys/yosys-filterlib -!/yosys/yosys-smtbmc +!/yosys/install/share/ +!/yosys/install/bin/yosys +!/yosys/install/bin/yosys-abc +!/yosys/install/bin/yosys-config +!/yosys/install/bin/yosys-filterlib +!/yosys/install/bin/yosys-smtbmc !/openfpga_flow !/openfpga.sh !/openfpga_flow/ diff --git a/.gitmodules b/.gitmodules index 6aab6298c..e0a20dae3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = yosys url = https://github.com/YosysHQ/yosys branch = release-branch-0.10 + ignore = dirty +[submodule "yosys-plugins"] + path = yosys-plugins + url = https://github.com/SymbiFlow/yosys-symbiflow-plugins diff --git a/CMakeLists.txt b/CMakeLists.txt index a6a055ba1..36655e110 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,13 +231,27 @@ include(CheckCXXCompilerFlag) add_custom_target( yosys ALL COMMAND $(MAKE) config-gcc - COMMAND $(MAKE) + COMMAND make clean + COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys COMMENT "Compile Yosys with given Makefile" ) # yosys compilation ends +# yosys-plugins compilation starts +add_custom_target( + yosys-plugins ALL + COMMAND $(MAKE) clean YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install + COMMAND $(MAKE) install YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install/bin/yosys + #DEPENDS yosys + COMMENT "Compile Yosys-plugins with given Makefile" +) + +add_dependencies(yosys-plugins yosys) + # run make to extract compiler options, linker options and list of source files #add_custom_target( # yosys diff --git a/openfpga_flow/misc/fpgaflow_default_tool_path.conf b/openfpga_flow/misc/fpgaflow_default_tool_path.conf index 91108dbac..b0b25b100 100644 --- a/openfpga_flow/misc/fpgaflow_default_tool_path.conf +++ b/openfpga_flow/misc/fpgaflow_default_tool_path.conf @@ -1,10 +1,10 @@ # Standard Configuration Example [CAD_TOOLS_PATH] openfpga_shell_path = ${PATH:OPENFPGA_PATH}/openfpga/openfpga -yosys_path = ${PATH:OPENFPGA_PATH}/yosys/yosys +yosys_path = ${PATH:OPENFPGA_PATH}/yosys/install/bin/yosys misc_dir = ${PATH:OPENFPGA_PATH}/openfpga_flow/misc odin2_path = ${PATH:OPENFPGA_PATH}/openfpga_flow/not_used_atm/odin2.exe -abc_path = ${PATH:OPENFPGA_PATH}/yosys/yosys-abc +abc_path = ${PATH:OPENFPGA_PATH}/yosys/install/bin/yosys-abc abc_mccl_path = ${PATH:OPENFPGA_PATH}/abc_with_bb_support/abc abc_with_bb_support_path = ${PATH:OPENFPGA_PATH}/abc_with_bb_support/abc vpr_path = ${PATH:OPENFPGA_PATH}/vpr/vpr diff --git a/openfpga_flow/misc/qlf_yosys.ys b/openfpga_flow/misc/qlf_yosys.ys index 587769941..843f2e6cd 100644 --- a/openfpga_flow/misc/qlf_yosys.ys +++ b/openfpga_flow/misc/qlf_yosys.ys @@ -1,4 +1,7 @@ # Yosys synthesis script for ${TOP_MODULE} + +plugin -i ql-qlf + # Read verilog files ${READ_VERILOG_FILE}