diff options
-rwxr-xr-x | .github/ci/build_interchange.sh | 4 | ||||
-rw-r--r-- | .github/workflows/interchange_ci.yml | 39 | ||||
-rw-r--r-- | fpga_interchange/examples/chipdb.cmake | 7 | ||||
-rw-r--r-- | nexus/fasm.cc | 5 |
4 files changed, 45 insertions, 10 deletions
diff --git a/.github/ci/build_interchange.sh b/.github/ci/build_interchange.sh index d20dba67..1d2ee9dc 100755 --- a/.github/ci/build_interchange.sh +++ b/.github/ci/build_interchange.sh @@ -19,10 +19,10 @@ function build_capnp { # Install latest Yosys function build_yosys { - git clone https://github.com/YosysHQ/yosys.git + DESTDIR=`pwd`/.yosys pushd yosys make -j`nproc` - sudo make install + sudo make install DESTDIR=$DESTDIR popd } diff --git a/.github/workflows/interchange_ci.yml b/.github/workflows/interchange_ci.yml index 8b16d795..4639b261 100644 --- a/.github/workflows/interchange_ci.yml +++ b/.github/workflows/interchange_ci.yml @@ -21,11 +21,22 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 - - name: Execute build yosys script + - name: Get yosys + run: git clone https://github.com/YosysHQ/yosys.git + + - name: Cache yosys installation + uses: actions/cache@v2 + id: cache-yosys + with: + path: .yosys + key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }} + + - name: Build yosys run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source ./.github/ci/build_interchange.sh build_yosys + if: steps.cache-yosys.outputs.cache-hit != 'true' Build-nextpnr: runs-on: ubuntu-latest @@ -45,7 +56,7 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 - - name: Execute build interchange script + - name: Execute build nextpnr run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source ./.github/ci/build_interchange.sh @@ -73,23 +84,39 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 + - name: Get yosys + run: git clone https://github.com/YosysHQ/yosys.git + + - name: Cache yosys installation + uses: actions/cache@v2 + id: cache-yosys + with: + path: .yosys + key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }} + + - name: Build yosys + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + source ./.github/ci/build_interchange.sh + build_yosys + if: steps.cache-yosys.outputs.cache-hit != 'true' + - name: Execute build interchange script env: RAPIDWRIGHT_PATH: ${{ github.workspace }}/RapidWright INTERCHANGE_SCHEMA_PATH: ${{ github.workspace }}/3rdparty/fpga-interchange-schema/interchange PYTHON_INTERCHANGE_PATH: ${{ github.workspace }}/python-fpga-interchange PYTHON_INTERCHANGE_TAG: v0.0.4 - run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source ./.github/ci/build_interchange.sh - build_yosys && build_nextpnr && get_dependencies + build_nextpnr && get_dependencies - name: Run tests env: DEVICE: ${{ matrix.device }} run: | + export PATH="$GITHUB_WORKSPACE/.yosys/usr/local/bin:$PATH" + which yosys cd build - make chipdb-$DEVICE-bin-check-test-data - make chipdb-$DEVICE-bin-check make all-$DEVICE-tests -j`nproc` diff --git a/fpga_interchange/examples/chipdb.cmake b/fpga_interchange/examples/chipdb.cmake index 9f2cf28c..4705c0bc 100644 --- a/fpga_interchange/examples/chipdb.cmake +++ b/fpga_interchange/examples/chipdb.cmake @@ -392,6 +392,11 @@ function(generate_chipdb) add_dependencies(all-${family}-archcheck-tests chipdb-${device}-bin-check-test-data chipdb-${device}-bin-check) # All tests targets for this device are added to this target - add_custom_target(all-${device}-tests) + add_custom_target( + all-${device}-tests + DEPENDS + chipdb-${device}-bin-check-test-data + chipdb-${device}-bin-check + ) endfunction() diff --git a/nexus/fasm.cc b/nexus/fasm.cc index d802712d..6fcfbb5d 100644 --- a/nexus/fasm.cc +++ b/nexus/fasm.cc @@ -32,8 +32,9 @@ struct NexusFasmWriter const Context *ctx; std::ostream &out; std::vector<std::string> fasm_ctx; + bool is_lifcl_17; - NexusFasmWriter(const Context *ctx, std::ostream &out) : ctx(ctx), out(out) {} + NexusFasmWriter(const Context *ctx, std::ostream &out) : ctx(ctx), out(out), is_lifcl_17(ctx->args.device.find("LIFCL-17") != std::string::npos) {} // Add a 'dot' prefix to the FASM context stack void push(const std::string &x) { fasm_ctx.push_back(x); } @@ -736,6 +737,8 @@ struct NexusFasmWriter pop(); } else { + if (is_lifcl_17 && (i != 0) && (i != 1)) + continue; // 3.3V banks, this should eventually be set based on the bank config write_bit(stringf("GLOBAL.BANK%d.VCC.3V3", i)); } |