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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- Ross Bannatyne. Microcontrollers for the automobile. Micro Control Journal, 2004. http://www.mcjournal.com/articles/arc105/arc105.htm.Google Scholar
- Max Baron and Cheryl Cadden. Strong growth to continue for MCU market, 2005. http://www.instat.com/press.asp?ID=1445&sku=IN0502457SI.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- The Paparazzi project, 2006. http://www.nongnu.org/paparazzi.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Youtao Zhang and Rajiv Gupta. Compressing heap data for improved memory performance. Software-Practice and Experience, 36(10):1081--1111, August 2006. Google Scholar
Digital Library
Index Terms
Offline compression for on-chip ram
Recommendations
Offline compression for on-chip ram
Proceedings of the 2007 PLDI conferenceWe 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 ...
Pluggable abstract domains for analyzing embedded software
Proceedings of the 2006 LCTES ConferenceMany abstract value domains such as intervals, bitwise, constants, and value-sets have been developed to support dataflow analysis. Different domains offer alternative tradeoffs between analysis speed and precision. Furthermore, some domains are a ...
Using data compression for increasing memory system utilization
The memory system presents one of the critical challenges in embedded system design and optimization. This is mainly due to the ever-increasing code complexity of embedded applications and the exponential increase seen in the amount of data they ...







Comments