主要内容

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

针对 AUTOSAR 建模的模型顾问检查

下表列出的模型顾问检查可用于验证模型是否符合 AUTOSAR 建模标准。

在模型顾问中,AUTOSAR 建模检查在以下位置可用:

  • 按产品 > AUTOSAR Blockset

  • 按任务 > AUTOSAR 建模标准

您需要拥有 Simulink® Check™AUTOSAR Blockset 许可证才能执行模型顾问检查。

模型顾问检查检查 ID
Check model configuration parameters for AUTOSAR compliance (AUTOSAR Blockset)mathworks.autosar.autosar_configset
Check compatibility of AUTOSAR Interpolation Routines (AUTOSAR Blockset)mathworks.autosar.lut_replacement_check

要访问 AUTOSAR Blockset 支持的高完整性检查,请转到按任务 > AUTOSAR 建模标准 > 高完整性系统文件夹。

注意

高完整性建模规范旨在确保符合 AUTOSAR 建模的选定方面。

模型顾问检查检查 ID高完整性系统建模规范
检查 Lookup Table 模块的使用mathworks.hism.hisl_0033hisl_0033: Usage of Lookup Table blocks
检查不一致的向量索引方法mathworks.hism.hisl_0021hisl_0021: Consistent vector indexing method
检查变体模块的使用mathworks.hism.hisl_0023hisl_0023: Verification of variant blocks
检查根端口是否存在缺失属性mathworks.hism.hisl_0024hisl_0024: Inport interface definition
检查 Relational Operator 模块的使用mathworks.hism.hisl_0017hisl_0017: Usage of blocks that compute relational operators (2)
检查浮点信号的关系比较mathworks.hism.hisl_0016hisl_0016: Usage of blocks that compute relational operators
检查 Logical Operator 模块的使用mathworks.hism.hisl_0018hisl_0018: Usage of Logical Operator block
检查 While Iterator 模块的使用mathworks.hism.hisl_0006hisl_0006: Usage of While Iterator blocks
检查 For Iterator 和 While Iterator 子系统的使用mathworks.hism.hisl_0007hisl_0007: Usage of For Iterator or While Iterator subsystems
检查 For Iterator 模块的使用mathworks.hism.hisl_0008hisl_0008: Usage of For Iterator Blocks
检查 If blocks 和 If Action Subsystem 模块的使用mathworks.hism.hisl_0010hisl_0010: Usage of If blocks and If Action Subsystem blocks
检查 Switch Case 块和 Switch Case Action Subsystem 块的使用情况mathworks.hism.hisl_0011hisl_0011: Usage of Switch Case blocks and Action Subsystem blocks
检查针对逻辑信号的安全相关优化设置mathworks.hism.hisl_0045hisl_0045: Configuration Parameters > Math and Data Types > Implement logic signals as Boolean data (vs. double)
检查与应用程序生命周期相关的安全优化设置mathworks.hism.hisl_0048hisl_0048: Configuration Parameters > Math and Data Types > Application lifespan (days)
检查数据类型转换的安全相关优化设置mathworks.hism.hisl_0053hisl_0053: Configuration Parameters > Code Generation > Optimization > Remove code from floating-point to integer conversions that wraps out-of-range values
检查整数除法运算异常的安全优化设置mathworks.hism.hisl_0054hisl_0054: Configuration Parameters > Code Generation > Optimization > Remove code that protects against integer division arithmetic exceptions
检查与安全相关的代码生成设置以查看注释mathworks.hism.hisl_0038hisl_0038: Configuration Parameters > Code Generation > Comments
检查与安全相关的代码生成接口设置mathworks.hism.hisl_0039hisl_0039: Configuration Parameters > Code Generation > Interface
检查与代码风格相关的安全代码生成设置。mathworks.hism.hisl_0047hisl_0047: Configuration Parameters > Code Generation > Code Style
检查与安全相关的代码生成标识符设置mathworks.hism.hisl_0049hisl_0049: Configuration Parameters > Code Generation > Identifiers
检查 Abs 模块的使用mathworks.hism.hisl_0001hisl_0001: Usage of Abs block
检查余数和倒数运算的使用mathworks.sldv.hism.hisl_0002hisl_0002: Usage of remainder and reciprocal operations
检查平方根运算的使用mathworks.hism.hisl_0003hisl_0003: Usage of square root operations
检查 log 和 log10 运算的使用mathworks.sldv.hism.hisl_0004hisl_0004: Usage of natural logarithm and base 10 logarithm operations
检查 Assignment 模块的使用mathworks.hism.hisl_0029hisl_0029: Usage of Assignment blocks
检查 Signal Routing 模块的使用mathworks.hism.hisl_0034hisl_0034: Usage of Signal Routing blocks
检查缺少范围定义的根入端口mathworks.hism.hisl_0025hisl_0025: Design min/max specification of input interfaces
检查根输出端口是否存在缺少范围定义的端口mathworks.hism.hisl_0026hisl_0026: Design min/max specification of output interfaces
检查 Stateflow 图的状态机类型mathworks.hism.hisf_0001hisf_0001: State Machine Type
检查 Stateflow 图,查找跨越平行状态边界的过渡路径mathworks.hism.hisf_0013hisf_0013: Usage of transition paths (crossing parallel state boundaries)
检查 Stateflow 调试选项mathworks.hism.hisf_0011hisf_0011: Stateflow debugging settings
检查 Stateflow 图中是否存在唯一定义的数据对象mathworks.hism.hisl_0061hisl_0061: Unique identifiers for clarity
检查 Stateflow 图,确保数据类型正确。mathworks.hism.hisf_0015hisf_0015: Strong data typing (casting variables and parameters in expressions)
检查 Stateflow 图中的赋值运算mathworks.hism.hisf_0065hisf_0065: Type cast operations in Stateflow to improve code compliance
查看 Stateflow 图以了解一元运算符。mathworks.hism.hisf_0211hisf_0211: Protect against use of unary operators in Stateflow Charts to improve code compliance
检查 MATLAB 函数接口是否具有继承属性mathworks.hism.himl_0002himl_0002: Strong data typing at MATLAB function boundaries
检查 MATLAB 函数度量mathworks.hism.himl_0003himl_0003: Complexity of user-defined MATLAB Functions
检查 MATLAB 代码分析器消息mathworks.hism.himl_0004himl_0004: MATLAB Code Analyzer recommendations for code generation
检查安全相关的模型应用设置mathworks.hism.hisl_0037hisl_0037: Configuration Parameters > Model Referencing
检查针对求解器的安全相关诊断设置mathworks.hism.hisl_0043hisl_0043: Configuration Parameters > Diagnostics > Solver
检查与仿真时间相关的安全求解器设置mathworks.hism.hisl_0040hisl_0040: Configuration Parameters > Solver > Simulation time
检查与安全相关的求解器设置,了解求解器选项mathworks.hism.hisl_0041hisl_0041: Configuration Parameters > Solver > Solver options
检查与任务和采样时间相关的求解器安全设置mathworks.hism.hisl_0042hisl_0042: Configuration Parameters > Solver > Tasking and sample time options
检查针对采样时间的安全相关诊断设置mathworks.hism.hisl_0044hisl_0044: Configuration Parameters > Diagnostics > Sample Time
检查与安全相关的诊断参数设置mathworks.hism.hisl_0302hisl_0302: Configuration Parameters > Diagnostics > Data Validity > Parameters
检查用于调试数据的安全相关诊断设置mathworks.hism.hisl_0305hisl_0305: Configuration Parameters > Diagnostics > Data Validity > Debugging
检查数据存储内存的安全相关诊断设置mathworks.hism.hisl_0013hisl_0013: Usage of data store memory
检查与安全相关的诊断设置,以进行类型转换mathworks.hism.hisl_0309hisl_0309: Configuration Parameters > Diagnostics > Type Conversion
检查与信号连接相关的安全诊断设置mathworks.hism.hisl_0306hisl_0306: Configuration Parameters > Diagnostics > Connectivity > Signals
检查与总线连接相关的安全诊断设置mathworks.hism.hisl_0307hisl_0307: Configuration Parameters > Diagnostics > Connectivity > Buses
检查与函数调用连接相关的安全诊断设置mathworks.hism.hisl_0308hisl_0308: Configuration Parameters > Diagnostics > Connectivity > Function calls
检查安全相关的诊断设置是否兼容。mathworks.hism.hisl_0301hisl_0301: Configuration Parameters > Diagnostics > Compatibility
检查模型初始化相关的安全诊断设置mathworks.hism.hisl_0304hisl_0304: Configuration Parameters > Diagnostics > Data Validity > Model initialization
检查与模型相关的安全诊断设置mathworks.hism.hisl_0310hisl_0310: Configuration Parameters > Diagnostics > Model Referencing
检查与安全相关的诊断设置以保存mathworks.hism.hisl_0036hisl_0036: Configuration Parameters > Diagnostics > Saving
检查 Merge 块的安全相关诊断设置mathworks.hism.hisl_0303hisl_0303: Configuration Parameters > Diagnostics > Data Validity > Merge blocks
检查 Stateflow 的安全相关诊断设置mathworks.hism.hisl_0311hisl_0311: Configuration Parameters > Diagnostics > Stateflow
检查模型对象名称mathworks.hism.hisl_0032hisl_0032: Model element names
检查模型元素中是否存在与需求不关联的部分。mathworks.hism.hisl_0070hisl_0070: Placement of requirement links in a model
检查过渡路径是否使用不当mathworks.hism.hisf_0014hisf_0014: Usage of transition paths (passing through states)
检查位运算块的使用情况mathworks.hism.hisl_0019hisl_0019: Usage of bitwise operations
检查带有索引信号的块的数据类型mathworks.hism.hisl_0022hisl_0022: Data type selection for index signals
检查模型文件名mathworks.hism.hisl_0031hisl_0031: Model file names
检查 MATLAB Function 模块中的 if/elseif/else 构型mathworks.hism.himl_0006himl_0006: MATLAB code if / elseif / else patterns
检查 MATLAB Function 模块中的 switch 语句mathworks.hism.himl_0007himl_0007: MATLAB code switch / case / otherwise patterns
检查图形函数中的全局变量mathworks.hism.hisl_0062hisl_0062: Global variables in graphical functions
检查用户自定义对象名称的长度mathworks.hism.hisl_0063hisl_0063: Length of user-defined object names to improve MISRA C compliance
检查 Merge 模块的使用mathworks.hism.hisl_0015hisl_0015: Usage of Merge blocks
检查标准化 MATLAB Function 头的使用mathworks.hism.himl_0001himl_0001: Usage of standardized MATLAB function headers
检查 MATLAB Function 模块中关系运算符的使用mathworks.hism.himl_0008himl_0008: MATLAB code relational operator data types
检查 MATLAB Function 模块中逻辑运算符和函数的使用mathworks.hism.himl_0010himl_0010: MATLAB code with logical operators and functions
检查条件表达式的类型和大小mathworks.hism.himl_0011himl_0011: Data type and size of condition expressions
检查 Stateflow 图中的端口命名mathworks.hism.hisf_0016hisf_0016: Stateflow port names
检查 Stateflow 数据对象的作用域mathworks.hism.hisf_0017hisf_0017: Stateflow data object scoping
检查 Gain 模块的使用mathworks.hism.hisl_0066hisl_0066: Usage of Gain blocks
检查除以零计算mathworks.hism.hisl_0067hisl_0067: Protect against divide-by-zero calculations
检查循环控制变量的数据类型mathworks.hism.hisl_0102hisl_0102: Data type of loop control variables to improve MISRA C compliance
检查 MISRA C:2023 的配置参数mathworks.misra.CodeGenSettingshisl_0060: Configuration parameters that improve MISRA C compliance

检查是否存在不建议用于 C/C++ 生产代码部署的模块

检查 MISRA C:2023 中不推荐使用的块

mathworks.hism.hisl_0020

mathworks.misra.BlkSupport

hisl_0020: Blocks not recommended for MISRA C compliance

检查安全相关的优化设置是否符合指定的最小值和最大值。

mathworks.hism.hisl_0056hisl_0056: Configuration Parameters > Code Generation > Optimization > Optimize using the specified minimum and maximum values
检查 Reciprocal Sqrt 模块的使用mathworks.hism.hisl_0028hisl_0028: Usage of Reciprocal Square Root blocks
检查硬件实现的安全相关设置mathworks.hism.hisl_0071hisl_0071: Configuration Parameters > Hardware Implementation >Inconsistent hardware implementation settings
检查递归的使用mathworks.hism.hisf_0004hisf_0004: Protect against recursive function calls to improve code compliance
检查代码生成不支持的 MATLAB 函数mathworks.hism.himl_0012himl_0012: Usage of MATLAB functions for code generation
生成代码复杂度的度量mathworks.hism.himl_0013himl_0013: Limitation of built-in MATLAB Function complexity
对于引用的模型,忽略参数可调性检查mathworks.hism.hisl_0072hisl_0072: Usage of tunable parameters for referenced models
检查位移操作的使用情况mathworks.hism.hisl_0073hisl_0073: Usage of bit-shift operations
检查与安全相关的诊断设置是否存在变体mathworks.hism.hisl_0074hisl_0074: Configuration Parameters > Diagnostics > Modeling issues related to variants
检查已禁用和参数化的库链接mathworks.hism.hisl_0075hisl_0075: Usage of library links
检查死逻辑mathworks.hism.hisl_0101hisl_0101: Prevent operations that result in dead logic to improve code compliance
检查缺少属性的根出端口mathworks.hism.hisl_0077hisl_0077: Outport interface definition
检查是否使用了相同的建模模式mathworks.hism.hisl_0078hisl_0078: Usage of identical modeling patterns
检查无效的根输入输出端口连接mathworks.hism.hisl_0079hisl_0079: Connections to root input/output ports
检查 Stateflow 的安全相关诊断设置mathworks.hism.hisl_0311hisl_0311: Configuration Parameters > Diagnostics > Stateflow
检查信号数据的安全相关诊断设置mathworks.hism.hisl_0314hisl_0314: Configuration Parameters > Diagnostics > Data Validity > Signals

另请参阅