CMSIS-DSP: Testing framework
Added some calibration to remove overhead in the benchmark measurement process.
Reorganized one test to move some initialization code outside of the test.
diff --git a/CMSIS/DSP/Testing/processResult.py b/CMSIS/DSP/Testing/processResult.py
index 43b85f4..f2b26ba 100644
--- a/CMSIS/DSP/Testing/processResult.py
+++ b/CMSIS/DSP/Testing/processResult.py
@@ -235,6 +235,11 @@
     return(TestScripts.ParseTrace.getCycles(trace))
 
 def analyseResult(root,results,embedded,benchmark,trace,formatter):
+    calibration = 0
+    if trace:
+      # First cycle in the trace is the calibration data
+      # The noramlisation factor must be coherent with the C code one.
+      calibration = int(getCyclesFromTrace(trace) / 20)
     formatter.start()
     path = []
     state = NORMAL
@@ -348,7 +353,7 @@
       
                     maybeCycles = m.group(4)
                     if maybeCycles == "t":
-                       cycles = getCyclesFromTrace(trace)
+                       cycles = getCyclesFromTrace(trace) - calibration
                     else:
                        cycles = int(maybeCycles)