36 #ifndef ARM_TRC_PKT_PROC_PTM_H_INCLUDED
37 #define ARM_TRC_PKT_PROC_PTM_H_INCLUDED
62 const uint32_t dataBlockSize,
63 const uint8_t *pDataBlock,
64 uint32_t *numBytesProcessed);
103 const bool isSync()
const;
139 #define ASYNC_PAD_0_LIMIT 11
141 #define ASYNC_REQ_0 5
Interpreter class for PTM Hardware configuration.
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
int m_numExcepBytes
got 1st exception byte
ocsd_datapath_resp_t waitASync()
look for first synchronisation point in the packet stream
bool m_bOPNotSyncPkt
true if output not sync packet when waiting for ASYNC
bool m_gotExcepBytes
got all needed exception bytes
int extractTS(uint64_t &tsVal, uint8_t &tsUpdateBits)
async_result_t findAsync()
virtual const bool isBadPacket() const
check if the current packet is an error / bad packet
std::vector< uint8_t > m_currPacketData
TrcPktProcPtm(int instIDNum)
void extractCtxtID(int idx, uint32_t &ctxtID)
@ ASYNC_INCOMPLETE
not enough input data.
@ ASYNC
pattern confirmed async 0x00 x 5, 0x80
@ ASYNC_EXTRA_0
pattern confirmed 0x00 x N + ASYNC
@ THROW_0
long pattern of 0x00 - throw some away.
@ NOT_ASYNC
pattern confirmed not async
int m_numAddrBytes
number of address bytes
ocsd_isa m_addrPktIsa
ISA of the branch address packet.
uint32_t extractAddress(const int offset, uint8_t &total_bits)
virtual ocsd_datapath_resp_t onEOT()
Implementation function for the OCSD_OP_EOT operation.
virtual ocsd_datapath_resp_t processData(const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)
Implementation function for the OCSD_OP_DATA operation.
int m_tsByteMax
max size for TS portion of TS packet.
void extractCycleCount(int idx, uint32_t &cycleCount)
int m_excepAltISA
Alt ISA bit iff exception bytes.
virtual ocsd_datapath_resp_t onFlush()
Implementation function for the OCSD_OP_FLUSH operation.
bool m_gotTSBytes
got all TS bytes
const uint8_t * m_pDataIn
enum TrcPktProcPtm::_async_result async_result_t
void InitProcessorState()
bool m_gotAddrBytes
got all Addr bytes in branch packet
process_state m_process_state
void(TrcPktProcPtm::* PPKTFN)(void)
enum TrcPktProcPtm::_process_state process_state
virtual ocsd_datapath_resp_t onReset()
Implementation function for the OCSD_OP_RESET operation.
ocsd_trc_index_t m_block_idx
ocsd_trc_index_t m_curr_pkt_index
ocsd_datapath_resp_t outputPacket()
virtual ocsd_err_t onProtocolConfig()
Called when the configuration object is passed to the decoder.
struct TrcPktProcPtm::_pkt_i_table_t m_i_table[256]
uint32_t m_dataInProcessed
const bool readByte(uint8_t &currByte)
PtmTrcPacket m_curr_packet
uint32_t ocsd_trc_index_t
enum _ocsd_datapath_resp_t ocsd_datapath_resp_t
enum _ocsd_err_t ocsd_err_t
@ OCSD_ERR_BAD_PACKET_SEQ
@ OCSD_ERR_INVALID_PCKT_HDR
const bool isSync() const
void throwPacketHeaderErr(const char *pszErrMsg)
void throwMalformedPacketErr(const char *pszErrMsg)
const ocsd_ptm_pkt_type getType() const
enum _ocsd_ptm_pkt_type ocsd_ptm_pkt_type
void SetErrType(const ocsd_ptm_pkt_type e_type)
@ PTM_PKT_BAD_SEQUENCE
invalid sequence for packet type
@ PTM_PKT_NOTSYNC
no sync found yet
ocsd_ptm_pkt_type pkt_type
OpenCSD : Trace packet processor base class.