Model-Based Design with automatic code generation has long been employed for rapid prototyping and is increasing being used for mass production deployment. With the focus on production usage, comes the need to implement a comprehensive V&V strategy involving models and resulting code.
A main principal of Model-Based Design is that generated code should behave like the simulation model. It should also be possible to verify that the model or design was fully implemented in the code. As a result, the transformation of models into generated code must be done in a way that facilitates traceability between the model and code. Also automated tests should be performed to determine that the code executes properly in its final software and hardware environments.
For example in a typical commercial vehicle application, the control algorithm and plant model are simulated together in a system simulation environment. Once the system model satisfies the requirements, the control model is checked to ensure that it has been fully exercised or covered. Once checked, code is then generated for production applications. The code is analyzed, tested, and compared to the original model results. Common model and code verification activities include software-in-the-loop (SIL), processor-in-the-loop (PIL), and hardware-in-the-loop (HIL) testing. In addition to functional results, it is important especially for high-integrity systems, that the model and code have been checked and assessed to known standards.
This paper describes recent advances in verification, validation, and test technologies involving Model-Based Design with production code generation.