riscv-tests.git
6 years agoImprove RVC test
Andrew Waterman [Fri, 4 Aug 2017 07:23:04 +0000 (00:23 -0700)]
Improve RVC test

Make the page-crossing instruction non-idempotent to detect erroneously
executing the first 16 bits of the instruction with garbage MSBs.

6 years agoFix the end of MulticoreTest.
Tim Newsome [Mon, 31 Jul 2017 20:49:34 +0000 (13:49 -0700)]
Fix the end of MulticoreTest.

Now it actually confirms that we're talking to two different cores which
have different values in their registers. Previously it could have been
fooled if eg. the thread command was a nop.

6 years agoMake pylint happy.
Tim Newsome [Thu, 27 Jul 2017 20:34:54 +0000 (13:34 -0700)]
Make pylint happy.

6 years agoUse new OpenOCD messages to determine gdb port.
Tim Newsome [Wed, 26 Jul 2017 14:56:35 +0000 (07:56 -0700)]
Use new OpenOCD messages to determine gdb port.

This is simpler and more reliable than playing around with lsof.
Specifically, it works if the OpenOCD command is "strace openocd" while
the previous code did not.

6 years agoOnly clean up logfiles that we know we created.
Tim Newsome [Fri, 21 Jul 2017 18:49:15 +0000 (11:49 -0700)]
Only clean up logfiles that we know we created.

6 years agoAdd back code to clean up triggers in entry.S
Tim Newsome [Fri, 21 Jul 2017 03:43:18 +0000 (20:43 -0700)]
Add back code to clean up triggers in entry.S

Then for targets that can't handle this because they don't implement
hmode, add a target setting that allows that to be specified.

6 years agoCheck all PCs after reset.
Tim Newsome [Tue, 18 Jul 2017 18:35:59 +0000 (11:35 -0700)]
Check all PCs after reset.

6 years agoPrint out logs in more failure cases.
Tim Newsome [Thu, 13 Jul 2017 03:26:21 +0000 (20:26 -0700)]
Print out logs in more failure cases.

6 years agoMerge pull request #58 from riscv/fpga_reset_halt
Tim Newsome [Thu, 6 Jul 2017 22:09:09 +0000 (15:09 -0700)]
Merge pull request #58 from riscv/fpga_reset_halt

debug: Make the 'out of reset' tests apply reset

6 years agodebug: Make the 'out of reset' tests actually apply reset
mwachs5 [Thu, 6 Jul 2017 22:04:27 +0000 (15:04 -0700)]
debug: Make the 'out of reset' tests actually apply reset

6 years agoAdd gdb_setup to target for arbitrary gdb commands
Tim Newsome [Mon, 3 Jul 2017 17:48:58 +0000 (10:48 -0700)]
Add gdb_setup to target for arbitrary gdb commands

I'm using this for a target where misa is at an old address, to
set riscv use_compressed_breakpoints off

6 years agoDon't clear triggers during execution.
Tim Newsome [Mon, 3 Jul 2017 17:36:03 +0000 (10:36 -0700)]
Don't clear triggers during execution.

This shouldn't affect triggers set by the debugger, because running code
can't change those. When it does affect them, it breaks Hwbp1 which sets
the breakpoint before running the program.

6 years agoTolerate missing misa register.
Tim Newsome [Tue, 27 Jun 2017 17:53:16 +0000 (10:53 -0700)]
Tolerate missing misa register.

At least in the test programs. There are other places where this causes
trouble as well.

6 years agoMerge pull request #55 from riscv/debug
Tim Newsome [Tue, 27 Jun 2017 17:28:10 +0000 (10:28 -0700)]
Merge pull request #55 from riscv/debug

Test gdb/OpenOCD during regular test run.

6 years agoMerge pull request #56 from riscv/config
Tim Newsome [Tue, 27 Jun 2017 17:27:41 +0000 (10:27 -0700)]
Merge pull request #56 from riscv/config

Move target definition into individual files.

6 years agoMove target definition into individual files.
Tim Newsome [Mon, 26 Jun 2017 17:00:34 +0000 (10:00 -0700)]
Move target definition into individual files.

Instead of defining each target in targets.py, now each target gets its
own .py file. This means people can easily keep their own target files
around that they may not want to put into the main test source. As part
of that, I removed the freedom-u500-sim target since I assume it's only
used internally at SiFive.

Added a few cleanups as well:
* Update README examples, mostly --sim_cmd instead of --cmd.
* Allow defining misa in a target, to skip running of ExamineTarget.
* Rename target.target() to target.create(), which is less confusing.
* Default --sim_cmd to `spike`
* Got rid of `use_fpu`, instead looking at F or D in $misa.

6 years agoTest gdb/OpenOCD during regular test run.
Tim Newsome [Fri, 23 Jun 2017 19:15:25 +0000 (12:15 -0700)]
Test gdb/OpenOCD during regular test run.

6 years agoAdd basic multicore test.
Tim Newsome [Fri, 23 Jun 2017 01:37:55 +0000 (18:37 -0700)]
Add basic multicore test.

6 years agoSmoketest multicore.
Tim Newsome [Tue, 20 Jun 2017 22:02:28 +0000 (15:02 -0700)]
Smoketest multicore.

When connecting to gdb, select a random thread and use that for the
current test.

Also replace infinite_loop with something that will later allow
smoketesting of more than one thread.

6 years agoWrite OpenOCD log when it crashes early.
Tim Newsome [Mon, 19 Jun 2017 16:13:51 +0000 (09:13 -0700)]
Write OpenOCD log when it crashes early.

6 years agoStore logs for all tests in logs/
Tim Newsome [Fri, 16 Jun 2017 18:30:46 +0000 (11:30 -0700)]
Store logs for all tests in logs/

This creates a record of passing as well as failing tests, and gets rid
of the log clutter that you previously ended up with in the current
directory.

6 years agoTest 64-bit addressing.
Tim Newsome [Thu, 15 Jun 2017 19:58:40 +0000 (12:58 -0700)]
Test 64-bit addressing.

The spike64 target now links all test programs at 0x7fff_ffff_ffff_0000.

Also a minor change to log file naming so that 'make all' works again.
I'll fix this better later.

6 years agoAdd final echo to E300/U500 OpenOCD scripts
Tim Newsome [Fri, 9 Jun 2017 23:54:22 +0000 (16:54 -0700)]
Add final echo to E300/U500 OpenOCD scripts

6 years agoMake HiFive1 testing (mostly) work again
Tim Newsome [Fri, 9 Jun 2017 21:09:35 +0000 (14:09 -0700)]
Make HiFive1 testing (mostly) work again

Currently failing:
    DebugChangeString
    DebugFunctionCall
    InstantHaltTest

6 years agoFix using defaults for --server_cmd and --sim_cmd
Tim Newsome [Fri, 9 Jun 2017 21:08:42 +0000 (14:08 -0700)]
Fix using defaults for --server_cmd and --sim_cmd

6 years agoDefault to openocd, not riscv-openocd
Tim Newsome [Fri, 9 Jun 2017 17:59:43 +0000 (10:59 -0700)]
Default to openocd, not riscv-openocd

AFAICT the normal build process never builds a binary called
riscv-openocd.

6 years agoMake pylint happy.
Tim Newsome [Mon, 5 Jun 2017 18:46:39 +0000 (11:46 -0700)]
Make pylint happy.

If we want we can start using print(), but if so let's consistently use
it instead of piecemeal. See also
https://stackoverflow.com/questions/28694380/pylint-says-unnecessary-parens-after-r-keyword

6 years agoMerge pull request #53 from richardxia/fail-if-simulator-exits-early
Palmer Dabbelt [Thu, 25 May 2017 19:14:06 +0000 (12:14 -0700)]
Merge pull request #53 from richardxia/fail-if-simulator-exits-early

Fail if simulator exits early.

6 years agoFail if simulator exits early.
Richard Xia [Tue, 23 May 2017 20:38:08 +0000 (13:38 -0700)]
Fail if simulator exits early.

6 years agominNum -> minimumNumber
Andrew Waterman [Mon, 22 May 2017 20:40:52 +0000 (13:40 -0700)]
minNum -> minimumNumber

6 years agoMerge pull request #52 from riscv/vcs_sim_cmd
Megan Wachs [Thu, 18 May 2017 19:14:07 +0000 (12:14 -0700)]
Merge pull request #52 from riscv/vcs_sim_cmd

debug: Correct the calling for a 32-bit simulation target

6 years agodebug: Correct the calling for a 32-bit simulation target
Megan Wachs [Thu, 18 May 2017 19:09:40 +0000 (12:09 -0700)]
debug: Correct the calling for a 32-bit simulation target

6 years agoManually assemble bad shift amount, since assembler rejects
Andrew Waterman [Wed, 17 May 2017 22:26:27 +0000 (15:26 -0700)]
Manually assemble bad shift amount, since assembler rejects

Resolves #51

6 years agoShorten the debug tests
Palmer Dabbelt [Wed, 17 May 2017 17:50:55 +0000 (10:50 -0700)]
Shorten the debug tests

6 years agoMerge pull request #49 from riscv/no_examine_target
Palmer Dabbelt [Wed, 17 May 2017 17:50:28 +0000 (10:50 -0700)]
Merge pull request #49 from riscv/no_examine_target

No Examine Target

6 years agoShow the debug logs to stdout, to avoid travis timeouts
Palmer Dabbelt [Wed, 17 May 2017 15:28:16 +0000 (08:28 -0700)]
Show the debug logs to stdout, to avoid travis timeouts

6 years agodebug: remove unused auto_int function
Megan Wachs [Tue, 16 May 2017 21:43:43 +0000 (14:43 -0700)]
debug: remove unused auto_int function

6 years agodebug: Allow skipping the ExamineTarget task.
Megan Wachs [Tue, 16 May 2017 21:40:29 +0000 (14:40 -0700)]
debug: Allow skipping the ExamineTarget task.

6 years agodebug: Allow skipping the ExamineTarget step by specifying misa
Megan Wachs [Tue, 16 May 2017 21:25:39 +0000 (14:25 -0700)]
debug: Allow skipping the ExamineTarget step by specifying misa

6 years agoMerge pull request #47 from riscv/debug-0.13
Palmer Dabbelt [Tue, 16 May 2017 20:48:55 +0000 (13:48 -0700)]
Merge pull request #47 from riscv/debug-0.13

Debug 0.13 Tests

6 years agoChange Spike's RAM location to match the linker script
Palmer Dabbelt [Tue, 16 May 2017 19:47:39 +0000 (12:47 -0700)]
Change Spike's RAM location to match the linker script

6 years agoLink the infinate loop at 0x10000000
Palmer Dabbelt [Tue, 16 May 2017 19:34:45 +0000 (12:34 -0700)]
Link the infinate loop at 0x10000000

Spike appears to have a problem geterating DTS at 0x80000000.

6 years agoLink in encoding.h instead of providing a path to it
Palmer Dabbelt [Tue, 16 May 2017 19:33:39 +0000 (12:33 -0700)]
Link in encoding.h instead of providing a path to it

6 years agodebug: Update OpenOCD configs.
Megan Wachs [Tue, 16 May 2017 17:01:30 +0000 (10:01 -0700)]
debug: Update OpenOCD configs.

6 years agoCopy debug/programs to the build dir, so debug-check runs
Palmer Dabbelt [Tue, 16 May 2017 02:24:56 +0000 (19:24 -0700)]
Copy debug/programs to the build dir, so debug-check runs

6 years agoMerge pull request #48 from riscv/tests
Palmer Dabbelt [Tue, 16 May 2017 00:45:17 +0000 (17:45 -0700)]
Merge pull request #48 from riscv/tests

Get the test running on Spike again

6 years agoDisable another PRIV mention, for now
Palmer Dabbelt [Mon, 15 May 2017 23:54:00 +0000 (16:54 -0700)]
Disable another PRIV mention, for now

6 years agoDisable the tests that touch PRIV, it's not implemented yet
Palmer Dabbelt [Mon, 15 May 2017 23:38:01 +0000 (16:38 -0700)]
Disable the tests that touch PRIV, it's not implemented yet

6 years agoHave the openocd invocation match the spike invocation
Palmer Dabbelt [Mon, 15 May 2017 23:27:30 +0000 (16:27 -0700)]
Have the openocd invocation match the spike invocation

6 years agoDisable some failing tests for now
Palmer Dabbelt [Mon, 15 May 2017 22:37:07 +0000 (15:37 -0700)]
Disable some failing tests for now

6 years agoDon't rely on Spike's default ISA
Palmer Dabbelt [Mon, 15 May 2017 22:36:55 +0000 (15:36 -0700)]
Don't rely on Spike's default ISA

6 years agoDon't use the RTOS, and do "reset halt"
Palmer Dabbelt [Mon, 15 May 2017 22:36:34 +0000 (15:36 -0700)]
Don't use the RTOS, and do "reset halt"

This is the most reliable way to run the tests for now.

6 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.

6 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

6 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

6 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.

6 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

6 years agoCheck UXL in sstatus
Andrew Waterman [Fri, 5 May 2017 23:28:06 +0000 (16:28 -0700)]
Check UXL in sstatus

6 years agoTest that superpage PTEs trap when PPN LSBs are set
Andrew Waterman [Fri, 5 May 2017 21:40:01 +0000 (14:40 -0700)]
Test that superpage PTEs trap when PPN LSBs are set

6 years agoRegularize control flow in dirty-bit test
Andrew Waterman [Fri, 5 May 2017 21:11:42 +0000 (14:11 -0700)]
Regularize control flow in dirty-bit test

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

6 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

6 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.