gpt4 book ai didi

model - SIMULINK 中代码生成符号的命名冲突

转载 作者:行者123 更新时间:2023-12-02 03:40:55 32 4
gpt4 key购买 nike

我的问题特定于 SIMULINK、Model and Code Generation Advisor 和 Embedded Coder

我在更大的模型(即集成系统)中使用了引用模型,我的引用模型具有相似或相同名称的信号。当我使用模型和代码生成顾问来检查我的模型的健全性时,在“为严格的单精度操作标识有问题的设置”下出现以下错误

{code}Error occurred during model compile.

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model{code}

我什至尝试删除任何信号名称并使用非虚拟数据总线对信号进行分组,以便将它们转换为 C 代码中的结构(生成时)。但是,它仍然提示同样的事情。

我尝试的另一件事是操纵名称修改。但随后它与 MISRA C 代码安全要求(最小修饰字符和最大标识符/var 长度)冲突。

如果这个问题是 SIMULINK 的限制或可以修复,我很难理解。我不能简单地去改信号名,因为那是盲目适应SIMULINK,而不是调查核心原因。另外,我认为模型在功能上是正确的。有没有人经历过这样的事情?

供引用,我认为使用数据总线与此无关。我只是尝试了这种方法,因为有人建议。

最佳答案

一旦我更改了标识符名称的最大允许字符长度,问题似乎就消失了。但是我必须在所有模型中更改它!!!!!!

这可以从模型配置参数的代码生成菜单的符号 Pane 中完成。

关于model - SIMULINK 中代码生成符号的命名冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20091912/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com