OpenCSD - CoreSight Trace Decode Library
0.9.2
|
Memory range to access by trace decoder. More...
#include <trc_mem_acc_base.h>
Public Types | |
enum | MemAccTypes { MEMACC_UNKNOWN, MEMACC_FILE, MEMACC_BUFPTR, MEMACC_CB_IF } |
Public Member Functions | |
TrcMemAccessorBase (MemAccTypes type) | |
TrcMemAccessorBase (MemAccTypes type, ocsd_vaddr_t startAddr, ocsd_vaddr_t endAddr) | |
virtual | ~TrcMemAccessorBase () |
void | setRange (ocsd_vaddr_t startAddr, ocsd_vaddr_t endAddr) |
virtual const bool | addrInRange (const ocsd_vaddr_t s_address) const |
virtual const bool | addrStartOfRange (const ocsd_vaddr_t s_address) const |
virtual const uint32_t | bytesInRange (const ocsd_vaddr_t s_address, const uint32_t reqBytes) const |
virtual const bool | overLapRange (const TrcMemAccessorBase *p_test_acc) const |
virtual const uint32_t | readBytes (const ocsd_vaddr_t s_address, const ocsd_mem_space_acc_t memSpace, const uint32_t reqBytes, uint8_t *byteBuffer)=0 |
virtual const bool | validateRange () |
enum MemAccTypes | getType () const |
void | setMemSpace (ocsd_mem_space_acc_t memSpace) |
const ocsd_mem_space_acc_t | getMemSpace () const |
const bool | inMemSpace (const ocsd_mem_space_acc_t mem_space) const |
virtual void | getMemAccString (std::string &accStr) const |
Protected Attributes | |
ocsd_vaddr_t | m_startAddress |
ocsd_vaddr_t | m_endAddress |
const MemAccTypes | m_type |
ocsd_mem_space_acc_t | m_mem_space |
Memory range to access by trace decoder.
Represents a memory access range for the trace decoder. Range inclusive from m_startAddress to m_endAddress. e.g. a 1k range from 0x1000 has start of 0x1000 and end of 0x13FF
Derived classes provide specific access types such as binary files and memory buffers.
Definition at line 52 of file trc_mem_acc_base.h.
Describes the storage type of the underlying memory accessor
Enumerator | |
---|---|
MEMACC_UNKNOWN | |
MEMACC_FILE | |
MEMACC_BUFPTR | |
MEMACC_CB_IF |
Definition at line 57 of file trc_mem_acc_base.h.
|
inline |
default constructor
Definition at line 166 of file trc_mem_acc_base.h.
|
inline |
costruct with address range values
Definition at line 158 of file trc_mem_acc_base.h.
|
inlinevirtual |
default desctructor
Definition at line 71 of file trc_mem_acc_base.h.
|
inlinevirtual |
test if an address is in the inclusive range for this accessor
s_address | : Address to test. |
Reimplemented in TrcMemAccessorFile.
Definition at line 180 of file trc_mem_acc_base.h.
|
inlinevirtual |
test if an address is the start of range for this accessor
s_address | : Address to test. |
Reimplemented in TrcMemAccessorFile.
Definition at line 185 of file trc_mem_acc_base.h.
|
inlinevirtual |
Test number of bytes available from the start address, up to the number of requested bytes. Tests if all the requested bytes are available from the supplied start address. Returns the number available up to full requested amount.
s_address | : Start address within the range. |
reqBytes | : Number of bytes needed from the start address. |
Reimplemented in TrcMemAccessorFile.
Definition at line 191 of file trc_mem_acc_base.h.
|
virtual |
|
inline |
Definition at line 145 of file trc_mem_acc_base.h.
|
inline |
Definition at line 141 of file trc_mem_acc_base.h.
|
inline |
|
inlinevirtual |
test is supplied range accessor overlaps this range.
*p_test_acc | : Accessor to test for overlap. |
Reimplemented in TrcMemAccessorFile.
Definition at line 204 of file trc_mem_acc_base.h.
|
pure virtual |
Read bytes from via the accessor from the memory range.
s_address | : Start address of the read. |
memSpace | : memory space for this access. |
reqBytes | : Number of bytes required. |
*byteBuffer | : Buffer to copy the bytes into. |
Implemented in TrcMemAccessorFile, TrcMemAccBufPtr, FileRegionMemAccessor, and TrcMemAccCB.
|
inline |
Definition at line 144 of file trc_mem_acc_base.h.
|
inline |
Set the inclusive address range of this accessor.
startAddr | : start address of the range. |
endAddr | : end address of the range. |
Definition at line 174 of file trc_mem_acc_base.h.
|
inlinevirtual |
Validate the address range - ensure addresses aligned, different, st < en etc.
Reimplemented in TrcMemAccessorFile.
Definition at line 213 of file trc_mem_acc_base.h.
|
protected |
accessible range end address
Definition at line 153 of file trc_mem_acc_base.h.
|
protected |
Definition at line 155 of file trc_mem_acc_base.h.
|
protected |
accessible range start address
Definition at line 152 of file trc_mem_acc_base.h.
|
protected |
memory accessor type
Definition at line 154 of file trc_mem_acc_base.h.