Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream repository into noop #5

Merged
merged 106 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
5e62d38
Add an exclude list for known failing Hifive1 tests (#485)
MarekVCodasip Jul 13, 2023
feddb19
debug: flushregs -> maintenance flush register-cache
timsifive Jul 13, 2023
4d2b318
Merge pull request #490 from riscv-software-src/flushregs
timsifive Jul 13, 2023
e989825
Remove old warning check in RepeatReadTest
en-sc Jul 14, 2023
1754ac4
Move `import random`
timsifive Jun 24, 2023
f6c33d7
Move "monitor targets" calls into a central place.
timsifive Jun 24, 2023
65e27a9
parkOtherHarts() already defaults to cease
timsifive Jun 24, 2023
a29522f
debug: Add support_unavailable_control property.
timsifive Jun 24, 2023
e1cb5be
Interact with OpenOCD CLI over stdin/stdout.
timsifive Jun 24, 2023
ba831d0
debug: CeaseMultiTest -> UnavailableMultiTest
timsifive Jul 6, 2023
995fa25
debug: CeaseRunTest -> UnavailableRunTest
timsifive Jul 6, 2023
90691df
debug: Create UnavailableCycleTest
timsifive Jul 6, 2023
cf5360f
Merge pull request #489 from riscv-software-src/power_dance
timsifive Jul 17, 2023
9d26a81
debug: Disable unavailable tests.
timsifive Jul 18, 2023
0ab6b90
Merge pull request #493 from riscv-software-src/disable_unavailable
timsifive Jul 18, 2023
e1f88be
debug: Only run pylint if debug files changed.
timsifive Jul 19, 2023
49ea593
debug: Better comment the privilege tests.
timsifive Jul 19, 2023
81f5ad4
Merge pull request #496 from riscv-software-src/pylint_workflow
timsifive Jul 20, 2023
87dc207
debug: Actually run tests in github workflow.
timsifive Jul 21, 2023
985acb5
Merge pull request #499 from riscv-software-src/debug_workflow
timsifive Jul 24, 2023
e63009f
debug: Re-enable unavailable tests.
timsifive Jul 18, 2023
83425c3
debug: Tolerate more whitespace from OpenOCD CLI
timsifive Jul 18, 2023
d4eaa5b
Merge pull request #497 from riscv-software-src/unavailable
timsifive Jul 24, 2023
07a5dda
debug: Add --hart command line option to gdbserver.py
timsifive Aug 29, 2023
3cc4fed
debug: Fix interrupt_all() to restore state.
timsifive Aug 29, 2023
e10e446
debug: Make Openocd.targets() tolerate blank lines.
timsifive Sep 28, 2023
4c8fab6
debug: Better interlock when interacting with gdb CLI.
timsifive Jul 25, 2023
2eb4c62
Merge pull request #505 from riscv-software-src/debug_hart
timsifive Sep 29, 2023
02c03f5
Merge pull request #506 from riscv-software-src/interrupt_all
timsifive Sep 29, 2023
85753ef
Merge pull request #507 from riscv-software-src/targets
timsifive Sep 29, 2023
903ec82
debug: Add Openocd.set_available()
timsifive Sep 28, 2023
39fc8b0
Merge pull request #509 from riscv-software-src/interlock
timsifive Sep 29, 2023
9905a43
Merge pull request #508 from riscv-software-src/set_available
timsifive Oct 3, 2023
ecf4fde
Disable timer interrupt to fix some bugs
lz-bro Sep 14, 2023
34fb040
Merge pull request #503 from lz-bro/dis_timer
timsifive Oct 11, 2023
15d7d67
debug: Document that pexpect is needed.
timsifive Oct 11, 2023
c36c814
Merge pull request #512 from riscv-software-src/pexpect
timsifive Oct 13, 2023
3366371
debug: Add UnavailableHaltedTest
timsifive Jul 18, 2023
4dfd2e7
Make CLINT address configurable
lz-bro Oct 16, 2023
57544c2
Make the non-existent csr configurable
lz-bro Oct 16, 2023
7453fe9
Merge pull request #515 from riscv-software-src/unavailable_halted2
timsifive Oct 17, 2023
a176b65
Merge pull request #514 from lz-bro/timer_configurable
timsifive Oct 17, 2023
d020e20
Merge pull request #513 from lz-bro/nonexist_csr
timsifive Oct 17, 2023
aa15f70
Support instruction count limit in IcountTest
lz-bro Oct 24, 2023
96403c8
Merge pull request #519 from lz-bro/fix_icount
timsifive Oct 25, 2023
a4d9f97
debug: use TCL-RPC to fetch results of OpenOCD commands instead of pa…
aap-sc Nov 8, 2023
bd0a19c
Merge pull request #522 from aap-sc/aap-sc/unavailable_fixup
timsifive Nov 10, 2023
4a72ca9
Disable mmu after test translate
lz-bro Jan 5, 2024
a077148
Uses appropriate addi instruction in lrsc test.
Jan 29, 2024
67e7759
Merge pull request #528 from powdr-labs/master
aswaterman Jan 30, 2024
9b04ba4
[debug tests] print selected seed for PRNG
aap-sc Jan 30, 2024
b89570c
[debug tests] add option to log GDB remote serial protocol
aap-sc Feb 1, 2024
787829a
[debug tests] fix setting of remotetimeout
aap-sc Jan 30, 2024
9e18388
Add virtual memory synchronization after completing the page tables
lz-bro Feb 2, 2024
c45a88f
Clear breakpoints so that gdb will not single step
lz-bro Feb 2, 2024
9f053a8
If Svnapot is not implemented, skip the test.
eiji-y Feb 3, 2024
ad33ed3
Merge pull request #536 from eiji-y/check_svnapot
aswaterman Feb 3, 2024
f83ba40
Check the mcontrol triggers, no other triggers.
lz-bro Feb 2, 2024
4547616
Add zba test cases
rogerchang23424 Feb 19, 2024
a3498c6
Add zbb test cases
rogerchang23424 Feb 19, 2024
879cb3c
Add zbc test cases
rogerchang23424 Feb 19, 2024
9c06101
Add zbs test cases
rogerchang23424 Feb 19, 2024
3bd02c8
Merge pull request #539 from rogerchang23424/bitmanip
aswaterman Feb 19, 2024
36b18c8
Fix breakpoint test
aswaterman Feb 19, 2024
9c3d66b
Merge pull request #526 from lz-bro/fix_TranslateTest
aswaterman Feb 29, 2024
634f172
Merge pull request #532 from lz-bro/mb_translate
aswaterman Feb 29, 2024
a7c1a56
Merge pull request #531 from aap-sc/aap-sc/improvements
en-sc Mar 1, 2024
06ca28c
Merge pull request #533 from lz-bro/fix_icount
aap-sc Mar 2, 2024
fafa5bb
Fix CI debug test using ubuntu-20.04
lz-bro Mar 5, 2024
fd01e46
ma_addr: permit access faults in lieu of misaligned exceptions
aswaterman Mar 19, 2024
6b1d737
Merge pull request #534 from lz-bro/fix_triggerDmode
aap-sc Apr 2, 2024
7f454c3
debug: Fix nonexistent trigger registers trap handle in entry.S
leesum1 Apr 17, 2024
1dde0ef
[debug tests] increase remotetimeout for all spike-based targets (#553)
aap-sc May 1, 2024
203362f
debug: Fix loading of empty exclude lists with comments
MarekVCodasip May 2, 2024
89a45c0
Merge pull request #554 from MarekVCodasip/exclusion-fix
aap-sc May 4, 2024
7dfa49b
Merge pull request #544 from lz-bro/debug-test-ubuntu-20.04
aap-sc May 4, 2024
29e6bc8
Merge pull request #549 from leesum1/trigger-fix
aap-sc May 9, 2024
084a607
Merge pull request #491 from en-sc/en-sc/warning-repeat-read
aap-sc May 13, 2024
db7e451
debug: workaround for sporadic failures of some tests due to unexpect…
aap-sc May 14, 2024
cb35777
debug: fix sporadic failures of memory sampling tests
aap-sc May 14, 2024
d3b582e
Merge pull request #556 from aap-sc/aap-sc/sampling_sporadic_failure
en-sc May 16, 2024
408e461
Merge pull request #555 from aap-sc/aap-sc/sporadic_faulure_fix
en-sc May 16, 2024
4193bb2
debug: fix HwbpManual test
en-sc May 23, 2024
fee361f
Support basic testing of more Zca instructions
aswaterman May 30, 2024
0eb7121
Support more basic testing of Zca instructions
aswaterman May 30, 2024
8f9c68e
Merge pull request #557 from en-sc/en-sc/manual-hwbp
en-sc May 31, 2024
8853c54
Suppress 'PRNG seed ...' log messages when --list-tests is specified;…
TommyMurphyTM1234 Jun 6, 2024
d3c0eca
Move PRNG seed generation/logging from gdbserver.py:main() into testl…
TommyMurphyTM1234 Jun 6, 2024
6c1ab37
Fix pylint issues with previous commit changes
TommyMurphyTM1234 Jun 6, 2024
1d3c10c
If ABI not already passed in then parameterize it based on selected X…
TommyMurphyTM1234 Jun 13, 2024
e06a435
Use Zvl/Zve to communicate VLEN/ELEN to target in debug tests (#567)
jerryz123 Jun 24, 2024
74c9c14
Merge pull request #561 from TommyMurphyTM1234/fix-list-tests
aap-sc Jun 27, 2024
b0eb63a
Change DTM IDCODE from SiFive HiFive1's 0x10e31913 to Spike's 0xdeadb…
TommyMurphyTM1234 Jun 27, 2024
8cd3144
README: add link to toolchain (#569)
orangecms Jul 2, 2024
7878085
rsort.c description updated to Radix Sort instead of Quicksort (#572)
busraozdmir Jul 17, 2024
68c70f5
debug: update lds to merge more section (#573)
zqb-all Jul 31, 2024
f2f748e
Remove `debug/test` binary file (#574)
en-sc Aug 7, 2024
8cc4918
[debug] Reserve the trigger in `HwbpManual`
en-sc Aug 7, 2024
e2cdf46
Fit riscv-tests to newest riscv spec: renaming sptbr,sbadaddr,mbadadd…
HUJIYONG Aug 15, 2024
2f97bab
Fix EtriggerTest assuming that NULL causes a trap (#579)
Wren6991 Aug 27, 2024
cc3b0f0
Merge pull request #575 from en-sc/en-sc/reserve-trigger
en-sc Sep 5, 2024
76ff703
[debug] Fix trigger reservation in HwbpManual
en-sc Sep 5, 2024
3c5b5e8
Merge pull request #580 from en-sc/en-sc/reserve-trigger-fix
en-sc Sep 5, 2024
1839696
[debug] Reserve triggers propperly in HwbpManual
en-sc Sep 6, 2024
51de008
Merge pull request #581 from en-sc/en-sc/reserve-trigger-fix-propper
en-sc Sep 6, 2024
147c369
Merge remote-tracking branch 'rvtest/master' into noop
Squareless-XD Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
on: pull_request
on:
pull_request:
paths:
- 'debug/**'

name: Check Code Style (checkpatch)
name: Check Debug Code Style (pylint)

jobs:
check:
Expand Down
172 changes: 172 additions & 0 deletions .github/workflows/spike-openocd-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Build Spike and run a couple of debug tests.

name: Test OpenOCD against 2 spike configurations

env:
SPIKE_REPO: https://github.com/riscv-software-src/riscv-isa-sim.git
SPIKE_REV: master
RISCV_TESTS_REPO: https://github.com/riscv-software-src/riscv-tests.git
RISCV_TESTS_REV: master
OPENOCD_REPO: https://github.com/riscv/riscv-openocd.git
OPENOCD_REV: riscv
TOOLCHAIN_URL: https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.2.0-1/xpack-riscv-none-elf-gcc-12.2.0-1-linux-x64.tar.gz

on:
# Run on merges to master to populate the cache with entities that are
# accessible by every pull request.
push:
branches:
- riscv
paths:
- 'debug/**'
- '.github/workflows/spike-openocd-tests.yml'
pull_request:
types: [synchronize, opened, reopened]
paths:
- 'debug/**'
- '.github/workflows/spike-openocd-tests.yml'

# There is some commented out code below that would be useful in adding this
# workflow to other repos. Ideally we can come up with something that would
# leave this file almost identical between repos, so they can all easily run
# this test suite.

jobs:
test:
name: Test debug (Ubuntu)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y device-tree-compiler build-essential

- name: Get revisions of dependencies
run: |
SPIKE_COMMIT=$( git ls-remote "$SPIKE_REPO" $SPIKE_REV | awk '{ print $1; }' )
OPENOCD_COMMIT=$( git ls-remote "$OPENOCD_REPO" $OPENOCD_REV | awk '{ print $1; }' )
echo "Revison of Spike: $SPIKE_COMMIT"
echo "Revision of OpenOCD: $OPENOCD_COMMIT"
# Save for later use
echo "SPIKE_COMMIT=$SPIKE_COMMIT" >> $GITHUB_ENV
echo "OPENOCD_COMMIT=$OPENOCD_COMMIT" >> $GITHUB_ENV

- name: Get the toolchain from cache (if available)
id: cache-restore-toolchain
uses: actions/cache/restore@v3
with:
path: /opt/riscv/toolchain
key: "toolchain-${{env.TOOLCHAIN_URL}}"

- if: ${{ steps.cache-restore-toolchain.outputs.cache-hit != 'true' }}
name: Download Toolchain (if not cached)
run: |
mkdir -p /opt/riscv/toolchain
wget --progress=dot:giga $TOOLCHAIN_URL -O /tmp/toolchain.tar.gz

- if: ${{ steps.cache-restore-toolchain.outputs.cache-hit != 'true' }}
name: Install Toolchain (if not cached)
run: tar zxf /tmp/toolchain.tar.gz --strip-components=1 -C /opt/riscv/toolchain

- name: Save the toolchain to the cache (if necessary)
id: cache-save-toolchain
uses: actions/cache/save@v3
with:
path: /opt/riscv/toolchain
key: "toolchain-${{env.TOOLCHAIN_URL}}"

- name: Get OpenOCD from cache (if available)
id: cache-restore-openocd
uses: actions/cache/restore@v3
with:
path: /opt/riscv/openocd
key: "openocd-${{env.OPENOCD_COMMIT}}"

- if: ${{ steps.cache-restore-openocd.outputs.cache-hit != 'true' }}
name: Download OpenOCD source (if not cached)
run: |
git clone "$OPENOCD_REPO"
cd riscv-openocd
git checkout "$OPENOCD_COMMIT"
git submodule update --init --recursive

- if: ${{ steps.cache-restore-openocd.outputs.cache-hit != 'true' }}
name: Build OpenOCD (if not cached)
run: |
cd riscv-openocd
./bootstrap
./configure --prefix=/opt/riscv/openocd
make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
make install

- if: ${{ steps.cache-restore-openocd.outputs.cache-hit != 'true' }}
name: Save OpenOCD to cache (if built)
id: cache-save-openocd
uses: actions/cache/save@v3
with:
path: /opt/riscv/openocd
key: "openocd-${{env.OPENOCD_COMMIT}}"

- name: Get spike from cache (if available)
id: cache-restore-spike
uses: actions/cache/restore@v3
with:
path: /opt/riscv/spike
key: "spike-${{env.SPIKE_COMMIT}}"

- if: ${{ steps.cache-restore-spike.outputs.cache-hit != 'true' }}
name: Download Spike source (if not cached)
run: |
git clone "$SPIKE_REPO"
cd riscv-isa-sim
git checkout "$SPIKE_COMMIT"
git submodule update --init --recursive

- if: ${{ steps.cache-restore-spike.outputs.cache-hit != 'true' }}
name: Build Spike (if not cached)
run: |
cd riscv-isa-sim
mkdir build && cd build
../configure --prefix=/opt/riscv/spike
make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
make install

- if: ${{ steps.cache-restore-spike.outputs.cache-hit != 'true' }}
name: Save spike to cache (if built)
id: cache-save-spike
uses: actions/cache/save@v3
with:
path: /opt/riscv/spike
key: "spike-${{env.SPIKE_COMMIT}}"

- name: Run Spike32 Tests
id: spike32-tests
run: |
cd debug
./gdbserver.py targets/RISC-V/spike32.py --print-failures \
--gcc /opt/riscv/toolchain/bin/riscv-none-elf-gcc \
--gdb /opt/riscv/toolchain/bin/riscv-none-elf-gdb \
--sim_cmd /opt/riscv/spike/bin/spike \
--server_cmd /opt/riscv/openocd/bin/openocd

- name: Run Spike64-2 Tests
if: success() || steps.spike32-tests.conclusion == 'failure'
run: |
cd debug
./gdbserver.py targets/RISC-V/spike64-2.py --print-failures \
--gcc /opt/riscv/toolchain/bin/riscv-none-elf-gcc \
--gdb /opt/riscv/toolchain/bin/riscv-none-elf-gdb \
--sim_cmd /opt/riscv/spike/bin/spike \
--server_cmd /opt/riscv/openocd/bin/openocd

- name: Archive test logs
# Proceed even if there was a failed test
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs
path: riscv-tests/debug/logs
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Building from repository
-----------------------------

We assume that the RISCV environment variable is set to the RISC-V tools
install path, and that the riscv-gnu-toolchain package is installed.
install path, and that the [riscv-gnu-toolchain](
https://github.com/riscv-collab/riscv-gnu-toolchain) package is installed.

$ git clone https://github.com/riscv/riscv-tests
$ cd riscv-tests
Expand Down
9 changes: 8 additions & 1 deletion benchmarks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

XLEN ?= 64

ifeq ($(XLEN),32)
ABI ?= ilp32d
endif
ifeq ($(XLEN),64)
ABI ?= lp64d
endif

default: all

src_dir = .
Expand Down Expand Up @@ -45,7 +52,7 @@ bmarks = \

RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf-
RISCV_GCC ?= $(RISCV_PREFIX)gcc
RISCV_GCC_OPTS ?= -DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf -fno-tree-loop-distribute-patterns -march=rv$(XLEN)gcv -mabi=lp64d
RISCV_GCC_OPTS ?= -DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf -fno-tree-loop-distribute-patterns -march=rv$(XLEN)gcv -mabi=$(ABI)
RISCV_LINK ?= $(RISCV_GCC) -T $(src_dir)/common/test.ld $(incs)
RISCV_LINK_OPTS ?= -static -nostdlib -nostartfiles -lm -lgcc -T $(src_dir)/common/test.ld
RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/rsort/rsort.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// See LICENSE for license details.

//**************************************************************************
// Quicksort benchmark
// Radix Sort benchmark
//--------------------------------------------------------------------------
//
// This benchmark uses quicksort to sort an array of integers. The
// This benchmark uses radix sort to sort an array of integers. The
// implementation is largely adapted from Numerical Recipes for C. The
// input data (and reference data) should be generated using the
// qsort_gendata.pl perl script and dumped to a file named
Expand Down
1 change: 1 addition & 0 deletions debug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The following should be in the user's path:
* openocd (can be overridden with `--server_cmd` when running gdbserver.py
manually), which should be the latest from
https://github.com/riscv/riscv-openocd.git.
* Python packages that might not be installed: pexpect

Usage
=====
Expand Down
Loading
Loading