| |||
| Home > ARMulator > Memory model interface | |||
The memory model interface is defined in the file armmem.h (which
is #included from armdefs.h).
All memory accesses are performed through a single function pointer
that is passed a flags word. The flags word consists of a bitfield
in which the bits correspond to the signals on the outside of the
ARM processor. This determines the type of memory access that is
being performed.
At initialization time, the initialization function registers
a number of functions in the memory interface structure, ARMul_MemInterface in armmem.h.
The basic entries are:
typedef struct armul_meminterface ARMulMemInterface;
struct armul_meminterface {
void *handle;
armul_ReadClock *read_clock;
armul_ReadCycles *read_cycles;
union {
struct {
armul_MemAccess *access;
armul_GetCycleLength *get_cycle_length;
} basic;
// ... other processor specific entries follow
The following sections describe the initialization function and the basic function entries:
There are two functions that allow you to set and return the address of the top of memory. These are described in: