主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

组合与 ECU 软件仿真

AUTOSAR 组合与 ECU 软件建模和仿真

开发多个相互连接并协同工作的 AUTOSAR 软件组件模型时,您可以将它们纳入一个 AUTOSAR 组合模型中进行仿真。组合是 AUTOSAR 软件组件,它聚合一组相关的软件组件。组合支持组件扩展,有助于管理设计的复杂性。

要创建 AUTOSAR 组合的 Simulink® 表示,请执行以下操作之一:

  • 导入组合的 AUTOSAR XML (ARXML) 描述(Classic 平台)。

  • 创建一个模型,并使用 Model 模块来引用和连接 AUTOSAR 组件模型。

如果您有 System Composer™ 软件,您也可以创建一个 AUTOSAR 架构模型,并使用 Software Composition 模块对 AUTOSAR 组合进行建模。有关详细信息,请参阅软件架构建模

对一个组合模型进行仿真时,您需要仿真聚合的 AUTOSAR 组件的整体行为。

对于 AUTOSAR Classic 平台,AUTOSAR Blockset 提供 Basic Software (BSW) 模块,您可使用这些模块对在 AUTOSAR 运行时环境中运行的 BSW 服务的软件组件调用进行建模。BSW 服务包括 NVRAM Manager (NvM)、Diagnostic Event Manager (Dem) 和 Function Inhibition Manager (FiM)。在运行时环境中,AUTOSAR 软件组件通常使用客户端-服务器或发送方-接收方通信来访问 BSW 服务。

要对调用 BSW 服务的 AUTOSAR 组件进行仿真,您需要创建一个包含式组合模型,并添加预配置的 BSW 服务组件模块。这些模块提供 BSW 服务的参考实现。

如果您有 Simulink Design Verifier™,您可以对 AUTOSAR 组件模型执行验证。

模块

Control Function Available CallerCall AUTOSAR Function Inhibition Manager (FiM) service interface ControlFunctionAvailable
Dem Status InjectInject an event failure to test recovery (自 R2022a 起)
Dem Status OverrideOverride an event to simulate and verify behavior (自 R2022a 起)
DiagnosticEventAvailableCallerCall AUTOSAR Diagnostic Event Manager (Dem) service interface EventAvailable
DiagnosticInfoCallerCall AUTOSAR Diagnostic Event Manager (Dem) service interface DiagnosticInfo
DiagnosticMonitorCallerCall AUTOSAR Diagnostic Event Manager (Dem) service interface DiagnosticMonitor
DiagnosticOperationCycleCallerCall AUTOSAR Diagnostic Event Manager (Dem) service interface OperationCycle
Diagnostic Service ComponentConfigure AUTOSAR Diagnostic Services and Runtime Environment (RTE) for emulation
Function Inhibition CallerCall AUTOSAR Function Inhibition Manager (FiM) service interface FunctionInhibition
NvMAdminCallerCall AUTOSAR NVRAM Manager (NvM) service interface NvMadmin
NvMServiceCallerCall AUTOSAR NVRAM Manager (NvM) service interface NvMService
NVRAM Service ComponentConfigure AUTOSAR NVRAM Services and Runtime Environment (RTE) for emulation

函数

autosar.slrealtime.migrateModelMigrate AUTOSAR component models to Simulink Real-Time for rapid-prototyping and real-time simulation (自 R2024b 起)
createCompositionAsModelCreate Simulink representation of AUTOSAR ARXML software composition
updateModelUpdate AUTOSAR model or architecture with ARXML changes

主题

导入 AUTOSAR 组合和组件

设计、建模和配置

仿真和验证