4.7.5. 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.

Syntax

int armul_MemAccess(void *handle, ARMword address, ARMword *data,
                    ARMul_acc access_type)

where:

handle

is the value of interf->handle set in MemInit.

address

is the value on the address bus.

data

is a pointer to the data for the memory access. See Data for reads and writes for details.

access_type

encodes 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.

Return

The function returns:

1

indicates successful completion of the cycle

0

tells the processor to busy-wait and try the access again next cycle

–1

signals an abort

–2

indicates that an address was not decoded by a peripheral model (see Reference peripherals).

Note

Memory models must not return –2. Only a peripheral that has registered an address range with a bus-decoder can return –2.

Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0207D
Non-Confidential