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/TMS320VC5410A: Potential Pipeline Conflict when compile C program

Part Number: TMS320VC5410A

Tool/software: TI C/C++ Compiler

Hi,

When I compile a C program with CCS, I get many warnings like:

"C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0740811", WARNING! at line 1589:

[W0005]

Potential Pipeline Conflict: SXM: 1 Slot Latency

DLD *SP(2), B          ;|93|

How can I remove these warnings? The C program is  correct when compiled in  other platform.

Our Code Composer Studio version is:5.5.0.00077

Best Regards!

Dudechao

  • TI ended support for C54x devices, and related tools like the compiler, several years ago.  That said, I'm happy to look at a test case and shed what light I can.  

    For the one source file that sees these diagnostics about the pipeline, please follow the directions in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George

  • George,

    Thanks for your response!

    I attached the required files following the directions, Our compiler version is   "TMS320C54x Linker PC v4.2.0" from object.map file.

    Best Regards!

    Dudechao

    aecm_core.pp.txt

    compiler_options_used.txt
    **** Build of configuration Debug for project dtmf_aec ****
    
    "D:\\ti\\ccs5_5\\ccsv5\\utils\\bin\\gmake" -k D:/ti/myprojects/vcs/dtmf_aec/Debug/aecm_core.obj 
    'Building file: D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c'
    'Invoking: C5400 Compiler'
    "D:/ti/ccs5_5/ccsv5/tools/compiler/c5400_4.2.0/bin/cl500" --define="_DEBUG" --define=c5410a --include_path="D:/ti/ccs5_5/ccsv5/tools/compiler/c5400_4.2.0/include" --include_path="D:/ti/ccs5_5/xdais_7_21_01_07/packages/ti/xdais" --include_path="D:/ti/myprojects/vcs/dtmf_aec" --include_path="D:/ti/ccs3_3/C5400/csl/include" --symdebug:dwarf --preproc_with_comment --preproc_with_compile --display_error_number --pipeline_warn --silicon_version=548 --call_assumptions=0 --gen_opt_info=0 --opt_level=0 --obj_directory="D:/ti/myprojects/vcs/dtmf_aec/Debug"  "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c"
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 318: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 319: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 320: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 321: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 322: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 324: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 326: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 692: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1374: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1374: warning #179-D: variable "fft" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1516: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1517: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1518: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1519: warning #1107-D: conversion from integer to smaller pointer
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1516: warning #179-D: variable "fft" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 1866: warning #112-D: statement is unreachable
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 48: warning #179-D: variable "kAlpha1" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 50: warning #179-D: variable "kBeta1" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 52: warning #179-D: variable "kAlpha2" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 54: warning #179-D: variable "kBeta2" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 56: warning #179-D: variable "kAlpha3" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 58: warning #179-D: variable "kBeta3" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 353: warning #179-D: function "WindowAndFFT" was declared but never referenced
    "D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c", line 383: warning #179-D: function "InverseFFTAndWindow" was declared but never referenced
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 1425:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        SUB       B,A                   ; |231| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 2157:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        DLD       *AR4,A                ; |449| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 4148:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       #8,B
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 5648:
     [W0005]
             Potential Pipeline Conflict: AR2:  1  Slot Latency
    	        LD        *AR2,#-3,B            ; |987| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 6349:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       B,A                   ; |1083| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 7143:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       #1,A,A                ; |1165| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 7370:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       B,#1,A                ; |1175| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 8722:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        DLD       *AR6,A                ; |1481| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 10024:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       B,A                   ; |1696| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 10049:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        SUB       B,A                   ; |1696| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 10421:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       #1,A
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 10532:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        SUB       B,A                   ; |1764| 
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 11505:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       *AR7,B
    
    "C:\Users\ADMINI~1.PC-\AppData\Local\Temp\0682011", WARNING! at line 11544:
     [W0005]
             Potential Pipeline Conflict: SXM:  1  Slot Latency
    	        ADD       *AR7,B
    
    No Assembly Errors, 14 Assembly Warnings
    'Finished building: D:/ti/myprojects/vcs/dtmf_aec/webrtc/modules/audio_processing/aecm/aecm_core.c'
    ' '
    
    **** Build Finished ****
    

  • Thank you for the test case.

    The compiler always models the pipeline, and schedules instructions to avoid pipeline conflicts.  When you use the build option --pipeline_warn, the assembler models the pipeline in a similar manner, and issues diagnostics when it detects a pipeline conflict.  So, this is a disagreement between the compiler and assembler on whether these particular pipeline conflicts are present. 

    The compiler pipeline model worked in the field for much longer, and is much more likely to be correct.  When you are building C or C++ code, there is no need to use the switch --pipeline_warn.  Use it only when building hand-coded assembly.

    Thanks and regards,

    -George

  • George,

    I also think  so before,   and I ignored these warnings and download the code to run, but the program run to corrupt soon with different cares something like  " cannot find code in address 0x86"  or in a endless loop( when I step  the codes, the cyclic conditional variable value can not be changed! ). I check the stack(SP) and  heap size. all  is enough ! 

    I step  run the whole program( only run once  each fuction), It is ok, but If run it free, It is run to dead soon. 

    The program run well  in other platform( ARM ), So I suspected these compile warnings!  Are you sure  thesse warnings can be ignored?

    Best Regards!

    Dudechao

  • Please keep in mind that, throughout this thread, I am speaking in general terms.  My memory of how the C54x pipeline works is too vague for me to be specific.

    It is possible that single stepping through a function can hide a pipeline problem that gets exposed when running all the way through the function.  But it sounds like you are not doing that.  If you had an actual pipeline problem, whenever you do even this ...

    user5926475 said:
    I step  run the whole program( only run once  each fuction), It is ok

    ... you would experience it.  That you go on to see this ...

    user5926475 said:
    but If run it free, It is run to dead soon. 

    ... usually means there is a timing problem of some sort.  Unfortunately, that is out of my expertise.

    Given that C54x support stopped so long ago, I don't have a good option for where to send you next.  I'll ask around, but I can't promise anything further.

    Thanks and regards,

    -George

  • George,

    "I step  run the whole program( only run once  each fuction), It is ok", I mean the program is not deed or corrupted.  I don't know if  experience  a pipeline problem.

    This program  have  an important role in our porject.

    Hope to get your help!

    Best Regards!

    Dudechao

  • Hi Dudechao,

    As an experiment, you could use the compiler to keep the generated assembly for those C files which generate the pipeline warnings. Then replace those C files in your project with the generated assembly, and insert NOPs in the assembly at the point where the assembler issues the pipeline warning.

    Regards,
    Frank

  • Hi Frank,

    I insert NOPs to the generated assembly and replace the same name C with it in the project. Then I compilering, there is no pipeline warnings.

    Can I  only use this way to resolve the problem? 

    Best Regards!

    Dudechao

  • Dudechao,

    >> Then I compilering, there is no pipeline warnings.

    Is the crash resolved when the pipeline warnings are eliminated?

    >> Can I  only use this way to resolve the problem?

    I'm not sure. Maybe you can experiment with the compiler settings to see if there's a way to generated code for which the assembler doesn't issue the pipeline warnings.

    Regards,
    Frank

  • user5926475 said:

    I insert NOPs to the generated assembly and replace the same name C with it in the project. Then I compilering, there is no pipeline warnings.

    Can I  only use this way to resolve the problem? 

    We do not intend for you to use the method as a way to solve the problem.  This is only an experiment to prove whether or not these diagnostics from the assembler are accurate.  If the problem behavior remains, then the assembler diagnostics are wrong.  If the problem behavior disappears, then the assembler diagnostics are correct.

    I'm still not sure of the results of this experiment.

    Thanks and regards,

    -George

  • Hi George,

    There is no pipeline conflict when compile C program. I make something wrong. I have solved this problem.

    Many thanks you for your help!

    Best Regards,

    Dudechao