Main Content

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

处理器在环仿真

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

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

PIL 仿真需要连接配置。

App

SIL/PIL 管理器验证生成的代码 (自 R2019b 起)

命名空间

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

全部展开

target.AddOnDescribe add-on properties for target type (自 R2020b 起)
target.API描述 API 详细信息 (自 R2020b 起)
target.APIImplementationDescribe API implementation details (自 R2020b 起)
target.BoardProvide hardware board details (自 R2020b 起)
target.BuildDependenciesDescribe C and C++ build dependencies to associate with target hardware (自 R2020b 起)
target.CommunicationChannelDescribe communication channel properties (自 R2020b 起)
target.CommunicationInterfaceDescribe data I/O details for target hardware (自 R2020b 起)
target.CommunicationProtocolStackDescribe communication protocol parameters (自 R2020b 起)
target.ConnectionBase class for target connection properties (自 R2020b 起)
target.ConnectionPropertiesDescribe target-specific connection properties (自 R2020b 起)
target.MainFunctionProvide C and C++ dependencies for main function of target hardware application (自 R2020b 起)
target.PILProtocolDescribe PIL protocol implementation for target hardware (自 R2020b 起)
target.PortDescribe connection via target hardware port (自 R2021a 起)
target.PortConnectionDescribe target connection port (自 R2020b 起)
target.ProcessorProvide target processor information
target.RS232ChannelDescribe serial communication channel (自 R2020b 起)
target.TargetConnectionProvide details about connecting MATLAB computer to target hardware (自 R2020b 起)
target.TCPChannelDescribe TCP communication properties (自 R2020b 起)
target.Tools描述目标硬件工具的属性 (自 R2020b 起)
target.UDPChannel描述 UDP 通信 (自 R2020b 起)
target.ApplicationStatusDescribe status of application on target hardware (自 R2021a 起)
target.Breakpoint 为调试器提供断点详细信息 (自 R2021a 起)
target.DebugExecutionToolProvide MATLAB service interface for debugger to manage processes on target hardware (自 R2023a 起)
target.DebugIOToolDebug byte stream I/O tool service interface (自 R2021a 起)
target.ExecutionServiceDescribe implementation of execution service for target application (自 R2021a 起)
target.ExecutionToolMATLAB service interface for tool that manages application execution on target hardware (自 R2021a 起)
target.MATLABDependenciesDescribe MATLAB class and function dependencies (自 R2021a 起)
target.ApplicationExecutionToolCapture system command information to run application from MATLAB computer (自 R2020b 起)
target.Command捕获在 MATLAB 计算机上执行的系统命令 (自 R2020b 起)
target.HostProcessExecutionToolCapture system command information to run target application from MATLAB computer (自 R2020b 起)
target.SystemCommandExecutionToolCapture system command information to run target application from MATLAB computer (自 R2020b 起)
target.FunctionProvide function signature information (自 R2020b 起)
target.TimerProvide timer details for processor (自 R2020b 起)

对象

全部展开

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

函数

全部展开

rtIOStreamCloseShut down communications channel
rtIOStreamOpenInitialize communications channel
rtIOStreamRecvReceive data through communication channel
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

主题

疑难解答

Debug Generated Code During SIL or PIL Simulation

Use a debugger to understand the behavior of generated code.

View SIL and PIL Files in Code Generation Report

Produce a code generation report and static code metrics that cover SIL and PIL files.

Verification of Code Generation Assumptions

The SIL or PIL simulation checks code generation assumptions.