Hello,
Does anyone know what is the simplest way to measure time on DSP 674 on Netra ?
Thanks.
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.
Alla,
You can use the following in some cases:
#include <c6h.x>
unsigned int uCalTime, ulStartTime, uEndTime, uBenchTime;
main()
{
TSCL = 0;
ullStartTime = TSCL;
ullCalTime = TSCL;
ullCalTime -= ullStartTime;
ullStartTime = TSCL;
<code to be measured>
ullEndTime = TSCL;
ullBenchTime = ullEndTime - ullStartTime - ullCalTime;
}
But the TSC (described in CPU & Instruction Set Reference Guide) is 64-bits, while just the TSCL half will overflow every 4G cycles. If this is a problem, then you will need to use a full 64-bit access. The version above is useful in most cases.
Regards,
RandyP
If you need more help, please reply back. If this answers the question, please click Verify Answer , below.