Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

处理器在环仿真

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

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

PIL 仿真需要连接配置。

全部展开

target.AddOnDescribe add-on properties for target type
target.APIDescribe API details
target.APIImplementationDescribe API implementation details
target.BoardProvide hardware board details
target.BuildDependenciesDescribe C and C++ build dependencies to associate with target hardware
target.CommunicationChannelDescribe communication channel properties
target.CommunicationInterfaceDescribe data I/O details for target hardware
target.CommunicationProtocolStackDescribe communication protocol parameters
target.ConnectionBase class for target connection properties
target.ConnectionPropertiesDescribe target-specific connection properties
target.MainFunctionProvide C and C++ dependencies for main function of target hardware application
target.PILProtocolDescribe PIL protocol implementation for target hardware
target.PortDescribe connection via target hardware port
target.PortConnectionDescribe target connection port
target.ProcessorProvide target processor information
target.RS232ChannelDescribe serial communication channel
target.TargetConnectionProvide details about connecting MATLAB computer to target hardware
target.TCPChannelDescribe TCP communication properties
target.ToolsDescribe properties of tools for target hardware
target.UDPChannelDescribe UDP communication
target.ApplicationStatusDescribe status of application on target hardware
target.Breakpoint Provide breakpoint details for debugger
target.DebugIOToolDebug byte stream I/O tool service interface
target.ExecutionServiceDescribe implementation of execution service for target application
target.ExecutionToolMATLAB service interface for tool that manages application execution on target hardware
target.MATLABDependenciesDescribe MATLAB class and function dependencies
target.ApplicationExecutionToolCapture system command information to run application from MATLAB computer
target.CommandCapture system command for execution on MATLAB computer
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.FunctionProvide function signature information
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

函数

全部展开

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

targetManage target hardware information

App

SIL/PIL ManagerVerify generated code

主题

SIL 和 PIL 仿真

软件在环 (SIL) 和处理器在环 (PIL) 仿真概述。

Choose a SIL or PIL Approach

Test code generated from top models, referenced models, or subsystems.

Create PIL Target Connectivity Configuration for Simulink

Customize PIL simulation for your target environment.

Host-Target Communication for Simulink PIL Simulation

Use the rtiostream API for communication between your development computer and target hardware during a PIL simulation.

Specify Hardware Timer

Specify a hardware timer using the Code Replacement Tool.

Set Up PIL Connectivity by Using target Package

Provide PIL connectivity between Simulink® and the target hardware.

Custom Toolchain Directives Required for Code Coverage and Execution Profiling

Specify compiler directives for building PIL application that supports code coverage analysis and execution profiling.

Configure and Run PIL Simulation

Set up and run top-model PIL, Model block PIL, and PIL block simulations.

SIL/PIL Manager Verification Workflow

A simplified workflow for verifying generated code.

PIL Simulation Sequence

How a PIL simulation proceeds.

Simulation Mode Override Behavior in Model Reference Hierarchy

How the simulation mode of the top model or parent model determines the simulation behavior of a model hierarchy.

永磁同步电机的磁场定向控制

仿真电机控制系统,生成控制器代码,并使用 PIL 仿真测试数值等效性和探查代码执行时间。

Security for PIL Simulations

Security measures for PIL simulations.

SIL and PIL Limitations

Modeling and code generation features that are not supported or partially supported by SIL and PIL simulations.

疑难解答

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.

特色示例