TIOVX User Guide

Detailed Description

APIs for real-time event trace operations on the host.

Functions

vx_status VX_API_CALL tivxLogRtTraceEnable (vx_graph graph)
 Enable run-time logging of graph trace. More...
 
vx_status VX_API_CALL tivxLogRtTraceDisable (vx_graph graph)
 Disable run-time logging of graph trace. More...
 
vx_status VX_API_CALL tivxLogRtTraceExportToFile (char *filename)
 Saved current log events to file and clear the event log memory. More...
 
void tivxLogRtTraceKernelInstanceAddEvent (vx_node node, uint16_t event_index, char *event_name)
 Add real-time log event in host side initialize callback for user kernel. More...
 
void tivxLogRtTraceKernelInstanceRemoveEvent (vx_node node, uint16_t event_index)
 Remove real-time log event in host side deinitilize callback for user kernel. More...
 

Function Documentation

◆ tivxLogRtTraceEnable()

vx_status VX_API_CALL tivxLogRtTraceEnable ( vx_graph  graph)

Enable run-time logging of graph trace.

  • By default run-time logging is disabled.
  • This API MUST be called after vxVerifyGraph and before starting the graph execution
Parameters
[in]graphGraph reference

◆ tivxLogRtTraceDisable()

vx_status VX_API_CALL tivxLogRtTraceDisable ( vx_graph  graph)

Disable run-time logging of graph trace.

  • By default run-time logging is disabled.
  • This API MUST be called after graph executions have stopped and before calling vxReleaseGraph
Parameters
[in]graphGraph reference

◆ tivxLogRtTraceExportToFile()

vx_status VX_API_CALL tivxLogRtTraceExportToFile ( char *  filename)

Saved current log events to file and clear the event log memory.

  • This API can be called while graphs are executing
  • Each time API is called, current log events are saved to the file 'filename' and existing log is cleared.
  • Calling this API periodically avoids the event log from getting full.
  • Thus this API allows to continuously store data to a file on the filesystem, limited only by the size of free space on the filesystem.
  • The data stored in the file can be visualized by doing below
  • Copy the saved file(s) to PC
  • Convert the binary data to 'VCD - Value Change Dump' format
  • Use a opensource tool like gtkwave to visualize the data
Parameters
[in]filenameFilename to save the log data into. When filename is NULL, data is not saved, only the event log is cleared.
Precondition
tivxLogRtTraceEnable

◆ tivxLogRtTraceKernelInstanceAddEvent()

void tivxLogRtTraceKernelInstanceAddEvent ( vx_node  node,
uint16_t  event_index,
char *  event_name 
)

Add real-time log event in host side initialize callback for user kernel.

  • This API is intended to be called from within the initialization callback of a user kernel.
  • For a given node, multiple such events can be added, therefore each one should be given a different index used to identify the event within the node.
  • Since the scope of the indexing is within a single node, it is permissible to reuse index values across nodes without any issue (for example, event_index of 0 can be used at most once per node).
Parameters
[in]nodeThe node object that the event is to be associated with
[in]event_indexUnique identifier of specific event within node
[in]*event_nameThe node object associated with the event

◆ tivxLogRtTraceKernelInstanceRemoveEvent()

void tivxLogRtTraceKernelInstanceRemoveEvent ( vx_node  node,
uint16_t  event_index 
)

Remove real-time log event in host side deinitilize callback for user kernel.

  • This API is intended to be called from within the deinitialization callback of a user kernel.
Parameters
[in]nodeThe node object that the event is to be asociated with
[in]event_indexUnique identifier of specific event within node
Precondition
tivxLogRtTraceKernelInstanceAddEvent