criscv/include/address_space.h

14 lines
436 B
C
Raw Normal View History

2024-10-14 19:48:56 +02:00
#include <stdint.h>
struct AddressSpace_s {
uint8_t *rom;
uint32_t romSize;
uint8_t *ram;
uint32_t ramSize;
};
typedef struct AddressSpace_s AddressSpace;
2024-10-15 13:30:45 +02:00
AddressSpace create_address_space(int romSize, int ramSize);
int read_address_space(const AddressSpace *addressSpace, uint32_t address, const int n, void *dest);
int write_address_space(const AddressSpace *addressSpace, uint32_t address, const int n, void *src);