A Model-Driven Architecture Approach to Efficient and Adaptable Software Code Generation

Mayuri Bhadra, Daniel Albert, Ungsang Yun, Robert Kunzelmann, Daniela Sanchez Lopera, Wolfgang Ecker

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Scopus citations

Abstract

In the evolving domain of embedded programming, addressing diverse challenges of resource constraints, reliability, and hardware dependencies is essential. To overcome these hurdles, we propose an efficient and adaptable model-based code generator aligned with Model-Driven Architecture (MDA) principles. This generator offers an alternative to the traditional manual coding approach, which is often laborious and error-prone. Our proposed solution emphasizes adaptability and efficiency by seamlessly integrating with different languages and target hardware architectures while incorporating high-level programming constructs like intrinsics and/or inline assembly. Applying our model-based code generator to generate kernel libraries for neural network (NN) inference showcases its adaptability, serving both high-performance systems like CPUs and tinyML targets such as RISC-V microcontroller units (MCUs). Our proposed solution’s efficiency is shown by incorporating intrinsic functions and generating different variants of NN kernel libraries for fundamental tensor math operators. Experimental results indicate an average reduction of approximately 126 times in Source Lines of Code (SLoC) when using our model-driven approach compared to the SLoC for the generated code of all possible variants according to the different attributes modeled for the respective operators and target hardware platforms. This highlights the efficiency and adaptability of our proposed solution in reducing the overall development effort and enhancing the development of generic embedded software.

Original languageEnglish
Title of host publicationMBMV 2024
Subtitle of host publicationMethoden und Beschreibungssprachen zur Modellierung und Verifikation von Schaltungen und Systemen - 27. Workshop
PublisherVDE VERLAG GMBH
Pages196-203
Number of pages8
ISBN (Electronic)9783800762682
StatePublished - 2024
Event27. Workshop Methoden und Beschreibungssprachen zur Modellierung und Verifikation von Schaltungen und Systemen, MBMV 2024 - 27th Workshop on Methods and Description Languages ??for Modeling and Verification of Circuits and Systems, MBMV 2024 - Kaiserslautern, Germany
Duration: 14 Feb 202415 Feb 2024

Publication series

NameMBMV 2024: Methoden und Beschreibungssprachen zur Modellierung und Verifikation von Schaltungen und Systemen - 27. Workshop

Conference

Conference27. Workshop Methoden und Beschreibungssprachen zur Modellierung und Verifikation von Schaltungen und Systemen, MBMV 2024 - 27th Workshop on Methods and Description Languages ??for Modeling and Verification of Circuits and Systems, MBMV 2024
Country/TerritoryGermany
CityKaiserslautern
Period14/02/2415/02/24

Keywords

  • Code generation
  • Model-Driven Architecture
  • Model-of-Software
  • metamodeling

Fingerprint

Dive into the research topics of 'A Model-Driven Architecture Approach to Efficient and Adaptable Software Code Generation'. Together they form a unique fingerprint.

Cite this