WCET-aware data selection and allocation for scratchpad memory

In embedded systems, SPM (scratchpad memory) is an attractive alternative to cache memory due to its lower energy consumption and higher predictability of program execution. This paper studies the problem of placing variables of a program into an SPM such that its WCET (worst-case execution time) is minimized. We propose an efficient dynamic approach that comprises two novel heuristics. The first heuristic iteratively selects a most beneficial variable as an SPM resident candidate based on its impact on the k longest paths of the program. The second heuristic incrementally allocates each SPM resident candidate to the SPM based on graph coloring and acyclic graph orientation. We have evaluated our approach by comparing with an ILP-based approach and a longest-path-based greedy approach using the eight benchmarks selected from Powerstone and Malardalen WCET Benchmark suites under three different SPM configurations. Our approach achieves up to 21% and 43% improvements in WCET reduction over the ILP-based approach and the greedy approach, respectively.

[1]  Sri Parameswaran,et al.  Hardware/software managed scratchpad memory for embedded system , 2004, IEEE/ACM International Conference on Computer Aided Design, 2004. ICCAD-2004..

[2]  Gerard J. M. Smit,et al.  A mathematical approach towards hardware design , 2010, Dynamically Reconfigurable Architectures.

[3]  David A. Patterson,et al.  Computer Architecture, Fifth Edition: A Quantitative Approach , 2011 .

[4]  David A. Patterson,et al.  Computer Architecture: A Quantitative Approach , 1969 .

[5]  Ting Chen,et al.  Efficient detection and exploitation of infeasible paths for software timing analysis , 2006, 2006 43rd ACM/IEEE Design Automation Conference.

[6]  Heiko Falk,et al.  Optimal static WCET-aware scratchpad allocation of program code , 2009, 2009 46th ACM/IEEE Design Automation Conference.

[7]  Sri Parameswaran,et al.  A novel instruction scratchpad memory optimization method based on concomitance metric , 2006, Asia and South Pacific Conference on Design Automation, 2006..

[8]  Luca Benini,et al.  An integrated hardware/software approach for run-time scratchpad management , 2004, Proceedings. 41st Design Automation Conference, 2004..

[9]  Jingling Xue,et al.  Scratchpad allocation for data aggregates in superperfect graphs , 2007, LCTES.

[10]  Jean-François Deverge,et al.  WCET-Directed Dynamic Scratchpad Memory Allocation of Data , 2007, 19th Euromicro Conference on Real-Time Systems (ECRTS'07).

[11]  Allen Goldberg,et al.  Applications of feasible path analysis to program testing , 1994, ISSTA '94.

[12]  Xianfeng Li,et al.  Chronos: A timing analyzer for embedded software , 2007, Sci. Comput. Program..

[13]  Heonshik Shin,et al.  Dynamic scratchpad memory management for code in portable systems with an MMU , 2008, TECS.

[14]  Hui Feng,et al.  Compiler-directed scratchpad memory management via graph coloring , 2009, TACO.

[15]  Isabelle Puaut,et al.  Scratchpad memories vs locked caches in hard real-time systems: a quantitative comparison , 2007 .

[16]  Ting Chen,et al.  WCET centric data allocation to scratchpad memory , 2005, 26th IEEE International Real-Time Systems Symposium (RTSS'05).

[17]  Peter Marwedel,et al.  Overlay techniques for scratchpad memories in low power embedded processors , 2006, IEEE Transactions on Very Large Scale Integration (VLSI) Systems.

[18]  Sumesh Udayakumaran,et al.  Compiler-decided dynamic memory allocation for scratch-pad based embedded systems , 2003, CASES '03.

[19]  Ying Zhang,et al.  Comparability graph coloring for optimizing utilization of stream register files in stream processors , 2009, PPoPP '09.

[20]  Hui Wu,et al.  Optimal WCET-aware code selection for scratchpad memory , 2010, EMSOFT '10.

[21]  Jens Knoop,et al.  Scratchpad memory allocation for data aggregates via interval coloring in superperfect graphs , 2010, TECS.

[22]  Luca Benini,et al.  A post-compiler approach to scratchpad mapping of code , 2004, CASES '04.

[23]  Minming Li,et al.  Minimizing WCET for Real-Time Embedded Systems via Static Instruction Cache Locking , 2009, 2009 15th IEEE Real-Time and Embedded Technology and Applications Symposium.

[24]  Krishna V. Palem,et al.  Scheduling Time-Critical Instructions on RISC Machines , 1993, ACM Trans. Program. Lang. Syst..

[25]  Peter Marwedel,et al.  WCET-aware static locking of instruction caches , 2012, CGO '12.

[26]  Mahmut T. Kandemir,et al.  Dynamic management of scratch-pad memory space , 2001, Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232).

[27]  Björn Lisper,et al.  Data cache locking for higher program predictability , 2003, SIGMETRICS '03.

[28]  Björn Lisper,et al.  Data cache locking for tight timing calculations , 2007, TECS.

[29]  Henrik Theiling,et al.  Compile-time decided instruction cache locking using worst-case execution paths , 2007, 2007 5th IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS).