-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (87 loc) · 3.58 KB
/
github_run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: RISC-V Arch Tests
on:
push:
jobs:
setup:
runs-on: ubuntu-20.04
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install OSS-CAD-Suite
uses: YosysHQ/setup-oss-cad-suite@v3
- name: Run Verilator Lint
run: |
make lint_verilator
- name: Run Icarus Verilog Lint
run: |
make lint_iverilog
- name: Compile Simulation Model
run: |
cd sim
make compile
- name: Setup Python 3.6
uses: actions/setup-python@v5
with:
python-version: '3.6.7'
- name: Create and activate Python virtual environment
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
- name: Install RISCOF
run: |
source venv/bin/activate
pip install git+https://github.com/riscv/riscof.git
- name: Install Test Suite
run: |
source venv/bin/activate
riscof --verbose info arch-test --clone
sed -i '158s/TEST_JALR_OP(x7, x0, x4, -0x401, x6, 48,0)/TEST_JALR_OP(x7, x1, x4, -0x401, x6, 48,0)/' riscv-arch-test/riscv-test-suite/rv64i_m/I/src/jalr-01.S
- name: Install RISC-V GNU Toolchain
run: |
wget -nv https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12/riscv64-elf-ubuntu-20.04-gcc-nightly-2024.04.12-nightly.tar.gz -P ~/riscv-toolchain
mkdir -p ${{ github.workspace }}/rv64-gcc
tar -xzf ~/riscv-toolchain/riscv64-elf-ubuntu-20.04-gcc-nightly-2024.04.12-nightly.tar.gz -C ${{ github.workspace }}/rv64-gcc
${{ github.workspace }}/rv64-gcc/riscv/bin/riscv64-unknown-elf-gcc --version
- name: Install Sail RISC-V Emulator
run: |
mkdir -p c_emulator/
tar -xzvf bin/riscv_sim_RV64.tar.gz -C c_emulator/ riscv_sim_RV64
- name: Verify Dependency Installations
run: |
export PATH=$PATH:${{ github.workspace }}/rv64-gcc/riscv/bin:${{ github.workspace }}/c_emulator/riscv_sim_RV64
source venv/bin/activate
verilator --version
riscv64-unknown-elf-gcc --version
riscof --version
sudo apt-get install lcov -y
- name: Run RISC-V Architectural Tests
run: |
export PATH=$PATH:${{ github.workspace }}/rv64-gcc/riscv/bin:${{ github.workspace }}/c_emulator
source venv/bin/activate
riscof run --no-browser --config=config.ini --suite=${{ github.workspace }}/riscv-arch-test/riscv-test-suite/ --env=${{ github.workspace }}/riscv-arch-test/riscv-test-suite/env
# - name: Generate Reports
# if: always()
# run: |
# echo "Merging Coverage Data..."
# cd riscof_work
# verilator_coverage --write-info coverage.info rv64i_m/*/src/*/dut/coverage.dat
# echo "Generating HTML Coverage Report..."
# genhtml coverage.info -s --legend -o coverage
# - name: Upload Artifacts
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: reports
# path: |
# riscof_work/report.html
# riscof_work/style.css
# riscof_work/coverage/
# riscof_work/rv64i_m/*/src/*/dut/log.txt
# riscof_work/rv64i_m/*/src/*/dut/DUT-Lucid64.signature
# riscof_work/rv64i_m/*/src/*/ref/*.signature
# riscof_work/rv64i_m/*/src/*/ref/*.disass
# riscof_work/rv64i_m/*/src/*/ref/*.log