Commit Graph

56 Commits

Author SHA1 Message Date
02114ea7d8 Multiple cleanups and improvements
- Cleanup exception trigger code
- Cleanup division to divide by 0
- Cleanup SRET code
- Cleanup CSR code
- Added interrupts
- Added TIMER interrupt
2023-10-22 19:20:52 +02:00
a0935f0aad ELF: added support for SHT_RISCV_ATTRIBUTES seg 2023-10-20 16:14:01 +02:00
326b52ef86 Added CSR_TIME support 2023-10-20 16:04:57 +02:00
256a56f70e Added CSRRSI 2023-10-20 12:17:41 +02:00
608dbba6a0 ebreak now generates BREAKPOINT 2023-10-20 12:16:17 +02:00
b3f915dcb5 CPU privilege modes 2023-10-20 12:02:50 +02:00
082d2dcd4f Added mock SBI_EXTENSION_TIMER 2023-10-20 11:28:12 +02:00
bdc091aab2 Fixed SBI base extension implementation 2023-10-20 11:14:38 +02:00
dcdebcd8e4 Added memory access type for mmu 2023-10-20 09:58:10 +02:00
5bb973e8da Added MMU 2023-10-19 21:00:12 +02:00
9da9b5045f Added SBI functions support 2023-10-19 20:56:18 +02:00
3f6657fe00 Removed logs 2023-10-19 20:55:36 +02:00
ce89df1ed4 Added noreturn, removed logs 2023-10-19 20:55:27 +02:00
5727356559 Added SBI functions 2023-10-19 16:18:05 +02:00
b1a327cccf Added FIXME messages for mulh 2023-10-19 13:29:10 +02:00
a76c9e5e5c Added supervisor level ids 2023-10-17 15:50:12 +02:00
6c5e3fcc32 Added CSRRC/CSRRCI 2023-10-17 13:28:49 +02:00
c404defb42 Added resource, fixed memaccess 2023-10-17 13:25:31 +02:00
43d22052e5 Fix GDB bug (ooops) 2023-10-13 21:57:55 +02:00
9742c89270 Added CSRRWI support 2023-10-11 21:58:44 +02:00
7fbfae1081 UART as MMIO device 2023-10-11 21:30:57 +02:00
58b4bdb1e6 Memory interface is now MMIO-capable 2023-10-11 21:30:46 +02:00
d7e684ad91 Added basic SBI support 2023-10-11 19:48:01 +02:00
31941c0813 MRET jump support 2023-10-11 19:25:06 +02:00
c421595a95 Added MRET/SRET mock support 2023-10-11 18:37:52 +02:00
9e895e9032 Change WFI behavior : halt simulation 2023-10-11 17:35:32 +02:00
13f7f21b49 Added CSRRW/CSRRS basic support
For now we allow all write/read in all CSR (just an array)
2023-10-10 11:06:53 +02:00
948ff6493b Added messages for privileged instructions 2023-10-09 21:49:10 +02:00
66c89d8630 Bugfix JAL, print enhance 2023-10-09 15:18:54 +02:00
44a917b398 gdbstub: added REUSEADDR/PORT and socket closing 2023-10-08 23:52:26 +02:00
c3fa088a38 Added 'trace' option 2023-10-08 22:54:09 +02:00
ce1729d5b1 better printing 2023-10-08 21:49:23 +02:00
cdf2ed883a Added non-debug ebreak intercept 2023-10-08 20:16:10 +02:00
21c85d0bec better printing 2023-10-08 19:09:12 +02:00
980070b204 correct ebreak implementation, gdbstub watcher
everything in gdb should work now :)
2023-10-08 19:04:25 +02:00
89da4e56bb fix mutex aquire order 2023-10-08 18:28:08 +02:00
f52699a8bf Multithread gdbstub and execution, with cont/halt 2023-10-08 17:42:44 +02:00
a10f56446a CPU simulation in another thread 2023-10-08 17:07:24 +02:00
f2c573bfc6 Make CPU and memory thread-safe 2023-10-08 16:50:57 +02:00
c878dee7e0 Make CPU code thread safe 2023-10-08 16:40:03 +02:00
afc68c1c96 gdbstub: implemented 'm' 'M' memory commands 2023-10-08 16:11:41 +02:00
629fa5fc56 gdbstub: ctrl-c command support 2023-10-08 15:15:34 +02:00
6b9e5c766b rv32cpu: allocated with calloc (for debug) 2023-10-08 14:09:20 +02:00
cb98752b67 gdbstub: implemented G command 2023-10-08 14:09:06 +02:00
43629abbd4 GDBstub base implementation (gdb is happy) 2023-10-08 13:02:50 +02:00
c466d7d175 Fix J decode wrong immediate
TODO recheck maybe
2023-10-06 12:13:08 +02:00
5b020b0444 Added mock gdbstub implementation 2023-10-05 23:04:59 +02:00
378d0fa463 Added M (Multiplication) extension 2023-10-05 22:34:08 +02:00
89744626a7 Better print :) 2023-10-05 21:48:59 +02:00
0adbd15225 Fix wrong OPCODEs for OR/AND 2023-10-05 21:02:15 +02:00