For a better experience on, enable JavaScript in your browser. Thank you!

Will Your ECU Software Still Function Correctly After Migrating to AUTOSAR?

Chris Grigas, Applications Engineer, dSPACE Inc.

November 2, 2016: AUTOSAR is becoming increasingly popular in the North American automotive market. As a result, many companies are working on migrating their existing electronic control unit (ECU) software to AUTOSAR. This can often involve reworking much of the structure and rewriting the code in order to make it compliant to the standard. All of these changes need to be tested thoroughly and efficiently to guarantee that the code still functions the same as it previously did.

dSPACE’s virtual validation technology plays a vital role in ensuring that the code is tested thoroughly. Virtual validation allows engineers to perform a functional validation of entire application layers on the application’s software-in-the-loop (SIL) level. Virtual validation relies on different elements: a virtual representation of the ECU called virtual ECU, a PC-based simulation environment called VEOS, and the capability to use the same dSPACE tool chain in the virtual environment as in the HIL environment. 

VEOS is a simulation engine that can run on any desktop PC and has the capability to simulate artifacts from a number of different environments. It can execute models from Simulink®, any model imported via the Functional Mockup Interface, AUTOSAR 3.x based code, AUTOSAR 4.x based code, and handwritten C-code. VEOS will handle the synchronization and data exchange between all of the models running in the environment. The execution speed of the simulation can also be faster or slower than real-time. This allows you to either run the simulation faster in order to get more tests done in less time, or you can slow the simulation down to step-by-step execution to debug the code.

Virtual ECUs allow you to encapsulate all or part of your application layer software in a virtual representation and incorporate simulations of lower level ECU software functions, like the AUTOSAR Run Time Environment (RTE) and OS. Virtual ECUs also use an A2L variable description file and connect over the XCP on Ethernet protocol to mimic how physical ECUs are typically connected to in the real world.

Additionally, virtual ECUs allow you to expand the SIL testing that is already being done on the software. For example, not only can you test perform SIL testing of each individual function, but you can also test the integration of all of the functions together, as well as the integration of the functions with lower level software components like the communication stack, non-volatile RAM manager, ECU state manager, etc. Simulating the RTE allows this functional integration to be tested in a realistic manner because it allows you to model complicated AUTOSAR communication specifications like client/server communication.

dSPACE’s tool chain allows you to take advantage of the VEOS and virtual ECU technology to test applications that you are currently migrating to AUTOSAR. Often the transition to AUTOSAR is done in steps. Two of the most common steps are 1) wrapping the legacy code in an AUTOSAR compliant wrapper, and 2) mixing legacy code software components with an AUTOSAR wrapper together with fully AUTOSAR-compliant software components. dSPACE provides a Legacy Software Integration Solution which allows you to easily generate an AUTOSAR software component from legacy code. The solution will automatically generate the correct provide/require ports and generate the correct runnables from the function that you have written in your code.

In both of these cases, it is important to be able to test the functionality of individual software components, as well as the overall application. And VEOS-based testing can allow you to do this testing. In the case of scenario 1, the Legacy Software Integration tool allows you to generate a virtual ECU from your existing code and then test the functionality of the software component. In scenario 2, you can reuse the legacy software component from scenario 1, integrate it with other fully AUTOSAR software components, and validate the communication and interaction of the various software components.

dSPACE technology supports your software migration to AUTOSAR in several ways. Using the dSPACE Legacy Code Integration solution, you can automatically generate an AUTOSAR-compliant software component from legacy C code, including the port and runnable configuration. That software component can then be tested individually, or it can be integrated with other software components that are either legacy software components or AUTOSAR components as part of a virtual ECU. dSPACE VEOS and virtual ECU testing allow you to simulate your application layer software along with an AUTOSAR RTE and OS, in order to realistically model and test the communication between SWCs and the OS task to RTE Runnable mapping. 

Further Information