This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: TDA4VM Custom C7 openvx node

Part Number: TDA4VM

Dear experts,

We made a custom kernel on C7x, did some pre-processing before the neural network, and later used TIDL for NN inference.
The kernel uses SE0, SE1, DMA, MMA and other hardware related resources, L1, L2, L3 memory, and performs standard map and unmap on shram.
Test the kernel separately, the function is normal, and the result is correct. Then, during joint debugging, it was found that only the first time the result was correct, the second time the result was wrong.

We suspect that the phenomenon is caused by calling a custom kernel after TIDL. Do the following experiments:

1 After shielding TIDL, the kernel is running normally again. (Only TIDL will affect the kernel)
2 Splitting TIDL and the custom node into two graphs, the same problem still exists. (There should be no problem with the resource release of graph, and the map/unmap of shram are also operating normally)
3 Other experiments that can prove that the custom kernel and TIDL are serial, and there is no mutual interference in timing

In addition, through additional printing, we found that the location of the problem in the custom kernel is in a mma function.
We checked Abuf, Bbuf, and Cbuf of mma, and the input data for multiple calls is the same.
However, if the custom kernel is called again after TIDL, the output of mma will be wrong, and the result of each error will be exactly the same.
(This is the error found by printing, not the error found by checking the output shram)
So we somewhat suspect that TIDL modified some of the MMA configuration, but we failed to reset it when using MMA.

The reset method we use is as follows:
__HWAOPEN (mma_config_reg, mma_offset_reg, __MMA_OPEN_FSM_RESET);

How can I confirm or eliminate the problem of mma at this time? Or can you provide mma reset or self-check method?

In addition, are there any registers that will have a residual impact on the calculation?

  • Hi,

        Can you confirm whether you are calling TIDL de-activate call after executing the network on TIDL? TIDL allocates DMA resources whenever TIDL activate function is called and releases them whenever TIDL de-activate function is called. Moreover during TIDL deactivate it also copies the internal handle from MSMC to DDR so that when TIDL gets called next time the internal handle can be re-stored from DDR to MSMC. I am suspecting that maybe this is not happening and hence you are seeing the issue.

    Regards,

    Anshu