Offline compression for on-chip ram

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.

[1]  Koen De Bosschere,et al.  System-wide compaction and specialization of the linux kernel , 2005, LCTES.

[2]  Dirk Grunwald,et al.  Whole-program optimization for time and space efficient threads , 1996, ASPLOS VII.

[3]  John Regehr,et al.  Eliminating stack overflow by abstract interpretation , 2003, TECS.

[4]  Seth Copen Goldstein,et al.  BitValue Inference: Detecting and Exploiting Narrow Bitwidth Computations , 2000, Euro-Par.

[5]  Rajeev Barua,et al.  MTSS: multi task stack sharing for embedded systems , 2005, CASES '05.

[6]  David A. Wagner,et al.  TinySec: a link layer security architecture for wireless sensor networks , 2004, SenSys '04.

[7]  Vikram S. Adve,et al.  Transparent pointer compression for linked data structures , 2005, MSP '05.

[8]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[9]  David E. Culler,et al.  The dynamic behavior of a data dissemination protocol for network programming at scale , 2004, SenSys '04.

[10]  Lei Yang,et al.  Automated compile-time and run-time techniques to increase usable memory in MMU-less embedded systems , 2006, CASES '06.

[11]  Laurie J. Hendren,et al.  Generalized Constant Propagation: A Study in C , 1996, CC.

[12]  Martin C. Rinard,et al.  Data size optimizations for java programs , 2003, LCTES.

[13]  David E. Culler,et al.  System architecture directions for networked sensors , 2000, SIGP.

[14]  Thomas W. Reps,et al.  Analyzing Memory Accesses in x86 Executables , 2004, CC.

[15]  Ben L. T itzer Virgil : Objects on the Head of a Pin , 2006 .

[16]  Mahmut T. Kandemir,et al.  Increasing on-chip memory space utilization for embedded chip multiprocessors through data compression , 2005, 2005 Third IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS'05).

[17]  Wolfgang Schröder-Preikschat,et al.  OSEK/VDX API for Java , 2006, PLOS '06.

[18]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[19]  Volker Barthelmann Inter-task register-allocation for static operating systems , 2002, LCTES/SCOPES '02.

[20]  Mark Stephenson,et al.  Bidwidth analysis with application to silicon compilation , 2000, PLDI '00.

[21]  David E. Culler,et al.  The nesC language: A holistic approach to networked embedded systems , 2003, PLDI.

[22]  Krishna V. Palem,et al.  Data remapping for design space optimization of embedded memory systems , 2003, TECS.

[23]  John Regehr,et al.  Pluggable abstract domains for analyzing embedded software , 2006 .

[24]  Jens Palsberg,et al.  Avrora: scalable sensor network simulation with precise timing , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..

[25]  Rajeev Barua,et al.  Memory overflow protection for embedded systems using run-time checks, reuse, and compression , 2006, TECS.

[26]  James R. Larus,et al.  Cache-conscious structure definition , 1999, PLDI '99.

[27]  Margaret Martonosi,et al.  Dynamically exploiting narrow width operands to improve processor power and performance , 1999, Proceedings Fifth International Symposium on High-Performance Computer Architecture.

[28]  Michael D. Smith,et al.  A high-performance microarchitecture with hardware-programmable functional units , 1994, Proceedings of MICRO-27. The 27th Annual IEEE/ACM International Symposium on Microarchitecture.

[29]  Rajiv Gupta,et al.  Compressing heap data for improved memory performance , 2006, Softw. Pract. Exp..