Joe Fairchild, a senior applications engineer at dSPACE Inc., extols virtual validation as one of the virtues of AUTOSAR (http://bit.ly/1bi3ZzF).
Using AUTOSAR, developers can, among other things, maximize code re-use, use off-the-shelf software stacks, and create hardware-independent applications, but Fairchild notes that AUTOSAR can also help test code.
Code testing is normally done in two phases – component testing and system testing. Fairchild says functional testing at the system level is difficult without hardware because the code often contains calls to drivers that won’t work without hardware, or else the code requires an operating system to trigger calls to the function to be tested.
Two AUTOSAR features that aid virtual validation, according to Fairchild, are the standardization of interfaces, and the AUTOSAR meta model for system architecture modeling.
Thanks to the standardization of interfaces, any function call or memory access or hardware driver action that accesses a feature external to the current application component will do so in a standardized way. The meta model allows developers to use XML or an off-the-shelf tool to specify information about the code, such as what data is input or output by the code, or what triggering behavior activates the code.
Fairchild suggests that AUTOSAR gives developers knowledge of everything going into or coming out of all parts of an application in a standardized format. With knowledge of what is contained within an application, and code that contains calls to standardized functions, it would be possible to build an operating system and hardware wrapper around application components that would allow the components to run independently; not dependent upon the application’s primary microprocessor. In fact, he points out, several off-the-shelf tools provide this ability.
The ability to execute application code in a platform-independent environment makes it possible for developers to begin testing much earlier than otherwise possible – validating virtually, without hardware.