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.
Tool/software: TI C/C++ Compiler
Hi,
in an example of the control suite I've found a call which calculates a sinus with this function: __sinpuf32!
The example is tmu_sinegen_cpu01.c!
the code is:
tmuOutput[i] = __sinpuf32(inputVector[i]);
Where does the compiler find this call __sinpuf32(x)?
I did not find this in a header.
I replaced a sin(x) call with __sinpuf32(x) in my first TMS320F28377S project with CCSv6.1.3 and got an error message
because __sinpuf32 will not be found!
I read the docs and supposed that the compiler will replace a sin(x) call with the TMU function automaticly?
Is this correct?
It appears you tried to attach an image to your last post. Something went wrong. I don't see any image.
Thanks and regards,
-George
Everything looks correct. I'm not sure how the results differ from what you expect.
What follows is a small example that illustrates how this intrinsic works.
>>>type file.c double fxn(double arg) { return __sinpuf32(arg); } >>>cl2000 --tmu_support=tmu0 --src_interlist file.c
The option --src_interlist tells the compiler to not delete the auto-generated .asm file, and to add comments to it that make it easier to understand. Inspect file.asm to see these lines ...
;---------------------------------------------------------------------- ; 3 | return __sinpuf32(arg); ;---------------------------------------------------------------------- SINPUF32 R0H,R0H ; [CPU_] |3|
There is no call to a function named __sinpuf32. Instead, the instruction SINPUF32 is used.
To understand more about intrinsics like this work, please see the section titled Using Intrinsics to Access Assembly Language Statements in the C2000 compiler manual.
Thanks and regards,
-George
Hi George,
very vividly, I try my best an will dive in.
I will share my experience with your information.
br Ralf