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: User kernel implementation

Part Number: TDA4VM


Tool/software:

Dear Experts,

We have been experimenting with writing our own user kernel, currently we are successfully created the framework with PyTiovx compiled for the C66 dsp.

The user kernel works fine for one image (read in from file and write out the result). However when we try to integrate this user kernel into our Tiovx pipeline, after a couple of frames later the processing stops and the image on the display freezes. Also the pipeline freezes as well, the whole graph seems to halt.

Couple of points:

- we only allocate memory on TIVX_MEM_EXTERNAL in the Create kernel callback function.

- we only do processing in the Process function, we do not call any VXLIB related functions at the moment. However when I only copy the input memory block to the output, everything works fine. As soon as I try to do any pixel manipulation, the graph freezes after a couple of frames (depending on the complexity of the manipulation).

Could you please help me localize the issue, give me some hint what could be wrong?

Thank you very much in advance!

Best Regards,

Andras

  • Andras,

    It would difficult without further details, Lets say if it is working for one frame, are you making sure that you are not accessing the images out of the image boundary? What's the image size? Are these images allocated to cache size? Is there a possibility of accessing pixels beyond image boundary? 

    Regards,

    Brijesh

  • Hello Brijesh,

    Could you please elaborate this question: "Are these images allocated to cache size?"

    For the c66 dsp, the image resolution is 1024*768.

    At the moment I am not sure if we even do the right thing. Since then I checked other kernel implementations from TI and I can see that there are instances where the image data is being transferred manually to the L3 cache. Do we have to manually do that?

    Thank you for your answer!

    Best Regards,

    Andras

  • Hi Andras,

    Could you please elaborate this question: "Are these images allocated to cache size?"

    I meant, are these image size allocated to cache line size aligned? 

    Could you please review your algorithm code to figure out where it can potentially cause crash? 

    Regards,

    Brijesh

  • Hello Brijesh,

    Well, we are still investigating the issue, however at this point it would be useful to be able to use any printf function on the C66 dsp.

    How I am able to achieve this? I have read the following posts, tried all solutions and its combinations, but nothing helps (neither with ssh, nor on uart).

    Could you please point me to the right direction?

    Just for clarification I have tried using VX_PRINT coupled with tivx_set_debug_zone in the create callback function and running /opt/vx_app_arm_remote_log.out in the background.

    Link 1

    Link 2

    What is the solution for this issue?

    Thanks!

    Best Regards,

    Andras

  • Hi Andras,

    I am not really sure, we need to find way to reproduce this issue quickly and debug it to figure out. 

    Regards,

    Brijesh