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.

AWR1642BOOST-ODS: Some questions about intrinsic operators in c6x.h

Part Number: AWR1642BOOST-ODS

Hi,

I come across some problems when I read the code of mmwavelib_vecsum in the out-of-box demo. In that function, I see many intrinsic operators, and I know what those means by the 8.6.6 TMS320C6000 Optimizing Compiler.Please excuse my ignorance, I don't know what's the relationship between these intrinsic operators and the Assembly Language. Do they just implement the same functionality? 

Besides, I can't implement the intrinsic operators in VS 2019 or Dev c++ by just including the header file "c6x.h". I guess the intrinsic operators can only work in the DSP but can't work in my CPU. Am I right?

Finally, I only see the statement in c6x.h, but no function. For example, _hill means to get high (odd) register of a long long register pair, but c6x.h only has unsigned  _hill(long long)Where can I find the implementation details of this function (_hill )?

Please help me, 

Thank you!

 

  • Hi,

    The intrinsic operators are basically ways to call from C environment ASM instructions.

    The intrinsics are specific to an assembly language. Intrinsics implemented for C6x DSP will not work on ARM or Intel CPU devices.

    The intrinsics are implemented in the compiler.

    Could you please start a new thread regarding the "Where can I find the implementation details of this function (_hill )?". The compiler team should be able to help with this question

    thank you

    Cesar

  • Thank you, Cesar!

    I still wonder why we need to use ASM instructions from C environment to calculate the sum of a vector. Just use '+' can also solve the problem.I guess it is faster by using the ASM instructions. Am I right?

  • Yes, your understanding is correct.

    The only reason for using ASM instructions is to optimize the execution speed.

    The code generated by the compiler will take more CPU cycles

    thank you

    Cesar

  • Thank you,Cesar! You've been a great help!

    I still have some questions. I guess the compiler means CCS, and since the compiler can't call ASM directly, so we need the intrinsic operators to build the bridge in order to help the compiler use ASM. When we call the intrinsic operator, it realizes the same function as its corresponding ASM does. Am I right?

    Thank you!

  • Hi,

    Yes, you are correct

    Cesar