
               CpuFree 1.02
               ------------
         for VSOS 3.60 or higher
        2020-10-12  VLSI Solution



CpuFree is a VSOS Shell driver that allows for the user to analyze the
processor time consuption of the current VS1005 / VSOS system.

To use, either compile the VSIDE Solution, or simply copy CpuFree.dl3 to
your VS1005 Evaluation Board's SYS/ folder.



S:>cpufree -h
Usage: CpuFree [-cx] [-h] [n]
-cx     Report every x'th time (default: 1)
-h      Show this help
x       Gather data at x ms intervals (default: 1000)


Example #1: Collect data for 10 seconds at the time

Add following line to config.txt:
CPUFREE 10000

To do the same from the VSOS Shell:
S:>driver +CpuFree 10000

Example output:
10.004s, used 62.55 MHz ( 72.7%), free 23.47 MHz ( 27.3%), tot 86.02 MHz

The example output tells that of a total available amount of 82.06 MHz,
all user programs used on average 62.55 MHz, or 72.7%. So, in this case,
there is slightly over one fourth of CPU time left, on average.


Example #2: Collect data every 100 millisecond, then report every 100th time
(approximately once every 10 seconds):
CPUFREE 100 -c100

To do the same from the VSOS Shell:
S:>driver +CpuFree 100 -c100

Example output:
10.666s n=100: L 61.69u 24.33f; M 62.55u 23.46f; H 72.64u 13.37f; T 86.02 MHz

Just as in Example #1, the output tells that the Mean processing time
requirement during the 10.45 second analysis was 62.55 MHz, leaving on
average 23.76 MHz free of the available 86.02 MHz clock. However, there
is more information on local processor time usage: you get the Lowest and
Highest processor time consumption of the 100 ms slices CpuFree recorded.
The bottom CPU consumption was 61.69 MHz, while the highest was as high as
72.64 MHz. This mode is very useful when testing algorithms that may have
high local processing time requirement peaks like in this example. In more
static code where the signal path is independent on data, the Low and High
numbers are often very close to each other.




License:
This code may be used freely in any product containing one or more ICs
by VLSI Solution.




Disclaimer:
No guarantee is given for the usability of this code.




Version History:
2020-10-12 HH v1.02 - Corrected help page.
2019-07-18 HH v1.01 - Reports more accuretely when out of CPU
2019-07-11 HH v1.00 - First release.
