Age | Commit message (Collapse) | Author | Files | Lines |
|
The caller of gdb.command() should estimate how much work gdb needs to
do, and testlib then scales this up proportional to the general gdb
timeout we configured. This hopefully allows us to configure a tighter
timeout, so we don't have to have a multi-hour timeout just for
something that takes long like `load` on a really slow simulator.
Hopefully this addresses #122.
|
|
Also halt instead of reset spike targets, which tests a more complicated
code path.
|
|
This makes it much easier to look at a log if you see a failure
scrolling by on your terminal.
|
|
|
|
|
|
It's an optional register.
|
|
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.
|
|
Cover all combinations of 32,64 bit XLEN with F and FD extensions.
Finishes Issue https://github.com/riscv/riscv-openocd/issues/110
|
|
gdb gets target XLEN from register width now, so this is taken care of
automatically.
|
|
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.)
|
|
Use a unique log file, so you can run multiple instances at once.
Add time out to waiting for the simulator to be ready.
|
|
Fixes --print-failures sometimes not actually printing out details about
failures.
|
|
|
|
* Debug: Actually use the --32 and --64 command line arguments
* debug: make XLEN mismatch message clearer
|
|
When not passed, they are no longer printed out.
|
|
|
|
* debug: Need to apply remotetimeout before connecting to remote target
* debug: whitespace cleanup
|
|
|
|
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.
|
|
Multigdb support
|
|
Now on multi-core targets it only runs once, wasting less time.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
files.
|
|
|
|
|
|
|
|
|
|
Also make sure vsim.log makes it into the generated log file.
|
|
|
|
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.
|
|
|
|
I'm using this for a target where misa is at an old address, to
set riscv use_compressed_breakpoints off
|
|
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.
|
|
|
|
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.
|