35 #ifndef ARM_TRC_PKT_DECODE_BASE_H_INCLUDED 36 #define ARM_TRC_PKT_DECODE_BASE_H_INCLUDED 147 init_err_msg =
"No element output interface attached and enabled";
149 init_err_msg =
"No memory access interface attached and enabled";
151 init_err_msg =
"No instruction decoder interface attached and enabled";
193 template <
class P,
class Pc>
203 const P *p_packet_in);
207 ocsd_err_t setProtocolConfig(
const Pc *config);
211 void ClearConfigObj();
240 const P *p_packet_in)
292 m_config =
new (std::nothrow) Pc(*config);
315 #endif // ARM_TRC_PKT_DECODE_BASE_H_INCLUDED
enum _ocsd_datapath_op_t ocsd_datapath_op_t
virtual ocsd_datapath_resp_t TraceElemIn(const ocsd_trc_index_t index_sop, const uint8_t trc_chan_id, const OcsdTraceElement &elem)=0
virtual ocsd_datapath_resp_t onEOT()=0
ocsd_err_t accessMemory(const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space, uint32_t *num_bytes, uint8_t *p_buffer)
virtual ~TrcPktDecodeBase()
virtual const uint8_t getCoreSightTraceID()=0
enum _ocsd_datapath_resp_t ocsd_datapath_resp_t
componentAttachPt< ITargetMemAccess > m_mem_access
ocsd_datapath_resp_t outputTraceElement(const OcsdTraceElement &elem)
const Pc * getProtocolConfig() const
componentAttachPt< IInstrDecode > m_instr_decode
void setUsesIDecode(bool bUsesIDecode)
virtual ocsd_datapath_resp_t processPacket()=0
componentAttachPt< ITrcGenElemIn > * getTraceElemOutAttachPt()
virtual ocsd_datapath_resp_t onFlush()=0
virtual ocsd_err_t onProtocolConfig()=0
Base class for all decode components in the library.
ocsd_err_t setProtocolConfig(const Pc *config)
virtual ocsd_datapath_resp_t onReset()=0
const bool getUsesMemAccess() const
enum _ocsd_err_t ocsd_err_t
void setUsesMemAccess(bool bUsesMemaccess)
TrcPktDecodeI(const char *component_name)
ocsd_err_t instrDecode(ocsd_instr_info *instr_info)
TrcPktDecodeBase(const char *component_name)
virtual ocsd_err_t DecodeInstruction(ocsd_instr_info *instr_info)=0
void LogError(const ocsdError &Error)
const bool getUsesIDecode() const
virtual void onFirstInitOK()
Generic trace element class.
componentAttachPt< IInstrDecode > * getInstrDecodeAttachPt()
virtual ocsd_datapath_resp_t PacketDataIn(const ocsd_datapath_op_t op, const ocsd_trc_index_t index_sop, const P *p_packet_in)
bool m_config_init_ok
set true if config set.
enum _ocsd_mem_space_acc_t ocsd_mem_space_acc_t
bool m_decode_init_ok
set true if all attachments in place for decode. (remove checks in main throughput paths) ...
ocsd_err_t invalidateMemAccCache()
const bool hasAttachedAndEnabled() const
ocsd_datapath_resp_t outputTraceElementIdx(ocsd_trc_index_t idx, const OcsdTraceElement &elem)
virtual ocsd_err_t ReadTargetMemory(const ocsd_vaddr_t address, const uint8_t cs_trace_id, const ocsd_mem_space_acc_t mem_space, uint32_t *num_bytes, uint8_t *p_buffer)=0
uint32_t ocsd_trc_index_t
std::string init_err_msg
error message for init error
OpenCSD : Base trace decode component.
Interface class providing an input for discrete protocol packets.
const P * m_curr_packet_in
ocsd_trc_index_t m_index_curr_pkt
componentAttachPt< ITargetMemAccess > * getMemoryAccessAttachPt()
virtual void InvalidateMemAccCache(const uint8_t cs_trace_id)=0
OpenCSD : Component attachment point interface class.
componentAttachPt< ITrcGenElemIn > m_trace_elem_out