模型引用限制
模型架构Limitations
Limitation | Details |
---|---|
加速器模式下的可重复使用性 | 看Specify Reusability of Referenced Models。 |
阻止口罩 | 看Use Masked Blocks in Referenced Models。 |
S-Functions | Use S-Functions with Referenced Models |
去和From块 | 去和From块cannot cross model reference boundaries. |
迭代器和可配置子系统 | 如果模型块引用了包含的模型任务块that are not in an iterator subsystem, you cannot place a模型迭代子系统中的块。 在一个可配置的子系统模型block, during model update, do not change the subsystem that the configurable subsystem selects. |
initfcn callback |
An |
MATLAB®Function block | A MATLAB Function block in a referenced model that executes in accelerator mode cannot call MATLAB functions that are declared extrinsic for code generation. |
Stateflow®charts | 如果该模型包含一个状态流图表:
|
Signal Limitations
Limitation | Details |
---|---|
0-based or 1-based indexing information propagation | 看索引信息传播。 |
Asynchronous rates | Referenced models can only use asynchronous rates if the model meets两个都of these conditions:
|
User-defined data type input or output | 引用的模型只能输入或输出固定点的用户定义的数据类型或 |
引用的模型无法在多条总线中访问信号 | A referenced model cannot directly access the signals in a multirate bus. To overcome this limitation, seeConnect Multirate Buses to Referenced Models。 |
模拟限制
Limitation | Details |
---|---|
Continuous sample time propagation | A continuous sample time cannot be propagated to a模型block that is sample-time independent. |
样品时间和求解器 | 模型参考层次结构中的所有连续样品时间均由最高模型的求解器控制。例如,对于固定步骤求解器,这意味着参考模型中的所有连续速率都将以最高模型的固定步骤运行。有关样本时间影响求解器的信息,请参见样品时间类型。 |
State initialization | To initialize the states of a model that references other models with states, specify the initial states in structure or structure with time format. For more information, seeState Information for Referenced Models。 |
Parameter tunability | When you simulate a model that references other models, under some circumstances, you lose some tunability of block parameters (for example, the获得parameter of a获得堵塞)。有关更多信息,请参阅Tunability Considerations and Limitations for Other Modeling Goals。 |
0-based or 1-based indexing information propagation | 看索引信息传播。 |
引用模型多个实例的正常模式可见性 | 您可以模拟具有正常模式的参考模型的多个实例的模型。参考模型的所有实例都是模拟的一部分。但是,Simuli万博1manbetxnk®在模型窗口中仅显示一个实例。正常模式可见性设置确定了哪些实例Simulink显示。万博1manbetx正常模式可见性包括显示范围块和data port values. To set up your model to control which instance of a referenced model in normal mode has visibility and to ensure proper simulation of the model, seeConfigure Models with Multiple Referenced Model Instances。 |
在使用加速器模式之前保存 | When you create a model, you cannot use that model as an accelerator mode referenced model until you have saved the model to disk. You can work around this limitation by setting the model to normal mode. SeeSimulate Model Reference Hierarchies。 |
加速器模式下的诊断配置参数 | 对于以加速器模式引用的模型,Simulink忽略了您设置为值的某些运行时诊断万博1manbetx |
在加速器模式下使用运行时检查的块 | 一些块包括在加速器模式下以引用模型中的块中包含块时禁用的运行时检查。这些块的示例包括任务,选择器, 和MATLAB功能块)。 |
sim command in accelerator mode |
当。。。的时候 |
Data logging and visualization in accelerator mode | These logging methods have limitations when specified for referenced models executing in accelerator mode.
|
加速器模式下的可重复使用性 | 看Specify Reusability of Referenced Models。 |
Linearization of discrete states in accelerator mode | 在加速器模式下,模型参考的离散状态不暴露于线性化。这些离散状态在线性化过程中不会受到干扰,因此在修剪过程中并非真正自由。 |
在加速器模式下修剪 | 在修剪过程中,随机块的输出不会保持恒定。不恒定的输出会影响优化过程。 |
外部模式in accelerator mode | Accelerator mode does not support the外部模式option. If you enable the外部模式选项,加速器模式忽略了它。 |
Sim viewing device in rapid accelerator mode | 在快速加速器模式下,Simulink不会更新万博1manbetx模型block with a sim viewing device. |
SIL and PIL mode | 看Simulation Mode Override Behavior in Model Reference Hierarchy(嵌入式编码器)。 |
Custom C code for referenced model simulation (SIM) target build for accelerator mode | 要在加速器模式下使用自定义C代码,请启用Include custom code for referenced models配置参数。 警告在加速器模式下使用自定义C代码进行引用的模型可以产生不同的结果,而不是使用自定义代码的模拟模型。如果自定义代码包括对总线或枚举结构的声明,则如果构建的重复声明对这些结构的重复声明,则SIM目标生成失败。另外,如果自定义代码使用代表总线或枚举的结构,则可能会获得意外的仿真结果。 |
工具限制
Limitation | Details |
---|---|
万博1manbetxSimulink调试器断点 | 使用父模型中的Simulink调试万博1manbetx器,您可以在模型block boundaries. Setting the breakpoints allows you to look at the input and output values of the模型堵塞。但是,您无法在模型内设置断点模型块引用。看Simulink Debugger了解更多信息。 |
万博1manbetxSimulink Profiler | In Normal mode, enabling the Simulink Profiler on a parent model does not enable profiling for referenced models. Enable profiling separately for each referenced model. See牧师如何捕获性能数据。 |
万博1manbetx访问内部数据或模型配置的Simulink工具 | Simulink tools that require access to the internal data or the configuration of a model have no effect on referenced models executing in accelerator mode. Specifications made and actions taken by such tools are ignored. Examples of tools that require access to model internal data or configuration include:
|
Printing referenced models | You cannot print a referenced model from a top model. |
代码生成限制
Limitation | Details |
---|---|
配置参数 | 看配置参数要求(Simulink Coder). |
原子子系统 | If you generate code for an atomic subsystem as a reusable function, when you use accelerator mode, the inputs or outputs that connect the subsystem to a referenced model can affect code reuse. See从子系统生成返回代码(万博1manbetxSimulink编码器)有关详细信息。 |
数据类型更换 | Simulation target code generation for referenced models in accelerator mode does not support data type replacement. |