Efficient Scratchpad Allocation Algorithms for Energy Constrained Embedded Systems

  • Manish Verma
  • Lars Wehmeyer
  • Peter Marwedel
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3164)


In the context of portable embedded systems, reducing energy is one of the prime objectives. Memories are responsible for a significant percentage of a system’s aggregate energy consumption. Consequently, novel memories as well as novel memory hierarchies are being designed to reduce the energy consumption. Caches and scratchpads are two contrasting variants of memory architectures. The former relies completely on hardware logic while the latter requires software for its utilization. Most high-end embedded microprocessors today include onchip instruction and data caches along with a scratchpad.

Previous software approaches for utilizing scratchpad did not consider caches and hence fail for the prevalent high-end system architectures. In this work, we use the scratchpad for storing instructions. We solve the allocation problem using a greedy heuristic and also solve it optimally using an ILP formulation. We report an average reduction of 20.7% in instruction memory energy consumption compared to a previously published technique. Larger reductions are also reported when the problem is solved optimally.

The scratchpad in the presented architecture is similar to a preloaded loop cache. Comparing the energy consumption of our approach against that of preloaded loop caches, we report average energy savings of 28.9% using the heuristic.


Memory architectures Memory allocation Energy aware compilation Integer Linear Programming Memory energy modeling 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    ARM. Advanced RISC Machines Ltd.,
  2. 2.
    Avissar, O., Barua, R., Stewart, D.: An Optimal Memory Allocation Scheme for Scratch-Pad-Based Embedded Systems. IEEE Transactions on Embedded Computing Systems 1(1), 6–26 (2002)CrossRefGoogle Scholar
  3. 3.
    Banakar, R., Steinke, S., Lee, B.-S., Balakrishnan, M., Marwedel, P.: Scratchpad Memory: A Design Alternative for Cache On-chip Memory in Embedded Systems. In: Proc. of 10th International Symposium on Hardware/Software Codesign, Colorado, USA (May 2002)Google Scholar
  4. 4.
    Bellas, N., Haji, I., Polychronopoulos, C., Stamoulis, G.: Architectural and Compiler Support for Energy Reduction in Memory Hierarchy of High Performance Microprocessors. In: Proceedings of the International Symposium on Low Power Electronics and Design ISPLED, Monterey, CA, USA (August 1999)Google Scholar
  5. 5.
    Berkelaar, M.: lp_solve: a Mixed Integer Linear Program solver, available from:
  6. 6.
    CPLEX. CPLEX Ltd.,
  7. 7.
    Department of Computer Science XII, University of Dortmund. ENCC.,
  8. 8.
    Department of Computer Science XII, University of Dortmund. MEMSIM,
  9. 9.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide To the Theory of NP-Completeness. Freeman, New York (1979)zbMATHGoogle Scholar
  10. 10.
    Gordon-Ross, S.C.A., Vahid, F.: Exploiting Fixed Programs in Embedded Systems: A Loop Cache Example. Computer Architecture Letters (January 2002)Google Scholar
  11. 11.
    Hennessy, J.L., Patterson, D.A.: Computer Architecture: A Quantitative Approach, 3rd edn. Morgan Kaufmann, San Francisco (2003)zbMATHGoogle Scholar
  12. 12.
    Kamble, M., Ghosh, K.: Analytical Energy Dissipation Models for Low Power Caches. In: Proceedings of the International Symposium on Low Power Electronics and Design ISPLED, Monterey, CA, USA (August 1997)Google Scholar
  13. 13.
    Lee, L.H., Moyer, B., Arends, J.: Instruction Fetch Energy Reduction Using Loop Caches For Embedded Applications with small Tight Loops. In: Proceedings of the International Symposium on Low Power Electronics and Design ISPLED, San Diego, CA, USA (August 1999)Google Scholar
  14. 14.
    Marwedel, P., Wehmeyer, L., Verma, M., Steinke, S., Helmig, U.: Fast, predictable and low energy memory references through architecture-aware compilation. In: Proceedings of the Asia and South Pacific Design Automation Conference ASPDAC 2004 (to appear, 2004)Google Scholar
  15. 15.
  16. 16.
    Panda, P.R., Dutt, N.D., Nicolau, A.: Memory Issues in Embedded Systems-On-Chip. Kluwer Academic Publishers, Norwell (1999)CrossRefGoogle Scholar
  17. 17.
    Pettis, P., Hansen, C.: Profile guided code positioning. In: Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation. ACM SIGPLAN (June 1990)Google Scholar
  18. 18.
    Steinke, S., Knauer, M., Wehmeyer, L., Marwedel, P.: An Accurate and Fine Grain Instruction-Level Energy Model Supporting Software Optimizations. In: Proceedings of International Workshop on Power And Timing Modeling, Optimization and Simulation PATMOS, Yverdon-Les-Bains, Switzerland (September 2001)Google Scholar
  19. 19.
    Steinke, S., Wehmeyer, L., Lee, B.-S., Marwedel, P.: Assigning Program and Data Objects to Scratchpad for Energy Reduction. In: Proceedings of Design Automation and Test in Europe DATE, Paris, France (March 2002)Google Scholar
  20. 20.
    Su, C.-L., Despain, A.M.: Cache Design Trade-Offs and Performance Optimization: A Case Study. In: Proceedings of the International Symposium on Low Power Design ISLPD, pp. 63–68 (1995)Google Scholar
  21. 21.
    Tomiyama, H., Yasuura, H.: Optimal Code Placement of Embedded Software for Instruction Caches. In: Proceedings of the 9th European Design and Test Conference ET&TC, Paris, France (March 1996)Google Scholar
  22. 22.
    Wilton, S.J.E., Jouppi, N.P.: CACTI: An Enhanced Cache Access and Cycle Time Model. IEEE Journal of Solid-State Circuits 31(5) (May 1996)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Manish Verma
    • 1
  • Lars Wehmeyer
    • 1
  • Peter Marwedel
    • 1
  1. 1.Department of Computer Science XIIUniversity of DortmundDortmundGermany

Personalised recommendations