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

Konferenz: MBMV 2024 - 27. Workshop
14.02.2024-15.02.2024 in Kaiserslautern

Tagungsband: ITG-Fb. 314: MBMV 2024

Seiten: 8Sprache: EnglischTyp: PDF

Autoren:
Bhadra, Mayuri; Kunzelmann, Robert; Sanchez Lopera, Daniela; Ecker, Wolfgang (Infineon Technologies AG, Neubiberg, Germany & Technical University of Munich, Germany)
Albert, Daniel; Yun, Ungsang (Infineon Technologies AG, Neubiberg, Germany)

Inhalt:
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 highlevel 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.