Eclipse APP4MC: Open Source Tools for Performance Analysis of Heterogeneous Embedded Systems
Eclipse APP4MC is an open platform for model-based performance analysis and optimization of heterogenous embedded hardware and software systems. The platform allows developers to create and manage complex toolchains, including simulation and validation. It has been used by Bosch and its partners in the automotive sector and is proven to provide interoperability and extensibility, and to unify data exchanges in cross-organizational projects.
The Eclipse APP4MC project is based on the work done in the ITEA-funded AMALTHEA, AMALTHEA4public, and PANORAMA European research projects.
Developers Can Combine Open Source and Commercial Components
To help engineering teams that are facing increasing issues when setting up their environments, the Eclipse APP4MC project features a service-oriented architecture that is deployable as individual cloud services hosted on Eclipse Foundation cloud infrastructure. However, because some services are not available as open source projects, the Eclipse APP4MC platform also provides the ability to connect individual cloud services to an existing architecture.
The software provides a classic IDE with modeling and data modification capabilities as well as the ability to use cloud processing for simulation, data analysis, and result visualization. With these two approaches, developers and users can create a solution that meets their individual needs.
Figure 1 illustrates the Eclipse APP4MC IDE user interface.
Figure 1: Eclipse APP4MC IDE User Interface
![Figure 1: Eclipse APP4MC IDE User Interface](images/article3_figure_1.png)
Figure 2 illustrates the Eclipse APP4MC platform in a cloud environment with PANORAMA cloud services and individually connected cloud services. PANORAMA is an ITEA 3-funded European research project that aims to boost design efficiency for heterogenous systems.
Figure 2: Eclipse APP4MC Cloud Services
![Figure 2: Eclipse APP4MC Cloud Services](images/article3_figure_2.png)
Cloud Services for Operations on AMALTHEA Models and Service Chaining
Eclipse APP4MC cloud services allow developers to perform operations on AMALTHEA models with no need to install tooling software locally. Developers can integrate static analysis and simulation of an AMALTHEA model in a continuous integration process and automatically verify the results of model modification.
Eclipse APP4MC cloud services also include a well-defined API through which service chaining is possible. This allows additional cloud services to be added to the processing chain without adjusting the processing implementation. The APP4MC Cloud Manager provides a default processing chain implementation with a web-based user interface to give developers a better idea of the possibilities enabled by the cloud services.
A Real-Time Calculus Analysis Tool for Modular Performance Analysis
Performance analysis based on technologies, such as a Real-Time Calculus (RTC) analysis tool, makes it possible to perform modular performance analysis of heterogeneous real-time systems.
The RTC analysis tool converts a given system model into a Directed Acyclic Graph (DAG) called a scheduling network. The nodes in this network correspond to the tasks in the system, while the edges between the nodes indicate resource-sharing and execution order.
In its current state, the RTC analysis tool derives upper and lower bounds for the delay and buffering of each task corresponding to the end-to-end delay and number of subsequent missed deadlines respectively. Additional metrics will be added to this tool in the future.
The RTC analysis tool has been implemented to analyze systems modeled with AMALTHEA, and is integrated in the Eclipse APP4MC cloud platform, which means no local setup is required. Furthermore, the tool's API can be called separately to allow its use as a standalone service in custom workflows. The RTC analysis tool was presented as part of the IEEE IDAACS-SWS conference 2020. You can find the presentation here.
Simulations for Early Evaluations of Models
Design and development with a model-based process creates the need for early evaluation of the models created. The Eclipse APP4MC toolchain allows simulation of AMALTHEA models with the SystemC simulation framework based on a model-to-text transformation named APP4MC.sim. The resulting SystemC simulation contains proxy classes for important AMALTHEA meta-model components and represents the execution semantics.
During the simulation, all execution time semantics are sampled according to their specification. The simulation currently creates two trace file types from the executed specification.
First, the simulation provides a Best Trace Format (BTF) file, which allows analysis of software execution interactions with standard tools. Second, tracing of hardware aspects, such as communications resource utilization, are done in the Value Change Dump (VCD) format (Figure 3).
Figure 3: VCD Trace of an AMALTHEA SystemC Simulation
![Figure 3: VCD Trace of an AMALTHEA SystemC Simulation](images/article3_figure_3.png)
For easier analysis, the simulation also annotates software entities, such as memory and communications units, that occupy hardware components based on an extension of the GTKWave wave viewer.
Trace Analysis Is Based on Best Trace Format and the AMALTHEA Trace Database
After a successful simulation run, there are several ways to process the results. One way is to write out the simulation trace by serializing it into a Best Trace Format (BTF) artifact, as described in BTF_Specification_2.2.0.pdf. BTF is a simple, comma separated values (CSV) format where each line represents a single event in the trace. BTF files can be produced using commercial simulation tools, such as the Vector TA Tool Suite, INCHRON Tool Suite, and trace debuggers.
In a second step, the BTF file can be visualized in a Gantt chart (Figure 4), or analyzed by deriving several metrics from trace data. These derived metrics can, in turn, be visualized in various charts.
Figure 4: Gantt Chart of a Simple Example Trace
![Figure 4: Gantt Chart of a Simple Example Trace](images/article3_figure_4.png)
To enable calculation of metrics only, which can be user-defined, we designed a new AMALTHEA Trace Database (ATDB). Initially, this SQLite database contains only the trace events from the BTF artifact. Then, some predefined typical metrics are calculated and inserted in metrics tables.
A typical metric is the amount of time an instance of an entity, such as a task, is in a specific state — pre-empted, for example. Based on the state chart provided in the BTF specification, all state time metrics can be automatically calculated using SQL queries by combining the timestamps of the respective events.
These instance metrics are subsequently aggregated to calculate the average pre-emption time, the standard deviation of a task’s runtime, and other metrics. Once all of the metrics are calculated, the source trace event table can be removed from the ATDB if the trace producer does not want to disclose the trace details. This enables a standardized metrics data exchange using the ATDB format.
The ATDB can also be enriched with event and event chain specifications from an AMALTHEA model. The specifications can then be used to find all event and event chain instances that are visible in the source trace. With this information, aggregated metrics for event chains can be calculated. For example, the minimum and maximum event chain latency can be calculated. The results can then be visualized in various charts and compared to latency requirements.
The new ATDB is part of the Eclipse APP4MC v1.0.0 release. The release includes converters, documentation, examples, and Java APIs that enable access and interactions with the database.
Figure 5 shows the Eclipse APP4MC tool platform with an example trace in BTF and the corresponding metrics in the related ATDB file.
Figure 5: BTF and ATDB representations in the Same Trace in Eclipse APP4MC
![Figure 5: BTF and ATDB representations in the Same Trace in Eclipse APP4MC](images/article3_figure_5.png)
Together, the capabilities described in this article give developers an open source-based collaborative environment for heterogenous embedded hardware and software development. They can combine open source and commercial components to create an environment that meets their unique needs.
Learn More
To learn more about the Eclipse APP4MC project, visit our website and follow us on Twitter.
To learn more about the OpenADx Working Group at the Eclipse Foundation and the autonomous driving toolchain, click here.
About the Authors
![Mahmoud Bazzal](images/mahmoud_bazzal.jpg)
![Benjamin Beichler](images/benjamin_beichler.png)
![Dirk Fauth](images/dirk_fauth.png)
![Lukas Krawczyk](images/lukas_krawczyk.png)
![Harald Mackamul](images/harald_mackamul.png)
![Joerg Tessmer](images/joerg_tessmer.png)
![Raphael Weber](images/raphael_weber.png)