Initial commit
Added base code, can run ELF files and simulate RV32I instructions
This commit is contained in:
9
src/memory/memory.c
Normal file
9
src/memory/memory.c
Normal 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
10
src/memory/memory.h
Normal 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
6
src/memory/mmu/mmu.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef MMU_H
|
||||
#define MMU_H
|
||||
|
||||
#define mmu_translate(vaddr) (vaddr)
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user