Real-Time Software Component Verification
One approach to verifying a software component is to build the component into a complete software system that can execute in real time in the target environment. A complete software system includes:
Algorithm for the software component
Scheduling algorithms
Calls to drivers for board-specific devices
This single build approach is more time consuming to set up, but makes it easier to get the complete application running in the target environment.
The following figure shows code generated for an algorithm being built into a complete system executable for the target environment.
The workflow for testing component software as part of a complete real-time target environment is:
Develop a component model and generate source code for production.
For information on building in scheduling and real-time system support, see:
Optimize generated code for a specific run-time environment, using specialized function libraries. For more information, see What Is Code Replacement?, What Is Code Replacement Customization?, and Optimize Generated Code by Developing and Using Code Replacement Libraries - Simulink.
Customize post code generation build processing to accommodate third-party tools and processes, as required. See Customize Post-Code-Generation Build Processing.
Integrate external code, for example, for device drivers and a scheduler, with the generated C or C++ code for your component model. For more information, see S-Functions and Code Generation. For more specific references depending on your verification goals, see the following table.
Simulate the integrated model.
Generate code for the integrated model.
Connect to data interfaces for the generated C code data structures. See Write External Code to Access Generated C API Code and Generate ASAP2 and CDF Calibration Files.
Customize and control the build process, as required. See Customize Post-Code-Generation Build Processing.
Create a zip file that contains generated code files, static files, and dependent data to build the generated code in an environment other than your host computer. See Relocate or Share Generated Code.