主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

Simulink 模型中提取架构

您可以在 Simulink® 模型上使用 System Composer™ 架构编辑和分析功能。为此,从 Simulink 模型中提取架构。模型和 Subsystem 模块以及 Simulink 模型中的所有端口代表架构结构,而所有其他模块代表某种动态或算法行为。在从 Simulink 模型获得的架构模型中,您可以选择表示架构构造或链接到行为模型。

  1. 打开一个示例模型。

    openExample('ReferenceFilesForCollaborationExample')

  2. 仿真选项卡上,点击保存箭头。从导出模型列表中选择架构模型

    Menu option under down arrow for the save icon, specifies export model to architecture model.

  3. 为架构模型指定名称和路径。

    Export to architecture model dialog specifying source model, architecture model name, and destination folder. Options are cancel and export.

  4. 点击导出。System Composer 编辑器窗口打开,显示与 Simulink 模型相对应的架构模型。

    Exported model in a system composer window displayed as an architecture model.

Simulink 模型中的每个子系统都对应于架构模型中的一个组件,因此架构模型中的层次结构反映了行为模型的层次结构。

Simulink 模型中的子系统和 Model 模块的需求在架构模型中得以保留。

在 Simulink 模型中,引用另一个模型的任何 Model 模块都对应于链接到该引用的模型的组件。

Simulink to System Composer conversation diagram.

子系统和 Model 模块端口的总线以及它们的字典链接在架构模型中得以保留。

您可以使用导出的模型添加与架构相关的信息,例如接口定义、模型元素的非功能属性,并分析设计。

另请参阅

主题