Luke Wren
9c56e669cd
Standardise on a single ISA variant for default test builds, and align this with the lightweight toolchain config in the Readme
...
(Automated test builds for multiple ISA variants still yet to be implemented)
2024-08-07 13:34:36 -07:00
Luke Wren
877c6aa5ee
Add trace disassembly annotation script for rvcpp, and add runtests support for passing flags to tb, and running post-processing commands on test results.
2024-06-02 11:20:58 +01:00
Luke Wren
b026814674
runtests: use argparse for argument parsing, and support passing a different tb executable
2024-06-02 10:36:29 +01:00
Luke Wren
a6558e554a
Set misa.b when all of Zba, Zbb and Zbs are enabled.
...
(The B extension has now been ratified as this combination of extensions.)
2024-05-11 12:13:35 +01:00
Luke Wren
a84742abd4
Fix mstatus.mie still being respected when privilege is less than M.
...
Extend umode_wfi testcase to cover this, and in particular to check
that when entering U-mode with IRQs pending, the IRQs execute before any
exceptions occurring as a result of the U-mode instructions.
2024-05-11 10:49:13 +01:00
Luke Wren
7d370292b0
Fix transposition of RWX <-> XWR in PMP implementation.
...
None of upstream tests used for Hazard3 seem to cover X != R. The
Hazard3 tests covered this case, but the header file for the tests has
the same mistake. Fix the header.
2024-04-27 13:52:43 +01:00
Luke Wren
fd584ea24b
Add Xh3bextm instructions to rvcpp, and rename xh3b test to xh3bextm
2024-03-20 23:45:30 +00:00
Luke Wren
8cbf5fceee
rvcpp: fix busted RMW CSR logic, fix ordering of CSR write vs update, csr_mcycle testcase now passes
2024-03-20 01:37:04 +00:00
Luke Wren
404aeead92
Additional assertions for cm.mvsa01/mva01s IRQ testcase
2024-03-17 05:04:59 +00:00
Luke Wren
e8b4578b40
Add test for cm.mvsa01/cm.mva01s tearing on IRQs
2023-11-04 14:08:07 +00:00
Luke Wren
514ab0bb32
Typo in zcmp_irq_kill tests
2023-11-04 12:24:45 +00:00
Luke Wren
9955807520
Check in missing xoroshiro header from amo_ops testcase
2023-11-04 12:17:04 +00:00
Luke Wren
2f6e98335f
Add two new tests for IRQs-over-Zcmp, and fix a bug they found:
...
Interrupting the PC-setting step of a cm.popret (only) can sample the return target
as the exception return PC, which will cause the stack pointer adjust to be skipped
when returning from the IRQ. Fix this by making the PC-setting step uninterruptible
(note the PC-setting step is the instruction we execute first out of the group
of instructions specified in the Zc spec as being atomic wrt interrupts. This
does not itself imply that the PC-setting step is uninterruptible, it just
requires that when the PC-setting step retires, all following steps also retire.
However this is not sufficient given the special case logic that allows the jr
ra PC-setting step to execute before the final stack adjust as an optimisation.)
2023-11-03 21:12:21 +00:00
Luke Wren
ef386f43c6
Disable zbs in sw_testcases compilation as a workaround for regression in GCC 12.3
2023-11-03 20:09:27 +00:00
Luke Wren
31642b6d4a
Add amo_ops testcase
2023-04-01 08:47:29 +01:00
Luke Wren
a536e3baa7
rvcpp sim: add A extension and M-mode traps
...
(now passes a lot of the Hazard3 tests)
2023-04-01 08:21:43 +01:00
Luke Wren
5aee830ac0
Restore SW Makefiles to use whatever riscv32-unknown-elf toolchain is in PATH
...
(clean up fallout from Zc implementation -- ensure Readme instructions will get you to hello world)
2023-03-31 01:53:28 +01:00
Luke Wren
56586def8d
List Zcb/Zcmp in docs, and rebuild PDF
2023-03-22 03:04:16 +00:00
Luke Wren
95faab6f2c
Add zcmp_irq_kill test
2023-03-22 02:44:03 +00:00
Luke Wren
f702fe5352
Add test covering all pop instructions
2023-03-20 18:26:29 +00:00
Luke Wren
d2adc6aad7
Add tests for mva01s/mvsa01
2023-03-20 16:05:07 +00:00
Luke Wren
142b3a81ff
Add spike-extracted output to zcmp_push
2023-03-20 15:37:38 +00:00
Luke Wren
ee6e03e0e6
Add beginnings of Spike-able zcmp_push test
2023-03-20 14:26:53 +00:00
Luke Wren
3b2ddee06b
Fix push/pop frame format, fix source regnums for mvsa01/mva01s
2023-03-20 02:35:18 +00:00
Luke Wren
7702c44288
Handle timeout in runtests
2023-03-20 01:32:16 +00:00
Luke Wren
e966e832d2
First attempt at Zcmp
2023-03-20 00:19:23 +00:00
Luke Wren
954bae5cf1
Implement block/unblock instructions, and fix questionable partial masking of sleep signals on exceptions. Add simple test for self-block/unblock with loopback in tb.
2022-08-29 14:52:01 +01:00
Luke Wren
2ae2463b97
First stab at adding wake/sleep state machine
2022-08-28 19:50:04 +01:00
Luke Wren
6e2076268c
Update CSR readability/writability tests for new CSRs
2022-08-22 08:50:57 +01:00
Luke Wren
6e3799eed0
First attempt at hacking in triggers, at least seems to have not broken other exception logic. Not yet tested.
2022-08-22 08:47:03 +01:00
Luke Wren
8b630d2ac6
Whoops I needed that constant
2022-08-10 01:00:47 +01:00
Luke Wren
64dc31244e
Add top/bottom-half IRQ test
2022-08-10 00:09:13 +01:00
Luke Wren
a44ff9b6f1
Add test for IRQ force array
2022-08-09 23:38:14 +01:00
Luke Wren
5894ddf15c
Fix outdated expected output in irq_set_all_with_pri test
2022-08-08 18:44:58 +01:00
Luke Wren
ad5fd24772
- Fix signal named priority, which is a keyword in SV
...
- Fix incorrect HIGHEST_WINS behaviour in one-hot selector
- Add test for asserting 32 IRQs at 16 priorities at once
- Add an entry counter to the soft dispatch code so tests can check
the number of times hardware entered the vector
2022-08-07 23:17:03 +01:00
Luke Wren
2e3d69e98f
Forgot to add expected output for preemption test
2022-08-07 22:08:50 +01:00
Luke Wren
5e72ec8941
Fix a couple of bugs in preemption priority update, add simple IRQ preemption test
2022-08-07 22:04:42 +01:00
Luke Wren
15cb21ae43
First pass at implementing the new IRQ controls. Works well enough that the old tests pass :)
2022-08-07 20:51:12 +01:00
Luke Wren
185194973f
Add a custom instruction (bextm/bextmi: 1 to 8-bit version of bext/bexti from Zbs) for fooling around with toolchains
2022-08-06 23:02:08 +01:00
Luke Wren
02b303b385
Remove stray old expected output file from sw_testcases dir
2022-06-03 17:20:49 +01:00
Luke Wren
e2c9901701
Update readme for runtests
2022-05-30 01:12:16 +01:00
Luke Wren
2cfe6aa90e
Add test to check MPRV/MPP behaviour when executing an MRET
2022-05-29 19:51:19 +01:00
Luke Wren
f96a0ffb75
Add test for MPRV vs PMP
2022-05-29 19:06:04 +01:00
Luke Wren
71eff7649d
Add PMP U-mode read/write permission test
2022-05-29 18:42:44 +01:00
Luke Wren
c8afcdbb8f
Extend umode_wfi test to check U-mode WFI doesn't stall the processor if TW=0 or PMP X check fails
2022-05-29 17:42:15 +01:00
Luke Wren
66965ac073
Fix inverted sc return code (argh) and lr/sc tests which also assumed the sc code was inverted
2022-05-28 15:36:21 +01:00
Luke Wren
81aec325bb
ecall from U-mode has a different mcause value than ecall from M-mode
2022-05-28 12:07:29 +01:00
Luke Wren
f2876eb51f
Fix bad mepc reported after branching to a branch in a no-X address range
2022-05-27 22:47:04 +01:00
Luke Wren
e208652ad7
Fix misa value in csr_id test
2022-05-26 00:48:12 +01:00
Luke Wren
5be8835365
Add missing output to pmp_write_and_lock test
2022-05-25 15:34:28 +01:00