Hi,
There are both AWE Designer and AWE MATLAB API MHz profiling possibilities. However, it is the average MHz profiling I mostly get. The peak profiling is only mentioned as a total number for the entire layout in one place. It is the peak profiling that tells us if we have a problem.
Example: I have a layout that takes 15% average on target but takes 20% peak. How can I find out what module(s) causes the peak fluctuations? I prefer MATLAB API.
Kind regards,
BOHR
11:36am
Hi Bohr,
Start by seeing whether the information under "Module Profile Type" in this article is of use. You will need to run several passes of profiling and then look to see which modules show the greatest variation. Is this helpful?
https://tinyurl.com/2ffxbs95
Thanks,
Gary
6:51am
Thanks for the reply and sorry for the long break Gary,
This peak profiling is only accessible from the AWE Designer layouts and not MATLAB API generated layouts, correct?
Is there then a way to convert a MATLAB API layout to AWE Designer layout to access this kind of profiling?
Regards,
BOHR
11:01am
Hi Bohr,
Please try using the following function (set_profiling_options) at the MATLAB console to enable peak profiling mode.
It is not possible to convert a layout done via MATLAB scripting directly to an AWD.
Let me know if this works for you.
Thanks,
Gary
8:11am
Hi Gary, sorry for the long delay, I was busy with other things.
What is an instance ID and how do I get it via MATLAB API for my layout or any other part of the layout?
How to set the optionsMask?
I assume I can use get_profiling_options to read the current values. However, the help file says:
profilingOptions = get_profiling_options(instanceID)
Get the current profiling options in an instance. On SUCCESS, status will
be 1 and on failure it will be 0.
If it returns 0 is it then the profiling options or does it mean failure?
Kind regards,
BOHR
12:35pm
Hi Bohr,
Different Instance Ids are associated with implementations that have more than one AWECore running on the SoC.
See: Multi-Instance AWE Core Integration Guide
Using the Native mode as an example, see in AWE Server that this supports 4 Instances, 0, 1, 2, 3.
In the layout, the InstanceID is shown under the Module as highlighted. Use the Change Thread module to change between instances in a single layout.
Regarding accessing the Instance ID of a module via MATLAB, use the "coreID" property:
Regarding setting profiling options, the actual calling sequence is:
function SUCCESS = set_profiling_options(instanceID, optionsMask, profilingOptions)
Regarding the MATLAB function get_profiling_options(), it has multiple return values, as shown:
function [profilingOptions, status] = get_profiling_options(instanceID)
Here's a code snippet demonstrating their use:
[profilingOptions, status] = get_profiling_options();
verifyEqual(testCase, status, 1);
verifyEqual(testCase, profilingOptions, 0); % 0x0 | (0x0 << 1)
Thanks, Gary
9:35am
Hi Gary,
Thanks for the clarifying answers, some help text should be updated for these functions. I am sure you are aware of.
It now works, thanks. Followup questions for the results:
When looking at differences between profiling 10s of the same layout natively with avg and peak settings I can see that:
1. %CPU, MHz and Ticks/Process for the individual modules are much higher for peak
-which makes sense
2. Layout has almost the same load (around 3.5%) for avg and peak
-how can this be correct? What does the layout %CPU number cover for the entire layout?
3. Some modules took more than 100% for the peak (259% to be exact)
-how to understand this? Normally if we are above 100% there should be a glitch in the audio but I did not hear any. Is it because natively we have 4 cores so our maximum is 400%?
4. I have six SecondOrderFilterSmoothedCascade each with a single biquad. Taking around 0.05% avg. Three of them takes more than 10% peak and the other three takes <0.5% peak.
-how can there be such a big difference? Anything I can do about it?
-will the profiling be less regular natively compared to most targets?
Regards,
BOHR