TIOVX User Guide
|
This file provides a BAM wrapper interface around each VXLIB kernel to be included in TIOVX. Using this BAM wrapper will accelerate the memory movement portion of the kernel by leveraging a hardware DMA (Direct Memory Access) unit to bring blocks of the image from external DRAM into fast L2 SRAM. BAM manages the sequencing of the DMA such that the DSP can process one block in parallel to the DMA writing the previous block to DDR and reading the next block into L2 SRAM. For most kernels, this is typically faster than relying on the DSP cache alone. More...
#include <TI/tivx.h>
#include <TI/tivx_target_kernel.h>
#include <VX/vx.h>
#include "tivx_bam_kernel_database.h"
#include "bam_common.h"
#include "tivx_target_kernel_instance.h"
Go to the source code of this file.
Data Structures | |
struct | tivx_bam_kernel_details_t |
Kernel Details structure. More... | |
struct | tivx_bam_plugin_def |
BAM plugin definition. More... | |
Macros | |
#define | TIVX_BAM_MAX_NODES (16u) |
Max number of nodes in a BAM graph. | |
#define | TIVX_BAM_MAX_EDGES (32u) |
Max number of edges in a BAM graph. | |
#define | TIVX_MAX_BUF_PARAMS (32u) |
Max number of buf params in a BAM graph. | |
#define | TIVX_IMAGE_NULL_PLANE (255) |
indicates if a plane is not connected | |
Typedefs | |
typedef void * | tivx_bam_graph_handle |
Graph handle. More... | |
typedef vx_status(VX_CALLBACK * | tivx_target_kernel_create_in_bam_graph_f) (tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg, BAM_NodeParams node_list[], tivx_bam_kernel_details_t kernel_details[], int32_t *bam_node_cnt, void *scratch, int32_t *size) |
The "create in bam graph" target kernel callback. More... | |
typedef vx_status(VX_CALLBACK * | tivx_target_kernel_get_node_port_f) (tivx_target_kernel_instance kernel, uint8_t ovx_port, uint8_t plane, uint8_t *bam_node, uint8_t *bam_port) |
The "get node port" target kernel callback. More... | |
typedef vx_status(VX_CALLBACK * | tivx_target_kernel_append_internal_edges_f) (tivx_target_kernel_instance kernel, BAM_EdgeParams edge_list[], int32_t *bam_edge_cnt) |
The "append internal edges" target kernel callback This callback is optional and only needs to be implemented if the node has more than one BAM kernel inside it. In this case, the node needs to append the internal edges to the overal BAM graph edge list. More... | |
typedef vx_status(VX_CALLBACK * | tivx_target_kernel_pre_post_process_f) (tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, tivx_bam_graph_handle *graph_handle, void *priv_arg) |
The "create in bam graph" target kernel callback. More... | |
Functions | |
vx_status | tivxBamRegisterPlugin (tivx_bam_plugin_def *plugin, BAM_KernelId *kernelId) |
Register BAM plugin with OpenVX framework on DSP. More... | |
vx_status | tivxBamGetKernelIdFromName (const char *name, BAM_KernelId *kernelId) |
Returns the kernelID associated with a plugin name. More... | |
vx_status | tivxBamMemInit (void *ibuf_mem, uint32_t ibuf_size, void *wbuf_mem, uint32_t wbuf_size) |
Initialize memory block for BAM usage. More... | |
vx_status | tivxBamCreateHandleSingleNode (BAM_TI_KernelID kernel_id, VXLIB_bufParams2D_t *buf_params[], tivx_bam_kernel_details_t *kernel_details, tivx_bam_graph_handle *graph_handle) |
BAM Create Graph Handle for Single Node. More... | |
vx_status | tivxBamCreateHandleMultiNode (BAM_NodeParams node_list[], uint32_t max_nodes, BAM_EdgeParams edge_list[], uint32_t max_edges, VXLIB_bufParams2D_t *buf_params[], tivx_bam_kernel_details_t kernel_details[], tivx_bam_graph_handle *g_handle) |
BAM Create Graph Handle for Multiple Nodes. More... | |
vx_status | tivxBamUpdatePointers (tivx_bam_graph_handle graph_handle, uint32_t num_inputs, uint32_t num_outputs, void *ptrs[]) |
BAM Update Pointers. More... | |
vx_status | tivxBamControlNode (tivx_bam_graph_handle graph_handle, uint32_t node_id, uint32_t cmd, void *payload) |
BAM Node Control. More... | |
vx_status | tivxBamProcessGraph (tivx_bam_graph_handle graph_handle) |
BAM Process Graph. More... | |
void | tivxBamDestroyHandle (tivx_bam_graph_handle graph_handle) |
BAM Destroy Handle. More... | |
vx_status | tivxBamInitKernelDetails (tivx_bam_kernel_details_t *kernel_details, uint32_t num_bam_nodes, tivx_target_kernel_instance kernel) |
BAM Initialize kernel details structure array. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxEnableKernelForSuperNode (tivx_target_kernel target_kernel, tivx_target_kernel_create_in_bam_graph_f create_in_bam_func, tivx_target_kernel_get_node_port_f get_node_port_func, tivx_target_kernel_append_internal_edges_f append_internal_edges_func, tivx_target_kernel_pre_post_process_f preprocess_func, tivx_target_kernel_pre_post_process_f postprocess_func, int32_t kernel_params_size, void *priv_arg) |
Allows users to support kernel as part of super node. More... | |
This file provides a BAM wrapper interface around each VXLIB kernel to be included in TIOVX. Using this BAM wrapper will accelerate the memory movement portion of the kernel by leveraging a hardware DMA (Direct Memory Access) unit to bring blocks of the image from external DRAM into fast L2 SRAM. BAM manages the sequencing of the DMA such that the DSP can process one block in parallel to the DMA writing the previous block to DDR and reading the next block into L2 SRAM. For most kernels, this is typically faster than relying on the DSP cache alone.
Definition in file tivx_bam_kernel_wrapper.h.