ASAM XIL is an API standard for the communication between test automation tools and test benches. The standard supports test benches at all stages of the development and testing process – most prominently model-in-the-loop (MIL), software-in-the-loop (SIL) and hardware-in-the-loop (HIL). The notation "XIL" indicates that the standard can be used for all "in-the-loop" systems. This has the advantage that it enables users to freely choose testing products according to their requirements and integrate them with little effort. Using ASAM XIL-compliant products allows users of test systems to mix and match the best components from different suppliers without having costly integration efforts.
The standard furthermore decouples test-cases from real and virtual test systems. This allows to transfer tests between different test systems with little to no migration effort. Consequently, tests can be easily re-used. Know-how is much easier transferred from one test bench to another, resulting in reduced training costs for development- and test engineers.
These advantages are the result of two major components of the ASAM XIL standard:
Test automation applications, which use the ASAM XIL API, are used in all automotive E/E domains, e.g. drivetrain, steering, electric lighting, etc. Cross tests for ASAM XIL implementations are carried out regularly to ensure compatibility between test automation software and test benches.
The standard comes with a C# source code library, which contains open source software that can be used by framework developers to implement the XIL API. It covers about 69% of the standard's API methods. Provided methods are unit and data type conversion, reading mapping files, mathematical operations, and more. The source code has been professionally developed and constitutes a standard-compliant implementation of significant parts of the ASAM XIL API.
The first release of ASAM HIL 1.0.0 was in June 2009. Maintenance releases 1.0.1 and 1.0.2 have been launched in February 2011 and February 2012. The first releases focused on the description of test bench functionality and port-based communication between the test bench and the test automation system.
Cross tests have been carried out in June 2012 and February 2013 based on ASAM HIL 1.0.2 by the major HIL system vendors dSPACE GmbH, ETAS GmbH, National Instruments Corporation, TraceTronic GmbH and Vector Informatik GmbH. These tests demonstrated that test systems and test automation software using the HIL API are able to communicate without integration efforts. The few minor functional deficits that occurred due to a standard misinterpretation were identified and fixed with the next release.
ASAM XIL 2.0.0 was released in October 2013 and marks a major milestone in the further development of the standard. A framework was introduced to the standard, which is completely new and contains broadly extended functionality such as logging of variables and mapping of units, data types or variable identifiers as well as managing of ports already known from ASAM HIL 1.0.2. The ports themselves were extended slightly with respect to missing functionality in the previous standard version, such as configuration and initialization. In order to give test developers standardized access to CAN busses, the Network Port was added to the standard.
ASAM cooperated with the ITEA2-funded project Modelisar during the development of the ASAM XIL API 2.0 project. As a result, part of the ASAM XIL standard has been re-published as ASAM XIL-MA with the title "Generic Simulator Interface for Simulation Model Access". Within the group of Modelica FMI (functional mock-up interfaces) standards, ASAM XIL-MA takes the position of functional mock-up interfaces for applications.
Main contributors to the standard are AUDI AG, AVL List GmbH, Berner & Mattner Systemtechnik GmbH, BMW AG, Robert Bosch GmbH, Continental Automotive GmbH , D2T, Daimler AG, dSPACE GmbH, ETAS GmbH, HORIBA Automotive Test Systems GmbH, M&K Mess- und Kommunikationstechnik GmbH, MBtech Group GmbH & Co. KGaA, National Instrument Corporation, RA-Consulting GmbH, Softing Automotive Electronics GmbH, TraceTronic GmbH, Vector Informatik GmbH.
HIL technology has been developed over the years by only a few suppliers. Due to several reasons the architecture of these HIL systems was characterized by a direct rigid coupling of test automation software and test hardware. Therefore test cases directly depended on the used test hardware. The end user, was not able to combine the ‘best’ test software with the ‘best’ testing hardware for his purpose.
Know-how could not be transferred from one test bench to the other. This resulted in additional training costs for employees. Switching to the newest testing technology and to a new development process stage was difficult because of tool specific formats and test hardware compatibility issues. Furthermore, the exchange of test cases between different parties, e.g. OEM and supplier, was difficult and costly.
The major goal of the ASAM XIL standardization effort is to allow for more reuse in test cases and to decouple test automation software from test hardware. As a consequence, the reuse of test cases within the same test automation software on different test hardware systems is achieved. This leads to a significant reduction of efforts for test hardware integration into test automation software.
Software investments and test case development efforts are long-term protected. End users may choose a test automation software system and use it for many years without being forced to use the test hardware from the same supplier.
Some areas of the ASAM XIL standard are not HIL-specific. The MAPort, for example, can also be used to connect test automation tools to PC-based simulation tools. This allows engineers to develop test cases in very early stages and in different domains in order to reuse them in later stages on real-time HIL simulators.
ASAM XIL focuses on the decoupling of test-cases from real and virtual test systems. It broadly covers all use cases in the testing area and is primarily used in conjunction with test automation tools on a client server base. The standard is used in test automation applications of all automotive E/E domains, e.g. drivetrain, steering, electric lighting, body electronics etc.
Typical application areas of XIL are test automation scenarios in Hardware-in-the-Loop (HIL) simulation environments. HIL simulation has become a well-established verification technology applied in many ECU development projects today. Tests of failure situations or tests of dangerous maneuvers can be shifted to the real-time simulation, at least some parts of the complete test program. The major advantage is the capability to automate these tests. This allows to reproduce all test cycles and to operate these test benches 24h per day.
Some areas of the XIL standard are not HIL-specific. The simulation model access port, for example, can also be used to adapt simulation tools. This allows engineers to develop test cases in very early stages and in different domains in order to reuse them in later stages at a real HIL simulator using XIL. The Functional Mock-up Interfaces (FMI) initiative has cooperated with the XIL API Project 2.0. As a result of the ITEA2-funded project Modelisar, standardized interfaces for model exchange and co-simulation of subsystems from different domains have been developed. These “functional mock-up interfaces” will support simulation system setup at all stages of function software development (MIL, SIL, HIL, etc.).
Thus, a subset of XIL mainly dealing with the simulation model access port as “Functional Mock-up Interface for Applications” has been released separately. This means that tests written in those early simulation environments can be directly reused in HIL environments at a later stage.
Furthermore, XIL is used in rapid control prototyping environments. As an example, Tula Technology Inc. from Silicon Valley, California uses it in early stages of function development. Through a combination of a unique application of digital signal processing and sophisticated powertrain controls, Tula has created the ‘digital engine’, thereby providing a cost-effective and easily integrated fuel-reduction technology. Therefore, Tula uses hardware components from dSPACE and National Instruments at a test bench accessed by test cases using the HIL API.
ASAM XIL contains two major parts:
- The framework, which provides functionality such as logging of variables and mapping of units, data types or variable identifiers as well as managing of port-based communication to the test bench. The framework uses functionality that is available on the test bench.
- The test bench, which includes access-ports to the simulation model, ECU data (parameters, variables and diagnostics), electrical error simulation and the ECU network.
The measuring capability of ASAM XIL allows data acquisition from different data sources (simulation model, ECUs etc.) to be configured. The time traces of variables from these different data sources are assembled on a common time basis. Users can control the data acquisition using sophisticated triggers that respond to important situations such as gear shifts, transient response in the drivetrain, etc. Recorders stream the coherent results either to memory for further processing or to standardized measurement files (ASAM MDF 4.0 or higher) for data reuse in a later process stage.
It is a challenging task for test developers to achieve effective decoupling between test cases and test benches in order to improve test reuse. The test developer's work is greatly facilitated by one of the ASAM XIL framework features: mapping. This provides the standardized mapping of values (variable identifiers, physical units, data types) between the test case and the test bench. Thus, mapped values can differ during the development process. The user just has to adjust the mapping - the test case (e.g., measurement definition) remains unaffected. The user can configure proper port preconditions in a unified way (e.g. which simulation model to download on the port and whether simulation needs to start automatically after download). This information enables the framework to put ports into their proper states before the measurement begins.
The XIL support library as a further part of the standard contains open-source software, which can be used by test case developers and framework vendors to realize vendor independent common tasks. Such tasks are unit and data type conversion, reading mapping files (which generates a memory image from mapping file information with access possibility), mathematical operations etc. Factories are distributed for the generic instantiation of the framework and one or more test benches from different vendors.
This chapter consists of five sections, starting with Synchronized Data Acquisition, which demonstrates one of the major features of ASAM XIL.
The XIL Test System Architecture section explains the general concepts of the Framework’s and Testbench’s API, containing the ports such as the Model Access Port - MAPort).
The following two sections Overview Framework and Overview Test Bench go into some more detail of these specific areas of the XIL API.
The last section XIL Support Library contains some basic information about the C# source code library that comes with the ASAM XIL standard. It contains open software that can be used by framework and test case developers to implement the ASAM XIL API.
XIL Test System Architecture
XIL testbench API with direct port access
The ASAM XIL standard specifies two major APIs, namely the Framework API and the Testbench API. This section will explain the general architecture, which is the basis of the different interfaces. The picture gives an overview of a test system in general. A typical XIL test bench consists of a system under test, which is a coupled system of ECUs, hardware components, and simulated parts of the system, depicted by the dark grey box at the bottom. The interaction between these parts is managed by different tools of different vendors, shown in the light grey boxes. These tools serve different purposes, such as accessing ECUs, or offer capabilities to interface bus systems, like CAN. The simulated parts might be executed by simulation tools or on the basis of compiled code. These tools have their proprietary means for configuration (orange blocks).
A first step of standardization has been achieved with ASAM HIL 1.0.2 providing standardized interfaces to the different types of tools by means of specific test bench ports in a test bench API. ECUC port and ECUM port offer standardized access to ECUs via an calibration and a measurement interface. The MA port deals with model access, the DIAG port with a diagnosis interface. The EES port offers means for electric error simulation. ASAM XIL 2.0 additionally introduces the Network port for accessing CAN networks.
Based on these test bench port interfaces, a test automation tool could utilize a standardized access to variables and signals on these ports without dealing with proprietary details of different vendors and their tools. However, in such a setup the test case has to implement start and shutdown of the test bench ports, which is highly dependent of the test system. In order to access variables and signals the test case has also to deal with port-specific addresses and data types.
These drawbacks have been resolved with ASAM XIL 2.0. The test bench port access is still available (see right side of figure) for compatibility reasons and in order to provide some detailed functionality, that is not provided by the framework.
Test system with XIL framework API and XIL testbench API
ASAM XIL 2.0 introduced port independence to test cases by using an object-oriented access to variables on test bench ports. This kind of port abstraction is provided by the framework layer between test automation and test bench. According to some test bench specific configuration within the framework, the different ports are started and shutdown in a specified order.
At the present time it is a challenging task for test developers to achieve effective decoupling between test cases and test benches in order to improve test reuse. The test developer’s work is greatly facilitated by one of the framework’s basic features: mapping. This allows to mapped values between test cases and the test bench:
Abstract identifiers for variables
Thus, mapped values can differ during the development process. The user just has to adjust the mapping – the test case remains unaffected. Mapped values such as the data type or physical unit of a vehicle’s velocity may change on the test bench side because different precisions or different simulation model suppliers are involved in the development process while the same test case implementation is being reused.
Based on a MappingInfoAPI a test case can retrieve all information, which is part of the mapping definition. Based on the variable objects, the framework also provides objects for port-independent signal recording, signal generation, and event watching and triggering. A more detailed description is given in the following sections.
The Framework class
The Framework class is the central class for managing the set of test bench ports and their configuration, mapping information as well as overall recording and stimulation. The Framework class provides factories for other framework related objects, e.g. the creation of variables (see figure right).
The ASAM XIL framework simplifies initialization of the test bench ports. The complete test system is initialized based on a configuration, which can be loaded from file using the LoadConfiguration() method. It references other mapping and port configuration files in order to setup the complete framework with all relevant ports. For more details see the section Configuration of the standard. The Init() method is called in order to initialize all ports according to the previously loaded configuration in a specified order. After successful initialization the test automation system is ready to perform framework variable accesses, or more precisely, all test bench ports are in their target state as specified in the configuration.
The most fundamental concept of ASAM XIL is to provide framework variable objects which abstract from the test bench ports and memory addresses of variables. The following figure shows the FrameworkVariable class.
Framework variables are created using the Framework.CreateVariable() method using an AbstractIdentifier string. This string has to be defined in the mapping configuration, where it is related to a specific test bench port. The mapping also contains meta data about unit and data type of the variable, as well as unit and data type of the test bench port value, which the variable represents. This allows an automatic unit and type conversion at any framework access.
The FrameworkVariable class
The value of a framework variable is encapsulated by a Quantity object. A quantity has a physical dimension, e.g. length, a unit, e.g. meter, and a value.
Framework variables exist as scalar variables as well as vector, matrix, curve, and map variables. More details on methods and framework mechanisms utilizing framework variables can be found in section Framework Variables of the Standard.
Note: In ASAM XIL , framework variables cannot be used for the DiagPort and EESPort.
To reduce the effort for test case developers and increase the functional safety, ASAM XIL has a special concept for working with quantities of framework variables if they are used in mathematical operations. A computation table is used to describe multiplication and division operations, based on the physical dimensions and units contained in the mapping file. The contained equations are based on the usage of physical dimensions. The used quantities of an equation should fit to one entry inside the computation table by equal physical dimensions of these units. Because the identifiers of units and dimensions can be user defined an easy alignment with the user approach is possible. The delivered computation table template includes the most common equations of automotive business.
Acquisition and Stimulation
The Acquisition class
Data acquisition is an important part of test systems. With the Acquisition object (see figure right), which can be obtained from the Framework, the data flow from the test bench ports to the framework is configured and controlled. The configuration is based on framework variables, which carry the relation to the test bench port and information about unit and data type.
Several recorders can be created. In order to reduce the amount of data, which is transferred to the host PC, the measurement process can be configured via triggers and a downsampling factor. A recorder can store signals from different ports. A RecorderResult can be held in memory or stored to file, e.g. in MDF4 format. Details are given in section Measuring of the standard.
The Stimulation class
In a similar way, stimulation is configured. The right figure shows the Stimulation class.
Several Player instances can be configured. The information about the specific port variable is again taken from the framework variables, which have been assigned in the configuration. A player can also use a previously recorded signal from file for stimulation. For details refer to section Stimulation of the standard.
Watcher objects are used to generate trigger events, e.g. for recordings. The trigger conditions are defined based on General Expression Syntax (GES) strings. In order to refer to framework variables, their AbstractIdentifier is used. Watchers can be defined for variables of different test bench ports.
Overview Test Bench
The Testbench API covers access to the test bench ports with their hardware and software components.
The API provides vendor independent access to the functionalities of a XIL simulator via port interface definitions for the different kinds of ports. Each tool vendor can provide an implementation of these interfaces, which is specific for his tool set. Thus, the user of the XIL Testbench API gains standardized access to the tools of different vendors.
The ASAM XIL Testbench API covers the functional areas:
Model access (MA port)
ECU access (ECUC and ECUM port)
Network access (Network Port),
Diagnostics access (Diag Port)
Electrical error simulation (EES port)
Each of these functional areas is represented by one or several ports. In contrast to ASAM HIL 1.0.x, in ASAM XIL 2.0 the port initialization is supported by means of standardized configuration methods and objects.
Note: Usually, initialization is performed by the framework. However, initialization sequences can also be programmed in test cases.
Ports of the ASAM XIL Test Bench API
XIL test bench ports
The following class diagram shows the different test bench ports.
The Model Access port (MAPort) provides access to the simulation model. It is possible to read and to write data and to capture and to generate signals.
The ECU Measurement port (ECUMPort) communicates with an electronic control unit. The ECUM port allows to capture and to read measurement variables.
The ECU Calibration port (ECUCPort) communicates with an electronic control unit. It provides access to ECU internal calibration values.
The Network Access port (NetworkPort) provides access to networks, such as CAN or FlexRay.
Note: Please note that in ASAM XIL 2.0 only CAN networks are supported. Support for FlexRay or other buses will be part of a future version of the standard.
The Diagnostic port (DiagPort) communicates with a diagnostic system to read data via diagnostic services from an ECU or Functional Group.
The EES port (EESPort) controls electrical error simulation hardware. It allows to set different types of errors.
ASAM XIL Support Library
The standard comes with a C# source code library, which contains open-source software that can be used by framework developers to implement the ASAM XIL API. It covers about 69% of the standard's framework API methods. Provided methods are unit and data type conversion, reading mapping files, mathematical operations and more. The source code has been professionally developed and constitutes a standard-compliant implementation of significant parts of the ASAM XIL API.
ASAMs goal is to offer some parts of the standard as open-source software, which can be used inside a framework. These open-source components are not relevant for competition of products on the market. These parts of the software can be used by tool vendors to integrate them into their own products. They are implemented in such a way that there is a clear dividing line to vendor-specific implementations such as the realization of Port Connectors.
The ASAM XIL Support Library includes factory implementations for the generic instantiation of the framework and one or more test benches from different vendors. The library includes the functionalities:
for creation of framework variables, quantities, meta data and units
the implementation of the framework mapping info API
data type converter
mathematical operations and
import of a mapping file
Besides the ASAM XIL support library, the standard also includes an example implementation of a framework, which shows the exemplary usage of a framework variable from the users view. The creation of a variable and the read and write access is shown there. This includes the usage of a data type and unit converter and also the transformation between a base value and a quantity.
The framework itself interacts with the selected underlying test bench port. Therefore a dummy implementation of a MAPort is provided as well.
Synchronized Data Acquisition
Measured signals from different hardware (accessed via different test bench ports) with different hardware timers usually are not synchronous. The XIL framework can synchronize these signals to a common time base and therefore, it provides standardized interfaces to configure and enable the synchronization. The framework supports synchronized data acquisition among signals across different capture systems accessed by test bench ports, which support capturing (MAPort, ECUMPort, NetworkPort).
Hardware timers usually are simple counters which start counting, once the hardware is switched on. During data acquisition, each measurement value of a capture system is given a time stamp by the corresponding timer. During data acquisition, those timers have different initial values (due to different times, when they have been switched on) and they also may drift apart due to slightly different frequencies.
Effects of offsets and drifting timers (without resynchronization)
To make it more clear, let’s compare the hardware timers with clocks at different places in the world, which provide time stamps for measured values (see figure below): Montreal and Sydney provide measurement data in their own time base. Of course the time difference to these places will vary according to where in the world you are, but let’s fix Munich as the place, from where this scenario is observed. Thus, Munich is supposed to be the framework time as the common time base to make measured signals from different locations comparable. At acquisition start, Munich is 6 hours ahead of Montreal, which means there is an offset of 6 hours; i. e. 4 am in Montreal is 10 am in Munich. However, the frequencies of timers differ, resulting in a mere 4 hours of difference between both cities at acquisition end in this example.
But it gets even more complex: Not all timers run at a constant frequency. The reason for this: changing environmental factors over time may affect the timer frequency, e. g. a rising temperature results in a higher timer frequency (see the significant curve progression of the Sydney time). Consequently, the framework compensates all these effects, if resynchronization is switched on (see figure below) using correction factors for offset and drift. Thus, the framework is turning the values of time stamps for Sydney back to Munich time, for Montreal it is advancing them. If signals are measured with equidistant time stamps at a local time, this transformation may lead to non-equidistant time stamps within the common time base, where the data is synchronized to. At acquisition start, all time stamps are reset to 0.
Effects of offsets and drifting timers corrected with resynchronization
The Resynchronisation property specifies the time interval, after that the framework recalculates the correction factors periodically in order to also deal with non-constant timer frequencies. A negative value of Resynchronization means, that the framework’s resynchronization mechanism is switched off.
Note, that the acquisition and the recording result objects have a past, present and future. This means that the framework adds recently synchronized measured values at the present arrow to the result object, whereas measured data, which already has been added remains unchanged, since it is history. Thus, no post processing is done of data, the framework has already added to in the past. Remember: The past is not controllable, but observable – the future is not observable, but controllable. This means that the framework uses (observes) data that has been collected in the past, in order to compute new correction factors, which will be used for timestamp adjustment (control) in the near future of the next resynchronization interval.
Each test bench port, which supports capturing, provides the method GET_DAQ_CLOCK. This method returns the time of its port in seconds. This time base is also used for the acquisition signals, as it is also known from XCP. Internally, the framework requests the current hardware time from the capture system using the getDAQClock method of the corresponding test bench port (e. g. MAPort). Note, that this method call has some latency time between starting the call and receiving the result. This may be one reason for some inaccuracy within the synchronized data acquisition.
The value of AcquisitionStartTime is the number of seconds since the Unix epoch time (i.e., the time unit is Unix time or POSIX time or Unix timestamp). This is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z. Thus, the epoch is Unix time 0 (midnight 1/1/1970).
Relation to Other Standards
ASAM XIL uses the ASAM General Expression Syntax for defining watcher conditions.
Measurement data in ASAM XIL includes numerical data, e. g. within CaptureResult or RecordingResult objects. For streaming this data to file, ASAM XIL uses the definition of MF4-files from ASAM MDF.
The Unit class, which is related to the Quantity of the FrameworkVariable in ASAM XIL has been designed according to the ASAM Harmonized Data Objects standard (HDO).
The generic UML model of XIL API is based on the ASAM IS Modeling standard.
List of Deliverables
The standard includes the following deliverables:
Standard package containing:
Generic UML Model
Templates and template examples
Technology References for C# and Python
XIL Support Library contains the software components
Converter (used for unit conversion)
Framework variables, MetaData, Quantities and Units
FullMappingAccess (Raw access to XML mapping data)
MappingObjectProvider (comfort access to XML mapping data)
MathOperation (functionality for mathematical operation)
Reader (XMLSource construction)
Resolver (abstract PortConnector, Quantity-BaseValue transformer)
Framework and Testbench factory software
UML model and documentation
Example Framework package, containing an example implementation with MAPort simulation
Prototype package with test environment
MSI setup package containing all .NET assemblies of the standard.
Neumerkel, Dietmar; Rasche, Rainer: Decoupling Test Cases from Real and Virtual Test Systems with ASAM HIL API; Tagungsband ASIM/GI Fachgruppentreffen Simulation technischer Systeme und Grundlagen und Methoden in Modellbildung und Simulation, Wolfenbüttel, 2012; ISBN: 978-3-901608-39-1.
Keprt, Jiri; Liu, Paul; Rasche, Rainer: Collaborating in California: Open HIL Test system architecture uses the ASAM HIL API; Proceedings of the 1st ASAM International Conference, Dresden, 2013
Liu, Paul; Hartmut Jürgens: Collaborating in California: Dynamic Skip Fire Development Using HIL API; Proceedings of the 7st ASAM US-Workshop, Novi, MI, USA; 2014
Brückner, Constantin; Neumerkel, Dietmar; Rasche, Rainer: Ready, Set, Go! Measuring, Mapping and Managing with XIL API 2.0; Proceedings of the 7th ASAM US-Workshop, Novi, MI, USA; 2014
Brückner, Constantin; Neumerkel, Dietmar; Rasche, Rainer: ASAM XIL 2.0: Standard für ein durchgängiges Testen im gesamten Produktentstehungsprozess (MiL/SiL/HiL); 7. Vector Congress, Stuttgart; 2014
McKeever, James: Dynamic Firing Order; ASAM Solutions Guide, page 38; 2015