Skip to content

Commit b7d5b7c

Browse files
committed
Merge branch 'act4' of https://github.com/riscv-non-isa/riscv-arch-test into Sv_ACT4
2 parents f33889a + 2f7c890 commit b7d5b7c

File tree

390 files changed

+4875
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

390 files changed

+4875
-626
lines changed

.github/workflows/regress.yml

Lines changed: 68 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,30 @@ jobs:
2222
- name: Ensure pre-commit checks pass
2323
run: uvx pre-commit run --all-files --show-diff-on-failure --color=always
2424

25+
discover-sail-configs:
26+
name: Discover Sail Configs
27+
runs-on: ubuntu-latest
28+
outputs:
29+
configs: ${{ steps.find.outputs.configs }}
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v6
33+
34+
- name: Find all sail configs
35+
id: find
36+
env:
37+
EXCLUDE: "sail-rv32e sail-rv32-max-clang sail-rv64-max-clang" # TODO: UDB does not support E yet, not all tests work with clang
38+
run: |
39+
configs=$(ls -d config/sail/*/ | xargs -n1 basename | grep -vxFf <(tr ' ' '\n' <<< "$EXCLUDE") | sort | jq -R -s -c 'split("\n") | map(select(length > 0)) | map("sail/" + .)')
40+
echo "configs=$configs" >> "$GITHUB_OUTPUT"
41+
2542
regress:
26-
name: ACT Regression (${{ matrix.config }})
43+
name: Sail Regression (${{ matrix.config }})
44+
needs: discover-sail-configs
2745
runs-on: ubuntu-latest
2846
strategy:
2947
matrix:
30-
config:
31-
[
32-
sail/sail-RVI20U32,
33-
sail/sail-RVI20U64,
34-
sail/sail-rv32-max,
35-
sail/sail-rv64-max,
36-
]
48+
config: ${{ fromJson(needs.discover-sail-configs.outputs.configs) }}
3749

3850
steps:
3951
- name: Checkout code
@@ -45,7 +57,7 @@ jobs:
4557
- name: Install sail-riscv model
4658
run: |
4759
sudo mkdir -p /usr/local
48-
curl --location https://github.com/riscv/sail-riscv/releases/download/0.9/sail-riscv-$(uname)-$(arch).tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1
60+
curl --location https://github.com/riscv/sail-riscv/releases/download/0.10/sail-riscv-$(uname)-$(arch).tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1
4961
5062
- name: Install RISC-V GCC toolchain
5163
run: curl --location https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.07.16/riscv64-elf-ubuntu-22.04-gcc-nightly-2025.07.16-nightly.tar.xz | sudo tar xvJ --directory=/usr/local --strip-components=1
@@ -57,27 +69,51 @@ jobs:
5769
run: DOCKER=1 CONFIG_FILES="config/${{ matrix.config }}/test_config.yaml" EXTENSIONS="" make --jobs $(nproc)
5870

5971
spike:
60-
name: Spike Regression (${{ matrix.target }})
72+
name: Spike Regression (${{ matrix.name }})
6173
runs-on: ubuntu-latest
74+
6275
strategy:
6376
matrix:
64-
target: [spike-rv64, spike-rv32]
77+
include:
78+
- name: rv64-max
79+
config_file: config/spike/spike-rv64-max/test_config.yaml
80+
config_name: spike-rv64-max
81+
run_cmd: spike --isa=rv64imafdcbv_zicbom_zicboz_zicbop_zicfilp_zicond_zicsr_zicclsm_zifencei_zihintntl_zihintpause_zihpm_zimop_zabha_zacas_zawrs_zfa_zfbfmin_zfh_zcb_zcmop_zbc_zkn_zks_zkr_zvfbfmin_zvfbfwma_zvfh_zvbb_zvbc_zvkg_zvkned_zvknha_zvknhb_zvksed_zvksh_zvkt_sscofpmf_smcntrpmf_sstc_svinval
82+
83+
- name: rv32-max
84+
config_file: config/spike/spike-rv32-max/test_config.yaml
85+
config_name: spike-rv32-max
86+
run_cmd: spike --isa=rv32imafdcbv_zicbom_zicboz_zicbop_zicfilp_zicond_zicsr_zicclsm_zifencei_zihintntl_zihintpause_zihpm_zimop_zabha_zacas_zawrs_zfa_zfbfmin_zfh_zcb_zcmop_zbc_zkn_zks_zkr_zvfbfmin_zvfbfwma_zvfh_zvbb_zvbc_zvkg_zvkned_zvknha_zvknhb_zvksed_zvksh_zvkt_sscofpmf_smcntrpmf_sstc_svinval
87+
88+
- name: RVI20U64
89+
config_file: config/spike/spike-RVI20U64/test_config.yaml
90+
config_name: spike-RVI20U64
91+
run_cmd: spike --isa=rv64imafdc_zicsr_zifencei_zicntr_zca_zcd_zaamo_zalrsc
92+
93+
- name: RVI20U32
94+
config_file: config/spike/spike-RVI20U32/test_config.yaml
95+
config_name: spike-RVI20U32
96+
run_cmd: spike --isa=rv32imafdc_zicsr_zifencei_zicntr_zca_zcd_zaamo_zalrsc
97+
6598
steps:
6699
- name: Checkout code
67100
uses: actions/checkout@v6
68101

69102
- name: Install Dependencies
70103
run: |
71104
sudo apt-get update
72-
sudo apt-get install -y device-tree-compiler libboost-regex-dev libboost-system-dev
105+
sudo apt-get install -y device-tree-compiler \
106+
libboost-regex-dev \
107+
libboost-system-dev
73108
74109
- name: Install the latest version of uv
75110
uses: astral-sh/setup-uv@v7
76111

77112
- name: Install sail-riscv model
78113
run: |
79114
sudo mkdir -p /usr/local
80-
curl --location https://github.com/riscv/sail-riscv/releases/download/0.9/sail-riscv-$(uname)-$(arch).tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1
115+
curl --location https://github.com/riscv/sail-riscv/releases/download/0.10/sail-riscv-$(uname)-$(arch).tar.gz \
116+
| sudo tar xvz --directory=/usr/local --strip-components=1
81117
82118
- name: Get Latest Spike Commit
83119
run: |
@@ -89,7 +125,7 @@ jobs:
89125
uses: actions/cache/restore@v4
90126
with:
91127
path: ${{ github.workspace }}/spike
92-
key: spike-${{ env.SPIKE_HASH }}-RV${{ matrix.xlen }}
128+
key: spike-${{ env.SPIKE_HASH }}
93129

94130
- name: Install Spike
95131
if: steps.cache-spike-restore.outputs.cache-hit != 'true'
@@ -104,27 +140,37 @@ jobs:
104140
105141
- name: Save cached Spike
106142
if: steps.cache-spike-restore.outputs.cache-hit != 'true'
107-
id: cache-spike-save
108143
uses: actions/cache/save@v4
109144
with:
110145
path: ${{ github.workspace }}/spike
111-
key: ${{ steps.cache-spike-restore.outputs.cache-primary-key }}
146+
key: spike-${{ env.SPIKE_HASH }}
112147

113148
- name: Add Spike to PATH
114-
run: echo $GITHUB_WORKSPACE/spike/bin >> $GITHUB_PATH
149+
run: echo "$GITHUB_WORKSPACE/spike/bin" >> $GITHUB_PATH
115150

116151
- name: Install RISC-V GCC toolchain
117-
run: curl --location https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.07.16/riscv64-elf-ubuntu-22.04-gcc-nightly-2025.07.16-nightly.tar.xz | sudo tar xvJ --directory=/usr/local --strip-components=1
152+
run: |
153+
curl --location https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.07.16/riscv64-elf-ubuntu-22.04-gcc-nightly-2025.07.16-nightly.tar.xz \
154+
| sudo tar xvJ --directory=/usr/local --strip-components=1
118155
119-
- name: Compile and run tests on Sail
120-
run: DOCKER=1 EXTENSIONS=I,M,F,D,Zca,Zcf,Zcd,Zaamo,Zalrsc,Zifencei make ${{ matrix.target }} --jobs $(nproc)
156+
- name: Build ELFs
157+
run: |
158+
DOCKER=1 \
159+
EXTENSIONS=I,M,F,D,Zca,Zcf,Zcd,Zaamo,Zalrsc,Zifencei \
160+
CONFIG_FILES=${{ matrix.config_file }} \
161+
make elfs --jobs $(nproc)
162+
163+
- name: Run Spike Tests
164+
run: |
165+
./run_tests.py "${{ matrix.run_cmd }}" \
166+
work/${{ matrix.config_name }}/elfs
121167
122168
- name: Upload logs
123169
if: always()
124170
uses: actions/upload-artifact@v4
125171
with:
126-
name: ${{ matrix.target }}-logs
127-
path: work/${{ matrix.target }}-max/logs
172+
name: ${{ matrix.name }}-logs
173+
path: work/${{ matrix.config_name }}/logs
128174

129175
vector-testgen:
130176
name: Vector Testgen

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
- id: check-merge-conflict
2626
args: ["--assume-in-merge"]
2727
exclude: \.adoc$ # sections titles Level 6 "=======" get flagged otherwise
28-
- id: check-json
28+
# - id: check-json # Doesn't support JSON with comments
2929
- id: check-toml
3030
- id: check-yaml
3131

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ spike-rv64: CONFIG_FILES = config/spike/spike-rv64-max/test_config.yaml
6262
spike-rv64: elfs
6363
./run_tests.py "spike --isa=rv64$(SPIKE_ISA)" $(WORKDIR)/spike-rv64-max/elfs
6464

65+
6566
###### Test compilation targets ######
6667
.PHONY: elfs
6768
elfs: generate-makefiles Makefile
@@ -100,7 +101,7 @@ $(STAMP_DIR)/testgen.stamp: $(TESTGEN_DEPS) $(TESTPLANS) Makefile | $(STAMP_DIR)
100101

101102
.PHONY: vector-testgen
102103
vector-testgen: $(STAMP_DIR)/vector-testgen-unpriv.stamp
103-
$(STAMP_DIR)/vector-testgen-unpriv.stamp: generators/testgen/scripts/vector-testgen-unpriv.py Makefile | $(STAMP_DIR)
104+
$(STAMP_DIR)/vector-testgen-unpriv.stamp: generators/testgen/scripts/vector-testgen-unpriv.py generators/testgen/scripts/vector_testgen_common.py Makefile | $(STAMP_DIR)
104105
$(UV_RUN) generators/testgen/scripts/vector-testgen-unpriv.py
105106
touch $@
106107

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ For more information or if you have issues installing the RISC-V toolchain, refe
107107

108108
#### 4. RISC-V Sail Reference Model
109109

110-
The ACTs use the RISC-V Sail model to generate expected results. It is currently compatible with version 0.9 of the model.
110+
The ACTs use the RISC-V Sail model to generate expected results. It is currently compatible with version 0.10 of the model.
111111

112112
To install the sail model:
113113

114114
```bash
115-
curl --location https://github.com/riscv/sail-riscv/releases/download/0.9/sail-riscv-$(uname)-$(arch).tar.gz | sudo tar xvz --directory=/path/to/install --strip-components=1
115+
curl --location https://github.com/riscv/sail-riscv/releases/download/0.10/sail-riscv-$(uname)-$(arch).tar.gz | sudo tar xvz --directory=/path/to/install --strip-components=1
116116
```
117117

118118
Add `/path/to/install/bin` to your `PATH` if you used a different directory than for the `riscv-gnu-toolchain`.

0 commit comments

Comments
 (0)