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.

Benchmarking code in SYS/BIOS

Hi all,

I am just getting my feet wet with SYS/BIOS, having previously used DSP/BIOS. Previously we made heavy use of the DSP/BIOS STS functions to profile bits of code, and this appears to no longer be available in SYS/BIOS.  If I understand this correctly, the Load module allows you only to profile whole tasks (rather than arbitrary sections of code), which is not particularly useful for us.  Am I misunderstanding or missing something?  Is there some equivalent (to DSP/BIOS STS) functionality out there?

Many thanks,
Brady

  • So does no one have suggestions/discussion about how they benchmark arbitrary sections of code on embedded platforms with BIOS 6?  Is this a stupid question with an obvious answer?

  • Brady,

    Have you considered using the xdc.runtime.Timestamp module for your profiling?  For example, to profile a section of code in your application:

      #include <xdc/runtime/Timestamp.h>

      :

        UInt32 timestamp, delta;

        :

        timestamp = Timestamp_get32();

        //Section of code to be profiled

        delta = Timestamp_get32() - timestamp;

    Regards,

    Shreyas

  • Shreyas,

     

    Thank you for your reply.  I did see that module, but that is more like the DSP/BIOS CLK_gethtime() function than the STS function. Unfortunately, (I think) it cannot be monitored with RTA tools, and it does no averaging over function calls.  Is there a way to monitor this using RTA besides printing it out?

    -Brady

  • The STS functionality you're referring to is not currently available with BIOS 6. It's an obvious gap between the two, and for what it's worth, it's on the list of enhancements to make to BIOS 6. 

    If it would be sufficient to just collect a batch of data and analyze it, then I think you could do this with Excel in the meantime. Here's what I'm thinking:

    1. Use the Timestamp API to measure a single pass, then print this value with Log_print.

    2. In the RTA 'printf logs' view, you can filter the table for just your benchmark event. The filter button has an icon with three staggered arrows pointing to the right. Use it to filter for some keyword in your printf string.

    3. Make sure the arguments columns are visible in the table. Right click on the table and select 'Column Settings...', then check the first few args to make them visible (that way you'll have the values as separate cells for performing calculations).

    4. Export the data to a .csv file for analysis in Excel. Right click on the table, then go to Data -> Export All... and save the data to a .csv file.

    I guess I'm not sure what kind of data you're trying to collect exactly, so that approach may or may not be helpful.

    Thanks,

    Chris

  • Chris,

     

    Thanks for the reply, but this is a real disappointment.  The whole reason I was hoping to use BIOS 6 is because BIOS 5 is also broken! (See here for an example of my problem: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/3205.aspx).  Basically this issue:

    SDOCM00056730    BIOS 5 RTA Over USB or 510USB, RTDX fails after 2nd time program is loaded

    is a real killer. Unfortunately I guess I should have stuck with CCS 3.3 and whatever BIOS I had back then...