diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-05-12 11:24:16 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-05-12 11:24:16 +0200 |
commit | 40b4d52e905227849785f6520d0381f19657820a (patch) | |
tree | 91eb8549419c14f4c8880693109eb41c8c650552 /emulator/hart.h | |
parent | b9dd0160640adcbb1b5a66247b274bf99a7de705 (diff) |
Reorganize all this shit
Diffstat (limited to 'emulator/hart.h')
-rw-r--r-- | emulator/hart.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/emulator/hart.h b/emulator/hart.h new file mode 100644 index 0000000..5e9d451 --- /dev/null +++ b/emulator/hart.h @@ -0,0 +1,16 @@ +#pragma once
+
+#include <stdint.h>
+
+struct Hart
+{
+ uint32_t pc;
+ uint32_t regs[32];
+ char* mem;
+ uint32_t mem_size;
+};
+typedef struct Hart Hart;
+
+void execute(Hart* hart, uint32_t instruction);
+void execute_from(Hart* hart, uint32_t start_address);
+
|