Memory Hierarchy Code Optimization (Mem-Opt)
Fact Sheet
Acronym | Mem-Opt |
---|---|
Name | Memory Hierarchy Code Optimization (in German: Code-Optimierung für Speicher-Hierarchien) |
Role of TUHH | Applicant, Project Management |
Start Date | 01/02/2022 |
End Date | 31/01/2025 |
Funds Donor | NXP Semiconductors Germany GmbH |
Summary
Modern real-time embedded systems are required to fulfill stringent timing constraints. But with the increasing complexity of such systems, it is necessary to consider not just execution times but other non-functional properties such as energy consumption, code size, etc. To perform optimizations for such non-functional properties, compilers can be the optimal middle ground.
Embedded systems can be equipped with sophisticated memory subsystems, featuring, among others, Flash memories, caches, tightly-coupled scratchpad memories (SPM), DRAM, DMA engines, etc. Principally, these memory subsystems play a vital role while optimizing these non-functional properties. Moreover, memory allocation for such elaborate architectures is a complex optimization problem to address. In the real-time community, the static assignment of memory objects to memories and address spaces typically is prevalent due to its inherent timing predictability. But this might lead to sub-optimal memory usage because of the lacking flexibility to adapt the memory allocation to the program's current state during execution. Therefore, this project will exploit compiler-based dynamic memory management for architectures with sophisticated memory hierarchies to design timing-, energy-, and code-size-efficient programs.
Dynamic memory allocation has been investigated in the past only for reasonably limited architectures. Moreover, the overhead imposed due to the copying of memory objects within the memory hierarchy is modeled accurately only in some cases. Lastly, until now, only dynamic memory allocation-based single-objective optimizations are considered. Therefore, currently, there is no comprehensive approach for performing compiler-based dynamic memory allocation for architectures with sophisticated memory hierarchy, under simultaneous consideration of multiple objectives, which accounts for the overheads imposed by the allocation's dynamic behavior.
To handle such multi-objective optimizations, this project aims to develop a generic framework based on Metaheuristic Algorithms and Integer Linear Programming (ILP) that performs dynamic memory allocation. As a kind of demonstration of our holistic approach, we will consider actual compiler-based optimizations like dynamic SPM allocation, cache locking, code compression, with and without DMA, etc. However, performing dynamic memory allocation is an NP-complete problem in itself. The design space within which the optimal solutions for such a problem lie, can be huge. Thus, performing multi-objective optimizations on such a huge problem, either by using the ILP- or Metaheuristics-based approach, is thus likely to have shortcomings in terms of complexity. Therefore, this project additionally aims to tackle the scalability issues by using hybrid combinations of these multi-objective optimization approaches.
Mem-Opt Publications of the Embedded Systems Design Group
[183641] |
Title: Towards Multi-Objective Dynamic SPM Allocation. <em>In Proceedings of the 21st International Workshop on Worst-Case Execution Time Analysis (WCET)</em> |
Written by: Shashank Jadhav and Heiko Falk |
in: July (2023). |
Volume: Number: |
on pages: 6:1-6:12 |
Chapter: |
Editor: |
Publisher: |
Series: |
Address: Vienna / Austria |
Edition: |
ISBN: 10.4230/OASIcs.WCET.2023.6 |
how published: 23-70 JF23b WCET |
Organization: |
School: |
Institution: |
Type: |
DOI: |
URL: |
ARXIVID: |
PMID: |
Note: sjadhav, hfalk, memopt, ESD, WCC
Abstract: Most real-time embedded systems are required to fulfill timing constraints while adhering to a limited energy budget. Small ScratchPad Memory (SPM) poses a common hardware constraint on embedded systems. Static SPM allocation techniques are limited by the SPM's stringent size constraint, which is why this paper proposes a Dynamic SPM Allocation (DSA) model at the compiler level for the dynamic allocation of a program to SPM during runtime. To minimize Worst-Case Execution Time (WCET) and energy objectives, we propose a multi-objective DSA-based optimization. Static SPM allocations might inherently use SPM sub-optimally, while all proposed DSA optimizations are only single-objective. Therefore, this paper is the first step towards a DSA that trades WCET and energy objectives simultaneously. Even with extra DSA overheads, our approach provides better quality solutions than the state-of-the-art multi-objective static SPM allocation and ILP-based single-objective DSA approach.