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.

Compiler/TMS320F28035: how much time would it consume when two floating number are under compare operation

Part Number: TMS320F28035

Tool/software: TI C/C++ Compiler

how much time would it consume when two floating number are under  compare operation on C28X- fixpoint CPU platform.

for example, 

TMS320F28035,clock=60MHz,

float a=36.2

float b=30.2.

unsigned int c=0;

if(a>b) c=1;

else c=0;

  • Since this device does not have floating point instructions, the comparison is done by calling a routine in the compiler RTS library.  The routine is named FS$$CMP.  It is in a file named fs_cmp28.asm.  This file is located in a directory similar to ...

    C:\ti\ccsv7\tools\compiler\ti-cgt-c2000_16.9.2.LTS\lib\src

    The routine contains about 20 instructions.  So that gives you a good sense of how many CPU cycles this comparison is likely to use.

    Thanks and regards,

    -George

  • Dear Mock,

    thanks for your reply.

    from your reply, I think it's better that this comparison should be excuted on CLA or using IQMATH on  C28X CPU.

    Best Regards

    Peng Mao