主要内容

处理器在环仿真

R2026b
在目标处理器或仿真器上测试生成的代码

处理器在环 (PIL) 仿真交叉编译生成的源代码,然后在目标硬件上下载并运行目标代码。通过比较普通模式仿真结果和 PIL 仿真结果,可以测试模型与生成的代码之间是否存在数值等效性。在 PIL 仿真期间,您可以为生成的代码收集代码覆盖率和执行时间度量。

PIL 仿真需要连接配置。

App

SIL/PIL 管理器验证生成的代码

命名空间

target管理目标硬件和构建工具信息

类

全部展开

target.AddOnDescribe add-on properties for target type
target.API描述 API 详细信息
target.APIImplementationDescribe API implementation details
target.Board提供硬件板详细信息
target.BuildDependenciesDescribe C and C++ build dependencies to associate with target hardware
target.CommunicationChannel描述通信通道属性
target.CommunicationInterfaceDescribe data I/O details for target hardware
target.CommunicationProtocolStack描述通信协议参数
target.ConnectionBase class for target connection properties
target.ConnectionProperties描述特定于目标的连接属性
target.MainFunction为目标硬件应用程序的 main 函数提供 C 和 C++依赖项
target.PILProtocolDescribe PIL protocol implementation for target hardware
target.Port描述通过目标硬件端口的连接
target.PortConnection描述目标连接端口
target.ProcessorProvide target processor information
target.RS232Channel描述串行通信通道
target.TargetConnectionProvide details about connecting MATLAB computer to target hardware
target.TCPChannel描述 TCP 通信属性
target.Tools描述目标硬件工具的属性
target.UDPChannel描述 UDP 通信
target.OperatingSystemDescribe operating system for target hardware (自 R2026a 起)
target.SupportSpecify association between target namespace objects (自 R2026a 起)
target.ApplicationStatus描述目标硬件上应用程序的状态
target.Breakpoint 为调试器提供断点详细信息
target.DebugExecutionTool为调试器提供 MATLAB 服务接口以管理目标硬件上的进程 (自 R2023a 起)
target.DebugIOTool调试字节流 I/O 工具服务接口
target.ExecutionService描述目标应用程序的执行服务的实现
target.ExecutionTool用于管理目标硬件上应用程序执行的工具的 MATLAB 服务接口
target.MATLABDependencies描述 MATLAB 类和函数依赖关系
target.ApplicationExecutionTool捕获从 MATLAB 计算机运行应用程序所需的系统命令信息
target.Command捕获在 MATLAB 计算机上执行的系统命令
target.HostProcessExecutionToolCapture system command information to run target application from MATLAB computer
target.SystemCommandExecutionToolCapture system command information to run target application from MATLAB computer
target.Function提供函数签名信息
target.TimerProvide timer details for processor

对象

全部展开

rtw.connectivity.ComponentArgsProvide parameters for each target connectivity component
rtw.connectivity.ConfigDefine connectivity implementation that comprises builder, launcher, and communicator components
rtw.connectivity.ConfigRegistryRegister connectivity configuration
rtw.connectivity.MakefileBuilderConfigure toolchain-based build process
rtw.connectivity.LauncherControl downloading, starting, and resetting of a target application
rtw.connectivity.RtIOStreamHostCommunicatorConfigure development computer communications with target processor
rtw.pil.RtIOStreamApplicationFrameworkConfigure target-side communications

函数

全部展开

rtIOStreamClose关闭通信通道
rtIOStreamOpen初始化通信通道
rtIOStreamRecv通过通信通道接收数据
rtIOStreamSendSend data through communication channel
rtiostreamtestTest custom rtiostream interface implementation
rtiostream_wrapperTest rtiostream shared library functions in MATLAB
piltestVerify custom target connectivity configuration for Simulink PIL simulation

主题

疑难解答

在 SIL 或 PIL 仿真期间调试生成代码

使用调试器了解生成代码的行为。

在代码生成报告中查看 SIL 和 PIL 文件

生成涵盖 SIL 和 PIL 文件的代码生成报告和静态代码度量。

Verification of Code Generation Assumptions

The SIL or PIL simulation checks code generation assumptions.

精选示例