Initial commit

Added base code, can run ELF files and simulate RV32I instructions
This commit is contained in:
2023-10-04 21:28:18 +02:00
commit 981c35584c
17 changed files with 1280 additions and 0 deletions

9
src/memory/memory.c Normal file
View File

@@ -0,0 +1,9 @@
#include "memory.h"
#include "vriscv.h"
uint8_t* memory;
void mem_init()
{
memory = malloc(memory_size);
}

10
src/memory/memory.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef MEMORY_H
#define MEMORY_H
#include <stdint.h>
extern uint8_t* memory;
void mem_init();
#endif

6
src/memory/mmu/mmu.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef MMU_H
#define MMU_H
#define mmu_translate(vaddr) (vaddr)
#endif