68 #include <TI/tivx_test_kernels.h> 69 #include <TI/tivx_capture.h> 70 #include "vx_tutorial_mcu_demo.h" 72 #if defined(SOC_AM62A) 73 void vx_tutorial_mcu_demo(
vx_bool use_mcu1_core)
75 void vx_tutorial_mcu_demo(
vx_bool use_mcu3_core)
83 vx_uint32 num_streams = 0, golden_output = 0;
87 printf(
" vx_tutorial_mcu_demo: Tutorial Started !!! \n");
98 tivxTestKernelsLoadKernels(context);
116 node0 = tivxScalarSourceNode(graph, scalar);
118 #if defined(SOC_AM62A) 123 #elif defined(SOC_J722S) 145 #if defined(SOC_J784S4) 159 node1 = tivxScalarIntermediateNode(graph, scalar, scalar_out);
161 #if defined(SOC_AM62A) 166 #elif defined(SOC_J722S) 188 #if defined(SOC_J784S4) 235 printf(
"Input scalar value = %d\n", scalar_val);
239 printf(
" Executing graph ...\n");
247 printf(
" Executing graph ... Done !!!\n");
272 if (num_streams != 0)
274 golden_output = num_streams % 256;
276 printf(
"Output scalar value = %d\n", output);
277 if(output!=golden_output)
279 printf(
"ERROR: %d != %d\n", output, golden_output);
283 printf(
"RUN SUCCESS!!!\n");
308 tivxTestKernelsUnLoadKernels(context);
321 printf(
" vx_tutorial_mcu_demo: Tutorial Done !!! \n");
vx_scalar VX_API_CALL vxCreateScalar(vx_context context, vx_enum data_type, const void *ptr)
Interface to TI extension APIs.
void show_node_attributes(vx_node node)
Show attributes of previously created node.
vx_status VX_API_CALL vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)
vx_status VX_API_CALL vxReleaseScalar(vx_scalar *scalar)
VX_API_ENTRY vx_status VX_API_CALL vxStopGraphStreaming(vx_graph graph)
Stop streaming mode of graph execution.
void show_graph_attributes(vx_graph graph)
Show attributes of previously created graph.
vx_bool tivxIsTargetEnabled(const char target_name[])
Utility function to know if target is enabled or not.
vx_status VX_API_CALL vxReleaseContext(vx_context *context)
void tivxTaskWaitMsecs(uint32_t msec)
waits/sleeps for given milliseconds
struct _vx_context * vx_context
vx_status VX_API_CALL vxCopyScalar(vx_scalar scalar, void *user_ptr, vx_enum usage, vx_enum user_mem_type)
vx_status VX_API_CALL vxSetNodeTarget(vx_node node, vx_enum target_enum, const char *target_string)
struct _vx_reference * vx_reference
VX_API_ENTRY vx_status VX_API_CALL vxStartGraphStreaming(vx_graph graph)
Start streaming mode of graph execution.
vx_status VX_API_CALL vxReleaseGraph(vx_graph *graph)
vx_status VX_API_CALL vxSetReferenceName(vx_reference ref, const vx_char *name)
VX_API_ENTRY vx_status VX_API_CALL vxEnableGraphStreaming(vx_graph graph, vx_node trigger_node)
Enable streaming mode of graph execution.
vx_graph VX_API_CALL vxCreateGraph(vx_context context)
vx_status VX_API_CALL vxVerifyGraph(vx_graph graph)
Returns the graph stream executions. Read-only. Use a vx_uint32 parameter.
vx_context VX_API_CALL vxCreateContext()
struct _vx_graph * vx_graph
vx_status VX_API_CALL vxReleaseNode(vx_node *node)
struct _vx_node * vx_node
struct _vx_scalar * vx_scalar