Wcet-aware function-level dynamic code management on Scratchpad memory

Yooseong Kim, David Broman, Aviral Shrivastava

Research output: Contribution to journalArticlepeer-review

4 Scopus citations


Scratchpad memory (SPM) is a promising on-chip memory choice in real-time and cyber-physical systems where timing is of the utmost importance. SPM has time-predictable characteristics since its data movement between the SPM and the main memory is entirely managed by software. One way of such management is dynamic management. In dynamic management of instruction SPMs, code blocks are dynamically copied from the main memory to the SPM at runtime by executing direct memory access (DMA) instructions. Code management techniques try to minimize the overhead of DMA operations by finding an allocation scheme that leads to efficient utilization. In this article, we present three function-level code management techniques. These techniques perform allocation at the granularity of functions, with the objective of minimizing the impact of DMA overhead to the worst-case execution time (WCET) of a given program. The first technique finds an optimal mapping of each function to a region using integer linear programming (ILP), whereas the second technique is a polynomial-time heuristic that is suboptimal. The third technique maps functions directly to SPM addresses, not using regions, which can further reduce the WCET. Based on ILP, it can also find an optimal mapping. We evaluate our techniques using the Mälardalen WCET suite, MiBench suite, and proprietary automotive applications from industry. The results show that our techniques can significantly reduce the WCET estimates compared to caches with the state-of-the-art cache analysis.

Original languageEnglish (US)
Article number112
JournalACM Transactions on Embedded Computing Systems
Issue number4
StatePublished - May 2017


  • Code management
  • Hard real-time systems
  • Scratchpad memory (SPM)
  • Worst-case execution time (WCET)

ASJC Scopus subject areas

  • Software
  • Hardware and Architecture


Dive into the research topics of 'Wcet-aware function-level dynamic code management on Scratchpad memory'. Together they form a unique fingerprint.

Cite this