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.

How many cycles takes to divide and multiple?

Other Parts Discussed in Thread: TMS320F28027, CONTROLSUITE

Hi everyone,

Can someone help me to find out, how many cycles takes to perform a division and multiplication operation in CCS v.3.3 - TMS320F28027(C28x Piccolo series). I'm to design some filters and I want to know if these operations takes more clock cycles to perform.

I hope to hear from you.

Regards

Michael.

 

  • Hi Michael,

    you will programm those filters in ASM dont you?

    As a quick reference you can try to take a look at the TMS320C28x - CPU and Instruction Set Reference Guide then. ( http://focus.ti.com/lit/ug/spru430e/spru430e.pdf ) In Chapter 6 you will find a list of all assembler instructions and how much CPU cycles they take to execute.

    Hopefully this helps a little bit... :-)

    Cheers,

    Mario

  • Hi Mario

    Thanks for the answer, but the  filters are implemented in C and I want to know  much clock cycles takes for division and multiplication operation in CCS v3.3. Are there any tools that can be used to analyse the code in CCS to verify how many cycles one has used?

    Thanks

    Michael

  • Hey...

    I dont know a convenient way to let CCS do the job. Maybe someone else does...

     I always count the assembly instructions and then calculate the time the code needs for execution. You can easily switch between Source and Mixed Mode by making a right click in the window of your c code and select Mixed mode. Mixed mode shows you the assembly code made out of your c code. Then you can count the cycles referring to the time the assembly instructions take to execute explained in the SPRU430 document.

    If you find out a better and faster way please let me know.... :-)

    Cheers,

    Mario

  • In CCS 3.3 you can use the profiler clock to get the cycles between breakpoints.  To enable & view the clock:

    • Profile ==> Clock ==> Enable
    •  Profile ==> Clock ==> View).

    The clock will show up at the bottom right of the CCS window.  Run to a breakpoint at the start of the code you want to profile, then double click on the clock to clear it, and run to another breakpoint and view the clock.

    Another way to profile is to toggle a pin around the code and measure the time on a scope.

    For fixed point division and multiplication, I suggest taking a look at the C28x IQmath library for optimized code. IQmath is available as part of controlSUITE (www.ti.com/controlsuite)

    Regards,

    Lori

  • Lori ,

    Can that same thing

    • Profile ==> Clock ==> Enable
    •  Profile ==> Clock ==> View). be done in CCS V4 and do we need to include some library or header file to execute this command.

    Does this clock give  the timing which the execution takes on the processor or its just for the comparison (between one method and other method). As generally in debugger mode the program runs slower so does this command have the slower effect of the debugger.

     

    Regards

    NIKHIL RAJPAL