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.

[参考译文] C7000-CGT:尝试在 C7504 DSP 上使用 FIR4指令时编译器缺陷

Guru**** 2386610 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1498195/c7000-cgt-compiler-defect-when-trying-to-use-fir4-instruction-on-c7504-dsp

器件型号:C7000-CGT

工具/软件:

来自汉堡的 Moin
我想编写一个使用 FIR4指令(特别是__vfir4suhw_vww 内在函数)的程序、但我遇到了编译器缺陷:

~/Downloads/ti-cgt-c7000_5.0.0.LTS/bin/cl7x --compile_only --cpp_file=BrokenFIR4.cpp --include_path=${HOME}/Downloads/ti-cgt-c7000_5.0.0.LTS/include --silicon_version=7504

>>>> Optimizer terminated abnormally
>>>>    in function _Z24demonstrateCompilerErrorPKtPKsPi()
>>>>    in file "BrokenFIR4.cpp"
This is caused by a defect in the TI C/C++ Optimizer.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI on the E2E support forums at http://e2e.ti.com

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment


>> Compilation failure

根据要求、我在此处附加了一个示例-很遗憾、出于某种原因、我无法上传.pp:
e2e.ti.com/.../BrokenFIR4.cpp

我已验证此问题仍然存在于编译器版本5.0.0 (截至目前、该版本为可供下载的最新版本)中

使用的命令行选项是:

  • -compile_only
  • -- cpp_file=
  • --- include_path=
  • --silicon_version=7504.

由于错误消息讨论了优化器、我尝试了-O0、但没有任何区别。

这是 FIR4指令的已知问题还是我应该能够使用它?

此致、
Moritz

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Moritz

    我可以按照您提供的步骤重现此问题。 我将检查问题的根本原因。  

    此外、我还能够使用优化级别3和4构建相同的内容。 所以、您可以尝试在相同的代码中使用-O3/-O4。  

    此外、您能否提供测试输入和输出来验证它们。

    此致、
    Sivadeep

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sivadeep:
    我尝试添加-O3和-O4、但两者的错误消息是相同的。 它不会编译

    ➜  Compiler Error ~/Downloads/ti-cgt-c7000_5.0.0.LTS/bin/cl7x --compile_only --cpp_file=BrokenFIR4.cpp --include_path=${HOME}/Downloads/ti-cgt-c7000_5.0.0.LTS/include --silicon_version=7504 -O3
    
    >>>> Optimizer terminated abnormally
    >>>>    in function _Z24demonstrateCompilerErrorPKtPKsPi()
    >>>>    in file "BrokenFIR4.cpp"
    This is caused by a defect in the TI C/C++ Optimizer.
    TI Customer Support may be able to suggest a workaround to avoid this.
    
    Upgrading to the newest version of the compiler may fix this problem.
    
    Contact TI on the E2E support forums at http://e2e.ti.com
    
    We need to see this ENTIRE error message and a complete, reproducible
    test case including ALL of the command-line options.
    Include the .pp file created by option --preproc_with_comment
    
    
    >> Compilation failure
    ➜  Compiler Error ~/Downloads/ti-cgt-c7000_5.0.0.LTS/bin/cl7x --compile_only --cpp_file=BrokenFIR4.cpp --include_path=${HOME}/Downloads/ti-cgt-c7000_5.0.0.LTS/include --silicon_version=7504 -O4
    
    >>>> Optimizer terminated abnormally
    >>>>    in function _Z24demonstrateCompilerErrorPKtPKsPi()
    >>>>    in file "BrokenFIR4.cpp"
    This is caused by a defect in the TI C/C++ Optimizer.
    TI Customer Support may be able to suggest a workaround to avoid this.
    
    Upgrading to the newest version of the compiler may fix this problem.
    
    Contact TI on the E2E support forums at http://e2e.ti.com
    
    We need to see this ENTIRE error message and a complete, reproducible
    test case including ALL of the command-line options.
    Include the .pp file created by option --preproc_with_comment
    
    
    >> Compilation failure
    ➜  Compiler Error 

    关于输入/输出示例、针对的输入  

    input[80} = {0,1,2,3,4,5,6,...79}
    taps[4] = {1,0,0,0}

    我期望看到的输出

    output[80] = {0,1,2,3,4,...63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    我能够从 ti-cgt-c7000_4.1.0.LTS 构建相同的代码。 我尝试从 CCS 构建它。 我能够获得5.0 LTS 版本的相同版本。 我将在内部讨论、并向您介绍最新的解决方案。

    此致、
    Sivadeep

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您将此问题通知我们并提供简明的测试案例。  我能够重现同样的行为。  我提交问题 EXT_EP-12360 进行调查。  欢迎点击这个链接。

    解决方法是更改这些行...

            int8 vResultsLo{0};
            int8 vResultsHi{0};

    注意大括号内的0。

    谢谢。此致、

    -乔治

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    如果我按照您建议的方式更改变量的初始化方式、我可以确认我能够成功进行编译。

    非常感谢您的调查!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    我正在关闭此主题、因为我认为原始问题已解决。 如果需要进一步的支持、只需回复重新打开。

    此致、
    Sivadeep