OpenCSD - CoreSight Trace Decode Library
0.14.0
|
Go to the documentation of this file.
35 #ifndef ARM_TRC_PKT_DECODE_BASE_H_INCLUDED
36 #define ARM_TRC_PKT_DECODE_BASE_H_INCLUDED
122 m_decode_init_ok(false),
123 m_config_init_ok(false),
124 m_uses_memaccess(true),
132 m_decode_init_ok(false),
133 m_config_init_ok(false),
134 m_uses_memaccess(true),
146 init_err_msg =
"No element output interface attached and enabled";
148 init_err_msg =
"No memory access interface attached and enabled";
150 init_err_msg =
"No instruction decoder interface attached and enabled";
184 template <
class P,
class Pc>
194 const P *p_packet_in);
231 const P *p_packet_in)
250 m_curr_packet_in = p_packet_in;
251 m_index_curr_pkt = index_sop;
252 resp = processPacket();
283 m_config =
new (std::nothrow) Pc(*config);
286 err = onProtocolConfig();
288 m_config_init_ok =
true;
306 #endif // ARM_TRC_PKT_DECODE_BASE_H_INCLUDED
virtual ocsd_err_t onProtocolConfig()=0
virtual ocsd_datapath_resp_t onEOT()=0
enum _ocsd_datapath_resp_t ocsd_datapath_resp_t
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
Generic trace element class.
const P * m_curr_packet_in
virtual ocsd_datapath_resp_t onReset()=0
ocsd_datapath_resp_t outputTraceElementIdx(ocsd_trc_index_t idx, const OcsdTraceElement &elem)
const bool getUsesMemAccess() const
virtual ocsd_datapath_resp_t TraceElemIn(const ocsd_trc_index_t index_sop, const uint8_t trc_chan_id, const OcsdTraceElement &elem)=0
const bool getUsesIDecode() const
TrcPktDecodeBase(const char *component_name)
componentAttachPt< ITargetMemAccess > * getMemoryAccessAttachPt()
bool m_config_init_ok
set true if config set.
const bool hasAttachedAndEnabled() const
Interface class providing an input for discrete protocol packets.
componentAttachPt< ITrcGenElemIn > * getTraceElemOutAttachPt()
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 ocsd_err_t DecodeInstruction(ocsd_instr_info *instr_info)=0
bool m_decode_init_ok
set true if all attachments in place for decode. (remove checks in main throughput paths)
const Pc * getProtocolConfig() const
ocsd_err_t instrDecode(ocsd_instr_info *instr_info)
enum _ocsd_err_t ocsd_err_t
@ OCSD_RESP_FATAL_INVALID_OP
ocsd_err_t setProtocolConfig(const Pc *config)
enum _ocsd_datapath_op_t ocsd_datapath_op_t
Base class for all decode components in the library.
OpenCSD : Base trace decode component.
virtual const uint8_t getCoreSightTraceID()=0
ocsd_datapath_resp_t outputTraceElement(const OcsdTraceElement &elem)
componentAttachPt< IInstrDecode > * getInstrDecodeAttachPt()
componentAttachPt< ITrcGenElemIn > m_trace_elem_out
std::string init_err_msg
error message for init error
@ OCSD_ERR_INVALID_PARAM_VAL
uint32_t ocsd_trc_index_t
ocsd_trc_index_t m_index_curr_pkt
componentAttachPt< ITargetMemAccess > m_mem_access
virtual ocsd_datapath_resp_t processPacket()=0
OpenCSD : Component attachment point interface class.
TrcPktDecodeI(const char *component_name)
virtual ~TrcPktDecodeBase()
enum _ocsd_mem_space_acc_t ocsd_mem_space_acc_t
void setUsesMemAccess(bool bUsesMemaccess)
@ OCSD_RESP_FATAL_NOT_INIT
virtual ocsd_datapath_resp_t onFlush()=0
virtual ocsd_datapath_resp_t PacketDataIn(const ocsd_datapath_op_t op, const ocsd_trc_index_t index_sop, const P *p_packet_in)
@ OCSD_RESP_FATAL_INVALID_PARAM
void setUsesIDecode(bool bUsesIDecode)
virtual void onFirstInitOK()
componentAttachPt< IInstrDecode > m_instr_decode
@ OCSD_ERR_DCD_INTERFACE_UNUSED