|
Course Highlight
This 4-day training is to provide an introduction to automatic code generation and its add-on products. Themes of real-time validation, rapid prototyping, and embedded software development are explored in the context of model-based design. It elaborates the design implementation to xPC Target, in additional there would be a 3-day course on Embedded Coder.
Topics include:
The Role of Simulink Coder
Real-Time Applications with xPC Target
Integration of multiple xPC Target
Introduction to Embedded Coder
Course Objective
The aim of the training is to provide participants with the fundamentals and hands-on experience in using Simulink Coder for real-time application development on xPC Target and to introduce to participants the Embedded Coder.
Who Should Attend
This hands-on course is designed for engineers who wish to use Simulink Coder and to do xPC Target implementation.
Course Benefit
Upon the completion of the course, the participants will gain fundamental understanding of Simulink Coder for code generation and on xPC Target as well as Embedded Coder.
Prerequisites
Attended “Comprehensive Matlab” or equivalent experience using MATLAB
Attended “Comprehensive Simulink” or equivalent experience using SIMULINK
Knowledge of C programming is strongly recommended for attendees who want to benefit from code inspection
Prior exposure to embedded programming, fixed-point arithmetic, and C MEX S-functions is helpful
Course Outline
Day 1 of 4
The Roles of Simulink Coder
Objective: This section explains the applications of Simulink Coder and how they fit in Simulink model-based design.
Role of Simulink Coder in simulation, prototyping, and Real-time testing applications
Simulation and prototyping applications
In-the-loop testing applications
Simulink Coder code architecture
Constraints of Simulink Coder
Real-Time Applications with xPC Target
Objective: This section introduces the use of xPC Target to generate real-time applications.
xPC Target product overview
Booting the xPC Target kernel
Generating and xPC Target application
Running a real-time application
xPC Target object
Accessing signals
Tuning parameters in real time
Understanding Digital I/O and CAN Bus interfaces
Objective: This section introduces hardware connection and testing procedure for Digital I/O and CAN Bus interfaces.
Building model and implementing design for Digital I/O interface
Building model and implementing design using CAN Bus interface
Integration of Multiple xPC Target
Objective: This section introduces the integration of multiple xPC Target.
Connecting to multiple xPC Target
Downloading the application to multiple xPC Target
Running application on multiple xPC Target
Day 2 of 4
Generating Embedded Code
Objective: Configure Simulink models for embedded code generation and effectively interpret the generated code.
System specification
Generating ERT code
Code modules
Data structures in generated code
Real-Time Workshop software build process
Integrating Generated Code with External Code
Objective: Modify models and files to run generated code and external code together.
Overview of model entry points
Using an execution harness
Including custom routines
Configuring data exchange with external code
Code generation for multirate systems
Optimizing Generated Code
Objective: Identify the requirements of the application at hand and configure optimization settings to satisfy these requirements.
Optimization considerations
Removing unnecessary code
Removing unnecessary data support
Optimizing data storage
Code generation objectives
Configuration wizards
Day 3 of 4
Customizing Data Characteristics in Simulink
Objective: Control the data types and storage class of data in Simulink.
Data characteristics
Data type classification
Simulink data type configuration
Simulink storage classes
Setting signal storage classes
Setting parameter storage classes
Impact of storage classes on symbols
Customizing Data Characteristics Using Data Objects
Objective: Control data types and design custom storage classes using data objects.
Simulink data objects overview
Controlling data types with data objects
Creating reconfigurable data types
Effect of storage classes on symbols
Custom storage classes (CSCs)
Using predefined custom storage classes
Designing custom storage classes
Bus signals and their storage classes
Controlling data type names
Controlling variable names
Customizing Generated Code Architecture
Objective: Control the architecture of the generated code according to application requirements.
Simulink model architecture
Controlling Simulink code partitioning
Generating reusable code
Data placement options
Priority of data placement controls
Day 4 of 4
Advanced Customization Techniques
Objective: Use code generation templates to control the generated files.
Review of the code generation process
Overview of code generation templates
Custom file processing
Defining code generation templates
Using code generation templates
Deploying Generated Code
Objective: Collect necessary data and identify the necessary steps for custom target development.
Motivation for custom targets
Custom target development process
Target directory structure
The system target file
Configuring the PRT custom target
Template makefiles (general)
Intervening in the build process
Setting up configuration parameters
Improving Code Efficiency and Compliance
Objective: Inspect the efficiency of generated code and verify compliance with standards and guidelines.
The Model Advisor
Hardware implementation parameters
Compliance with standards and guidelines
|