| |||
| Home > RVISS Reference > Memory model interface > armul_MemAccess | |||
The access entry in the ARMul_MemInterface structure
is a pointer to an armul_MemAccess() function.
This function is called on each ARM core cycle.
You must implement this function, even if the implementation is very simple. You define the function name yourself.
int armul_MemAccess(void *handle, ARMwordaddress, ARMword *data, ARMul_accaccess_type)
where:
handleis the value of interf->handle set
in MemInit.
addressis the value on the address bus.
datais a pointer to the data for the memory access. See Data for reads and writes for details.
access_typeencodes the type of cycle. On some processors, for example, cached processors, some of the signals are not valid. See Macros for access types for details of the macros for determining access type.
The function returns:
indicates successful completion of the cycle
tells the processor to busy-wait and try the access again next cycle
signals an abort
indicates that an address was not decoded by a peripheral model (see Reference peripherals).
Memory models must not return –2. Only a peripheral that has registered an address range with a bus-decoder can return –2.