riscv-tests.git
7 years agoLet Spike have the default amount of RAM
Palmer Dabbelt [Mon, 15 May 2017 22:36:14 +0000 (15:36 -0700)]
Let Spike have the default amount of RAM

Without this programs won't run.

7 years agoDon't build openocd here, it's in riscv-tools now
Palmer Dabbelt [Mon, 15 May 2017 22:35:17 +0000 (15:35 -0700)]
Don't build openocd here, it's in riscv-tools now

7 years agodebug: fix the make target for debug-check
Megan Wachs [Mon, 15 May 2017 17:17:58 +0000 (10:17 -0700)]
debug: fix the make target for debug-check

7 years agodebug: Use consistent 'sim_cmd' argument.
Megan Wachs [Mon, 15 May 2017 07:54:41 +0000 (00:54 -0700)]
debug: Use consistent 'sim_cmd' argument.

7 years agoMerge remote-tracking branch 'origin/priv-1.10' into HEAD
Megan Wachs [Mon, 15 May 2017 02:41:07 +0000 (19:41 -0700)]
Merge remote-tracking branch 'origin/priv-1.10' into HEAD

7 years agoSet ELF entry point correctly
Andrew Waterman [Mon, 1 May 2017 21:42:42 +0000 (14:42 -0700)]
Set ELF entry point correctly

7 years agoSet FS before reading F registers
Palmer Dabbelt [Wed, 26 Apr 2017 16:17:15 +0000 (09:17 -0700)]
Set FS before reading F registers

7 years agoAdd abort() for benefit of benchmark code
Andrew Waterman [Wed, 26 Apr 2017 19:25:01 +0000 (12:25 -0700)]
Add abort() for benefit of benchmark code

7 years agobump OpenOCD version
Megan Wachs [Wed, 19 Apr 2017 00:24:10 +0000 (17:24 -0700)]
bump OpenOCD version

7 years agodebug: Don't halt out of reset. It's unrealistic. Use a program which loops (actually...
Megan Wachs [Tue, 18 Apr 2017 22:09:55 +0000 (15:09 -0700)]
debug: Don't halt out of reset. It's unrealistic. Use a program which loops (actually it just gets an exception anyway).

7 years agodebug: Use RTOS OpenOCD for Spike for now.
Megan Wachs [Tue, 18 Apr 2017 18:33:35 +0000 (11:33 -0700)]
debug: Use RTOS OpenOCD for Spike for now.

7 years agodebug: Checkpoint restoring Spike functionality
Megan Wachs [Mon, 17 Apr 2017 21:20:53 +0000 (14:20 -0700)]
debug: Checkpoint restoring Spike functionality

7 years agoMerge remote-tracking branch 'origin/newprogram' into debug-0.13
Megan Wachs [Mon, 17 Apr 2017 18:34:33 +0000 (11:34 -0700)]
Merge remote-tracking branch 'origin/newprogram' into debug-0.13

7 years agoMerge remote-tracking branch 'origin/priv-1.10' into HEAD
Megan Wachs [Mon, 17 Apr 2017 18:33:46 +0000 (11:33 -0700)]
Merge remote-tracking branch 'origin/priv-1.10' into HEAD

7 years agoFix illegal-instruction test when S-mode is not implemented
Andrew Waterman [Sat, 15 Apr 2017 01:11:49 +0000 (18:11 -0700)]
Fix illegal-instruction test when S-mode is not implemented

7 years agodebug: checkpoint trying to get 64 bit programs to compile as well.
Megan Wachs [Fri, 14 Apr 2017 17:26:11 +0000 (10:26 -0700)]
debug: checkpoint trying to get 64 bit programs to compile as well.

7 years agodebug: checkpoint of trying to get simulation tests working
Megan Wachs [Fri, 14 Apr 2017 17:24:32 +0000 (10:24 -0700)]
debug: checkpoint of trying to get simulation tests working

7 years agodebug: working with newprogram branch
Megan Wachs [Fri, 14 Apr 2017 14:56:32 +0000 (07:56 -0700)]
debug: working with newprogram branch

7 years agoImprove fp ldst/move tests; remove redundant fsgnj tests
Andrew Waterman [Tue, 11 Apr 2017 00:27:38 +0000 (17:27 -0700)]
Improve fp ldst/move tests; remove redundant fsgnj tests

7 years agoRetrofit rv64mi-p-illegal to test vectored interrupts
Andrew Waterman [Fri, 7 Apr 2017 23:20:27 +0000 (16:20 -0700)]
Retrofit rv64mi-p-illegal to test vectored interrupts

7 years agoRemove defunct IPI tests
Andrew Waterman [Fri, 7 Apr 2017 23:19:47 +0000 (16:19 -0700)]
Remove defunct IPI tests

7 years agoMake ma_addr test work for systems with misaligned ld/st
Andrew Waterman [Thu, 6 Apr 2017 04:45:34 +0000 (21:45 -0700)]
Make ma_addr test work for systems with misaligned ld/st

7 years agoExpand dirty-bit test to test MPRV and SUM
Andrew Waterman [Thu, 30 Mar 2017 07:30:29 +0000 (00:30 -0700)]
Expand dirty-bit test to test MPRV and SUM

7 years agoNew PMP encoding
Andrew Waterman [Thu, 30 Mar 2017 07:30:14 +0000 (00:30 -0700)]
New PMP encoding

7 years agoProhibit relaxing the initial gp generation
Palmer Dabbelt [Fri, 17 Mar 2017 22:39:02 +0000 (15:39 -0700)]
Prohibit relaxing the initial gp generation

I've added an additional linker relaxation that relaxes two instruction
pc-relative sequences to one instruction gp relative sequences when
possible.  This sequence now optimizes the initial gp generation to

  mv gp, gp

which is obviously bogus.  The fix is to disable relaxations when
setting up gp, preventing the linker from relaxing away this setup code.

7 years agoChange the global pointer symbol to __global_pointer$
Palmer Dabbelt [Fri, 17 Mar 2017 22:37:29 +0000 (15:37 -0700)]
Change the global pointer symbol to __global_pointer$

This changed a while ago in binutils.

7 years agoSeparate page faults from physical memory access exceptions
Andrew Waterman [Mon, 27 Mar 2017 21:26:09 +0000 (14:26 -0700)]
Separate page faults from physical memory access exceptions

7 years agoFix FPU initialization code
Andrew Waterman [Sat, 25 Mar 2017 23:07:25 +0000 (16:07 -0700)]
Fix FPU initialization code

7 years agoLike tests, pass the benchmarks if XLEN disagrees
Andrew Waterman [Fri, 24 Mar 2017 19:51:24 +0000 (12:51 -0700)]
Like tests, pass the benchmarks if XLEN disagrees

7 years agobump env
Andrew Waterman [Thu, 23 Mar 2017 19:34:34 +0000 (12:34 -0700)]
bump env

7 years agoAdd PMP test
Andrew Waterman [Thu, 23 Mar 2017 02:17:34 +0000 (19:17 -0700)]
Add PMP test

7 years agoClean up benchmarks build
Andrew Waterman [Wed, 22 Mar 2017 10:43:15 +0000 (03:43 -0700)]
Clean up benchmarks build

7 years agoClean up bmarks build
Andrew Waterman [Wed, 22 Mar 2017 01:12:45 +0000 (18:12 -0700)]
Clean up bmarks build

7 years agoRemove smips/host-debugging cruft
Andrew Waterman [Wed, 22 Mar 2017 00:04:49 +0000 (17:04 -0700)]
Remove smips/host-debugging cruft

7 years agoAllow supervisor access to user pages in dirty-bit test
Andrew Waterman [Tue, 21 Mar 2017 23:47:04 +0000 (16:47 -0700)]
Allow supervisor access to user pages in dirty-bit test

7 years agoAvoid x3 (gp), which is now TESTNUM
Andrew Waterman [Tue, 21 Mar 2017 23:46:43 +0000 (16:46 -0700)]
Avoid x3 (gp), which is now TESTNUM

7 years agoTest mstatus.TW, mstatus.TVM, and mstatus.TSR features
Andrew Waterman [Mon, 13 Mar 2017 22:40:06 +0000 (15:40 -0700)]
Test mstatus.TW, mstatus.TVM, and mstatus.TSR features

7 years agoDon't link ISA tests against libc
Andrew Waterman [Thu, 9 Mar 2017 20:43:54 +0000 (12:43 -0800)]
Don't link ISA tests against libc

7 years agoPermit flexible dirty-bit behavior
Andrew Waterman [Thu, 9 Mar 2017 20:43:36 +0000 (12:43 -0800)]
Permit flexible dirty-bit behavior

7 years agoCheck mbadaddr in ma_addr test
Andrew Waterman [Thu, 9 Mar 2017 20:43:01 +0000 (12:43 -0800)]
Check mbadaddr in ma_addr test

7 years agoResurrect spike debug support
Palmer Dabbelt [Fri, 3 Mar 2017 23:13:11 +0000 (15:13 -0800)]
Resurrect spike debug support

7 years agoPrint an error message when the OpenOCD config file can't be read
Palmer Dabbelt [Fri, 3 Mar 2017 22:11:14 +0000 (14:11 -0800)]
Print an error message when the OpenOCD config file can't be read

7 years agoAdd assert to save me from myself.
Tim Newsome [Fri, 24 Feb 2017 21:52:50 +0000 (13:52 -0800)]
Add assert to save me from myself.

spike passes the download test, but needs a 15 minute timeout. That's
too ridiculous to put in here, but 60s is reasonable.

7 years agoKeep the DownloadTest source if the test fails.
Tim Newsome [Fri, 24 Feb 2017 20:46:57 +0000 (12:46 -0800)]
Keep the DownloadTest source if the test fails.

7 years agoMake pylint happy.
Tim Newsome [Fri, 24 Feb 2017 20:43:54 +0000 (12:43 -0800)]
Make pylint happy.

7 years agoTalk to spike using OpenOCD instead of directly.
Tim Newsome [Tue, 21 Feb 2017 21:07:14 +0000 (13:07 -0800)]
Talk to spike using OpenOCD instead of directly.

7 years agoAdd HiFive1 target.
Tim Newsome [Fri, 17 Feb 2017 17:45:53 +0000 (09:45 -0800)]
Add HiFive1 target.

7 years agoUse NaN macros
Andrew Waterman [Thu, 2 Feb 2017 07:18:00 +0000 (23:18 -0800)]
Use NaN macros

7 years agoTest FMIN/FMAX NaN behavior
Andrew Waterman [Thu, 2 Feb 2017 07:17:17 +0000 (23:17 -0800)]
Test FMIN/FMAX NaN behavior

See https://github.com/riscv/riscv-isa-sim/issues/76

7 years agoTest qNaN and sNaN inputs to FP comparisons
Andrew Waterman [Wed, 1 Feb 2017 03:48:41 +0000 (19:48 -0800)]
Test qNaN and sNaN inputs to FP comparisons

7 years agoUse correct macro to guard floating-point initialization
Andrew Waterman [Sat, 21 Jan 2017 03:25:28 +0000 (19:25 -0800)]
Use correct macro to guard floating-point initialization

7 years agoFix build with glibc
Andrew Waterman [Sat, 21 Jan 2017 03:21:24 +0000 (19:21 -0800)]
Fix build with glibc

7 years agoSpecify Spike ISA explicitly
Andrew Waterman [Wed, 4 Jan 2017 19:45:18 +0000 (11:45 -0800)]
Specify Spike ISA explicitly

7 years agoRemove Hwacha macros
Andrew Waterman [Wed, 4 Jan 2017 19:42:25 +0000 (11:42 -0800)]
Remove Hwacha macros

7 years agoMask off large constants for RV32
Andrew Waterman [Wed, 4 Jan 2017 19:41:08 +0000 (11:41 -0800)]
Mask off large constants for RV32

7 years ago"make clean" shouldn't fail if "make" wasn't first run
Andrew Waterman [Wed, 4 Jan 2017 19:33:09 +0000 (11:33 -0800)]
"make clean" shouldn't fail if "make" wasn't first run

7 years agoIncrease delay in UserInterrupt.
Tim Newsome [Mon, 2 Jan 2017 20:59:41 +0000 (12:59 -0800)]
Increase delay in UserInterrupt.

This makes the test pass reliably (10/10) against the Arty board.
Previously it failed intermittently.

7 years agoUse compressed code if the target supports it.
Tim Newsome [Tue, 27 Dec 2016 19:34:50 +0000 (11:34 -0800)]
Use compressed code if the target supports it.

The main change was to read misa before running any other test. If misa
indicates C is supported, then use compressed code. This required
changing some tests, mostly to ensure correct alignment.  The single
step test also needs to know the correct addresses to step through in
compressed code.

Only print at most 1000 lines from each log file.

7 years agoClean up .pyc files.
Tim Newsome [Tue, 27 Dec 2016 19:19:10 +0000 (11:19 -0800)]
Clean up .pyc files.

7 years agoFix WriteCsrs test.
Tim Newsome [Tue, 13 Dec 2016 19:12:56 +0000 (11:12 -0800)]
Fix WriteCsrs test.

At some point the program changed to use a different register and this
test was never updated. If $x1 pointed somewhere bad, that would result
in an exception.

7 years agoPass newly updated -march, -mabi options to gcc
Andrew Waterman [Tue, 13 Dec 2016 06:51:27 +0000 (22:51 -0800)]
Pass newly updated -march, -mabi options to gcc

7 years agoMerge pull request #38 from richardxia/disable_tcl_and_telnet_servers
Tim Newsome [Tue, 13 Dec 2016 00:06:31 +0000 (16:06 -0800)]
Merge pull request #38 from richardxia/disable_tcl_and_telnet_servers

Disable tcl and telnet servers when running OpenOCD

7 years agoDisable tcl and telnet servers when running OpenOCD because the port numbers might...
Richard Xia [Mon, 12 Dec 2016 21:14:53 +0000 (13:14 -0800)]
Disable tcl and telnet servers when running OpenOCD because the port numbers might conflict with other processes.

7 years agoAdd test of compare-sections command.
Tim Newsome [Fri, 9 Dec 2016 17:25:03 +0000 (09:25 -0800)]
Add test of compare-sections command.

7 years agoUse XLEN macro for these sources as well.
Tim Newsome [Thu, 8 Dec 2016 04:42:31 +0000 (20:42 -0800)]
Use XLEN macro for these sources as well.

All tests pass on spike32 and spike64 again.

7 years agoUse our own XLEN macro.
Tim Newsome [Thu, 8 Dec 2016 04:03:36 +0000 (20:03 -0800)]
Use our own XLEN macro.

Relying on something that the compiler automatically sets is apparently
not reliable.

7 years agoWe *do* need the FPU to compile 64-bit code.
Tim Newsome [Thu, 8 Dec 2016 03:52:00 +0000 (19:52 -0800)]
We *do* need the FPU to compile 64-bit code.

7 years agoPut env back where it was.
Tim Newsome [Thu, 8 Dec 2016 03:51:05 +0000 (19:51 -0800)]
Put env back where it was.

Fixes #37.

7 years agoDon't compile with FPU support for now.
Tim Newsome [Thu, 8 Dec 2016 02:32:15 +0000 (18:32 -0800)]
Don't compile with FPU support for now.

It's not Just Working, and none of the tests so far actually care.

7 years agoNicely display compile failures.
Tim Newsome [Thu, 8 Dec 2016 02:21:11 +0000 (18:21 -0800)]
Nicely display compile failures.

7 years agoDon't eat compile errors.
Tim Newsome [Thu, 8 Dec 2016 02:00:13 +0000 (18:00 -0800)]
Don't eat compile errors.

7 years agoFix race when finding the port OpenOCD is using.
Tim Newsome [Thu, 8 Dec 2016 01:52:26 +0000 (17:52 -0800)]
Fix race when finding the port OpenOCD is using.

7 years agoavoid non-standard predefined macros
Andrew Waterman [Wed, 7 Dec 2016 01:04:14 +0000 (17:04 -0800)]
avoid non-standard predefined macros

7 years agoRemove cache miss test from all but one AMO test
Andrew Waterman [Mon, 21 Nov 2016 23:29:09 +0000 (15:29 -0800)]
Remove cache miss test from all but one AMO test

This doesn't reduce coverage for cache-based RV64 systems, but will
improve test runtime and work around the need for smaller test footprint
for scratchpad-based RV32 systems.

I would argue that these microarchitectural tests should be in the
domain of torture, and that the last one should be removed, too.

7 years agoAttempt to work around hard-float linking problem
Andrew Waterman [Tue, 15 Nov 2016 07:26:32 +0000 (23:26 -0800)]
Attempt to work around hard-float linking problem

8 years agoMerge pull request #35 from richardxia/have-openocd-pick-gdb-server-port
Tim Newsome [Fri, 11 Nov 2016 20:19:46 +0000 (12:19 -0800)]
Merge pull request #35 from richardxia/have-openocd-pick-gdb-server-port

Tell OpenOCD to pick an unused port for gdb server

8 years agoDecrease sleep time to 0.1s.
Richard Xia [Thu, 10 Nov 2016 22:24:08 +0000 (14:24 -0800)]
Decrease sleep time to 0.1s.

8 years agoTell OpenOCD to pick an unused port, and use lsof to figure out which one it picked.
Richard Xia [Fri, 4 Nov 2016 23:18:38 +0000 (16:18 -0700)]
Tell OpenOCD to pick an unused port, and use lsof to figure out which one it picked.

8 years agoMake sure FP stores don't write memory if mstatus.FS=0.
Andrew Waterman [Tue, 1 Nov 2016 07:34:54 +0000 (00:34 -0700)]
Make sure FP stores don't write memory if mstatus.FS=0.

8 years agoAdd basic floating point register test.
Tim Newsome [Mon, 31 Oct 2016 20:30:44 +0000 (13:30 -0700)]
Add basic floating point register test.

8 years agoImprove reg test a little.
Tim Newsome [Fri, 21 Oct 2016 17:51:44 +0000 (10:51 -0700)]
Improve reg test a little.

8 years agoTest OpenOCD step and resume.
Tim Newsome [Thu, 20 Oct 2016 21:49:44 +0000 (14:49 -0700)]
Test OpenOCD step and resume.

8 years agoFix conflict: JTAG VPI changes vs openocd refactor
Tim Newsome [Wed, 19 Oct 2016 20:38:26 +0000 (13:38 -0700)]
Fix conflict: JTAG VPI changes vs openocd refactor

8 years agoActually test something in regs test.
Tim Newsome [Wed, 19 Oct 2016 20:16:47 +0000 (13:16 -0700)]
Actually test something in regs test.

8 years agoMerge pull request #34 from richardxia/use-port-randomization
Tim Newsome [Wed, 19 Oct 2016 17:52:59 +0000 (10:52 -0700)]
Merge pull request #34 from richardxia/use-port-randomization

Use port randomization for VCS and OpenOCD

8 years agoPull port number from VCS output and pass to OpenOCD.
Richard Xia [Tue, 18 Oct 2016 21:38:24 +0000 (14:38 -0700)]
Pull port number from VCS output and pass to OpenOCD.

8 years agoAdd framework to test OpenOCD directly.
Tim Newsome [Tue, 18 Oct 2016 21:21:02 +0000 (14:21 -0700)]
Add framework to test OpenOCD directly.

This took a lot of refactoring to make it look reasonable.
There isn't actually any functional OpenOCD test yet. But a dummy test
runs a command (and fails).

8 years agoRandomize gdb port.
Richard Xia [Tue, 18 Oct 2016 18:31:25 +0000 (11:31 -0700)]
Randomize gdb port.

8 years agoWait for OpenOCD to start fully before connecting.
Tim Newsome [Fri, 14 Oct 2016 19:41:41 +0000 (12:41 -0700)]
Wait for OpenOCD to start fully before connecting.

Requires OpenOCD change 4eba841bfee4b6c347423ac28851ab7ee7e75532

8 years agoAdd MemTestWriteInvalid.
Tim Newsome [Thu, 13 Oct 2016 18:32:02 +0000 (11:32 -0700)]
Add MemTestWriteInvalid.

8 years agoAlign FP data sections
Andrew Waterman [Mon, 10 Oct 2016 05:13:31 +0000 (22:13 -0700)]
Align FP data sections

8 years agoAdd test for memory read from invalid address.
Tim Newsome [Mon, 3 Oct 2016 17:40:17 +0000 (10:40 -0700)]
Add test for memory read from invalid address.

8 years agoTolerate remotes that return memory read errors.
Tim Newsome [Fri, 30 Sep 2016 19:11:03 +0000 (12:11 -0700)]
Tolerate remotes that return memory read errors.

8 years agoUpdate dmode test to match spec.
Tim Newsome [Thu, 29 Sep 2016 18:42:41 +0000 (11:42 -0700)]
Update dmode test to match spec.

M-mode writes to triggers with dmode set are now ignored instead of
raising an exception.

Also added -f/--fail-fast option to gdbserver.

8 years agoClear triggers during entry.
Tim Newsome [Thu, 29 Sep 2016 18:38:54 +0000 (11:38 -0700)]
Clear triggers during entry.

If the last test leaves some triggers set they should be cleaned up.

8 years agoDisable TriggerDmode while spike is changed.
Tim Newsome [Wed, 28 Sep 2016 15:18:14 +0000 (08:18 -0700)]
Disable TriggerDmode while spike is changed.

8 years agoMove debug testing from all into debug-check target.
Tim Newsome [Wed, 21 Sep 2016 17:23:35 +0000 (10:23 -0700)]
Move debug testing from all into debug-check target.

Fixes issue #30.

8 years agoMinor tweaks to trigger tests for openocd.
Tim Newsome [Tue, 20 Sep 2016 16:47:11 +0000 (09:47 -0700)]
Minor tweaks to trigger tests for openocd.

8 years agoRewrite debug testing.
Tim Newsome [Thu, 15 Sep 2016 20:11:56 +0000 (13:11 -0700)]
Rewrite debug testing.

No longer use unittest. Now tests can return not_applicable if eg. a
desired execution mode isn't implemented on a target. Also we do a
better job killing spike processes when a test fails.

Did a lot of code cleanup, partly by using pylint.

Fix the Makefile so that if the test fails, 'make' actually fails too.

8 years agoAdd rv32uf tests
Andrew Waterman [Wed, 7 Sep 2016 06:58:57 +0000 (23:58 -0700)]
Add rv32uf tests