T-EMU
2
The Terma Emulator
|
#include <temu-c/Memory/Memory.h>
Data Fields | |
int(* | readBytes )(void *Obj, void *Dest, uint64_t Offs, uint32_t Size, int Swap) |
int(* | writeBytes )(void *Obj, uint64_t Offs, uint32_t Size, const void *Src, int Swap) |
For objects which have actual memory (not just registers) This is for the simulator (not the emu core). The procedures should write the data given in bytes to the given physical offset. The offset is a 64 bit uint to support 64 bit targets. The interface is used for example by DMA transactions.
The swap argument is used to swap bytes to the host endianess. Specify the log size of the read data types. 0: We are reading bytes (bytes will be in target memory order) 1: We are reading half words (will be swapped to host order) 2: We are reading words (will be swapped) 3: We are reading double words (will be swapped) With 0 for swap, we are basically reading a byte array
int(* temu_MemoryIface::readBytes)(void *Obj, void *Dest, uint64_t Offs, uint32_t Size, int Swap) |
int(* temu_MemoryIface::writeBytes)(void *Obj, uint64_t Offs, uint32_t Size, const void *Src, int Swap) |