For my design i'm using the CLA to handle control specific tasks i'm experimenting on the TMX320F28069 control card.
I would like to use the __mswapf intrinisic to swap two floatingpoint variables stored in a global structure
this structure is mapped to the message RAM in which the CLA has read and write access.
example how i declared the structure in the shared header (C28x and Cla)
struct ClaRW {
float inputA;
float inputB ;
};
external volatile struct ClaRW gClaVars;
In the C28x specific code i declared this,
#pragma DATA_SECTION("ClaWriteCpuRead")
volatile struct ClaRW gClaVars;
The code works and i begon to optimize my code by using intrinsics
this is where i get a compilation error
Multiple markers at this line
- ClaCode.cla, line 55 [S/W BP]
- #435 qualifiers dropped in binding reference of type "float &" to initializer of type
"volatile float" __mswapf( gClaVars.InputA, gClaVars.InputB );
The compiler reference manual [spru514e] states the following for __mswapf in the CLA compiler
void __mswapf(float a, float b )--> assembly MSWAPF a, b --> Swap the contents of a and b.
Question:
Why does this compiler intrinisic not work for this example?
Is it the volatile reference, or should i supply a pointer instead of the actual float to __mswapf?
Thanks in advance,
Regards Rob,