Commit Graph

85 Commits

Author SHA1 Message Date
67406a9c48 Fix some warnings 2025-12-27 11:55:19 +01:00
9f8e9ec380 Implement a GDB stub and fix another huge issue in S-type immediate decoding 2025-12-27 11:48:36 +01:00
a64fcaa3b5 Make execload respect the static ram start 2025-12-26 19:32:55 +01:00
34034dd5db Make macros for R/I-type operations and use them to implement basically every single one i think 2025-12-26 18:14:32 +01:00
75e843f5f9 Make branches macros and implement all of them 2025-12-26 16:06:30 +01:00
528b519ce9 (BIG CHANGE) memory handling has changed, MMIO is now a 2 level page table, misaligned access supported, addresses not internally split to page and offset immediately, all load/store instructions implemented. Might still have bugs 2025-12-26 14:20:27 +01:00
6d9efb7eb8 Small refactor in exception handling in core.rs 2025-12-24 16:14:54 +01:00
44394b3d19 Update README to mention ELF support 2025-12-24 14:11:29 +01:00
66c63ab63c Add a default implementation for the memory device interface that just returns access faults 2025-12-24 14:06:16 +01:00
09d9064372 EXCEPTION SYSTEM (initial version - may change later) 2025-12-24 13:56:41 +01:00
3f789442c0 some linker script updates to work even more properly for newlib i think 2025-12-24 11:42:55 +01:00
96c2cbf7ae remove unused imports in main.rs 2025-12-23 20:04:14 +01:00
8ed4845d58 ADD ELF SUPPORT 2025-12-23 19:56:42 +01:00
36faa1e39c Add license headers to files missing them 2025-12-23 19:22:11 +01:00
43bae12ea0 Comment out the unused 'Pause' instruction result 2025-12-23 18:46:38 +01:00
0c6a540a85 Implement SRLI 2025-12-23 18:42:50 +01:00
23392a55df Implement SH 2025-12-23 18:31:04 +01:00
f38114dbd7 Remove some debug messages i forgot 2025-12-23 11:01:28 +01:00
c6da147d50 Implement BLT 2025-12-23 09:51:53 +01:00
643a39c24a Fix s-type immediate decoding 2025-12-23 09:51:32 +01:00
1b409cd14e Improve error messaging 2025-12-23 09:51:09 +01:00
976bd688b0 Remove an unused import in main.rs 2025-12-23 08:57:43 +01:00
0ac363e203 Implement LW 2025-12-22 22:48:57 +01:00
7a22570a0f Improve the debug messages when invalid instructions are found (again) 2025-12-22 22:46:45 +01:00
2b5eb96187 Implement BLTU 2025-12-22 21:17:38 +01:00
be1b1b9fe6 Implement LH 2025-12-22 21:15:24 +01:00
5cbaf2dc66 Implement BGEU 2025-12-22 20:08:16 +01:00
ae57cdc691 Improve the debug messages when invalid instructions are found 2025-12-22 19:57:33 +01:00
bac68d7118 Pull out memory access instructions from rvi.rs to their own file 2025-12-22 19:51:21 +01:00
8cce960b29 Implement SW 2025-12-22 19:44:37 +01:00
cb100e92ac Implement SUB 2025-12-22 19:33:40 +01:00
d0d3775b88 Implement OR 2025-12-22 19:29:31 +01:00
1ddda6614a Implement AND and improve formatting and ordering in rvi.rs 2025-12-22 19:25:19 +01:00
ff161a69e6 Implement ADD 2025-12-22 19:19:19 +01:00
e00103375d Fix page offset miscalculation in instruction fetch 2025-12-22 18:28:31 +01:00
7177633477 WHY WAS I USING S-TYPE IMMEDIATE IN LD (also add some more debugging info on an exception) 2025-12-22 18:00:15 +01:00
48477bd8b1 Make echo.S compatible with the C-compatible linker script 2025-12-21 22:51:29 +01:00
24dcf5d5bd Improve UART by using nonblocking stdin 2025-12-21 21:25:29 +01:00
209e44ae64 Implement LD and BNE 2025-12-21 21:00:25 +01:00
5b2d6a1af0 Fix memory size in link.ld 2025-12-21 20:04:06 +01:00
a2d4dec417 Add some stuff to help with using C in link.ld 2025-12-21 19:38:32 +01:00
6c39a5eef2 Implement JALR, fix JAL, change how some stuff in instructions.rs is expressed 2025-12-21 19:36:25 +01:00
944ed573c6 Switch the current binary to use anyhow errors and add a proper argument number check 2025-12-21 19:06:23 +01:00
2e1c0a7dce Implement AUIPC 2025-12-21 19:01:02 +01:00
5c132b55e9 Fix assembly syntax in echo program 2025-12-21 17:56:40 +01:00
c10e1ec09b Allow other image file names through cli args, increase ram size, update readme 2025-12-21 17:49:02 +01:00
25dd685345 Add a linker script and example uart echo program 2025-12-21 17:04:18 +01:00
c05ba60c3c Implement ANDI and BEQ 2025-12-21 16:29:28 +01:00
acc267a460 Remove unused imports from the UART implementation 2025-12-21 16:01:39 +01:00
25c3b9f5e2 Make a dedicated function for advancing the PC by one instruction 2025-12-21 16:00:54 +01:00