Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate main-next #84

Merged
merged 43 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fa6140b
Added a way of injecting user module for clock gate(s)
mkurc-ant Feb 15, 2023
7f9cd4e
Corrected default WIDTH param value of rvdffppe
mkurc-ant Apr 3, 2023
0a778d6
Fixed swapped mnemonics in testbench/dasm.svi
mkurc-ant Apr 4, 2023
7992955
Initial makefile able to run RISC-V DV code in Verilated simulation a…
mkurc-ant Apr 6, 2023
39730de
End-to-end RISC-V DV flow, currently reports execution mismatch.
mkurc-ant Apr 6, 2023
ce38b5d
Reworked VeeR execution trace parser
mkurc-ant Apr 7, 2023
4c21629
Created a temporary assembly code fixup script for VeeR and integrate…
mkurc-ant Apr 11, 2023
6776f1e
Updated ld script
mkurc-ant Apr 11, 2023
25f4fb4
VeeR execution log parser terminates on first occurrence of ecall ins…
mkurc-ant Apr 11, 2023
6e9a3a9
Finalized the makefile flow
mkurc-ant Apr 11, 2023
2929272
Added RISC-V DV as a submodule
mkurc-ant Apr 12, 2023
6a64639
Changed to use RISC-V DV instruction generator available in the curre…
mkurc-ant Apr 12, 2023
be92563
Initial RISC-V DV CI
mkurc-ant Apr 12, 2023
43134ec
Merge pull request #77 from antmicro/mkurc/fix-opcode-swap
tmichalak Apr 14, 2023
2bed74b
Bumped RISC-V DV submodule
mkurc-ant Apr 14, 2023
14fc19b
Added dumping CSR writes to the execution log from testbench
mkurc-ant Apr 14, 2023
b0c6db5
Support for parsing CSR write effects from VeeR testbench execution logs
mkurc-ant Apr 13, 2023
f6e8c1f
Added VeeR-ISS (a.k.a. whisper) to the RISC-V DV verification flow
mkurc-ant Apr 13, 2023
6051027
Added using VeeR-ISS in the CI
mkurc-ant Apr 13, 2023
c291f53
Switched to RISC-V DV code generation and ISS invocation done by run.…
mkurc-ant Apr 14, 2023
83cd6c9
Integrated code fixup needed for VeeR with the RISC-V DV flow
mkurc-ant Apr 17, 2023
bf3d8e9
Fixed handling of execution corner case when a delayed effect insruct…
mkurc-ant Apr 17, 2023
fdefb36
RISC-V DV workflow tweaks
mkurc-ant Apr 17, 2023
41571a6
Merge pull request #79 from antmicro/use-riscv-dv
kgugala Apr 24, 2023
cff6273
Merge pull request #54 from antmicro/user_clock_gate
kgugala Apr 27, 2023
b3138b4
Merge pull request #76 from antmicro/mkurc/fix-rvdffppe-issue
tmichalak May 5, 2023
ee21b3c
Integrated Renode with the RISC-V DV flow
mkurc-ant May 17, 2023
88e7373
Add support for renode
mczyz-antmicro May 18, 2023
bd0ac93
Bumped RISC-V DV submodule
mkurc-ant May 22, 2023
b7c096b
Separated CI artifact packages for different ISS
mkurc-ant May 22, 2023
a583f6a
Added seeding rng in RISC-V DV to the CI
mkurc-ant May 22, 2023
f04c480
Merge pull request #82 from antmicro/mczyz/ci-renode-support
tmichalak May 22, 2023
87e5c9c
Added missing el2_pkg imports
mkurc-ant May 29, 2023
9c92613
lint: waive module-filename rule for libraries
koluckirafal Mar 30, 2023
bc76424
Merge pull request #85 from antmicro/mkurc/add-missing-imports
tmichalak Jun 1, 2023
01ba37c
Implement minimal PyUVM test environment
mczyz-antmicro Jun 5, 2023
e1e2a5f
Add mock test for faster CI debugging
mczyz-antmicro Jun 5, 2023
ef0cd6b
Run tests in CI
mczyz-antmicro Jun 5, 2023
d015ae3
Merge pull request #83 from antmicro/mczyz/rebase-pyuvm
tmichalak Jun 5, 2023
1df32bf
Bump versions of actions for node16
mczyz-antmicro Jun 16, 2023
133ee35
Revert addition of the scan_rst_l input
mkurc-ant Jun 19, 2023
0df48e1
Merge pull request #90 from antmicro/mczyz/update-riscvdv
mkurc-ant Jun 19, 2023
88e301f
Merge pull request #91 from antmicro/mkurc/sync-veer
tmichalak Jun 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
312 changes: 312 additions & 0 deletions .github/workflows/riscv-dv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,312 @@
name: RISC-V DV tests

on:
push:
pull_request:

jobs:

verilator:
name: Build Verilator
runs-on: ubuntu-latest
env:
CCACHE_DIR: "/opt/veer-el2/.cache/"
DEBIAN_FRONTEND: "noninteractive"

steps:
- name: Install prerequisities
run: |
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \
git autoconf automake autotools-dev curl python3 python3-pip \
libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex \
texinfo gperf libtool patchutils bc zlib1g zlib1g-dev libexpat-dev \
ninja-build ccache libfl2 libfl-dev

- name: Create Cache Timestamp
id: cache_timestamp
uses: nanzm/[email protected]
with:
format: 'YYYY-MM-DD-HH-mm-ss'

- name: Setup cache
uses: actions/cache@v3
timeout-minutes: 3
continue-on-error: true
with:
path: "/opt/veer-el2/.cache/"
key: cache_verilator_${{ steps.cache_timestamp.outputs.time }}
restore-keys: cache_verilator_

- name: Build Verilator
run: |
git clone https://github.com/verilator/verilator
pushd verilator
git checkout v5.002
autoconf
./configure --prefix=/opt/verilator
make -j `nproc`
make install
popd
cd /opt && tar -czvf verilator.tar.gz verilator/

- name: Store Verilator binaries
uses: actions/upload-artifact@v3
with:
name: verilator
path: /opt/*.tar.gz
retention-days: 1

#--------------#
# Renode
#--------------#
renode:
name: Download Renode
runs-on: ubuntu-latest
env:
CCACHE_DIR: "/opt/veer-el2/.cache/"
DEBIAN_FRONTEND: "noninteractive"

steps:
- name: Create Cache Timestamp
id: cache_timestamp
uses: nanzm/[email protected]
with:
format: 'YYYY-MM-DD-HH-mm-ss'

- name: Setup cache
uses: actions/cache@v3
timeout-minutes: 3
continue-on-error: true
with:
path: "/opt/veer-el2/.cache/"
key: cache_renode_${{ steps.cache_timestamp.outputs.time }}
restore-keys: cache_renode_

- name: Get latest release
uses: robinraju/[email protected]
with:
repository: "renode/renode"
latest: true
fileName: "renode-*.linux-portable.tar.gz"
extract: false

- name: Rename the archive
run: |
mv ${{ github.workspace }}/renode-*.tar.gz ${{ github.workspace }}/renode.tar.gz

- name: Store Renode binaries
uses: actions/upload-artifact@v3
with:
name: renode
path: ${{ github.workspace }}/renode.tar.gz
retention-days: 1

spike:
name: Build Spike ISS
runs-on: ubuntu-latest
env:
CCACHE_DIR: "/opt/veer-el2/.cache/"
DEBIAN_FRONTEND: "noninteractive"

steps:
- name: Install prerequisities
run: |
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \
git build-essential cmake ccache device-tree-compiler

- name: Create Cache Timestamp
id: cache_timestamp
uses: nanzm/[email protected]
with:
format: 'YYYY-MM-DD-HH-mm-ss'

- name: Setup cache
uses: actions/cache@v3
timeout-minutes: 3
continue-on-error: true
with:
path: "/opt/veer-el2/.cache/"
key: cache_spike_${{ steps.cache_timestamp.outputs.time }}
restore-keys: cache_spike_

- name: Build Spike
run: |
git clone https://github.com/riscv-software-src/riscv-isa-sim spike
export CC="ccache gcc"
export CXX="ccache g++"
pushd spike
git checkout d70ea67d
mkdir build
cd build
../configure --prefix=/opt/spike
make -j`nproc`
make install
popd
rm -rf /opt/spike/include # Remove include and lib to save space
rm -rf /opt/spike/lib
cd /opt && tar -czvf spike.tar.gz spike/

- name: Store Spike binaries
uses: actions/upload-artifact@v3
with:
name: spike
path: /opt/*.tar.gz
retention-days: 1

veer-iss:
name: Build VeeR-ISS
runs-on: ubuntu-latest
env:
CCACHE_DIR: "/opt/veer-el2/.cache/"
DEBIAN_FRONTEND: "noninteractive"

steps:
- name: Install prerequisities
run: |
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \
git build-essential ccache libboost-all-dev

- name: Create Cache Timestamp
id: cache_timestamp
uses: nanzm/[email protected]
with:
format: 'YYYY-MM-DD-HH-mm-ss'

- name: Setup cache
uses: actions/cache@v3
timeout-minutes: 3
continue-on-error: true
with:
path: "/opt/veer-el2/.cache/"
key: cache_veer-iss_${{ steps.cache_timestamp.outputs.time }}
restore-keys: cache_veer-iss_

- name: Build VeeR-ISS
run: |
git clone https://github.com/chipsalliance/VeeR-ISS veer-iss
export CC="ccache gcc"
export CXX="ccache g++"
pushd veer-iss
git checkout 666c94e
make -j`nproc`
mkdir -p /opt/veer-iss
cp build-Linux/whisper /opt/veer-iss/
popd
cd /opt && tar -czvf veer-iss.tar.gz veer-iss/

- name: Store VeeR-ISS binaries
uses: actions/upload-artifact@v3
with:
name: veer-iss
path: /opt/*.tar.gz
retention-days: 1

tests:
name: Run RISC-V DV tests
runs-on: ubuntu-latest
needs: [verilator, spike, veer-iss, renode]
strategy:
fail-fast: false
matrix:
test:
- riscv_arithmetic_basic_test
iss:
- spike
- whisper
- renode
env:
DEBIAN_FRONTEND: "noninteractive"

steps:
- name: Install utils
run: |
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \
git cpanminus ccache device-tree-compiler python3-minimal python3-pip \
libboost-all-dev gcc-riscv64-unknown-elf
sudo cpanm Bit::Vector

- name: Download Verilator binaries
uses: actions/download-artifact@v3
with:
name: verilator
path: /opt

- name: Download Renode binaries
uses: actions/download-artifact@v3
with:
name: renode
path: /opt

- name: Download Spike binaries
uses: actions/download-artifact@v3
with:
name: spike
path: /opt

- name: Download VeeR-ISS binaries
uses: actions/download-artifact@v3
with:
name: veer-iss
path: /opt

- name: Unpack binaries
run: |
pushd /opt
tar -zxvf verilator.tar.gz
tar -zxvf spike.tar.gz
tar -zxvf veer-iss.tar.gz
tar -zxvf renode.tar.gz --strip-components=1
popd

- name: Setup repository
uses: actions/checkout@v3
with:
submodules: recursive
path: veer

- name: Install Python deps
run: |
pip install -r veer/third_party/riscv-dv/requirements.txt

- name: Create Cache Timestamp
id: cache_timestamp
uses: nanzm/[email protected]
with:
format: 'YYYY-MM-DD-HH-mm-ss'

- name: Setup cache
uses: actions/cache@v3
timeout-minutes: 3
continue-on-error: true
with:
path: "/opt/veer-el2/.cache/"
key: cache_tests_${{ steps.cache_timestamp.outputs.time }}
restore-keys: cache_tests_

- name: Run test
run: |
export PATH=/opt/verilator/bin:$PATH
export PATH=/opt/veer-iss:$PATH
export RV_ROOT=`realpath veer`
export RISCV_GCC=riscv64-unknown-elf-gcc
export RISCV_OBJCOPY=riscv64-unknown-elf-objcopy
export SPIKE_PATH=/opt/spike/bin
export WHISPER_ISS=/opt/veer-iss/whisper
export RENODE_PATH=/opt/renode
${RISCV_GCC} --version

pushd ${RV_ROOT}
cd tools/riscv-dv && make -j`nproc` \
RISCV_DV_TEST=${{ matrix.test }} \
RISCV_DV_ISS=${{ matrix.iss }} \
RISCV_DV_ITER=3 \
RISCV_DV_SEED=999 \
run
popd

- name: Pack artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: artifacts-${{ matrix.test }}-${{ matrix.iss }}
path: veer/tools/riscv-dv/work/test_*
2 changes: 2 additions & 0 deletions .github/workflows/verible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ jobs:
- uses: chipsalliance/verible-linter-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
extra_args: '--waiver_files=./violations.waiver'
paths: |
./design

Loading