OpenCSD - CoreSight Trace Decode Library
1.3.3
|
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 uint8_t trcID, 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 167 of file trc_mem_acc_base.h.
|
inline |
costruct with address range values
Definition at line 159 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 181 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 186 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 192 of file trc_mem_acc_base.h.
|
virtual |
Reimplemented in TrcMemAccessorFile.
|
inline |
Definition at line 146 of file trc_mem_acc_base.h.
|
inline |
Definition at line 139 of file trc_mem_acc_base.h.
|
inline |
Definition at line 147 of file trc_mem_acc_base.h.
|
inlinevirtual |
test is supplied range accessor overlaps this range.
*p_test_acc | : Accessor to test for overlap. |
Reimplemented in TrcMemAccessorFile.
Definition at line 205 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. |
trcID | : Trace ID of trace source. |
reqBytes | : Number of bytes required. |
*byteBuffer | : Buffer to copy the bytes into. |
Implemented in FileRegionMemAccessor, TrcMemAccessorFile, TrcMemAccCB, and TrcMemAccBufPtr.
|
inline |
Definition at line 145 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 175 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 214 of file trc_mem_acc_base.h.
|
protected |
accessible range end address
Definition at line 154 of file trc_mem_acc_base.h.
|
protected |
Definition at line 156 of file trc_mem_acc_base.h.
|
protected |
accessible range start address
Definition at line 153 of file trc_mem_acc_base.h.
|
protected |
memory accessor type
Definition at line 155 of file trc_mem_acc_base.h.