Skip to content

Commit

Permalink
Change CI to build cvv spike
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioOpenHWGroup committed Oct 26, 2023
1 parent e678902 commit b63b170
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,34 @@ name: ci
on: [push, pull_request]

jobs:
riscv-tests:
name: riscv-tests
build-riscv-tests:
name: build-riscv-tests
runs-on: ubuntu-latest
env:
RISCV: /riscv
NUM_JOBS: 16
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Prepare
run: ci/setup.sh
execute-riscv-tests:
name: execute-riscv-tests
runs-on: ubuntu-latest
strategy:
matrix:
testcase: [asm-tests, mul, amo, fp, benchmarks]
target: [cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb]
env:
RISCV: /riscv
needs:
build-riscv-tests
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Prepare
run: ci/setup.sh
- name: run tests
run: make run-${{ matrix.testcase}}-verilator target=${{ matrix.target }}
- name: Run Tests
run: |
ls -la tools
make run-${{ matrix.testcase}}-verilator target=${{ matrix.target }}
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ VCOM ?= vcom$(questa_version)
VLIB ?= vlib$(questa_version)
VMAP ?= vmap$(questa_version)
# verilator version
verilator ?= $(PWD)/tmp/verilator-v5.008/verilator/bin/verilator
VERILATOR_INSTALL_DIR ?= $(PWD)/tmp/verilator-v5.008/verilator/
verilator ?= verilator
# traget option
target-options ?=
# additional defines
Expand Down
10 changes: 6 additions & 4 deletions ci/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
export ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
export ROOT_PROJECT=$ROOT

export PATH=$RISCV/bin:/bin:$PATH
export LIBRARY_PATH=$RISCV/lib
Expand All @@ -15,13 +16,14 @@ sudo apt install device-tree-compiler

ci/make-tmp.sh

ci/install-verilator.sh

sudo mkdir -p $RISCV && sudo chmod 777 $RISCV
RISCV64_UNKNOWN_ELF_GCC=riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14.tar.gz
if [ ! -f "$RISCV64_UNKNOWN_ELF_GCC" ]; then
wget https://static.dev.sifive.com/dev-tools/$RISCV64_UNKNOWN_ELF_GCC
fi
tar -x -f $RISCV64_UNKNOWN_ELF_GCC --strip-components=1 -C $RISCV
ci/install-fesvr.sh

sudo apt install libfl-dev help2man

source verif/regress/install-cva6.sh
ci/build-riscv-tests.sh
3 changes: 2 additions & 1 deletion verif/regress/install-verilator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Original Author: Jean-Roch COULON - Thales

if [ -z "$NUM_JOBS" ]; then
NUM_JOBS=1
NUM_JOBS=4
fi

# Ensure the location of tools is known (usually, .../core-v-verif/tools).
Expand Down Expand Up @@ -51,6 +51,7 @@ if [ ! -f "$VERILATOR_INSTALL_DIR/bin/verilator" ]; then
echo "VERILATOR_BRANCH=$VERILATOR_BRANCH"
echo "VERILATOR_HASH=$VERILATOR_HASH"
echo "VERILATOR_PATCH=$VERILATOR_PATCH"
echo "NUM_JOBS=$NUM_JOBS"
mkdir -p $VERILATOR_BUILD_DIR
cd $VERILATOR_BUILD_DIR
# Clone only if the ".git" directory does not exist.
Expand Down

0 comments on commit b63b170

Please sign in to comment.