skip to main content
10.1145/1250734.1250776acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Offline compression for on-chip ram

Published:10 June 2007Publication History

ABSTRACT

We present offline RAM compression, an automated source-to-source transformation that reduces a program's data size. Statically allocated scalars, pointers, structures, and arrays are encoded and packed based on the results of a whole-program analysis in the value set and pointer set domains. We target embedded software written in C that relies heavily on static memory allocation and runs on Harvard-architecture microcontrollers supporting just a few KB of on-chip RAM. On a collection of embedded applications for AVR microcontrollers, our transformation reduces RAM usage by an average of 12%, in addition to a 10% reduction through a dead-data elimination pass that is also driven by our whole-program analysis, for a total RAM savings of 22%. We also developeda technique for giving developers access to a flexible spectrum of tradeoffs between RAM consumption, ROM consumption, and CPU efficiency. This technique is based on a model for estimating the cost/benefit ratio of compressing each variable and then selectively compressing only those variables that present a good value proposition in terms of the desired tradeoffs.

References

  1. C. Scott Ananian and Martin Rinard. Data size optimizations for Java programs. In Proc. of the 2003 Conf. on Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 59--68, San Diego, CA, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Lan S. Bai, Lei Yang, and Robert P. Dick. Automated compiletime and run-time techniques to increase usable memory in MMUless embedded systems. In Proc. of the Intl. Conf. on Compilers, Architecture, and Synthesis for Embedded Systems (CASES), Seoul, Korea, October 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Gogul Balakrishnan and Thomas Reps. Analyzing memory accesses in x86 executables. In Proc. of the Intl. Conf. on Compiler Construction (CC), pages 5--23, Bonita Springs, FL, April 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. Ross Bannatyne. Microcontrollers for the automobile. Micro Control Journal, 2004. http://www.mcjournal.com/articles/arc105/arc105.htm.Google ScholarGoogle Scholar
  5. Max Baron and Cheryl Cadden. Strong growth to continue for MCU market, 2005. http://www.instat.com/press.asp?ID=1445&sku=IN0502457SI.Google ScholarGoogle Scholar
  6. Volker Barthelmann. Inter-task register-allocation for static operating systems. In Proc. of the Joint Conf. on Languages, Compilers, and Tools for Embedded Systems (LCTES) and Software and Compilers for Embedded Systems (SCOPES), pages 149--154, Berlin, Germany, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Surupa Biswas, Matthew Simpson, and Rajeev Barua. Memory overflow protection for embedded systems using run-time checks, reuse and compression. In Proc. of the Conf. on Compilers, Architecture, and Synthesis for Embedded Systems (CASES), Washington, DC, September 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. David Brooks and Margaret Martonosi. Dynamically exploiting narrow width operands to improve processor power and performance. In Proc. of the 5th Intl. Symp. on High Performance Computer Architecture (HPCA), Orlando, FL, January 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Mihai Budiu, Majd Sakr, Kip Walker, and Seth Copen Goldstein. BitValue inference: Detecting and exploiting narrow bitwidth computations. In Proc. of the European Conf. on Parallel Processing (EUROPAR), Münich, Germany, August 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dominique Chanet, Bjorn De Sutter, Bruno De Bus, Ludo Van Put, and Koen De Bosschere. System--wide compaction and specialization of the Linux kernel. In Proc. of the 2005 Conf. on Languages, Compilers, and Tools for Embedded Systems (LCTES), Chicago, IL, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Trishul M. Chilimbi, Bob Davidson, and James R. Larus. Cacheconscious structure definition. In Proc. of the ACM SIGPLAN 1999 Conf. on Programming Language Design and Implementation (PLDI), pages 13--24, Atlanta, GA, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Nathan Cooprider and John Regehr. Pluggable abstract domains for analyzing embedded software. In Proc. of the 2006 Conf. on Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 44--53, Ottawa, Canada, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. David Gay, Phil Levis, Robert von Behren, Matt Welsh, Eric Brewer, and David Culler. The nesC language: A holistic approach to networked embedded systems. In Proc. of the Conf. on Programming Language Design and Implementation (PLDI), pages 1--11, San Diego, CA, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dirk Grunwald and Richard Neves. Whole-program optimization for time and space efficient threads. In Proc. of the 7th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 50--59, Cambridge, MA, October 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, and Kristofer Pister. System architecture directions for networked sensors. In Proc. of the 9th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 93--104, Cambridge, MA, November 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Jonathan W. Hui and David Culler. The dynamic behavior of a data dissemination protocol for network programming at scale. In Proc. of the 2nd ACM Conf. on Embedded Networked Sensor Systems (SenSys), pages 81--94, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Chris Karlof, Naveen Sastry, and David Wagner. TinySec: A link layer security architecture for wireless sensor networks. In Proc. of the 2nd ACM Conf. on Embedded Networked Sensor Systems (SenSys), Baltimore, MD, November 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Chris Lattner and Vikram Adve. Transparent pointer compression for linked data structures. In Proc. of the ACM Workshop on Memory System Performance (MSP), Chicago, IL, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Bhuvan Middha, Matthew Simpson, and Rajeev Barua. MTSS: Multi task stack sharing for embedded systems. In Proc. of the Intl. Conf. on Compilers, Architecture, and Synthesis for Embedded Systems (CASES), San Francisco, CA, September 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. George C. Necula, Scott McPeak, S. P. Rahul, and Westley Weimer. CIL: Intermediate language and tools for analysis and transformation of C programs. In Proc. of the Intl. Conf. on Compiler Construction (CC), pages 213--228, Grenoble, France, April 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Ozcan Ozturk, Mahmut Kandemir, and Mary Jane Irwin. Increasing on-chip memory space utilization for embedded chip multiprocessors through data compression. In Proc. of the 3rd Intl. Conf. on Hardware/Software Codesign and System Synthesis (CODES+ISSS), pages 87--92, Jersey City, NJ, September 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. The Paparazzi project, 2006. http://www.nongnu.org/paparazzi.Google ScholarGoogle Scholar
  23. Rodric M. Rabbah and Krishna V. Palem. Data remapping for design space optimization of embedded memory systems. ACM Trans. Embedded Computing Systems (TECS), 2(2):1--32, May 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Rahul Razdan and Michael D. Smith. A high-performance microarchitecture with hardware-programmable functional units. In Proc. of the 27th Intl. Symp. on Microarchitecture (MICRO), pages 172--180, San Jose, CA, November 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. John Regehr, Alastair Reid, and Kirk Webb. Eliminating stack overflow by abstract interpretation. ACM Transactions on Embedded Computing Systems (TECS), 4(4):751--778, November 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Mark Stephenson, Jonathan Babb, and Saman Amarasinghe. Bitwidth analysis with application to silicon compilation. In Proc. of the Conf. on Programming Language Design and Implementation (PLDI), pages 108--120, Vancouver, Canada, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Michael Stilkerich, Christian Wawersich, Wolfgang Schröder-Preikschat, Andreas Gal, and Michael Franz. An OSEK/VDX API for Java. In Proc. of the 3rd Workshop on Programming Languages and Operating Systems (PLOS), San Jose, CA, October 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Ben L. Titzer. Virgil: Objects on the head of a pin. In Proc. of the ACM Conf. on Object--Oriented Programming, Systems, Languages, and Applications (OOPSLA), Portland, OR, October 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Ben L. Titzer, Daniel Lee, and Jens Palsberg. Avrora: Scalable sensor network simulation with precise timing. In Proc. of the 4th Intl. Conf. on Information Processing in Sensor Networks (IPSN), Los Angeles, CA, April 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Clark Verbrugge, Phong Co, and Laurie Hendren. Generalized constant propagation: A study in C. In Proc. of the Intl. Conf. on Compiler Construction (CC), Linköping, Sweden, April 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Mark N.Wegman and F. Kenneth Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems (TOPLAS), 13(2):181--210, April 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Lei Yang, Robert P. Dick, Haris Lekatsas, and Srimat Chakradhar. On-line memory compression for embedded systems. ACM Trans. Embedded Computing Systems (TECS), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Youtao Zhang and Rajiv Gupta. Compressing heap data for improved memory performance. Software-Practice and Experience, 36(10):1081--1111, August 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Offline compression for on-chip ram

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2007
          508 pages
          ISBN:9781595936332
          DOI:10.1145/1250734
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 42, Issue 6
            Proceedings of the 2007 PLDI conference
            June 2007
            491 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/1273442
            Issue’s Table of Contents

          Copyright © 2007 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 10 June 2007

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          Overall Acceptance Rate406of2,067submissions,20%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!