Statistical Profiler (BF516)

I'm using the statistical profiler in VisualDSP++ 5.0 Update 8 to profile some code.

On the left side of the statistical profiler window, the "Execution Unit" column contains duplicates of the same function. This is confusing. Why does this happen?

Secondly, if I click on a function in the "Execution Unit" column, I get the corresponding source for that function on the right side of the window. However, when I add up the percentages for that function, it doesn't equal the total percentage in the "percentage column". Why is that?

UPDATE: I have uploaded a zip file which contains a project which can be executed in the BF5xx simulator. There's a ReadMe file in the zip file which explains how to reproduce the results.
  • 0
    •  Analog Employees 
    on Feb 12, 2013 9:17 PM


    I moved your question to the VisualDSP++ Development Tools Community.  Someone here should be able to assist.



    EngineerZone Support Community Manager

  • 0
    •  Analog Employees 
    on Feb 13, 2013 10:42 AM


    Thanks for providing your project. Im trying to reproduce the problem, however, would you be able to try turning off Optimization to see if thie solves your problem. To do this right click your project and select "Project Options". Then select the "General" section under the compile section. Remove the check box next to "Enable Optimization". Now Rebuild your project and let me know if you notice the same duplicate entries.



  • I can't even get there yet. Are you suspecting that it has something to do with the '-ip' linker optimization switch?

    I'm trying to use profile guided optimization, but I get this exception right before the PGO is about to finish.

    Exception: #10 PROTVIOL:Illegal use superv. res at PC 0xffa12462

    When I run the same test in Visual Studio, I don't get any exceptions and the audio from the decoder sounds fine. I know that I can't compare execution on Blackfin with execution in Windows, but I just want to mention it anyway.

    I have attached the latest version of my test project.

  • I can't figure out why the PGO session is taking so long to execute. It just runs forever!!!

    Can you have a look at it, make whatever modifications are needed and post the corrected project so I can see how profiling using PGO is done?

    I am also not sure if the LDF file is correct. I had to #define USE_SDRAM in the linker properties to fix an "out of memory" error. Not sure if this is the right way to do it.

    Thank you.

  • 0
    •  Analog Employees 
    on Feb 14, 2013 3:47 PM


    The "USE_SDRAM" macro will enable the sections of the LDF that map to SDRAM. This is necessary if you want to use SDRAM and are linking against the default LDF. I should mention that this is not recommended.

    We recommend adding - and configuring - your LDF via 'Project: Project Options: Add Startup Code/LDF'. There is an 'External Memory' tab that is added when this option is used which allows you to specify the size and partitioning of your SDRAM.

    Your initial question mentioned the Statistical Profiler, however the PROTVIOL error message, slow execution, and the screenshot of your Streams configuration suggests you are using a Simulator sessions - can you confirm this is the case?

    My guess is that the illegal supervisor resource error you are getting in the Simulator is caused by a stack or heap overflow. I would recommend adding the LDF via 'Project: Options: Add Startup Code/LDF', then enable External Memory under the 'External Memory' tab. Next, go to the System Heap and System Stack tabs, and enable the check box to 'Customize' these settings. Place them both in L3.

    If you are going to use the Simulator, I would recommend using the Compiled Simulator. While it isn't cycle accurate (each instruction is simply treated as a single cycle), it runs much, much faster than the Cycle-Accurate simulator.