A timeout occurs when do Motion detection

  • Dear,

    I have a timeout problem on micrioEnable 5 VQ8-CXP6D.

    When I was build MotionDetection.va(a difference image example in VA) to hap,and test in microDisplay.exe , the timeout occur. but the simulation was successful.

    This is my simulation:

    the first frame simulation


    the second frame simulation


    I guess the first frame was removed, DmaToPC has no data output. So in microDislpaly the Timeout occur.

    The guess is right ?

    Why it result int timeout?

    How to solve this problem?


  • Hello,

    The remove image procedure inserts a delay of exactly one full frame.

    The previously inserted FIFO was able to store a single line.

    Because of that there was a deadlock as soon as the first line ran into the SYNC(module16)...

    Below you can see a screenshot of the solution and the VA source code below:


    Download VA Design: grab_test_BRudde_v01.va

    That version will work as expected.

    The VA simulation is not taking care of the synchronization in hardware,

    that detail needs to be fixed by the developer during design time.

    For explanation:

    The remove image approach causes a delay of a full frame in the upper link (by-pass) and requires a memory for a full frame.

  • Thank you for your help, Rudde

    It helps me a lot.

    Now,I have a new problem of the memory management.

    I'm trying to write a grayscale image matching algorithm SAD(Sum of Absolute Differences)


    searched image template

    SAD algorithm


    S is the searched image ,T is the template image.

    The algorithm need a loop to search the template in the searched image. The smallest D(i,j) is the best match. And my strategy is to split the searched image to many roi, then do SAD. To find the roi which is close to the template image.

    There is my SAD_template.va.


    It coulde work well if I do not add it with MotionDetect va of my camera.

    My board is micrioEnable 5 VQ8-CXP6D.It just has 4RAM module. And my camare is 4CXP, it need 32 parallism and more buffer module.

    My program was inefficient and consumed too much memory,even the Visual Applets could not map it.


    This problem has been bothering me for a long time. I have no idea to solve it.

    I really need your help.

    Can help me analyze, and give me some ideas to solve