Tim Newsome [Mon, 19 Feb 2018 21:31:40 +0000 (13:31 -0800)]
Test debugging with/without a program buffer
Tim Newsome [Thu, 1 Mar 2018 23:05:45 +0000 (15:05 -0800)]
Ensure an error when reading a non-existent CSR.
Andrew Waterman [Tue, 27 Feb 2018 07:25:34 +0000 (01:25 -0600)]
Add test for clearing misa.C while PC is misaligned (#117)
See https://github.com/riscv/riscv-isa-manual/pull/139
Tim Newsome [Fri, 9 Feb 2018 16:54:59 +0000 (08:54 -0800)]
Test resuming from a trigger.
Tim Newsome [Wed, 7 Feb 2018 21:48:54 +0000 (13:48 -0800)]
Link scripts shouldn't be executable.
Tim Newsome [Mon, 8 Jan 2018 20:36:49 +0000 (12:36 -0800)]
Deal with gdb reporting pmpcfg0 not existing.
It's an optional register.
Tim Newsome [Fri, 5 Jan 2018 22:25:57 +0000 (14:25 -0800)]
Add test for multicore failure
Specifically, make sure that after resuming all cores, and halting core
0, that OpenOCD's poll() doesn't mess up the currently selected hart to
the point where memory accesses intended for core 0 go to core 1.
Andrew Waterman [Wed, 3 Jan 2018 05:13:38 +0000 (21:13 -0800)]
Test access exception behavior for illegal addresses (#111)
OK'd by @palmer-dabbelt
Tim Newsome [Wed, 27 Dec 2017 23:41:45 +0000 (15:41 -0800)]
Test FPRs that aren't XLEN in size.
Cover all combinations of 32,64 bit XLEN with F and FD extensions.
Finishes Issue https://github.com/riscv/riscv-openocd/issues/110
Tim Newsome [Fri, 22 Dec 2017 00:00:01 +0000 (16:00 -0800)]
Add all-tests target.
I hope to use this in riscv-tools' regression.sh.
Megan Wachs [Thu, 21 Dec 2017 23:35:15 +0000 (15:35 -0800)]
Merge pull request #110 from riscv/bump_env
tests: bump env to pick up new names for CSRs
Megan Wachs [Thu, 21 Dec 2017 23:23:38 +0000 (15:23 -0800)]
tests: bump env to pick up new names for CSRs
Tim Newsome [Wed, 20 Dec 2017 23:00:01 +0000 (15:00 -0800)]
Remove `set arch riscv:rv%d`
gdb gets target XLEN from register width now, so this is taken care of
automatically.
Tim Newsome [Wed, 20 Dec 2017 20:17:05 +0000 (12:17 -0800)]
Verify that F18 does not exist on FPU-less targets
Tim Newsome [Tue, 12 Dec 2017 16:02:38 +0000 (08:02 -0800)]
Display env variables used when invoking OpenOCD
This makes it a little easier to just cut and paste from the log when
reproducing a failure. (The port number still needs changing though.)
Tim Newsome [Fri, 1 Dec 2017 22:29:11 +0000 (14:29 -0800)]
Ensure there are no unnamed registers.
Tim Newsome [Thu, 30 Nov 2017 20:24:32 +0000 (12:24 -0800)]
Merge pull request #109 from riscv/vcssim
Clean up VcsSim init()
Tim Newsome [Thu, 30 Nov 2017 19:50:18 +0000 (11:50 -0800)]
Clean up VcsSim init()
Use a unique log file, so you can run multiple instances at once.
Add time out to waiting for the simulator to be ready.
Andrew Waterman [Mon, 27 Nov 2017 22:37:58 +0000 (14:37 -0800)]
Rename sbadaddr to satp
Torbjørn [Mon, 27 Nov 2017 05:56:53 +0000 (06:56 +0100)]
Rv32ud tests (#108)
* Probably implemented the changes required to support fadd test for rv32ud
* Created test files in rv32ud, implemented working(?) test for ldst
* fclass, fcvt_w, fmin and recoding seem to be working now
* Got fdiv (and sqrt) tests working
* fmadd tests seem to work
* fcmp works
* [WIP] fcvt working, but lacks a 32-bit implementation of the final test
* Renamed macro TEST_LDST_D32 to TEST_CASE_D32 to indicate that it can be used for more than just LDST
* Added Makefrag for rv32ud tests and included in main isa Makefile
* Don't run 64-bit tests if the defined XLEN is 32
Christopher Celio [Wed, 22 Nov 2017 22:01:26 +0000 (14:01 -0800)]
Check sepc for rv64si/scall test. (#107)
Closes #105.
Andrew Waterman [Mon, 20 Nov 2017 19:59:28 +0000 (11:59 -0800)]
Check mtval in rv64mi-p-illegal (#104)
Closes #103
Tim Newsome [Mon, 20 Nov 2017 04:54:33 +0000 (20:54 -0800)]
Ensure log file is fully written before reading it
Fixes --print-failures sometimes not actually printing out details about
failures.
Tim Newsome [Mon, 20 Nov 2017 04:54:14 +0000 (20:54 -0800)]
Make pylint happy.
Megan Wachs [Fri, 17 Nov 2017 21:43:33 +0000 (13:43 -0800)]
Merge pull request #102 from riscv/xlen_fix
debug: Fix the XLEN command line check
Megan Wachs [Fri, 17 Nov 2017 19:27:04 +0000 (11:27 -0800)]
debug: Fix the XLEN command line check
Megan Wachs [Fri, 17 Nov 2017 00:34:02 +0000 (16:34 -0800)]
Debug: Use the --32 and --64 command line arguments (#97)
* Debug: Actually use the --32 and --64 command line arguments
* debug: make XLEN mismatch message clearer
Tim Newsome [Thu, 16 Nov 2017 23:40:27 +0000 (15:40 -0800)]
Disable PMP for PrivRw test.
Tim Newsome [Thu, 16 Nov 2017 00:51:49 +0000 (16:51 -0800)]
Clarify PrivTest detail.
Andrew Waterman [Sun, 12 Nov 2017 00:15:22 +0000 (16:15 -0800)]
Make sure that code is 4-byte aligned before disabling rvc (#100)
Andrew Waterman [Fri, 10 Nov 2017 03:25:22 +0000 (19:25 -0800)]
Make rv64mi-p-ecall work when U-mode is not present
Andrew Waterman [Fri, 10 Nov 2017 01:12:49 +0000 (17:12 -0800)]
Use mstatus.MPP to check existence of U-mode
misa is allowed to be hardwired to 0, so checking its U bit could
incorrectly suggest that U-mode is not supported.
Tim Newsome [Thu, 2 Nov 2017 22:14:40 +0000 (15:14 -0700)]
Add --print-log-names to print temp log names ASAP
When not passed, they are no longer printed out.
Tim Newsome [Thu, 2 Nov 2017 20:11:50 +0000 (13:11 -0700)]
Ensure gdb connection failures end up in main log.
Megan Wachs [Thu, 2 Nov 2017 15:46:24 +0000 (08:46 -0700)]
debug: Need to apply remotetimeout before connecting to remote target (#94)
* debug: Need to apply remotetimeout before connecting to remote target
* debug: whitespace cleanup
Christopher Celio [Wed, 1 Nov 2017 20:46:34 +0000 (13:46 -0700)]
SBREAK test now checks EPC value. (#92)
Closes #89
Tim Newsome [Wed, 1 Nov 2017 19:36:36 +0000 (12:36 -0700)]
Make pylint 1.6.5 happy.
Tim Newsome [Wed, 1 Nov 2017 19:19:16 +0000 (12:19 -0700)]
Test register aliases in the simple register tests
Tim Newsome [Wed, 1 Nov 2017 18:43:04 +0000 (11:43 -0700)]
Fix MulticoreRegTest.
This test would fail intermittently if gdb on the first hart managed to
set a breakpoint, resume, halt, and clear the breakpoint before the
second hart got a chance to resume.
Palmer Dabbelt [Tue, 31 Oct 2017 23:07:21 +0000 (16:07 -0700)]
Merge pull request #90 from richardxia/comment-out-multicore-reg-test
Temporarily comment out MulticoreRegTest due to flakiness.
Richard Xia [Tue, 31 Oct 2017 20:19:21 +0000 (13:19 -0700)]
Temporarily comment out MulticoreRegTest due to flakiness.
Richard Xia [Mon, 30 Oct 2017 22:44:21 +0000 (15:44 -0700)]
Remove cache miss test from last AMO test. (#88)
Follow-up to
b68b39031a730ecc155ed87fba2ed5f111d0ab07.
The 64KiB allocated by the code to force a cache miss makes it impossible to run
the test from any memories that are smaller 64KiB, such as scratchpad memories
or LIMs. Since this is trying to test microarchitectural behavior, they don't
belong in these ISA tests anyway.
Richard Xia [Mon, 30 Oct 2017 19:18:49 +0000 (12:18 -0700)]
Declare trap handlers as global symbols. (#87)
This allows them to be referenced by other files, such as a test environment
that lives in a separate compilation unit.
Andrew Waterman [Wed, 20 Sep 2017 17:47:11 +0000 (10:47 -0700)]
Verify that mtval/stval is written correctly on misaligned fetch
Richard Xia [Fri, 27 Oct 2017 04:33:49 +0000 (21:33 -0700)]
Fix rv64mi-csr for the case where U-mode is not available. (#86)
Tim Newsome [Tue, 24 Oct 2017 18:55:01 +0000 (11:55 -0700)]
Increase dual-core RV64 timeouts.
I need this for CompareSections to pass when I instrument spike to be
really slow.
Tim Newsome [Thu, 19 Oct 2017 20:21:26 +0000 (13:21 -0700)]
Get helpful gdb output in MemTestBlock.
Tim Newsome [Thu, 12 Oct 2017 18:53:22 +0000 (11:53 -0700)]
Pay attention to server_timeout_sec
Fixes #83.
Tim Newsome [Sat, 30 Sep 2017 21:48:15 +0000 (14:48 -0700)]
Resurrect priv tests.
Tim Newsome [Wed, 4 Oct 2017 19:40:30 +0000 (12:40 -0700)]
Merge pull request #79 from riscv/multigdb
Multigdb support
Tim Newsome [Fri, 29 Sep 2017 22:41:30 +0000 (15:41 -0700)]
Make ExamineTarget multi-core aware.
Now on multi-core targets it only runs once, wasting less time.
Tim Newsome [Fri, 29 Sep 2017 20:20:30 +0000 (13:20 -0700)]
Fix tests to work in multi-gdb mode.
The Gdb class now can handle connecting to more than one gdb. It
enumerates the harts across all connections, and when asked to select a
hart, it transparently sends future gdb commands to the correct
instance.
Multicore tests still have to be aware of some differences. The main one
is that when executing 'c' in RTOS mode, all harts resume, while in
multi-gdb mode only the current one resumes. Additionally, gdb doesn't
set breakpoints until 'c' is issued, so the hart where breakpoints are
set needs to be resumed before other harts might see them.
Tim Newsome [Fri, 22 Sep 2017 19:57:51 +0000 (12:57 -0700)]
Remove unused function.
Tim Newsome [Thu, 21 Sep 2017 22:19:47 +0000 (15:19 -0700)]
Add coverage for single-core non-rtos OpenOCD.
Tim Newsome [Wed, 20 Sep 2017 00:10:36 +0000 (17:10 -0700)]
Allow multiple reset vectors.
Some boards have jumpers that control the reset vector, and forcing them
one way or another is more annoying than dealing with it in software.
Andrew Waterman [Tue, 19 Sep 2017 21:34:42 +0000 (14:34 -0700)]
Link against libm for fma()
Tim Newsome [Tue, 19 Sep 2017 21:12:12 +0000 (14:12 -0700)]
Merge pull request #76 from riscv/multicore
Add interrupts to MulticoreRunHaltStepiTest.
Tim Newsome [Tue, 19 Sep 2017 18:23:35 +0000 (11:23 -0700)]
Forgot to commit this earlier.
Fixes #77.
Tim Newsome [Mon, 18 Sep 2017 18:31:08 +0000 (11:31 -0700)]
Add interrupts to MulticoreRunHaltStepiTest.
Just to hammer on anything at once, and hopefully catch weird
interactions if they exist.
Tim Newsome [Fri, 15 Sep 2017 19:03:52 +0000 (12:03 -0700)]
Don't read entire log into RAM just to print it.
Tim Newsome [Thu, 14 Sep 2017 23:26:51 +0000 (16:26 -0700)]
misa is stored in the hart now, not the target
Tim Newsome [Thu, 14 Sep 2017 19:59:08 +0000 (12:59 -0700)]
When spike fails to launch, display its output.
Tim Newsome [Wed, 13 Sep 2017 01:48:44 +0000 (18:48 -0700)]
Test debugging code with interrupts.
Tim Newsome [Tue, 12 Sep 2017 18:21:06 +0000 (11:21 -0700)]
Call postMortem() when a test fails.
Tim Newsome [Tue, 12 Sep 2017 18:20:27 +0000 (11:20 -0700)]
Clarify timeout units.
Andrew Waterman [Thu, 14 Sep 2017 18:11:44 +0000 (11:11 -0700)]
Move link options to end of gcc command line
Tim Newsome [Tue, 12 Sep 2017 16:36:34 +0000 (09:36 -0700)]
Merge pull request #69 from riscv/multicore
Proper multicore support for debug tests
Andrew Waterman [Fri, 1 Sep 2017 18:15:44 +0000 (11:15 -0700)]
Improve ma_fetch test to cover JAL and branches
Tim Newsome [Fri, 1 Sep 2017 19:31:15 +0000 (12:31 -0700)]
Add some infrastructure for multicore tests.
When compiling, define the number of harts. This means we only need to
allocate a lot of stack if there are a lot of harts.
Tim Newsome [Fri, 1 Sep 2017 19:03:40 +0000 (12:03 -0700)]
Use 32-bit link script for 32-bit target.
Tim Newsome [Mon, 28 Aug 2017 20:40:15 +0000 (13:40 -0700)]
This file isn't ready yet.
Tim Newsome [Mon, 28 Aug 2017 19:43:08 +0000 (12:43 -0700)]
Forgot to add this file.
Tim Newsome [Mon, 28 Aug 2017 19:17:37 +0000 (12:17 -0700)]
Increase remotetimeout for spike targets.
On overloaded systems, when executing compare-sections, otherwise gdb
might hit a timeout and the compare-sections code doesn't deal with it.
(You get an error message complaining that 130 is not a valid hex
digit.)
Tim Newsome [Tue, 15 Aug 2017 22:32:24 +0000 (15:32 -0700)]
Fix rebase bug.
Tim Newsome [Sun, 13 Aug 2017 20:56:44 +0000 (13:56 -0700)]
Make MemTestBlock output a more descriptive error.
Tim Newsome [Sun, 13 Aug 2017 19:50:39 +0000 (12:50 -0700)]
Fix MemTest* after sloppy rebase.
Tim Newsome [Fri, 11 Aug 2017 20:25:06 +0000 (13:25 -0700)]
Rename test to MulticoreRunHaltStepiTest.
Tim Newsome [Fri, 11 Aug 2017 19:55:25 +0000 (12:55 -0700)]
Make pylint happy.
Tim Newsome [Thu, 10 Aug 2017 18:27:04 +0000 (11:27 -0700)]
WIP multicore testing.
Tim Newsome [Mon, 7 Aug 2017 22:13:09 +0000 (15:13 -0700)]
WIP towards multiple gdb instances.
Tim Newsome [Mon, 7 Aug 2017 19:51:42 +0000 (12:51 -0700)]
Make the debug tests aware of multicore.
Targets now contain an array of harts. When running a regular test, one
hart is selected to run the test on while the remaining harts are parked
in a safe infinite loop.
There's currently only one test that tests multicore behavior, but there
could be more.
The infrastructure should be able to support heterogeneous multicore,
but I don't have a target like that to test with.
Tim Newsome [Mon, 28 Aug 2017 19:11:49 +0000 (12:11 -0700)]
Increase delay in UserInterrupt.
When a machine is very loaded, otherwise it could happen that we send
the interrupt before the resume has actually happened.
Palmer Dabbelt [Wed, 16 Aug 2017 20:42:50 +0000 (13:42 -0700)]
Merge pull request #67 from riscv/sfence_vma
Inform GCC that "sfence.vma" clobbers memory
Palmer Dabbelt [Wed, 16 Aug 2017 19:26:25 +0000 (12:26 -0700)]
Inform GCC that "sfence.vma" clobbers memory
Tim Newsome [Mon, 14 Aug 2017 22:24:41 +0000 (15:24 -0700)]
Put logfile code back so everything works again.
I don't exactly understand why it has to be the way it is, but I just
want it to work.
Also fix a pylint complaint.
Megan Wachs [Mon, 14 Aug 2017 20:33:31 +0000 (13:33 -0700)]
Merge pull request #66 from riscv/debug_user_niceness
Debug: Usability Features
Megan Wachs [Mon, 14 Aug 2017 20:26:02 +0000 (13:26 -0700)]
debug: clean up Temporary Log File messages
Megan Wachs [Mon, 14 Aug 2017 20:24:04 +0000 (13:24 -0700)]
debug: Avoid None type error
Megan Wachs [Mon, 14 Aug 2017 17:59:34 +0000 (10:59 -0700)]
debug: Revert change to print backtrace, as that is actually already printed
Megan Wachs [Mon, 14 Aug 2017 17:58:22 +0000 (10:58 -0700)]
debug: Allow OpenOCD startup timeout to be specified. Print out path to log files.
Megan Wachs [Mon, 14 Aug 2017 17:17:01 +0000 (10:17 -0700)]
When a test fails with exception, actually print out the reason why.
Tim Newsome [Sun, 13 Aug 2017 19:33:07 +0000 (12:33 -0700)]
Make MemTest* catch reading too many words.
For one of the test addresses, use the highest possible one to ensure
that OpenOCD isn't secretly reading/writing more words than requested.
Tim Newsome [Fri, 11 Aug 2017 21:56:36 +0000 (14:56 -0700)]
Show the OpenOCD log in all(?) failure cases.
Tim Newsome [Fri, 11 Aug 2017 21:33:54 +0000 (14:33 -0700)]
Print out name of logfile when debug test is run.
Tim Newsome [Fri, 11 Aug 2017 21:13:41 +0000 (14:13 -0700)]
When make fails to run a test, print out the log.
Tim Newsome [Fri, 11 Aug 2017 18:15:11 +0000 (11:15 -0700)]
Don't use `set pipefail` which is a bashism.
Instead, just give up on making the log files altogether now. Since
gdbserver.py makes its own log files it's not as necessary in any case.
This is yet another commit in an attempt to get the riscv-tools build to
actually fail if these tests fail.
Tim Newsome [Fri, 11 Aug 2017 17:48:19 +0000 (10:48 -0700)]
Don't eat errors in debug Makefile.
Tim Newsome [Thu, 10 Aug 2017 21:23:29 +0000 (14:23 -0700)]
Don't run debug tests as part of build.
Testing is a separate step.
Also fix Issue #64 by adding src_dir to the path to the targets file.
Tim Newsome [Thu, 10 Aug 2017 20:30:37 +0000 (13:30 -0700)]
Pylint target files as well.
This would have prevented some bugs I committed earlier.
Tim Newsome [Thu, 10 Aug 2017 18:43:49 +0000 (11:43 -0700)]
Give these sim targets a chance of passing.
Also make sure vsim.log makes it into the generated log file.