This thesis presents an approach to generate optimized C code for embedded systems using an iterative multigranular approach across different levels of abstraction. The goal here is to decouple the algorithm development from the optimization for the actual target system.
First, the four hierarchical levels considered are introduced and their interaction is discussed in more detail. The algorithm level deals with the pure implementation of functionality and how known properties of algorithms can be exploited early on. At the code level, the representation of the algorithm in the source code is optimized. Code transformations and other methods are used for this purpose, in order to be able to analyze and split the application better afterwards. Finally, the task level deals with the distribution of the individual tasks to the available execution units and the data level ensures the correct synchronization of the data between all cores.
Next, the code generation steps necessary to convert the algorithms initially available in MATLAB into statically analyzable C code and to generate the parallel C code for the target platforms after the optimization steps are discussed and solutions are presented. The challenges of generating efficient C code from a scripting language where data types and variable sizes are computed dynamically at runtime by an interpreter are discussed in more detail. In addition, it is discussed how the correct control flow of an application can be ensured in a parallelized application.
In the following, the realization of cross-level parallelization is described. For this purpose, the specification of the target systems is introduced via an architecture description, and then the most important implementations per level are presented. At the algorithm level, this is the detection of known algorithms and how known properties can be exploited. Parallelization at the code level focuses on code transformations that harness the intrinsic parallelism of applications. The task level deals with the distribution of tasks to the available execution units and which algorithms are used for scheduling. Finally, the data level deals with the placement of synchronization and communication instructions to ensure the correct and efficient execution of the parallelized application.
This approach is finally evaluated with three example applications, two data-flow-heavy and one control-flow-heavy. This is done by describing the optimizations applied at each level, how they are applied iteratively, and how the levels affect each other. Measurements on different hardware platforms complete the results.
Finally, a summary is given and possible future extensions are described.
| Related KIT institution | Institute for Information Processing Technologies (ITIV) |
|---|---|
| Language | German |
| KITopen ID | 1000176033 |
| Publisher | Karlsruher Institut für Technologie (KIT) |
| Size | xiii, 229 p. |
| Faculty | Fakultät für Elektrotechnik und Informationstechnik (ETIT) |
| Institute | Institute for Information Processing Technologies (ITIV) |
| Exam date | Jul 15, 2024 |
| Supervisors | Jürgen Becker Michael Hübner |
| Referenced in | OpenAlex |