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.

SYS/BIOS Benchmark Cycle Definitions

Other Parts Discussed in Thread: TMS320F28069, SYSBIOS

Hello,

This should be an easy one.  I ran the TMS320F28069 SYS/BIOS benchmark program.  It ran correctly and displayed in the console the min, max, and average number of cycles for each benchmark.  What is the definition of a cycle?  Is it the number of instruction per cycle?  Is it the number of clock ticks?  What kind of clock ticks?  What do I multiply it with to get the actual execution time of the benchmark?  I have spent the last 2 hours searching TI documentation including the source code with no luck.  Any help appreciated.

Regards,

Steve M.

  • Hello Again,


    I found an old benchmark forum posting.  I believe the definition of cycles is the number of instructions needed to execute the specific benchmark.  Since I am using a 320F28069 my instruction time/cycle is 1/90,000,000, or 11.11nS.  The Hwi dispatcher prolog is 1578 cycles.  Multiplying 1578 by 1/90,000,000 gives me 17.53 uS to execute the Hwi dispatcher prolog.  Can this be right?  This means it takes 17.53 uS to handle a hardware interrupt.  This seems way to long.  I simply took the benchmark_TMS320F28069 and ran it with no changes.  I looked at the C28_large_times.html table in the sysbios/benchmarks/doc-files.  For a ezdsp28335 - the closest C28 MCU I could find -- the total number of cycles was 242 cycles or 242 * 1/90,000,000 = 2.68 uS.  Not blazing but closer to the range of acceptable.  Am I running the benchmark incorrectly?  Maybe its running in flash.  I am new to SYS/BIOS so how do I make sure this benchmark is running out of SRAM?  Pasted below is my console output results;

    [C28xx] 192    192    192     Hwi_restore()
    176    176    176     Hwi_disable()
    1578    1578    1578     Hwi dispatcher prolog
    1105    1105    1105     Hwi dispatcher epilog
    2699    2699    2699     Hwi dispatcher()
    4124    4124    4124     Hardware Interrupt to Blocked Task
    3036    3036    3036     Hardware Interrupt to Software Interrupt
    592    592    592     Swi_enable()
    112    112    112     Swi_disable()
    240    240    240     Post Software Interrupt Again
    897    897    897     Post Software Interrupt without Context Switch
    1718    1718    1718     Post Software Interrupt with Context Switch
    21638    21638    21638     Create a New Task without Context Switch
    1345    1345    1345     Set a Task Priority without a Context Switch
    1569    1569    1569     Task_yield
    304    304    304     Post Semaphore, No Waiting Task
    1345    1345    1345     Post Semaphore No Task Switch
    1889    1889    1889     Post Semaphore with Task Switch
    432    432    432     Pend on Semaphore, No Context Switch
    2241    2241    2241     Pend on Semaphore with Task Switch
    80    80    80     Clock_getTicks

    Regards,

    Steve M.

  • The units are the number of instructions.

    First what is your library type: instrumented, nonInstrumented, custom, Custom Debug. The documented numbers are for Custom with asserts and logging disabled (and the Build-Profile set to “release”).

    The placement and configuration really matter also. Where are you putting the code? What are the wait-states on the flash?

    Todd

  • Todd,

    you stated that the units are the number of instructions. But then you ask for the number of wait-states for FLASH?  If the code consists of let's say 10 instructions, then the tool should give you 10, regardless of how fas or slow the FLASH is set.

    Frank

     

  • Hi Frank,

    Sorry, I was too loose with my terminology. The units are CPU cycles. So if an instruction takes 5 CPU cycles because of wait states, you'll get 5. So code placement and wait state configuration is very important.

    Todd

  • Hello Todd,

    How do I set the library type?  How do I set "Custom with asserts"?  What is the optimal placement of the code?  Can you walk me through what I should be doing?

    Regards,

    Steve M.

  • Check Section 2.3.5 of the User's Guide.   Hopefully, that'll help.


    You can change he placement of the code using the linker.cmd file in your project.   You should also make sure that you have the wait states programmed correctly for your device.  I believe the default wait states are "safe" and will work, but you can improve performance by tuning the FLASH wait states.


    Regards,
    -Karl-

  • Steve,

    How did you read out that data?  I just ran the exact same code

    program: benchloop.c

    project: benchmark_TMS320F28069

    I can run everything, but I don't know how to view the results.  You said you saw them in "console output."  But I go to my console and can't see anything like that.  

    I noticed that TI didn't enable logging with UIA tools so I don't know how to view the System_printf statements...

    I know this is probably really easy I'm just not seeing it.  Any advice?
    Thanks,

    Rick