From 29287cca2015d99a346040b2463bc903bb85f9a7 Mon Sep 17 00:00:00 2001 From: kkumar23 Date: Tue, 7 Sep 2021 04:38:30 -0700 Subject: [PATCH] restore build.yml --- .github/workflows/build.yml | 22 +++++++++++----------- .gitmodules | 6 ++++-- CMakeLists.txt | 17 ++++++++++++++++- README.md | 4 +++- openfpga.sh | 6 ++++++ openfpga_flow/misc/qlf_yosys.ys | 2 ++ yosys | 2 +- yosys-symbiflow-plugins | 1 + 8 files changed, 44 insertions(+), 16 deletions(-) create mode 160000 yosys-symbiflow-plugins diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77ccb1527..dd6b83f13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -157,12 +157,12 @@ jobs: 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 docker_distribution: @@ -227,11 +227,11 @@ jobs: chmod +x ace2/ace chmod +x openfpga/openfpga chmod +x vpr/vpr - chmod +x yosys/yosys - chmod +x yosys/yosys-abc - chmod +x yosys/yosys-config - chmod +x yosys/yosys-filterlib - chmod +x yosys/yosys-smtbmc + chmod +x yosys/install/bin/yosys + chmod +x yosys/install/bin/yosys-abc + chmod +x yosys/install/bin/yosys-config + chmod +x yosys/install/bin/yosys-filterlib + chmod +x yosys/install/bin/yosys-smtbmc - name: ${{matrix.config.name}}_GCC-8_(Ubuntu 18.04) shell: bash run: source openfpga.sh && source openfpga_flow/regression_test_scripts/${{matrix.config.name}}.sh diff --git a/.gitmodules b/.gitmodules index 1fb1d4212..5a28c030e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,6 @@ [submodule "yosys"] path = yosys - url = https://github.com/QuickLogic-Corp/yosys.git - branch = quicklogic-rebased + url = https://github.com/symbiflow/yosys +[submodule "yosys-symbiflow-plugins"] + path = yosys-symbiflow-plugins + url = https://github.com/SymbiFlow/yosys-symbiflow-plugins diff --git a/CMakeLists.txt b/CMakeLists.txt index a6a055ba1..116c59cf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,14 +230,29 @@ include(CheckCXXCompilerFlag) # run makefile provided, we pass-on the options to the local make file add_custom_target( yosys ALL + COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install COMMAND $(MAKE) config-gcc - COMMAND $(MAKE) + 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) + COMMAND $(MAKE) install + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins + COMMENT "Compile Yosys-plugins with given Makefile" +) + +add_dependencies(yosys-plugins yosys) + +# yosys-plugins compilation ends + # run make to extract compiler options, linker options and list of source files #add_custom_target( # yosys diff --git a/README.md b/README.md index 9a9238b94..384792dc3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Getting Started with OpenFPGA +# +Getting Started with OpenFPGA [![linux build](https://github.com/LNIS-Projects/OpenFPGA/workflows/linux_build/badge.svg)](https://github.com/LNIS-Projects/OpenFPGA/actions?query=workflow%3Alinux_build) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) @@ -25,6 +26,7 @@ It also includes detailed information about docker image. ```bash # Clone the repository and go inside it git clone https://github.com/LNIS-Projects/OpenFPGA.git && cd OpenFPGA +source openfpga.sh make all ``` diff --git a/openfpga.sh b/openfpga.sh index f0ab701ee..4103c6b10 100755 --- a/openfpga.sh +++ b/openfpga.sh @@ -16,6 +16,12 @@ export OPENFPGA_SCRIPT_PATH="${OPENFPGA_PATH}/openfpga_flow/scripts" export OPENFPGA_TASK_PATH="${OPENFPGA_PATH}/openfpga_flow/tasks" if [ -z $PYTHON_EXEC ]; then export PYTHON_EXEC="python3"; fi + +# Add yosys bin folder in PATH, this is required by yosys-plugins +# to install plugins in yosys folder +export PATH="${OPENFPGA_PATH}/yosys/install/bin:${PATH}" + + # This function checks the path and # raises warning if the command is not executing # inside current OpendFPGA folder diff --git a/openfpga_flow/misc/qlf_yosys.ys b/openfpga_flow/misc/qlf_yosys.ys index 587769941..b00efe862 100644 --- a/openfpga_flow/misc/qlf_yosys.ys +++ b/openfpga_flow/misc/qlf_yosys.ys @@ -1,4 +1,6 @@ # Yosys synthesis script for ${TOP_MODULE} + +plugin -i ql-qlf # Read verilog files ${READ_VERILOG_FILE} diff --git a/yosys b/yosys index f44a4f908..b7d46be40 160000 --- a/yosys +++ b/yosys @@ -1 +1 @@ -Subproject commit f44a4f90867b49837da048f9055fdcd8a13c335b +Subproject commit b7d46be40d538f66309fc1d53a618a7fdfcdb8c8 diff --git a/yosys-symbiflow-plugins b/yosys-symbiflow-plugins new file mode 160000 index 000000000..9fad20e35 --- /dev/null +++ b/yosys-symbiflow-plugins @@ -0,0 +1 @@ +Subproject commit 9fad20e359c678ebc4674e0442afd5f7b1a4fe19