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.

Using _cmpyr1, _shl2 intrinsics for TCI6614 EVM

Hi,

I am facing problems in using _cmpyr1, _shl2 intrinsics for 6614 EVM. I included c6x.h header file in my project where prototype of these intrinsics defined but I see prototyes of these intrinsics are not included as they are  #defined  for TMS320C6400, TMS320C6740, TMS320C6600, TI_C6X_TESLA. I tried selecting any one of these devices but none of them are showing under the C6000 family while creating the new project. In C66xx data manual it is mentioned that these intrinsics are compatible with all C66xx devices. If I build my project with calls to these intrinsics included, compiler is not giving any error but if I run the code it is not giving proper result. Can you please help me in resolving this issue?

Thanks & Regards,

Anjibabu

  • I presume that when you set up your project, CCS automatically sets the compiler build option -mv6600.  This option tells the compiler to build for a C66xx device.  Use of that option, in turn, causes the preprocessor symbol _TMS320C6600 to be defined with the value 1 (along with many others).  In c6x.h, the function prototypes for _cmpyr1 and _shl2 are made available when _TMS320C6600 is defined.

    Anji Babu said:
    if I run the code it is not giving proper result.

    What are you seeing that makes you say that?

    What version of the compiler (not CCS) are you using?

    Thanks and regards,

    -George

  • Hi George,

    Thanks for your response. I am using -mv6600 version still I see preprocessor symbol is not defined. Does preprocessor symbol depends on compiler version alone or do I need change something else in project properties?


    Thanks & Regards,

    Anjibabu

  • George asks you for the compiler version so that we can try this ourselves.  When I use -mv6600 with the latest version of the compiler, it correctly defines the macro _TMS320C6600 and declares those two intrinsics.  You can see this by using the compiler option -pdsw225, which instructs the parser to emit a warning for any implicitly-declared function; intrinsics that are not properly declared will show up as implicitly-declared functions when they are used.  You can see which macros are predefined by using the -ppm parser option to generate a .pp file containing all of the macro definitions.

    Please tell us your compiler version and show us your complete command line options.

  • Hi,

    I am using 7.4.4 compiler version and -mv6600 processor version. Please look into this .pp file  2870.macro_defines.txt.

  • As I expected, I see the line ...

    #define _TMS320C6600 1	/* Predefined */
    

    This means the appropriate functions are made available in c6x.h.  

    I'm still not clear on what you see that makes you think the code is not building or executing correctly.

    Thanks and regards,

    -George