Reducing RAM requirements with Numonyx® PCM and software

By Kurt Sowa
Numonyx Software Product Manager

This article provides an overview of Numonyx® Phase Change Memory (PCM) memory and how PCM features and performance enable new paradigms in system memory usage. This article also discusses methods for leveraging PCM to reduce the amount of RAM required by a system.

PCM vs. traditional flash memory

PCM is a non-volatile memory based on chalcogenide alloys that exhibit a reversible phase change when heated. PCM memories utilize the change in resistance when the alloy is changed between and amorphous and a crystalline state.

Traditional NOR and NAND flash memories cells are programmed from a “1” to a “0” by raising the charge on a floating gate. Once programmed to a “0,” these devices require that an entire region (block) of cells be erased to “1” before they can be programmed again. PCM memory cells can be programmed from “1” to “0” and from “0” to “1” without requiring a block erase. The ability to change individual bits without requiring erase, along with the read performance and increased reliability, enables new usage models.

Reducing RAM requirements with PCM

The functionality and performance of PCM can be leveraged to reduce the amount of RAM required in a system. The remainder of this article focuses on leveraging the benefits of PCM.

Fast XiP code execution

PCM has a read latency similar to that of NOR flash. Coupled with random access capability, code can be executed directly from PCM. This reduces the RAM required for demand paging or code shadowing. Since there is no latency to page the code to RAM, and frequently executed code remains cached, effective performance is comparable to code executed directly from RAM.

Direct RAM replacement

With bit alterability, PCM can be used as a direct replacement for RAM in many instances. Since there is no need to manage data in blocks for garbage collection, PCM can be used as a RAM replacement without the overhead of complicated memory management routines.

Using PCM for static data

The fast latency and read time of PCM make it suitable for storing static data. Most systems have many examples of data that can be accessed directly from PCM without a performance penalty. Data sets such as keyboard maps, fonts and dictionaries can be located in PCM without the need to shadow them in RAM for system access.

Using PCM for dynamic data

PCM write performance is similar to NAND flash memory. While the write performance is slower than RAM, PCM can also be used to store dynamic data. Infrequently updated data or small data can be stored in PCM with little impact on performance. Since PCM is persistent, a small PCM cache can be used to preserve data across power cycles while maintaining performance.

Storing application data in PCM

Application heap and stack requirements can make RAM usage unpredictable. RAM usage may increase to unacceptable levels, depending on the user model for the application. Increased application usage of RAM can make systems unstable or decrease performance, resulting in a poor user experience.

Moving application data structures to PCM can reduce the amount of RAM required. Analysis of an application can help determine which RAM elements are good candidates for PCM storage (depending on data size, growth potential and frequency of updates).
Moving data to PCM can provide the benefit of maintaining the application state over discrete sessions. An application state can be stored to PCM, improving load performance by removing the need to reload tables, settings and state.

Moving data from RAM to PCM

To use PCM as RAM, PCM should be defined in the system as a memory segment. For static data, the segment can be defined as read-only. For dynamic data, a read-write memory segment should be defined. When building the system and applications, the appropriate elements can be located to the memory segments in PCM.

Memory segmentation for an embedded system is defined when configuring the operating system build environment. Configuration includes defining the memory map for the system. Further refinement can be accomplished for specific applications by setting the location of text, bss or heap segments to the desired memory segment.

If only certain structures or data from an application are needed to be placed into PCM, a pool of memory from a PCM segment can be allocated and managed within the application.

A flash file system that is XiP-enabled, or that supports memory mapped files, can also be used to provide a storage mechanism to elements. This allows simplified management for discrete elements such as fonts, and can also support updates and addition of new data elements.

Numonyx® software and services

In addition to being the industry leader in the development of PCM, Numonyx has a dedicated team of software engineers and memory experts who can help with memory configuration and memory usage models. Numonyx also offers Technology for Memory Optimization (TMO), which is a combination of cutting edge software and services designed to optimize RAM usage and code storage and execution for designs using NOR, NAND or PCM.

Leverage Numonyx experience with memory systems and data management to get the most from your design. For additional information, contact your Numonyx representative.