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.

TMS320F28234: Could division execute directly by CPU?

Part Number: TMS320F28234

Hi Expert,

I just test the division code(div_result = 3001.123/456.16;) in the example project, and the execution result is right.

However I'm confused that,

  • Why the division code could work, since the F28234 don't have floating point unit?
  • I find the execution time is same as 196*sysclk when it execute one above division code or ten repeated codes. Does this because the compiler optimize the ten codes to one?

Thanks!

Rayna

  • Rayna Wang said:

    I just test the division code(div_result = 3001.123/456.16;) in the example project, and the execution result is right.

    However I'm confused that,

    • Why the division code could work, since the F28234 don't have floating point unit?
    • I find the execution time is same as 196*sysclk when it execute one above division code or ten repeated codes. Does this because the compiler optimize the ten codes to one?

    Rayna,

    Please clarify.  Was the division using constants exactly as shown?  If yes, then the compiler pre-processor will do the division and use a constant in the code itself. 

    If this is the case then the execution time for the instruction should only be an assignment of a constant. 

    Regards

    Lori