Skip to content

Commit 96ed974

Browse files
committed
Merge last 2.x upstream version
2 parents 1c0d031 + 6f7f47b commit 96ed974

1,941 files changed

Lines changed: 14415265 additions & 226023 deletions

File tree

Some content is hidden

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

.github/workflows/main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ jobs:
3434
uses: ffurrer2/extract-release-notes@v1
3535

3636
- name: Tag
37+
id: create_tag
3738
if: github.ref == 'refs/heads/master'
38-
run: |
39-
git tag ${{ steps.get_version.outputs.version }}
40-
git push origin ${{ steps.get_version.outputs.version }}
39+
uses: mathieudutour/github-tag-action@v5.5
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
42+
custom_tag: ${{ steps.get_version.outputs.version }}
43+
create_annotated_tag: True
44+
tag_prefix: ''
4145

4246
- name: Build PDF
4347
id: build_pdf

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: test
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
pull_request:
9+
branches: [ master ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
check-version:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: actions-ecosystem/action-get-latest-tag@v1
22+
id: get-latest-tag
23+
24+
- name: version check
25+
run: |
26+
export CHNGVER=$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md);
27+
echo "CHANGELOG VERSION: $CHNGVER"
28+
export TAGVER=${{ steps.get-latest-tag.outputs.tag }};
29+
echo "TAG VERSION: $TAGVER"
30+
if [ "$CHNGVER" = "$TAGVER" ]; then
31+
echo "No changelog update."
32+
exit 1
33+
else
34+
echo "Changelog updated."
35+
fi

CHANGELOG.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,85 @@
11
# CHANGELOG
22

3+
4+
## [2.7.4] - 2022-04-18
5+
- Clean fflags in F* macros
6+
- Update rv32i_m/F and rv64i_m/D signatures
7+
8+
## [2.7.3] - 2022-03-31
9+
- Update framework to support test suite compilation with LLVM.
10+
11+
## [2.7.2] - 2022-03-18
12+
- Add sigalign based changes to F&D sigupd macros.
13+
- Add helper macro to check offset legality.
14+
15+
16+
## [2.7.1] - 2022-03-18
17+
- Fix bug in auto-offset update for SIGUPD macros.
18+
19+
## [2.7.0] - 2022-03-15
20+
- Updated K Crypto (Scalar) instructions for the V.1.0.0 ratified spec.
21+
- changed xperm.n -> xperm4 and xperm.b -> xperm8 instructions
22+
- removed unsupported packu
23+
24+
## [2.6.3] - 2022-03-04
25+
- import and synchronize P-ext changes in arch_test.h from riscv-ctg
26+
- automatically adjust base and offset if offset gets too big
27+
28+
29+
## [2.6.2] - 2022-02-24
30+
- modified verify.sh to ignore comments in reference signature during diff operation [#230]
31+
- udpated test-format spec to include the order of lines in the signature file [#214]
32+
- RVTEST_E macro to be enabled for all rv32E tests. [#227]
33+
34+
## [2.6.1] - 2021-11-25
35+
- Fixed RVTEST_FP_ENABLE macro for the issue #223
36+
37+
## [2.6.0] - 2021-10-21
38+
- Added rv64d tests, references, coverage files and data propagation reports
39+
- removed unwated re-assignment of macros for RV64F combination in `arch_test.h`
40+
- fixed rvtest-case strings for flw and fsw tests in rv32if suite
41+
42+
## [2.5.4] - 2021-10-20
43+
- Second Fix for the issue #206
44+
45+
## [2.5.3] - 2021-10-15
46+
- fix the lower case `i` in the `RVTEST_CASE` macros used in the shift operation tests.
47+
48+
## [2.5.2] - 2021-10-14
49+
- update format for aes32 and sm4 instructions
50+
- update reference signature for sha256 and sm3 instructions in rv64i_m/K_unratified
51+
- delete zip and unzip tests in rv64i_m/K_unratified
52+
- update tests for aes64ks1i, sm4ed and sm4ks to use byte_count with overlap = "Y" to improve the coverage of S-boxes
53+
54+
## [2.5.1] - 2021-10-07
55+
- added styles files to the F coverage report directories.
56+
57+
## [2.5.0] - 2021-10-01
58+
- Added rv32f tests, references, coverage files and data propagation reports
59+
- fixed broken links in READMEs across the repo.
60+
- corrected string "EBREAK" in io string macro to "ECALL" for ecall.S tests. #207
61+
- fixed typo `.alive` --> `.align` in `riscv-target/example_target/model_test.h`.
62+
63+
## [2.4.7] - 2021-10-01
64+
- Fix for the issue #206
65+
66+
## [2.4.6] - 2021-08-02
67+
- Added rv32e tests in riscv-test-suite
68+
69+
## [2.4.5] - 2021-07-29
70+
- fix for issue #195
71+
72+
## [2.4.4] - 2021-07-19
73+
- Annotating tags during releases
74+
75+
## [2.4.3] - 2021-05-20
76+
- added new 64-bit K crypto tests as per the test-plan presented by the scalar crypto task group
77+
[here](https://github.com/riscv/riscv-crypto/blob/d89dfee25780f79c162da4eb69cd9076dd701c88/tests/compliance/test-plan-scalar.adoc)
78+
- added new 32-bit K crypto tests as per the above mentioned test-plan.
79+
- added coverage and data propagation reports for the above tests.
80+
- updated README in riscv-test-suite
81+
- added missing semi-colon in example target Makefile.include files
82+
383
## [2.4.2] - 2021-04-20
484
- changed all occurances of SPTBR to the new name SATP
585

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,17 @@ Special cases:
2121

2222
---
2323

24-
# RISC-V Architecture Test SIG
2524

25+
# :red_circle: IMPORTANT DISCLAIMER :red_circle:
26+
27+
The current default branch [master] will be completely replaced with branch [riscof-dev](https://github.com/riscv-non-isa/riscv-arch-test/tree/riscof-dev) on **1st MAY 2022**.
28+
This transition essentially migrates the current framework to the RISCOF framework.
29+
This provides a much richer and configurable environment for targets to test their compatibility.
30+
The current framework will be archived and **NO LONGER SUPPORTED AFTER 1st MAY 2022.**
31+
It is therefore recommended that ALL model/target owners migrate their targets to the riscof environment ASAP.
32+
More information on porting your target to RISCOF is available here: https://riscof.readthedocs.io/en/stable/
33+
34+
# RISC-V Architecture Test SIG
2635

2736
This is a repository for the work of the RISC-V Foundation Architecture Test SIG. The repository owners are:
2837

@@ -37,6 +46,7 @@ For more details on the test format spec see: [spec/TestFormatSpec.adoc](spec/Te
3746

3847
For contributions and reporting issues please refer to [CONTRIBUTION.md](CONTRIBUTION.md)
3948

49+
4050
## Test Disclaimers
4151

4252
The following are the exhaustive list of disclaimers that can be used as waivers by target owners
@@ -53,7 +63,7 @@ when reporting the status of pass/fail on the execution of the architectural sui
5363
have compressed extension support enabled by default. Targets without the compressed extension
5464
support will fail the following tests:
5565
1. rv[32/64]i_m/privilege/src/misalign-b[ge[u],lt[u],eq,ne]-01.S
56-
2. rv[32/64]i_m/privilege/src/misalign[1,2]-jalr-01.S
66+
2. rv[32/64]i_m/privilege/src/misalign2-jalr-01.S
5767

5868
3. The machine mode trap handler used in the privilege tests assumes one of the following conditions.
5969
Targets not satisfying any of the following conditions are bound to fail the entire
@@ -88,9 +98,9 @@ The files [`COPYING.BSD`](./COPYING.BSD), [`COPYING.APACHE`](./COPYING.APACHE) a
8898

8999
## Quick Links:
90100

91-
- RISCOF \[[DOCS](https://riscof.readthedocs.io/en/latest/)\] \[[REPO](https://gitlab.com/incoresemi/riscof/)\]: This is the next version of the architectural test framework currently under development
92-
- RISCV-ISAC \[[DOCS](https://riscv-isac.readthedocs.io/en/latest/index.html)\] \[[REPO](https://github.com/riscv/riscv-isac)\] : This is an ISA level coverage extraction tool for RISC-V which used to generate the coverage statistics of the architectural tests.
93-
- RISCV-CTG: \[[DOCS](https://riscv-ctg.readthedocs.io/en/latest/index.html)\]\[[REPO](https://github.com/riscv/riscv-ctg)\]: This is a RISC-V Architectural Test generator used to generate some of the tests already checked into this repository. Docs to be updated soon !!
101+
- RISCOF \[[DOCS](https://riscof.readthedocs.io/en/latest/)\] \[[REPO](https://github.com/riscv-software-src/riscof)\]: This is the next version of the architectural test framework currently under development
102+
- RISCV-ISAC \[[DOCS](https://riscv-isac.readthedocs.io/en/latest/index.html)\] \[[REPO](https://github.com/riscv-software-src/riscv-isac)\] : This is an ISA level coverage extraction tool for RISC-V which used to generate the coverage statistics of the architectural tests.
103+
- RISCV-CTG: \[[DOCS](https://riscv-ctg.readthedocs.io/en/latest/index.html)\]\[[REPO](https://github.com/riscv-software-src/riscv-ctg)\]: This is a RISC-V Architectural Test generator used to generate some of the tests already checked into this repository.
94104
- [Videos](https://youtu.be/VIW1or1Oubo): This Global Forum 2020 video provides an introduction to the above mentioned tools
95105
- [riscvOVPsim](https://github.com/riscv-ovpsim/imperas-riscv-tests): Imperas freeware RISC-V reference simulator for compliance testing
96106
- [riscvOVPsimPlus](https://www.ovpworld.org/riscvOVPsimPlus/): Imperas enhanced freeware RISC-V reference simulator for test development and verification

riscv-target/example-target/device/rv32i_m/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COMPILE_CMD=\
2020
$$(RISCV_OBJCOPY) -O binary $$@ $$@.bin
2121

2222
OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \
23-
$$(RISCV_OBJDUMP) $$@ --source > $$@.debug \
23+
$$(RISCV_OBJDUMP) $$@ --source > $$@.debug; \
2424
$$(RISCV_READELF) -a $$@ > $$@.readelf
2525

2626

riscv-target/example-target/device/rv64i_m/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COMPILE_CMD=\
2020
$$(RISCV_OBJCOPY) -O binary $$@ $$@.bin
2121

2222
OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \
23-
$$(RISCV_OBJDUMP) $$@ --source-comment="// " > $$@.debug \
23+
$$(RISCV_OBJDUMP) $$@ --source-comment="// " > $$@.debug; \
2424
$$(RISCV_READELF) -a $$@ > $$@.readelf
2525

2626

riscv-target/example-target/model_test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
//TODO: declare the end of the signature region here. Add other target specific contents here.
2626
#define RVMODEL_DATA_END \
27-
.alive 4; .global end_signature; end_signature: \
27+
.align 4; .global end_signature; end_signature: \
2828
RVMODEL_DATA_SECTION
2929

3030

riscv-target/ibex/device/rv32i_m/K

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../rv32imc/
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
TARGET_SIM ?= riscv_sim_RV32 -V
2+
TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS)
3+
ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),)
4+
$(error Target simulator executable '$(TARGET_SIM)` not found)
5+
endif
6+
7+
RUN_CMD=\
8+
$(TARGET_SIM) $(TARGET_FLAGS) \
9+
--test-signature=$(*).signature.output \
10+
$(<)
11+
12+
RISCV_PREFIX ?= riscv32-unknown-elf-
13+
RISCV_GCC ?= $(RISCV_PREFIX)gcc
14+
RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump
15+
RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES)
16+
17+
COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \
18+
-I$(ROOTDIR)/riscv-test-suite/env/ \
19+
-I$(TARGETDIR)/$(RISCV_TARGET)/ \
20+
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \
21+
$$(<) -o $$@
22+
OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \
23+
$$(RISCV_OBJDUMP) $$@ --source > $$@.debug
24+
25+
26+
COMPILE_TARGET=\
27+
$(COMPILE_CMD); \
28+
if [ $$$$? -ne 0 ] ; \
29+
then \
30+
echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \
31+
exit 1 ; \
32+
fi ; \
33+
$(OBJ_CMD); \
34+
if [ $$$$? -ne 0 ] ; \
35+
then \
36+
echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \
37+
exit 1 ; \
38+
fi ;
39+
40+
RUN_TARGET=\
41+
$(RUN_CMD)

riscv-test-env/verify.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ do
2828
echo -e "Check $(printf %-24s ${stub}) \e[33m ... IGNORE \e[39m"
2929
continue
3030
fi
31-
diff --ignore-case --strip-trailing-cr ${ref} ${sig} &> /dev/null
31+
#diff --ignore-case --strip-trailing-cr ${ref} ${sig} &> /dev/null
32+
diff --ignore-case --ignore-trailing-space --strip-trailing-cr <(grep -o '^[^#]*' ${ref}) ${sig} &> /dev/null
3233
if [ $? == 0 ]
3334
then
3435
echo -e "\e[32m ... OK \e[39m"

0 commit comments

Comments
 (0)