Skip to content

Commit 322b75f

Browse files
committed
feat(xs-nightly): test xiangshan simv with acceleration
1 parent 506a6d6 commit 322b75f

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.github/workflows/xiangshan.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: XiangShan Nightly Regression
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
schedule:
8+
# 14:00 UTC == 22:00 UTC+8
9+
- cron: '00 14 * * *'
10+
11+
jobs:
12+
xiangshan-difftest:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
# branch: [ master ]
17+
# branch: [ master, kunminghu-v3 ]
18+
branch: [ master, kmhv3-store-event ]
19+
topo:
20+
- name: single
21+
num_cores: 1
22+
workload: "$NOOP_HOME/ready-to-run/linux.bin"
23+
ref: "$NOOP_HOME/ready-to-run/riscv64-nemu-interpreter-so"
24+
- name: dual
25+
num_cores: 2
26+
workload: "/nfs/home/share/ci-workloads/linux-hello-smp-new/bbl.bin"
27+
ref: "$NOOP_HOME/ready-to-run/riscv64-nemu-interpreter-dual-so"
28+
debug_args: [ "--difftest-config ZESNHP" ]
29+
config: [ DefaultConfig ]
30+
31+
runs-on: self-hosted
32+
timeout-minutes: 720
33+
name: ${{ matrix.branch }}-${{ matrix.topo.name }}
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Set Env
38+
run: |
39+
source /nfs/home/ci-runner/ci-runner-difftest/tools/env.sh
40+
41+
- name: Check Env
42+
run: |
43+
clang --version
44+
verilator -V
45+
46+
- name: Prepare XiangShan
47+
run: |
48+
cd $GITHUB_WORKSPACE/..
49+
NOOP_HOME="$PWD/XiangShan-${{ matrix.branch }}"
50+
echo "NOOP_HOME=$NOOP_HOME" >> "$GITHUB_ENV"
51+
if [ ! -d "$NOOP_HOME" ]; then
52+
git clone -b ${{ matrix.branch }} --single-branch https://github.com/OpenXiangShan/XiangShan.git $NOOP_HOME
53+
fi
54+
cd $NOOP_HOME
55+
git fetch --depth=1 origin ${{ matrix.branch }}
56+
git checkout ${{ matrix.branch }}
57+
git reset --hard origin/${{ matrix.branch }}
58+
rm -rf difftest && make init
59+
rm -rf difftest && cp -r $GITHUB_WORKSPACE .
60+
make clean
61+
62+
- name: Generate Verilog
63+
run: |
64+
cd $NOOP_HOME
65+
make sim-verilog PLDM=1 NUM_CORES=${{ matrix.topo.num_cores }} DEBUG_ARGS="${{ matrix.debug_args }}" CONFIG=${{ matrix.config }} WITH_CHISELDB=0 WITH_CONSTANTIN=0 -j200
66+
67+
- name: Build SIMV
68+
run: |
69+
cd $NOOP_HOME
70+
make simv VCS=verilator NUM_CORES=${{ matrix.topo.num_cores }} WITH_CHISELDB=0 WITH_CONSTANTIN=0 DIFFTEST_PERFCNT=1 EMU_THREADS=16 \
71+
PGO_WORKLOAD=${{ matrix.topo.workload }} PGO_MAX_CYCLE=400000 LLVM_PROFDATA=llvm-profdata -j200
72+
73+
- name: Test with Linux
74+
run: |
75+
cd $NOOP_HOME
76+
ulimit -s 32768
77+
./build/simv +workload=${{ matrix.topo.workload }} +diff=${{ matrix.topo.ref }} 2>&1 | tee simv.log

0 commit comments

Comments
 (0)