riscv-tests.git
7 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.

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

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

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

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

7 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

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

7 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

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

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

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

7 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

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

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

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

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

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

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

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

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

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

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

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

7 years agoMake RVC test fit in 16 KiB
Andrew Waterman [Fri, 2 Sep 2016 22:42:02 +0000 (15:42 -0700)]
Make RVC test fit in 16 KiB

7 years agoFix/add to instant trigger tests.
Tim Newsome [Fri, 2 Sep 2016 19:27:14 +0000 (12:27 -0700)]
Fix/add to instant trigger tests.

7 years agoLimit spike RAM so I can run valgrind on it.
Tim Newsome [Fri, 2 Sep 2016 16:12:32 +0000 (09:12 -0700)]
Limit spike RAM so I can run valgrind on it.

7 years agoAdd some immediate trigger tests.
Tim Newsome [Thu, 1 Sep 2016 20:17:56 +0000 (13:17 -0700)]
Add some immediate trigger tests.

7 years agoCreate TriggerTest.
Tim Newsome [Thu, 1 Sep 2016 17:07:54 +0000 (10:07 -0700)]
Create TriggerTest.

7 years agoAdd test for address triggers.
Tim Newsome [Tue, 23 Aug 2016 00:54:51 +0000 (17:54 -0700)]
Add test for address triggers.

7 years agoRemove "import ." notation.
Tim Newsome [Thu, 1 Sep 2016 20:18:29 +0000 (13:18 -0700)]
Remove "import ." notation.

Doesn't work with Python 2.7.9 which is the default in latest Debian.

7 years agoAdd .pyc to .gitignore.
Tim Newsome [Thu, 1 Sep 2016 16:38:26 +0000 (09:38 -0700)]
Add .pyc to .gitignore.

7 years agoChange accidental use of SLTIU in SLTI tests (#26)
Brett Cannon [Wed, 31 Aug 2016 18:59:23 +0000 (11:59 -0700)]
Change accidental use of SLTIU in SLTI tests (#26)

7 years agoShare code between rv32ui and rv64ui tests
Andrew Waterman [Tue, 30 Aug 2016 20:02:59 +0000 (13:02 -0700)]
Share code between rv32ui and rv64ui tests

They were almost identical, so I made them actually identical.  This
will reduce the burden of writing further tests that span base ISAs.

Tests can still be specialized for XLEN with ifdefs on e.g. __riscv64.

7 years agoAdd missing RV32 slt[i]u tests
Andrew Waterman [Tue, 30 Aug 2016 18:11:08 +0000 (11:11 -0700)]
Add missing RV32 slt[i]u tests

Closes #12.

7 years agoOn RV32, zero-extend pointers for HTIF
Andrew Waterman [Mon, 29 Aug 2016 20:42:37 +0000 (13:42 -0700)]
On RV32, zero-extend pointers for HTIF

7 years agoDon't explicitly use atomics in rsort
Andrew Waterman [Mon, 29 Aug 2016 20:41:16 +0000 (13:41 -0700)]
Don't explicitly use atomics in rsort

This is a pattern GCC should pick up for targets where AMOADD is faster
than LW/ADD/SW.

7 years agoUpdate to new breakpoint & counter spec
Andrew Waterman [Sat, 27 Aug 2016 02:53:25 +0000 (19:53 -0700)]
Update to new breakpoint & counter spec

7 years agoMerge pull request #24 from richardxia/declare-dependencies
Tim Newsome [Tue, 23 Aug 2016 21:34:59 +0000 (14:34 -0700)]
Merge pull request #24 from richardxia/declare-dependencies

Add requirements.txt and reorder imports by type.

7 years agoUse a version range.
Richard Xia [Tue, 23 Aug 2016 21:25:47 +0000 (14:25 -0700)]
Use a version range.

7 years agoAdd requirements.txt and reorder imports by type.
Richard Xia [Tue, 23 Aug 2016 01:16:53 +0000 (18:16 -0700)]
Add requirements.txt and reorder imports by type.

7 years agoUse env shebang so for virtualenv compatibility.
Tim Newsome [Tue, 23 Aug 2016 00:59:41 +0000 (17:59 -0700)]
Use env shebang so for virtualenv compatibility.

7 years agoImprove AMO tests
Andrew Waterman [Wed, 17 Aug 2016 07:37:17 +0000 (00:37 -0700)]
Improve AMO tests

- avoid code duplication between RV32 and RV64 variants
- make LR/SC do something interesting on uniprocessors
- avoid requiring M extension

7 years agoFix missing setup in test_turbostep.
Tim Newsome [Tue, 16 Aug 2016 17:44:16 +0000 (10:44 -0700)]
Fix missing setup in test_turbostep.

7 years agoSimplify test_function_call.
Tim Newsome [Mon, 15 Aug 2016 19:52:03 +0000 (12:52 -0700)]
Simplify test_function_call.

Now it doesn't rely on malloc, which can be tricky to get to work in and
of itself.

7 years agobump env
Andrew Waterman [Tue, 16 Aug 2016 18:01:27 +0000 (11:01 -0700)]
bump env

7 years agoMake ENTROPY deterministic
Andrew Waterman [Tue, 16 Aug 2016 07:46:27 +0000 (00:46 -0700)]
Make ENTROPY deterministic

Base it on the output filename, not the pid.  This still gets decent
coverage, but is deterministic.

7 years agoAdd --32 and --64 options to gdbserver.py.
Tim Newsome [Mon, 15 Aug 2016 17:28:01 +0000 (10:28 -0700)]
Add --32 and --64 options to gdbserver.py.

7 years agoFix cut and paste bug.
Tim Newsome [Mon, 15 Aug 2016 17:54:34 +0000 (10:54 -0700)]
Fix cut and paste bug.

Also minor style changes.

7 years agoMerge pull request #21 from sifive/add_freedom_sim_targets
Tim Newsome [Fri, 12 Aug 2016 01:43:46 +0000 (18:43 -0700)]
Merge pull request #21 from sifive/add_freedom_sim_targets

Add freedom sim targets

7 years agoAdd FreedomU500 & incorporate feedback
Megan Wachs [Thu, 11 Aug 2016 20:43:04 +0000 (13:43 -0700)]
Add FreedomU500 & incorporate feedback

7 years agoMake simple memory test errors more readable.
Tim Newsome [Thu, 11 Aug 2016 19:15:04 +0000 (12:15 -0700)]
Make simple memory test errors more readable.

7 years agomove fclass macros into the same file as the rest (#22)
Colin Schmidt [Mon, 8 Aug 2016 23:08:32 +0000 (16:08 -0700)]
move fclass macros into the same file as the rest (#22)

7 years agoBy default debug=False
Megan Wachs [Mon, 8 Aug 2016 19:24:44 +0000 (12:24 -0700)]
By default debug=False

7 years agoAdd U500 Target
Megan Wachs [Mon, 8 Aug 2016 18:34:32 +0000 (11:34 -0700)]
Add U500 Target

7 years agoSome code cleanup
Megan Wachs [Fri, 5 Aug 2016 21:50:14 +0000 (14:50 -0700)]
Some code cleanup

7 years agoAdded FreedomE300 Simulator target
Megan Wachs [Thu, 4 Aug 2016 21:21:37 +0000 (14:21 -0700)]
Added FreedomE300 Simulator target

7 years agoMerge remote-tracking branch 'origin/master'
Megan Wachs [Mon, 8 Aug 2016 18:41:25 +0000 (11:41 -0700)]
Merge remote-tracking branch 'origin/master'

7 years agoRe-enable debug testing. (#20)
Tim Newsome [Mon, 1 Aug 2016 17:37:03 +0000 (10:37 -0700)]
Re-enable debug testing. (#20)

Manually ran all the steps travis does, and the tests pass.

7 years agoAdd RV32 RVC and breakpoint tests
Andrew Waterman [Fri, 29 Jul 2016 21:47:26 +0000 (14:47 -0700)]
Add RV32 RVC and breakpoint tests

7 years agoAdd an RVC test
Andrew Waterman [Fri, 29 Jul 2016 20:59:33 +0000 (13:59 -0700)]
Add an RVC test

7 years agoAdd tests for virtual priv register.
Tim Newsome [Thu, 28 Jul 2016 21:47:12 +0000 (14:47 -0700)]
Add tests for virtual priv register.

Users can use this register to inspect and change the privilege level of
the core. It doesn't make any assumptions about the actual underlying
debug mechanism (as opposed to having the user change DCSR directly,
which may not exist in all debug implementations).

7 years agoAdd --gdb argument so I can run valgrind on gdb.
Tim Newsome [Thu, 28 Jul 2016 17:26:47 +0000 (10:26 -0700)]
Add --gdb argument so I can run valgrind on gdb.

7 years agoRename m2gl_m2s to freedom-e300. (#19)
Tim Newsome [Wed, 27 Jul 2016 23:05:09 +0000 (16:05 -0700)]
Rename m2gl_m2s to freedom-e300. (#19)

It's possible to flash the Freedom E300 onto different FPGA boards, and
then debug them in the exact same way.

7 years agoRename m2gl_m2s to freedom-e300.
Tim Newsome [Wed, 27 Jul 2016 21:34:40 +0000 (14:34 -0700)]
Rename m2gl_m2s to freedom-e300.

It's possible to flash the Freedom E300 onto different FPGA boards, and
then debug them in the exact same way.

7 years agoMerge pull request #18 from sifive/master
Andrew Waterman [Mon, 25 Jul 2016 18:32:15 +0000 (11:32 -0700)]
Merge pull request #18 from sifive/master

Display log file during build if debug testing fails.

7 years agoDisplay log file during build if testing fails.
Tim Newsome [Mon, 25 Jul 2016 18:19:06 +0000 (11:19 -0700)]
Display log file during build if testing fails.

That way somebody doesn't need to spend forever trying to reproduce a
travis failure when all they really need is the logfile.

7 years agoTemporarily stop building debug tests, as they fail in travis
Andrew Waterman [Fri, 22 Jul 2016 22:16:29 +0000 (15:16 -0700)]
Temporarily stop building debug tests, as they fail in travis

@timsifive can you look into why?

https://travis-ci.org/riscv/riscv-tools/builds/146759105

7 years agoskip user-mode trap tests in rv32mi/rv64mi-p-csr if no user mode
Howard Mao [Fri, 22 Jul 2016 21:20:28 +0000 (14:20 -0700)]
skip user-mode trap tests in rv32mi/rv64mi-p-csr if no user mode

7 years agoMove rv32mi dirty bit test to rv32si
Andrew Waterman [Fri, 22 Jul 2016 18:58:18 +0000 (11:58 -0700)]
Move rv32mi dirty bit test to rv32si

7 years agoMove dirty bit test to rv64si directory
Andrew Waterman [Fri, 22 Jul 2016 18:25:52 +0000 (11:25 -0700)]
Move dirty bit test to rv64si directory

Not sure this is quite right, since the test technically runs in M-mode.

Also, remove unused rdnpc/example tests.

7 years agoSimplify fence.i test for RVC
Andrew Waterman [Wed, 20 Jul 2016 01:15:01 +0000 (18:15 -0700)]
Simplify fence.i test for RVC

7 years agoMake ma_fetch test robust against code size changes
Andrew Waterman [Tue, 19 Jul 2016 19:23:22 +0000 (12:23 -0700)]
Make ma_fetch test robust against code size changes

7 years agoMerge pull request #17 from timsifive/debug
Andrew Waterman [Wed, 20 Jul 2016 00:10:24 +0000 (17:10 -0700)]
Merge pull request #17 from timsifive/debug

Add end-to-end debug tests

7 years agoRun debug tests from main Makefile.
Tim Newsome [Tue, 19 Jul 2016 18:07:03 +0000 (11:07 -0700)]
Run debug tests from main Makefile.

7 years agoUse unique filenames for block test.
Tim Newsome [Tue, 19 Jul 2016 01:41:57 +0000 (18:41 -0700)]
Use unique filenames for block test.

Fixes occasional failure when multiple tests are run at once.

7 years agoAdd 32-bit support.
Tim Newsome [Tue, 19 Jul 2016 01:33:10 +0000 (18:33 -0700)]
Add 32-bit support.

7 years agoBe verbose, since output is going to a log file.
Tim Newsome [Tue, 19 Jul 2016 01:32:45 +0000 (18:32 -0700)]
Be verbose, since output is going to a log file.

7 years agoAdd Makefile.
Tim Newsome [Mon, 18 Jul 2016 16:57:37 +0000 (09:57 -0700)]
Add Makefile.

Add --isolate argument which enables the 32- and 64-bit spikes to be
tested simultaneously.

7 years agoFix test_instant_halt.
Tim Newsome [Sat, 16 Jul 2016 00:10:47 +0000 (17:10 -0700)]
Fix test_instant_halt.

Only check for things that the spec guarantees when coming out of reset.

7 years agoFix test_block for 64-bit targets.
Tim Newsome [Thu, 14 Jul 2016 21:52:55 +0000 (14:52 -0700)]
Fix test_block for 64-bit targets.

7 years agoFix test_32 on 64-bit targets.
Tim Newsome [Thu, 14 Jul 2016 21:49:23 +0000 (14:49 -0700)]
Fix test_32 on 64-bit targets.

7 years agoOnly run hwbp tests on targets that support them.
Tim Newsome [Wed, 13 Jul 2016 18:25:42 +0000 (11:25 -0700)]
Only run hwbp tests on targets that support them.

7 years agoTell gdb what xlen is when there's no ELF file.
Tim Newsome [Wed, 13 Jul 2016 17:51:05 +0000 (10:51 -0700)]
Tell gdb what xlen is when there's no ELF file.

This makes several spike32 tests pass that used to fail. Ideally gdb
wouldn't need to be told, but that's a project for another day.

7 years agoflush spike log after initial write.
Tim Newsome [Wed, 13 Jul 2016 17:37:53 +0000 (10:37 -0700)]
flush spike log after initial write.

This makes sure the execution line is the first one in the logfile.

7 years agoI think I've finally got malloc working right.
Tim Newsome [Fri, 1 Jul 2016 01:57:24 +0000 (18:57 -0700)]
I think I've finally got malloc working right.

Now gdb can call functions and change strings.

7 years agoMake variables local again, now that gdb is "fixed."
Tim Newsome [Thu, 30 Jun 2016 20:11:20 +0000 (13:11 -0700)]
Make variables local again, now that gdb is "fixed."

7 years agoAdd test for gdb function calls.
Tim Newsome [Tue, 28 Jun 2016 00:10:09 +0000 (17:10 -0700)]
Add test for gdb function calls.

7 years agoTest step over invalid instruction.
Tim Newsome [Wed, 22 Jun 2016 02:20:27 +0000 (19:20 -0700)]
Test step over invalid instruction.

7 years agoTurn off debugging.
Tim Newsome [Tue, 21 Jun 2016 20:59:19 +0000 (13:59 -0700)]
Turn off debugging.

7 years agoRemove hardware breakpoints so future tests work.
Tim Newsome [Tue, 21 Jun 2016 20:56:32 +0000 (13:56 -0700)]
Remove hardware breakpoints so future tests work.

7 years agoMake DownloadTest pass on boards with little RAM.
Tim Newsome [Tue, 21 Jun 2016 00:38:20 +0000 (17:38 -0700)]
Make DownloadTest pass on boards with little RAM.

7 years agoIncrease TCK speed.
Tim Newsome [Tue, 21 Jun 2016 00:25:53 +0000 (17:25 -0700)]
Increase TCK speed.

7 years agoWrite command to logfile.
Tim Newsome [Sun, 19 Jun 2016 20:31:51 +0000 (13:31 -0700)]
Write command to logfile.

7 years agoAdd test for debuginfo symbols.
Tim Newsome [Sat, 18 Jun 2016 18:07:06 +0000 (11:07 -0700)]
Add test for debuginfo symbols.

Currently fails with 32-bit tools.

7 years agoAdd explicit test for stepping over branches/jumps.
Tim Newsome [Thu, 16 Jun 2016 20:03:19 +0000 (13:03 -0700)]
Add explicit test for stepping over branches/jumps.

7 years agoImprove formatting. Add examples.
Tim Newsome [Thu, 16 Jun 2016 17:07:15 +0000 (10:07 -0700)]
Improve formatting. Add examples.

7 years agoIncrease "load" timeout.
Tim Newsome [Thu, 16 Jun 2016 17:06:38 +0000 (10:06 -0700)]
Increase "load" timeout.

7 years agoBump up speed.
Tim Newsome [Thu, 16 Jun 2016 17:06:17 +0000 (10:06 -0700)]
Bump up speed.

7 years agoAdd a few tips.
Tim Newsome [Tue, 14 Jun 2016 00:56:53 +0000 (17:56 -0700)]
Add a few tips.

7 years agoUpdate IDCODE.
Tim Newsome [Fri, 10 Jun 2016 23:41:24 +0000 (16:41 -0700)]
Update IDCODE.