The idea of modeling isn't new to embedded systems designers. For embedded control and algorithm designers, modeling has always been an essential part of the process. Designers have learned how to use mathematically-based modeling tools, such as Matlab, in school, and have embraced them for modeling and algorithm design for both control systems and DSP/communications systems. With the evolution of graphical design tools that offer modeling and simulation capabilities, engineers are now seeing the ability to marry multiple disciplines using the same tools for both the design and implementation of embedded software.
One of the first uses of modeling and simulation tools in a production setting was for "executable specifications." Because the design models can be executed (simulated), they provide far less ambiguous representations of a design than traditional paper based specifications. This has greatly facilitated the communication between departments and the growing trend to outsource final development to suppliers and contractors. It also allowed engineers to work at higher levels of abstraction on designs and specifications.
This by itself has been a breakthrough for many companies and has been an enabling item for better communication and the elimination of design errors. Several companies have reported a dramatic drop in design errors using this process, which has come to be called model-based design. The model serves as the central focal point of the design process, from which documentation, test generation, and code generation can be directly derived.
Our more innovative customers asked us why we could not simply take the simulated models and precisely translate them into matching embeddable software code. In fact, some of these customers took the code we had generated for rapid prototyping and began to experiment with using this code instead of rewriting it from scratch. Over the past few years, we worked with these customers to give them what they requested -- what we now call production code. This is automatically generated code that the designers can take directly, put through their own testing and qualification processes, and then deliver to their own customers as their production code. The benefit of automatic code generation is that human error in the coding phase is eliminated.
With automatic code generation, companies can use an entirely model-centric approach to embedded systems development. The "model" serves as the primary representation throughout multiple phases of a development process. Development becomes the successive refinement of conceptual models until a design is realized through automatic code generation.
Physical models of the environment, which control engineers call plant models, are used for early design work and then reused for validation and testing purposes. This greatly reduces the amount of costly "real" prototypes that need to be developed. It also permits rapid design iterations and "what if" studies without leaving the desktop. New model-based testing and coverage tools also help shorten the validation and testing phases.
In short, thousands of engineers are seeing the value of a model-based design approach and the use of automatic code generation. They are revolutionizing the way embedded software is developed.
Andy Grace is director of development for design automation for The Mathworks, provider of Matlab.