Flight code generation automatically converts models into high-quality, well-documented code embedded in line replaceable units (LRUs), which has enabled aerospace companies to save 40% per line of code, achieve Six-Sigma flight software quality, and have an autopilot work on the first try.
With millions of lines of flight code automatically generated using MathWorks products flying in vehicles today, MathWorks continues to develop innovative technologies that support aerospace needs for system engineering and software design, flight code generation and integration, code verification, and DO-178 certification.
Simulink and Stateflow are well suited for developing avionics, GN&C, propulsion, radar, and other aerospace system designs. Using executable specifications instead of static diagrams accelerates design, clearly expresses the algorithm’s intended behavior, and enables early verification and validation. Key design features supported include component development using Model blocks and algorithm design in MATLAB with flight code generated using MATLAB Coder.
Embedded Coder® generates embedded code from design models. The code can be used for system simulation integration or flight code deployment. For system simulation integration, you generate code to export your algorithms to an environment used for simulating the flight system, reducing the need for hand coding or re-work. Similarly, hand-written code is easily imported into Simulink using the legacy code tool, preserving your code investment and enabling incremental adoption of code generation technology. For flight code generation, ANSI/ISO C and C++ is generated by default for any platform. In addition, code can be optimized for any MCU or DSP using flexible APIs.
Simulink Code Inspector helps automate source code reviews for safety standards by performing structural equivalence analysis and generating traceability reports involving a model and its generated code.
Software-in-the-loop (SIL), processor-in-the-loop (PIL), and hardware-in-the-loop (HIL) testing form the cornerstone of flight code verification by automating execution and comparison of code results with reference model behavior. Creating a PIL test environment is supported using Embedded Coder or direct connection to your processor boards. Integration with popular code coverage tools including LDRA Testbed is also provided. Simulink Real-Time™ enables HIL testing on any PC by generating and executing real-time code from Simulink plant models. Bidirectional links between model and code allow you to trace each line of code to every construct in your model, or with Simulink Requirements™, to every high-level textual requirement. Finally, Polyspace code verifiers let you examine generated or handwritten code for possible run-time errors and MISRA C-2004 code compliance.
DO-178B is the primary aerospace software safety standard. MathWorks support for DO-178B is available in the DO Qualification Kit. It provides verification tool qualification for: model and code coverage tool in Simulink Coverage, and DO-178 model checks in Simulink Check, Polyspace code verifiers including its MISRA C: 2004 code analyzer; and results comparison check in Simulink Test™. With automated and qualified verification tools, aerospace engineers can establish a push-button, highly automated verification approach to certifying their embedded software to DO-178B.