66 #ifndef TIVX_TARGET_H_    67 #define TIVX_TARGET_H_    74 #include <TI/tivx_config.h>    85 #define TIVX_TARGET_INST_MASK (0xFFu)    91 #define TIVX_TARGET_INST_SHIFT (0x0u)   100 #define TIVX_CPU_ID_MASK    (0xFu)   106 #define TIVX_CPU_ID_SHIFT   (0x8)   111 #define TIVX_TARGET_ID_MASK    (((uint32_t)TIVX_CPU_ID_MASK << (uint32_t)TIVX_CPU_ID_SHIFT) | \   112                                 ((uint32_t)TIVX_TARGET_INST_MASK << (uint32_t)TIVX_TARGET_INST_SHIFT))   117 #define TIVX_TARGET_ID_SHIFT    (TIVX_TARGET_INST_SHIFT)   127 #define TIVX_MAKE_TARGET_ID(cpu, target_inst)  ((((((uint32_t)cpu) & (uint32_t)TIVX_CPU_ID_MASK) << (uint32_t)TIVX_CPU_ID_SHIFT) |((((uint32_t)target_inst)&TIVX_TARGET_INST_MASK) << (uint32_t)TIVX_TARGET_INST_SHIFT)))   135 #define TIVX_GET_CPU_ID(target)                ((((uint32_t)(target) >> (uint32_t)TIVX_CPU_ID_SHIFT) & (uint32_t)TIVX_CPU_ID_MASK))   143 #define TIVX_GET_TARGET_INST(target)           ((uint16_t)(((uint16_t)(target) >> TIVX_TARGET_INST_SHIFT)) & TIVX_TARGET_INST_MASK)   149 #define TIVX_TARGET_ID_INVALID      (0xFFFFFFFFU)   154 #define TIVX_CPU_ID_INVALID         (0xFFFFFFFFu)   158 #define TIVX_TARGET_MAX_TASK_NAME   (12u)   166 #define TIVX_TARGET_MAX_JOB_QUEUE_DEPTH    (96u)   171 typedef enum _tivx_target_cmd_e {
   193 typedef struct _tivx_target {
   228 typedef struct _tivx_target_create_params
   295             uint16_t prm_obj_desc_id[], 
vx_bool *is_node_blocked);
   303             uint16_t prm_obj_desc_id[]);
 Target object internal state. 
struct _tivx_target * tivx_target
Target Object. 
void ownTargetSetTimestamp(const tivx_obj_desc_node_t *node_obj_desc, tivx_obj_desc_t *obj_desc[])
Propagates time stamp of input parameters of a kernel to output parameters. 
void ownTargetDeInit(void)
De-Init global state of target module. 
void ownTargetNodeDescReleaseAllParameters(tivx_obj_desc_node_t *node_obj_desc, uint16_t prm_obj_desc_id[])
Release parameters that were previously acquired. 
uint32_t task_stack_size
Task stack size, if 0, OS allocates stack with default size. 
vx_enum ownTargetGetCpuId(vx_enum target_id)
Get CPU ID associated with given target ID. 
#define TIVX_TARGET_MAX_TASK_NAME
Max size of target name string. 
uint32_t task_priority
task priority for task associated with this target TIVX_TASK_PRI_HIGHEST is highest priority...
uint32_t task_core_affinity
If task runs on a SMP CPU then this value tells the affinity of task to a given core, Valid values are 0 .. max cores in the SMP CPU. when TIVX_TASK_AFFINITY_ANY is used OS decides the task affinity. 
void ownTargetSetDefaultCreateParams(tivx_target_create_params_t *params)
Used to set default target create parameters in parameter structure. 
#define TIVX_TARGET_MAX_JOB_QUEUE_DEPTH
Max depth of queue associated with target. 
Parameters that can be set during target creation. 
Command to call a user callback, on node execution complete. 
tivx_target_cmd_e
Command ID for commands that can be send to a target. 
tivx_queue job_queue_handle
handle to job queue associated with this target 
vx_bool targetExitRequest
Flag to request target to exit main so that it can be deleted. 
Command to delete a node on target. 
vx_status ownTargetQueueObjDesc(vx_enum target_id, uint16_t obj_desc_id)
Queue object descriptor to a given target. 
vx_status ownTargetDelete(vx_enum target_id)
Delete a target object. 
tivx_task_create_params_t task_params
Parameters of task associated with this target. 
Parameters that can be set during task creation. 
void ownTargetNodeDescAcquireAllParameters(tivx_obj_desc_node_t *node_obj_desc, uint16_t prm_obj_desc_id[], vx_bool *is_node_blocked)
Acquire parameters for node execution. 
void(VX_CALLBACK * tivx_task_main_f)(void *app_var)
Entry point of task. 
vx_enum target_id
ID of this target. 
void ownTargetNodeDescAcquireAllParametersForPipeup(tivx_obj_desc_node_t *node_obj_desc, uint16_t prm_obj_desc_id[])
Acquire parameters for node execution during pipeup phase. 
void ownTargetInit(void)
Init global state of target module. 
Command to create a node on target. 
Command to inform host that a ref is consumed and is available for user dequeue. 
tivx_task task_handle
Handle to underlying task associate with this target. 
vx_status ownTargetCreate(vx_enum target_id, const tivx_target_create_params_t *params)
Create a target object and associate with given target ID. 
vx_bool targetExitDone
Flag to indicate target exited its processing loop and is about to exit its main function. 
void ownTargetTriggerNode(uint16_t node_obj_desc_id)
Trigger execution of a node obj desc. 
Command to control a node on target. 
tivx_task_main_f target_main
target main 
uint8_t * task_stack_ptr
Pointer to task stack, if NULL then task stack is allcoated by OS and not supplied by user...