criscv/include/address_space.h
2024-10-15 13:30:45 +02:00

14 lines
No EOL
436 B
C

#include <stdint.h>
struct AddressSpace_s {
uint8_t *rom;
uint32_t romSize;
uint8_t *ram;
uint32_t ramSize;
};
typedef struct AddressSpace_s AddressSpace;
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);