Forums - FAQ: Cache and FastCV

1 post / 0 new
FAQ: Cache and FastCV
Join Date: 5 Dec 12
Posts: 41
Posted: Thu, 2013-10-10 18:52

It appears that fcvFilterCorr3x3s8 does have some DCFETCH instructions, but is lacking any L2FETCH instructions. This will be improved in a future release. fcvAbsDiffu8 has 2 implementations. The optimized implementation requires src1, src2, dst, srcStride and dstStride to all be 8-byte multiples, as well as srcWidth >= 32. If all these are met, it should use the optimized implementation with pre-fetching. Otherwise it will use the slow code.

The simulator statistics might be a way to confirm pre-fetching being used, but sometimes the statistics can be inaccurate compared to HW performance, especially for multi-threaded simulations. Another way to indirectly check is to compare the ideal-cache performance on simulator vs. performance when --timing --buspenalty 40 is used. In general, if the ratio between them is close to one (e.g. < 1.5), prefetching is working pretty well. This comparison tends to be trustworthy on the simulator. For this comparison, it is important to make sure the test buffers are not already in cache when the test reaches the target function. The downscale example simulation test shows how to do this.
The hexagon simulator is almost always identical to the HW in terms of bit-exact behavior. The only exceptions are due to HW bugs, or programmer errors that have different outcomes in different environments (e.g. scribbling randomly in memory).
  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.