SPM(Scratchpad Memory)是实时嵌入式系统中常见的片上存储器,其分配管理在编译期进行,从而可以在编译完成时确定访存时延.当前的SPM分配方法主要用于减少程序在平均情况下的执行时间.然而,在硬实时系统中,最差情况下的执行时间(WCET,Worst-Case Execution Time)是更为关键的指标.通过分析优化程序WCET值过程中存在的主要问题以及现有算法,基于变量公用度概念,提出一种启发式搜索算法用于最小化程序WCET值的数据变量SPM分配,实验表明,论文提出的分配方法可获得更好的优化效果.
Scratchpad memory is a popular choice for on-chip storage in real-time embedded systems. The allocation of program elements to scratchpad memory is performed at compile time leading to predictable memory access latencies. Current scratchpad memory allocation techniques mainly improve the average-case execution time of tasks. For hard real-time systems,however,worst case execution time (WCET) is a more important key metric. In this paper,we propose scratchpad allocation techniques for data memory that aim to minimize a task's WCET. We first analyze main problem of optimal allocation process and current works of allocation algorithms. Then,based on common degree of variables,we design a new heuristic searches algorithm that achieves better optimal performance for all our benchmarks.