Hi TI.
In tiovx in psdk 7.1, one node seems to be capable of up to 64 input/output parameters.
#ifndef TIVX_CONFIG_H_
#define TIVX_CONFIG_H_
#ifdef __cplusplus
extern "C" {
#endif
/*! \brief Max parameters in a kernel
* \ingroup group_tivx_obj_desc_cfg
*/
#define TIVX_KERNEL_MAX_PARAMS (64u)
However, if more than 32 inputs and outputs were used, a null value obj_desc was entered into the process function of vx_xx_target.c, and the node did not operate normally.
i found that the problem occurs in the part that handles the bit-flag (tivxFlagIsBitSet()) when "prm_id" is 32 or higher.
void tivxTargetNodeDescAcquireAllParameters(tivx_obj_desc_node_t *node_obj_desc,
uint16_t prm_obj_desc_id[], vx_bool *is_node_blocked)
{
uint32_t prm_id;
vx_bool is_prm_data_ref_q_flag;
*is_node_blocked = (vx_bool)vx_false_e;
is_prm_data_ref_q_flag = (int32_t)node_obj_desc->is_prm_data_ref_q;
for(prm_id=0; prm_id<node_obj_desc->num_params; prm_id++)
{
if(tivxFlagIsBitSet((uint32_t)is_prm_data_ref_q_flag, ((uint32_t)1U<<prm_id))==(vx_bool)vx_false_e)
{
prm_obj_desc_id[prm_id] = node_obj_desc->data_id[prm_id];
}
I've been trying to find a solution in psdk 7.3. But I couldn't.
I temporarily modified it like this, but I'm not sure if it works well.
static inline vx_bool tivxFlagIsBitSetById(uint32_t flag_var, uint32_t bit_idx)
{
vx_bool status = vx_false_e;
if(bit_idx > 31)
{
status = vx_false_e;
}
else
{
uint32_t flag_val = 1U << bit_idx;
status = ((flag_var & flag_val) == flag_val) ? vx_true_e : vx_false_e;
}
return status;
}
I hope you can check and fix this issue.