-
Notifications
You must be signed in to change notification settings - Fork 98
125 lines (109 loc) · 4.33 KB
/
xiangshan.yml
File metadata and controls
125 lines (109 loc) · 4.33 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: XiangShan Nightly Regression
on:
workflow_dispatch:
schedule:
# 14:00 UTC == 22:00 UTC+8
- cron: '00 14 * * *'
jobs:
xiangshan-pldm-sim:
strategy:
fail-fast: false
matrix:
branch: [ kunminghu-v2, kunminghu-v3 ]
topo:
- name: single
num_cores: 1
workload: "$NOOP_HOME/ready-to-run/linux.bin"
ref: "$NOOP_HOME/ready-to-run/riscv64-nemu-interpreter-so"
- name: dual
num_cores: 2
workload: "/nfs/home/share/ci-workloads/linux-hello-smp-new/bbl.bin"
ref: "$NOOP_HOME/ready-to-run/riscv64-nemu-interpreter-dual-so"
debug_args: [ "--difftest-config ZESNHP" ]
config: [ DefaultConfig ]
runs-on: self-hosted
timeout-minutes: 720
name: XS-PLDM(${{ matrix.branch }}-${{ matrix.topo.name }})
steps:
- uses: actions/checkout@v4
- name: Set Env
run: |
source /nfs/home/ci-runner/ci-runner-difftest/tools/env.sh
- name: Prepare XiangShan
run: |
cd $GITHUB_WORKSPACE/..
NOOP_HOME="$PWD/XiangShan-${{ matrix.branch }}"
echo "NOOP_HOME=$NOOP_HOME" >> "$GITHUB_ENV"
if [ ! -d "$NOOP_HOME" ]; then
git clone -b ${{ matrix.branch }} --single-branch https://github.com/OpenXiangShan/XiangShan.git $NOOP_HOME
fi
cd $NOOP_HOME
git fetch --depth=1 origin ${{ matrix.branch }}
git checkout ${{ matrix.branch }}
git reset --hard origin/${{ matrix.branch }}
rm -rf difftest && make init
rm -rf difftest && cp -r $GITHUB_WORKSPACE .
make clean
- name: Generate Verilog
run: |
cd $NOOP_HOME
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
- name: Build SIMV
run: |
cd $NOOP_HOME
make simv VCS=verilator NUM_CORES=${{ matrix.topo.num_cores }} WITH_CHISELDB=0 WITH_CONSTANTIN=0 DIFFTEST_PERFCNT=1 EMU_THREADS=16 -j200
- name: Test with Linux
run: |
cd $NOOP_HOME
ulimit -s 32768
./build/simv +workload=${{ matrix.topo.workload }} +diff=${{ matrix.topo.ref }} 2>&1 | tee pldm.log
xiangshan-fpga-sim:
strategy:
fail-fast: false
matrix:
branch: [ kunminghu-v2, kunminghu-v3 ]
runs-on: self-hosted
timeout-minutes: 720
name: XS-FPGA(${{ matrix.branch }})
steps:
- uses: actions/checkout@v4
- name: Set Env
run: |
source /nfs/home/ci-runner/ci-runner-difftest/tools/env.sh
- name: Prepare XiangShan
run: |
cd $GITHUB_WORKSPACE/..
NOOP_HOME="$PWD/XiangShan-${{ matrix.branch }}"
echo "NOOP_HOME=$NOOP_HOME" >> "$GITHUB_ENV"
if [ ! -d "$NOOP_HOME" ]; then
git clone -b ${{ matrix.branch }} --single-branch https://github.com/OpenXiangShan/XiangShan.git $NOOP_HOME
fi
cd $NOOP_HOME
git fetch --depth=1 origin ${{ matrix.branch }}
git checkout ${{ matrix.branch }}
git reset --hard origin/${{ matrix.branch }}
rm -rf difftest && make init
rm -rf difftest && cp -r $GITHUB_WORKSPACE .
make clean
- name: Generate Verilog
run: |
cd $NOOP_HOME
make sim-verilog FPGA=1 DEBUG_ARGS="--difftest-config ESBIFDU" CONFIG=FpgaDiffDefaultConfig WITH_CHISELDB=0 WITH_CONSTANTIN=0 -j200
- name: Build Fpga Host
run: |
cd $NOOP_HOME
make -C difftest fpga-build FPGA=1 FPGA_SIM=1 DIFFTEST_PERFCNT=1 -j200
- name: Build SIMV
run: |
cd $NOOP_HOME
make simv VCS=verilator FPGA_SIM=1 WITH_CHISELDB=0 WITH_CONSTANTIN=0 DIFFTEST_PERFCNT=1 EMU_THREADS=16 -j200
- name: Test with Microbench
run: |
cd $NOOP_HOME
ulimit -s 32768
bash difftest/scripts/fpga_sim/cosim.sh WORKLOAD=./ready-to-run/microbench.bin DIFF=./ready-to-run/riscv64-nemu-interpreter-so | tee fpga-microbench.log
- name: Test with Linux
run: |
cd $NOOP_HOME
ulimit -s 32768
bash difftest/scripts/fpga_sim/cosim.sh WORKLOAD=./ready-to-run/linux.bin DIFF=./ready-to-run/riscv64-nemu-interpreter-so | tee fpga-linux.log