From e71b5eb3f4bec18854aade504fa0fe5cc8adf791 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 18:25:11 -0700 Subject: [PATCH 01/19] [Git] add OpenFPGA as a submodule --- .gitmodules | 3 +++ OpenFPGA | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 OpenFPGA diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0b17e9c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "OpenFPGA"] + path = OpenFPGA + url = https://github.com/LNIS-Projects/OpenFPGA diff --git a/OpenFPGA b/OpenFPGA new file mode 160000 index 0000000..74828ee --- /dev/null +++ b/OpenFPGA @@ -0,0 +1 @@ +Subproject commit 74828ee9ece9c6823ce04b9b5d4e1b0a168d7df5 From e7fae9a32d5207b0a7633928df72ae5fc3e3f9dc Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 18:34:04 -0700 Subject: [PATCH 02/19] [Git] Remove submodules --- .gitmodules | 3 --- OpenFPGA | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 OpenFPGA diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0b17e9c..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "OpenFPGA"] - path = OpenFPGA - url = https://github.com/LNIS-Projects/OpenFPGA diff --git a/OpenFPGA b/OpenFPGA deleted file mode 160000 index 74828ee..0000000 --- a/OpenFPGA +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 74828ee9ece9c6823ce04b9b5d4e1b0a168d7df5 From 6fe1609f91821c1e1a563344dd9dc182165794e8 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 18:51:35 -0700 Subject: [PATCH 03/19] [Test] Add CI test --- .github/workflows/build.yml | 89 +++++++++++++++++++++++++ .github/workflows/install_dependency.sh | 48 +++++++++++++ .github/workflows/quick_test.sh | 8 +++ 3 files changed, 145 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/install_dependency.sh create mode 100755 .github/workflows/quick_test.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..783413f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,89 @@ +name: linux_build + +# Run CI on +# - each push +# - each pull request +# - scheduled weekly +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0 ' # weekly + +# Environment variables +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + MAKEFLAGS: "-j8" + +# Multiple job to tests +jobs: + # Test the compilation compatibility + linux_build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + + # Branch on different OS and settings + strategy: + fail-fast: false + matrix: + config: + - { + name: "Quick Test: GCC-8 (Ubuntu 18.04)", + artifact: "OpenFPGA-basic-tests-ubuntu-18.04-gcc8-build.7z", + os: ubuntu-18.04, + cc: "gcc-8", cxx: "g++-8", + reg_script: "quick_test.sh" + } + + # Define the steps to run the build job + steps: + - name: Checkout Skywater-OpenFPGA repo + uses: actions/checkout@v2 + + - name: Checkout OpenFPGA repo + uses: actions/checkout@v2 + with: + repository: https://github.com/LNIS-Projects/OpenFPGA.git + + - name: Install dependency + run: source ./.github/workflows/install_dependency.sh + + - name: Checkout CMake version + run: cmake --version + + - name: Checkout iVerilog version + run: | + iverilog -V + vvp -V + + - name: Create CMake build environment + # Some projects don't allow in-source building, so create a separate build directory + # We'll use this as our working directory for all subsequent commands + run: cmake -E make_directory ${{GITHUB_WORKSPACE}}/OpenFPGA/build + + - name: Configure CMake + # Use a bash shell so we can use the same syntax for environment variable + # access regardless of the host operating system + shell: bash + working-directory: ${{GITHUB_WORKSPACE}}/OpenFPGA/build + # Note the current convention is to use the -S and -B options here to specify source + # and build directories, but this is only available with CMake 3.13 and higher. + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 + run: | + export CC=${{ matrix.config.cc }} + export CXX=${{ matrix.config.cxx }} + cmake ${{GITHUB_WORKSPACE}}/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + - name: Build + working-directory: ${{GITHUB_WORSPACE}}/OpenFPGA/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: | + cmake --build . --config $BUILD_TYPE + + - name: ${{matrix.config.name}} + if: contains(matrix.config.name, 'Quick Test') + shell: bash + # Execute the test. + run: source ./.github/workflows/${{matrix.config.reg_script}} diff --git a/.github/workflows/install_dependency.sh b/.github/workflows/install_dependency.sh new file mode 100644 index 0000000..0e663ef --- /dev/null +++ b/.github/workflows/install_dependency.sh @@ -0,0 +1,48 @@ +# Install all the dependency for OpenFPGA in Ubuntu-18.04 +sudo apt-get update +sudo apt-get install autoconf +sudo apt-get install automake +sudo apt-get install bash +sudo apt-get install bison +sudo apt-get install build-essential +sudo apt-get install cmake +sudo apt-get install ccache +sudo apt-get install ctags +sudo apt-get install curl +sudo apt-get install doxygen +sudo apt-get install flex +sudo apt-get install fontconfig +sudo apt-get install gdb +sudo apt-get install git +sudo apt-get install gperf +sudo apt-get install iverilog +sudo apt-get install libcairo2-dev +sudo apt-get install libevent-dev +sudo apt-get install libfontconfig1-dev +sudo apt-get install liblist-moreutils-perl +sudo apt-get install libncurses5-dev +sudo apt-get install libx11-dev +sudo apt-get install libxft-dev +sudo apt-get install libxml++2.6-dev +sudo apt-get install perl +sudo apt-get install python +sudo apt-get install python-lxml +sudo apt-get install texinfo +sudo apt-get install time +sudo apt-get install valgrind +sudo apt-get install zip +sudo apt-get install qt5-default +sudo apt-get install clang-format-7 +# Add all the supported compilers +sudo apt-get install g++-5 +sudo apt-get install gcc-5 +sudo apt-get install g++-6 +sudo apt-get install gcc-6 +sudo apt-get install g++-7 +sudo apt-get install gcc-7 +sudo apt-get install g++-8 +sudo apt-get install gcc-8 +sudo apt-get install g++-9 +sudo apt-get install gcc-9 +sudo apt-get install clang-6.0 +sudo apt-get install clang-8 diff --git a/.github/workflows/quick_test.sh b/.github/workflows/quick_test.sh new file mode 100755 index 0000000..48993ce --- /dev/null +++ b/.github/workflows/quick_test.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +############################################### +# OpenFPGA Shell with VPR8 +############################################## +python3 SCRIPT/repo_setup.py From 54dbae15037c1385a5dd0242b4177f1aa1c0c5d5 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 19:45:12 -0700 Subject: [PATCH 04/19] [CI] Try bug fix --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 783413f..62d5a4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,23 +60,23 @@ jobs: - name: Create CMake build environment # Some projects don't allow in-source building, so create a separate build directory # We'll use this as our working directory for all subsequent commands - run: cmake -E make_directory ${{GITHUB_WORKSPACE}}/OpenFPGA/build + run: cmake -E make_directory ${GITHUB_WORKSPACE}/OpenFPGA/build - name: Configure CMake # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash - working-directory: ${{GITHUB_WORKSPACE}}/OpenFPGA/build + working-directory: ${GITHUB_WORKSPACE}/OpenFPGA/build # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 run: | export CC=${{ matrix.config.cc }} export CXX=${{ matrix.config.cxx }} - cmake ${{GITHUB_WORKSPACE}}/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE + cmake ${GITHUB_WORKSPACE}/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE - name: Build - working-directory: ${{GITHUB_WORSPACE}}/OpenFPGA/build + working-directory: ${GITHUB_WORSPACE}/OpenFPGA/build shell: bash # Execute the build. You can specify a specific target with "--target " run: | From e66b2648da51f1c7091a8a2ae4e6bfb45f47aca2 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 19:47:15 -0700 Subject: [PATCH 05/19] [CI] Bug fix --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62d5a4a..49b0972 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: Checkout OpenFPGA repo uses: actions/checkout@v2 with: - repository: https://github.com/LNIS-Projects/OpenFPGA.git + repository: https://github.com/LNIS-Projects/OpenFPGA - name: Install dependency run: source ./.github/workflows/install_dependency.sh From 7cb188fc5c624e15f394bdf9234b72c194e9b05e Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 19:52:14 -0700 Subject: [PATCH 06/19] [CI] Try to give a correct repo path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49b0972..5a5da11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: Checkout OpenFPGA repo uses: actions/checkout@v2 with: - repository: https://github.com/LNIS-Projects/OpenFPGA + repository: https://github.com/LNIS-Projects/OpenFPGA/ - name: Install dependency run: source ./.github/workflows/install_dependency.sh From cf8b83e2718e5533e86abeecd54f0a77e002ac81 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 19:53:54 -0700 Subject: [PATCH 07/19] [CI] Try another format of repo address --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a5da11..784b221 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: Checkout OpenFPGA repo uses: actions/checkout@v2 with: - repository: https://github.com/LNIS-Projects/OpenFPGA/ + repository: LNIS-Projects/OpenFPGA - name: Install dependency run: source ./.github/workflows/install_dependency.sh From e19201e9dbc8d25aca989bbf3bfce870972f418f Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 19:59:38 -0700 Subject: [PATCH 08/19] [CI] Fix the wrong path to checkout OpenFPGA --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 784b221..09159fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: uses: actions/checkout@v2 with: repository: LNIS-Projects/OpenFPGA + path: ${GITHUB_WORKSPACE} - name: Install dependency run: source ./.github/workflows/install_dependency.sh From 58d4f1835c6bf4daaa24ff30d2be0c2c3945f122 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 20:01:56 -0700 Subject: [PATCH 09/19] [CI] Try to correct path when checking out OpenFPGA --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09159fa..ec33ae8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v2 with: repository: LNIS-Projects/OpenFPGA - path: ${GITHUB_WORKSPACE} + path: ../ - name: Install dependency run: source ./.github/workflows/install_dependency.sh From 27b16b36196f59f931dc12844f57d4d2119a456a Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 20:06:03 -0700 Subject: [PATCH 10/19] [CI] Bug fix --- .github/workflows/build.yml | 9 ++++----- .github/workflows/quick_test.sh | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec33ae8..ea5b943 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,6 @@ jobs: uses: actions/checkout@v2 with: repository: LNIS-Projects/OpenFPGA - path: ../ - name: Install dependency run: source ./.github/workflows/install_dependency.sh @@ -61,23 +60,23 @@ jobs: - name: Create CMake build environment # Some projects don't allow in-source building, so create a separate build directory # We'll use this as our working directory for all subsequent commands - run: cmake -E make_directory ${GITHUB_WORKSPACE}/OpenFPGA/build + run: cmake -E make_directory ${{runner.workspace}}/OpenFPGA/build - name: Configure CMake # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash - working-directory: ${GITHUB_WORKSPACE}/OpenFPGA/build + working-directory: ${{runner.workspace}}/OpenFPGA/build # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 run: | export CC=${{ matrix.config.cc }} export CXX=${{ matrix.config.cxx }} - cmake ${GITHUB_WORKSPACE}/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE + cmake .${{runner.workspace}}/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE - name: Build - working-directory: ${GITHUB_WORSPACE}/OpenFPGA/build + working-directory: ${{runner.workspace}}/OpenFPGA/build shell: bash # Execute the build. You can specify a specific target with "--target " run: | diff --git a/.github/workflows/quick_test.sh b/.github/workflows/quick_test.sh index 48993ce..c1ba391 100755 --- a/.github/workflows/quick_test.sh +++ b/.github/workflows/quick_test.sh @@ -5,4 +5,4 @@ set -e ############################################### # OpenFPGA Shell with VPR8 ############################################## -python3 SCRIPT/repo_setup.py +python3 SCRIPT/repo_setup.py --openfpga_root_path ./OpenFPGA From 582b3afa6d2658979b7deb13afee099495441cbf Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 20:14:43 -0700 Subject: [PATCH 11/19] [CI] Use native cmake build commands --- .github/workflows/build.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea5b943..efc40ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,30 +57,20 @@ jobs: iverilog -V vvp -V - - name: Create CMake build environment - # Some projects don't allow in-source building, so create a separate build directory - # We'll use this as our working directory for all subsequent commands - run: cmake -E make_directory ${{runner.workspace}}/OpenFPGA/build - - - name: Configure CMake + - name: Build # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash - working-directory: ${{runner.workspace}}/OpenFPGA/build # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 run: | export CC=${{ matrix.config.cc }} export CXX=${{ matrix.config.cxx }} - cmake .${{runner.workspace}}/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE - - - name: Build - working-directory: ${{runner.workspace}}/OpenFPGA/build - shell: bash - # Execute the build. You can specify a specific target with "--target " - run: | - cmake --build . --config $BUILD_TYPE + cd ./OpenFPGA + mkdir build + cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE + make -j2 - name: ${{matrix.config.name}} if: contains(matrix.config.name, 'Quick Test') From e0d9eb9e7f6411879dcbbe600eae9197b816fd2d Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 20:18:19 -0700 Subject: [PATCH 12/19] [CI] Add debugging info --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efc40ea..24d773a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,6 +67,7 @@ jobs: run: | export CC=${{ matrix.config.cc }} export CXX=${{ matrix.config.cxx }} + pwd cd ./OpenFPGA mkdir build cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE From ef2d19aafabe9c002e2cac90081e089d426c050b Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 20:27:41 -0700 Subject: [PATCH 13/19] [CI] Bug fix --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24d773a..7533801 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: uses: actions/checkout@v2 with: repository: LNIS-Projects/OpenFPGA + path: OpenFPGA - name: Install dependency run: source ./.github/workflows/install_dependency.sh @@ -68,6 +69,8 @@ jobs: export CC=${{ matrix.config.cc }} export CXX=${{ matrix.config.cxx }} pwd + ls + ls .. cd ./OpenFPGA mkdir build cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE From 3a6b0c18f74cf922724eaa05b3109724f4226dcb Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 20:35:56 -0700 Subject: [PATCH 14/19] [CI] Bug fix --- .github/workflows/build.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7533801..3fc3bad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,23 +58,30 @@ jobs: iverilog -V vvp -V - - name: Build + - name: Create CMake build environment + # Some projects don't allow in-source building, so create a separate build directory + # We'll use this as our working directory for all subsequent commands + run: cmake -E make_directory ${{runner.workspace}}/OpenFPGA/build + + - name: Configure CMake # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash + working-directory: ${{runner.workspace}}/OpenFPGA/build # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 run: | export CC=${{ matrix.config.cc }} export CXX=${{ matrix.config.cxx }} - pwd - ls - ls .. - cd ./OpenFPGA - mkdir build - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE - make -j2 + cmake $GITHUB_WORKSPACE/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + - name: Build + working-directory: ${{runner.workspace}}/OpenFPGA/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: | + cmake --build . --config $BUILD_TYPE - name: ${{matrix.config.name}} if: contains(matrix.config.name, 'Quick Test') From 2aa8f8142135abeb411f9ee4ec8892699801a82c Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 21:25:02 -0700 Subject: [PATCH 15/19] [CI] Add more tests --- .github/workflows/quick_test.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/quick_test.sh b/.github/workflows/quick_test.sh index c1ba391..0f953d9 100755 --- a/.github/workflows/quick_test.sh +++ b/.github/workflows/quick_test.sh @@ -5,4 +5,16 @@ set -e ############################################### # OpenFPGA Shell with VPR8 ############################################## + +############################################## +# Initialize the repository +# - Generate final version of architecture files +# - Run FPGA tasks to validate netlist generations python3 SCRIPT/repo_setup.py --openfpga_root_path ./OpenFPGA + +############################################## +# Generate post-PnR testbenches +python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.0.json +python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_reset_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.1.json +python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_softadder_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.0.json +python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_reset_softadder_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.1.json From 764e5310aa0951d62784ca713a19e745e2022551 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 21:29:15 -0700 Subject: [PATCH 16/19] [Doc] Add badges to frontpage README --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2de4f1..b7a4b0a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# skywater-openfpga +# Skywater + OpenFPGA: Open-Source FPGAs +[![linux_build](https://github.com/LNIS-Projects/skywater-openfpga/workflows/linux_build/badge.svg)](https://github.com/LNIS-Projects/skywater-openfpga/actions) +[![Documentation Status](https://readthedocs.org/projects/skywater-openfpga/badge/?version=latest)](https://skywater-openfpga.readthedocs.io/en/latest/?badge=latest) + +## Introduction + FPGA tape-outs using the open-source Skywater 130nm PDK and OpenFPGA ## Quick Start From 6d5bb2d794dccc3267b4f949af3b4f409dad67c8 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 22:38:24 -0700 Subject: [PATCH 17/19] [CI] Bug fix --- .github/workflows/quick_test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/quick_test.sh b/.github/workflows/quick_test.sh index 0f953d9..3927dcc 100755 --- a/.github/workflows/quick_test.sh +++ b/.github/workflows/quick_test.sh @@ -14,7 +14,7 @@ python3 SCRIPT/repo_setup.py --openfpga_root_path ./OpenFPGA ############################################## # Generate post-PnR testbenches -python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.0.json -python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_reset_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.1.json -python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_softadder_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.0.json -python3 generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_reset_softadder_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.1.json +python3 TESTBENCH/common/generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.0.json +python3 TESTBENCH/common/generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_reset_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.1.json +python3 TESTBENCH/common/generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_softadder_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.0.json +python3 TESTBENCH/common/generate_post_pnr_testbenches.py --pre_pnr_testbench_dir_name ./TESTBENCH/k4_N8_reset_softadder_caravel_io_FPGA_12x12_fdhd_cc --pin_assignment_file ./HDL/common/caravel_wrapper_pin_assignment_v1.1.json From 11d4b156b48b1e3a790750b519349f2fe2816743 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 22:41:29 -0700 Subject: [PATCH 18/19] [Testbench] Bug fix in finding scripts --- TESTBENCH/common/generate_post_pnr_testbenches.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TESTBENCH/common/generate_post_pnr_testbenches.py b/TESTBENCH/common/generate_post_pnr_testbenches.py index 962cdef..502905e 100644 --- a/TESTBENCH/common/generate_post_pnr_testbenches.py +++ b/TESTBENCH/common/generate_post_pnr_testbenches.py @@ -40,6 +40,7 @@ args = parser.parse_args() ##################################################################### logging.info("Finding pre-PnR testbenches..."); +script_base_dir_abspath = dirname(os.path.abspath(__file__)) pre_pnr_testbench_dir_abspath = abspath(args.pre_pnr_testbench_dir_name) + "/prepnr/verilog_testbench"; # Count how many testbenches have been converted @@ -69,7 +70,7 @@ for curr_pre_pnr_testbench_file in pre_pnr_testbench_files: logging.info("Processing " + curr_pre_pnr_testbench_file + " testbench:") curr_post_pnr_testbench_file = re.sub("_autocheck_top_tb.v$", "_post_pnr_autocheck_top_tb.v", curr_pre_pnr_testbench_file) curr_post_pnr_testbench_file = re.sub("\/prepnr\/", "\/postpnr\/", curr_post_pnr_testbench_file) - cmd = "python3 ./post_pnr_testbench_converter.py " \ + cmd = "python3 " + script_base_dir_abspath + "/post_pnr_testbench_converter.py " \ + " --pre_pnr_testbench " + curr_pre_pnr_testbench_file \ + " --post_pnr_testbench " + curr_post_pnr_testbench_file subprocess.run(cmd, shell=True, check=True) @@ -87,7 +88,7 @@ for curr_pre_pnr_testbench_file in pre_pnr_testbench_files: curr_post_pnr_testbench_file = re.sub("\/prepnr\/", "\/postpnr\/", curr_post_pnr_testbench_file) curr_wrapper_testbench_file = re.sub("_autocheck_top_tb.v$", "_wrapper_autocheck_top_tb.v", curr_post_pnr_testbench_file) logging.info("Processing " + curr_post_pnr_testbench_file + " testbench:") - cmd = "python3 ./post_pnr_wrapper_testbench_converter.py " \ + cmd = "python3 " + script_base_dir_abspath + "./post_pnr_wrapper_testbench_converter.py " \ + " --post_pnr_testbench " + curr_post_pnr_testbench_file \ + " --pin_assignment_file " + args.pin_assignment_file \ + " --wrapper_testbench " + curr_wrapper_testbench_file From d867dbb1bf6adc48bee57f17c8687afee1658147 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 1 Dec 2020 08:14:43 -0700 Subject: [PATCH 19/19] [Testbench] Bug fix in calling sub python script --- TESTBENCH/common/generate_post_pnr_testbenches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTBENCH/common/generate_post_pnr_testbenches.py b/TESTBENCH/common/generate_post_pnr_testbenches.py index 502905e..51c06f7 100644 --- a/TESTBENCH/common/generate_post_pnr_testbenches.py +++ b/TESTBENCH/common/generate_post_pnr_testbenches.py @@ -88,7 +88,7 @@ for curr_pre_pnr_testbench_file in pre_pnr_testbench_files: curr_post_pnr_testbench_file = re.sub("\/prepnr\/", "\/postpnr\/", curr_post_pnr_testbench_file) curr_wrapper_testbench_file = re.sub("_autocheck_top_tb.v$", "_wrapper_autocheck_top_tb.v", curr_post_pnr_testbench_file) logging.info("Processing " + curr_post_pnr_testbench_file + " testbench:") - cmd = "python3 " + script_base_dir_abspath + "./post_pnr_wrapper_testbench_converter.py " \ + cmd = "python3 " + script_base_dir_abspath + "/post_pnr_wrapper_testbench_converter.py " \ + " --post_pnr_testbench " + curr_post_pnr_testbench_file \ + " --pin_assignment_file " + args.pin_assignment_file \ + " --wrapper_testbench " + curr_wrapper_testbench_file