PhD Seminar: Automated Compilation Framework for Scratchpad-based Real-time Systems

Tuesday, June 18, 2019 2:30 pm - 2:30 pm EDT

Candidate: Muhammad Refaat Sedky Soliman

Title: Automated Compilation Framework for Scratchpad-based Real-time Systems

Date: June 18, 2019

Time: 2:30 PM

Place: E5 4106-4128

Supervisor(s): Pellizzoni, Rodolfo



Scratchpad local memory (SPM) is highly adopted in real-time systems as it exhibits a predictable behaviour. SPM is managed using the software by explicitly inserting instructions to move code and data between the SPM and the main memory. However, it is a tedious job to manually modify the code to insert memory transfers. Hence, an automated compilation tool is essential to efficiently utilize the SPM. Another key problem with SPM is the latency suffered by the system due to the memory transfers. Hiding this latency is important for high-performance systems. In this thesis, we address the problem of managing SPM and reducing the impact of the memory latency. To realize the automation of our work, we developed a compilation framework based on the LLVM compiler to analyze and transform the program code. We exploit our framework to improve the performance of the execution of single and multi-tasks in real-time systems. For the single task execution, WCET is of great importance to assure correct and safe behaviour of the system. So, we propose a WCET-driven allocation technique for data SPM that employs software prefetching to efficiently manage the SPM and to overlap the memory transfer and the task execution in a predictable way. On the other hand, multi-tasking requires the system to be schedulable such that all the tasks can meet their timing requirements. However, executing multiple tasks on a multi-processor platform suffers from the contention of the accesses to the shared main memory. To avoid the contention, several scheduling techniques adopted the 3-phase execution model which executes the task as a sequence of memory and computation phases. This provides the means to avoid the contention as well as to hide the memory latency by using a DMA engine. Using the 3-phase model in systems with limited size SPM may necessitate a segmentation of the task. Automating the segmentation process is important especially for systems with large task sets. Hence, we propose a set of efficient segmentation algorithms that follow the 3-phase execution model. The application of these algorithms shows a significant improvement in the system schedulability. For our segmentation algorithms to be more applicable, we extend the 3-phase model to allow programs with multiple paths represented as conditional DAGs, unlike the previous works that targeted sequential programs. We also introduce a multi-steaming model to exploit the benefits of prefetching by overlapping the memory and computation phases of the same task, which was not allowed in the previous approaches. By combining the automated compilation with the proposed algorithms, we can efficiently manage data SPM in real-time systems.