Lines Matching full:decoder
4 @brief A description of the C API external decoder interface.
9 An external custom decoder is one which decodes a CoreSight trace byte stream from a source other
14 The external decoder API allows a suitable decoder to be attached to the library and used in the
15 same way as the built-in decoders. This means that the external decoder can be created and destroyed
19 An external decoder will be required to use three standard structures:-
21 - `ocsd_extern_dcd_fact_t` : This is a decoder "factory" that allows the creation of the custom dec…
22 … `ocsd_extern_dcd_inst_t` : This structure provides decoder data to the library for a single decod…
23 …_fns` : This structure provides a set of callback functions allowing the decoder to use library fu…
27 Registering A Decoder
30 A single API function is provided to allow a decoder to be registered with the library by name.
34 This registers the custom decoder with the library using the supplied name and factory structure.
35 As part of the registration function the custom decoder will be assigned a protocol ID which may be…
38 …ered, the standard API functions used with the built-in decoders will work with the custom decoder.
42 …he interface that is registered with the library to allow the creation of custom decoder instances.
45 …eateCustomDecoder` : Creates a decoder. This function will fill in a `ocsd_extern_dcd_inst_t` str…
46 - `fnDestroyCustomDecoder` : Destroys the decoder. Takes the `decoder_handle` attribute of the inst…
47 - `fnGetCSIDFromConfig` : Extracts the CoreSight Trace ID from the decoder configuration structu…
49 attach the decoder to the correct trace byte stream.
53 `protocol_id` : This is filled in when the decoder type is registered with the library. Used in som…
54 calls to specify the decoder protocol type.
58 Creating a Custom Decoder Instance
61 Once the custom decoder factory has been registered with the library then using the decoder uses th…
67 This creates a decoder by type name in the current decode tree and attaches it to the trace data st…
70 To create a custom decoder instance simply use the custom name and a pointer to the custom configur…
72 Calling this on a custom decoder name will result in a call to the factor function `fnCreateCustomD…
79 `fnTraceDataIn` : the decoder must provide this as this is called by the library to provide the
80 raw trace data to the decoder.
82 …to communicate when packet sink / packet monitor interfaces are attached to the decoder and in use.
84 The decoder creation process will also fill in the additional information to allow the library to c…
86 … a structure of callback functions - `ocsd_extern_dcd_cb_fns` - that the decoder can use to access…
88 trace elements generated by the decoder. The decoder is not required to use these functions - indee…
89 …ble use these functions if being used as part of a combined ARM / custom decoder tree. This will s…
92 The `create_flags` parameter will describe the expected operational mode for the decoder. The flags…
93 - `OCSD_CREATE_FLG_PACKET_PROC` : Packet processing only - the decoder will split the incoming str…
94 - `OCSD_CREATE_FLG_FULL_DECODER` : Full decode - the decoder will split the incoming stream into pr…
96 Finally the decoder creation function will interpret the custom configuration (`decoder_cfg`) and f…
97 for this decoder instance. Decoder configuration structures describe registers and parameters used …
99 stream to the decoder.
102 Example : The echo_test decoder
105 The echo_test decoder is provided to both test the C-API interfaces provided for using custom decod…
107 This decoder is initialised and created by the `c_api_pkt_print_test` program when the `-extern` co…
109 In order to use a custom decoder, the header files for that decoder must be included by the client …
116 The implementation of the decoder provides an external function to get a factory structure.
120 Assuming this returns a structure then the decoder is registered by name.
127 …ter this the test uses the same code path as the built in decoders when testing the custom decoder.
128 …cd_tree_handle_t dcd_tree_h)` is called if the test parameters indicate a custom decoder is needed.
129 …iguration structure specific to the echo_test decoder (`echo_dcd_cfg_t`), then passes this plus th…
143 …/* create an external decoder - no context needed as we have a single stream to a single handler. …
147 …test program perspective, these are the only changes made to the test program to test this decoder.
148 …_dt_create_decoder()` and `ocsd_dt_attach_packet_callback()` to hook the decoder into the decode t…