| |||
| Home > The Cycle Accurate Debug Interface > Defining a CADI interface > CADI::CADIMemRead() |
The function reads memory values from the component. This function must be implemented to support the display of memory contents.
virtual CADIReturn_t CADI::CADIMemRead (CADIAddrComplete_t startAddress,
uint32_t unitsToRead, uint32_t unitSizeInBytes, uint8_t * data,
uint32_t * actualNumOfUnitsRead, uint8_t doSideEffects) =0
where:
startAddressis the starting address to begin reading from. If
startAddress.overlay is CADI_NO_OVERLAY, it refers
to the current overlay.
unitsToReadThis is the number of units of size unitSizeInBytes to
read.
unitSizeInBytesis the unit size of the addresses specified in bytes.
datais the data buffer that was allocated by the caller and must be big enough to hold the requested number of addresses. The target data is encoded in little endian format.
actualNumOfUnitsReadis the number of units actually read. It can be less than the number of units requested.
doSideEffectsindicates that any side effects are associated with accessing this memory.
If an error occurs, CADIMemRead() must
return the error position in actualNumOfUnits*. Data is
assumed valid up to this position.