Flash in Devices

Flash in Phones and Tablets: One Board, Two Memories

How phone and tablet flash is packaged with LPDDR, from PoP to ePoP and uMCP, and what Android’s memory manager, F2FS and encryption do with it.

On this page 7 sections

In February 2015, Samsung began mass producing ePoP. It was a single package of 3GB of LPDDR3 DRAM, 32GB of eMMC and a controller, and it sat directly on top of a phone’s processor. Two memories that had needed two footprints on the board now needed one. How a maker packages them decides what a spec sheet shows and what a buyer can choose.

A phone processor with a DRAM package stacked on it and a flash package beside itA side view of a phone board. A processor package sits on the board with a DRAM package stacked on top of it. A separate flash package sits beside them. Copper solder balls join each package to the board.GUIDE / FLASH IN DEVICESDRAM on top, flash beside itLPDDR · FLASH · PoP · ePoP · uMCPBOARDLPDDRprocessorflash

Part 1, UFS Explained, covers the link between a phone and its flash, and Part 2, eMMC Explained, covers the older one. This part covers what surrounds both of them, meaning how flash and LPDDR share a package, how makers pair storage with RAM, and what Android does to keep working data out of flash and stored data encrypted.

Two memories share one board

LPDDR is DRAM designed for low power, and a phone keeps its working data there. Whatever has to survive a power cut goes in flash. Micron’s 1-gamma LPDDR5X is sampling with a 10.7Gb/s speed grade, against 7.5Gb/s for its earlier 1-beta LPDDR5X, in what Micron calls the industry’s thinnest LPDDR5X package. Samsung’s newly developed 10.7Gb/s LPDDR5X allows a single mobile DRAM package of up to 32GB. Flash sits behind its own interface, which Part 1 covers.

Two memories share one board

LPDDR stacks on the processor, and flash sits in its own package

A side view of a phone board. On the left, a processor package sits on the board with a DRAM package stacked on top of it, labeled as a package-on-package stack that holds working data. On the right, a separate flash package sits on the board and holds stored data. A line along the board links the processor to the flash package and is labeled interface.BOARDLPDDRworking dataprocessorPACKAGE-ON-PACKAGE STACKflashstored dataSEPARATE PACKAGElinkprocessor and DRAMflashsolder ball
Figure 1 · Side view, not to scale. The conventional arrangement as Samsung describes it: the processor and DRAM form a package-on-package stack, and the eMMC is a separate package. The flash reaches the processor over its own interface. Source: Samsung ePoP press release, February 2015.

Figure 1 shows the conventional arrangement. In a package-on-package (PoP) stack, the DRAM package sits on top of the processor package, and the flash is a separate package beside them. Foundry-made versions of the stack are in Photolithography Part 6. Samsung’s description of a conventional PoP puts the processor and DRAM stack at 15 × 15mm and the eMMC beside it at 11.5 × 13mm.

ePoP and uMCP put both memories in one package

Samsung’s ePoP replaces that arrangement with one package. It holds 3GB of LPDDR3 running at 1,866Mb/s over a 64-bit interface, 32GB of eMMC and a controller. It takes no board space beyond the 225mm² the processor already occupies, which cuts the area of the conventional layout by about 40%. The height limit of 1.4mm is met as well. Samsung added that it already sold a similar package for wearables, which it called wearable memory, and that the phone version could serve high-end tablets.

Micron took a different route. On October 20, 2020, it launched uMCP5, which it called the first multichip package to pair UFS storage with LPDDR5. It uses UFS 3.1, and a phone built around it saves 55% of circuit board space against separate LPDDR5 and UFS parts, by Micron’s count. Its DRAM bandwidth reaches up to 6,400Mb/s, 50% above the 4,266Mb/s of the previous LPDDR4x generation.

ePoP and uMCP put both memories in one package

Three layouts: PoP with eMMC, single-package ePoP, and uMCP5

Three panels. Panel 1, PoP and eMMC: a processor and DRAM stack of 15 by 15 millimeters beside a separate 11.5 by 13 millimeter eMMC package, 374.5 square millimeters in all. Panel 2, ePoP: 3GB of LPDDR3, 32GB of eMMC and a controller stacked on the processor, 225 square millimeters in all, a 1.4 millimeter height limit and about 40% less area. Panel 3, uMCP5: UFS 3.1 and LPDDR5 in one package, from 128+8GB up to 256+12GB, with 55% less board space.01 PoP AND eMMCprocessor and DRAM15 × 15mmeMMC, separate11.5 × 13mm374.5mm² in all02 ePoP3GB LPDDR332GB eMMCand a controller225mm² in all1.4mm height limitabout 40% less area03 uMCP5UFS 3.1 and LPDDR5in one package128+8GB up to256+12GB55% less board spaceprocessor and DRAMflash
Figure 2 · The 40% compares ePoP with a PoP stack plus a separate eMMC. The 55% compares uMCP5 with stand-alone LPDDR5 and UFS parts. The baselines differ, so the two percentages do not compare with each other. Source: Samsung ePoP and Micron uMCP5 press releases.

Figure 2 sets the three layouts side by side. The two percentages have different baselines. Samsung’s 40% is against a PoP stack plus a separate eMMC, and Micron’s 55% is against stand-alone LPDDR5 and UFS parts, so they do not compare with each other. uMCP5 comes in four pairs. They are 128+8GB, 128+12GB, 256+8GB and 256+12GB, with NAND first and LPDDR5 second. Its NAND is rated for 5,000 program/erase cycles, an improvement of around 66% in Micron’s words.

A spec sheet that lists 12GB and 256GB does not say which layout holds them, and that is the maker’s documentation to read.

Storage tiers come with fixed amounts of RAM

Micron sold its package in fixed pairs, and tablets show the same habit from the buyer’s side. Apple’s specifications for the iPad Pro 13-inch (M4) show 8GB of RAM on the 256GB and 512GB models and 16GB on the 1TB and 2TB models. Memory bandwidth is 120GB/s on every tier, so the larger storage tiers get twice the RAM and the same bandwidth.

Storage tiers come with fixed amounts of RAM

iPad Pro RAM doubles from the 512GB to the 1TB storage tier

Vertical bars of RAM by storage tier for the iPad Pro 13-inch (M4). The 256GB and 512GB tiers each have 8GB of RAM. The 1TB and 2TB tiers each have 16GB of RAM.RAM, GB04812168GB256GB8GB512GB16GB1TB16GB2TBStorage tier8GB of RAM16GB of RAM
Figure 3 · Apple lists 120GB/s of memory bandwidth for every tier, so the RAM size is the only memory figure that changes with storage. Source: Apple, iPad Pro 13-inch (M4) tech specs.

Figure 3 plots Apple’s pairs. A buyer who wants the larger RAM has to choose a larger storage tier first. Storage also gates a feature, since the same page allows ProRes video recording up to 4K at 30fps and limits the 256GB model to 1080p at 30fps. Apple’s page gives no reason for either pairing. A footnote defines 1GB as 1 billion bytes and warns that the available space is less than the listed capacity.

Android keeps working data out of flash

Android’s developer documentation names three kinds of memory on a device, RAM, zRAM and storage. A part of RAM, zRAM, serves as compressed swap space, and Android does not use storage for swap because frequent writing wears the flash and shortens its life. Memory is managed in pages of typically 4KB. When RAM runs short, the kernel’s kswapd can move cached private dirty pages and anonymous dirty pages into zRAM, where they are compressed, and a page is not written out to flash to make room.

Android keeps working data out of flash

Android compresses cold pages in RAM and never swaps to flash

Two blocks. On the left, RAM holds running apps in pages of typically 4KB and a zRAM area, a compressed swap space, below them; an arrow marked compress runs from the apps down to zRAM. When zRAM is not enough, the low memory killer daemon, lmkd, ends processes. On the right, storage holds the file system. A dashed line between RAM and storage is crossed out and marked no swap.RAMrunning appspages of typically 4KBlmkd ends processes at the limitcompresszRAMcompressed swap spaceSTORAGEfile systemapps and datano swapRAMstorageswap path
Figure 4 · Pages move into zRAM, a compressed area of RAM, before any process is ended. Storage holds the file system and is not used for swap, because frequent writing wears it. Source: Android Developers, memory allocation among processes; Android Open Source Project, low memory killer daemon.

Figure 4 shows where the line falls. When compression is not enough, Android kills processes. Early versions relied on a driver inside the kernel for that, and since kernel 4.12 the low memory killer daemon, lmkd, has done it from user space. This design protects the flash by spending RAM.

F2FS writes the way flash prefers

Android’s own examples of file-based encryption mount the user data partition as F2FS. The kernel documentation describes the Flash-Friendly File System as built for NAND flash storage such as SSDs, eMMC and SD cards, and it is log-structured. A log-structured file system writes all modifications sequentially into a log, divides the log into segments, and uses a cleaner to gather the live data out of fragmented segments.

F2FS writes the way flash prefers

F2FS keeps six logs open, split by how often blocks change

Two rows of three. The node row has a hot log for directory node blocks, a warm log for other direct node blocks and a cold log for indirect node blocks. The data row has a hot log for directory entries, a warm log for other data blocks and a cold log for multimedia and migrated blocks.01 NODE LOGShotdirectorynode blockswarmother directnode blockscoldindirectnode blocks02 DATA LOGShotdirectoryentrieswarmother datablockscoldmultimedia andmigrated blockshot, changes oftenwarmcold, rarely
Figure 5 · Hot, warm and cold logs for node blocks and for data blocks, as F2FS allocates them by default. Directory entries go to the hot data log; multimedia and migrated blocks go to the cold one. Source: Linux kernel documentation, Flash-Friendly File System (F2FS).

Figure 5 shows the six logs F2FS keeps open at once, hot, warm and cold for its node blocks and for its data blocks. Directory entries go to the hot data log, and the cold data log takes multimedia and migrated blocks. Separating blocks by how often they change is one of the ways F2FS cuts cleaning overhead.

F2FS also lines itself up with the flash below it. It expects its section size to match the garbage-collection unit of the flash translation layer, and it spreads the sections of its active logs across zones where it can. Cleaning runs on demand when free segments run short, and in the background when the system is idle. With real-time discard enabled, F2FS sends discard (TRIM) commands for the segments it cleans. Part 1 covers the device’s own controller, which does the matching work on its side.

Encryption sits in the path to the flash

Android has supported file-based encryption (FBE) since version 7.0, and every device launching with Android 10 or higher must use it. Each user gets Credential Encrypted storage, which opens only after unlock, and Device Encrypted storage, which is also available during Direct Boot before the user unlocks. FBE runs on both the Ext4 and F2FS file systems.

Encryption sits in the path to the flash

Inline crypto hardware encrypts data on its way to the flash

A write passes left to right through four blocks: the app writes a file, F2FS applies file-based encryption, the host controller's inline crypto engine encrypts the data, and the UFS device stores ciphertext. Below the host controller, a key hardware block holds the raw key under Android 11 hardware-wrapped keys and sends a subkey up to the inline crypto engine.01 A WRITE GOES DOWN THE PATHappwrites a fileF2FSfile-basedencryptionhost controllerinline cryptoengineUFS devicestoresciphertext02 KEY HARDWAREholds the raw keyAndroid 11wrapped keyssubkeysoftwareflashdata and key path
Figure 6 · Inline encryption hardware encrypts and decrypts data between the host and the storage device. With hardware-wrapped keys, from Android 11, only dedicated hardware knows the raw key and loads a subkey into the engine. Source: Android Open Source Project, file-based encryption and hardware-wrapped keys.

Figure 6 follows a write down to the flash. Android recommends inline encryption hardware, which encrypts and decrypts data on its way to and from the storage device, to improve performance and cut power use. Common kernels 4.14 and higher carry the framework, with an option for UFS. Android 11 added hardware-wrapped keys. Only dedicated hardware knows the raw key, and software works with it in wrapped form while the hardware loads a subkey into the inline crypto engine, usually in the UFS or eMMC host controller. The aim is protection against cold boot attacks and against leaks of system memory.

Reading a phone or tablet specification

A line such as 12GB and 256GB gives two numbers and leaves three questions open. One is whether the RAM is tied to the storage tier, as it is on the iPad Pro. Another is whether the two memories share a package, which the maker’s documentation shows, as with ePoP and uMCP5. Last comes the storage interface and its version, which Part 1 sorts out.

Reading a phone or tablet specification

A line of 12GB and 256GB hides three questions the maker answers

A spec line reading 12GB and 256GB sits at the top. Three lines run down to three panels. Panel 1, tied to a tier: the iPad Pro 13-inch has 8GB with 256GB or 512GB and 16GB with 1TB or 2TB. Panel 2, one package: ePoP holds LPDDR3 and eMMC, and uMCP5 holds UFS 3.1 and LPDDR5, and the maker says which. Panel 3, which interface: UFS or eMMC and which version, with Part 1 covering UFS and Part 2 covering eMMC.12GB + 256GB01 TIED TO A TIER?iPad Pro 13-inch8GB with 256GBor 512GB16GB with 1TBor 2TB02 ONE PACKAGE?ePoPLPDDR3 and eMMCuMCP5UFS 3.1 and LPDDR5the maker says03 WHICH INTERFACE?UFS or eMMCand which versionPart 1 covers UFSPart 2 coverseMMCspec line and its questionslink
Figure 7 · One spec line, three checks: whether the RAM comes with the storage tier, whether the two memories share a package, and which interface and version the storage uses. The examples are Apple's iPad Pro, Samsung's ePoP and Micron's uMCP5. Source: Apple iPad Pro tech specs; Samsung ePoP and Micron uMCP5 press releases.

Figure 7 puts the three questions beside a spec line. Capacity is a fourth check, since the maker’s count and the space a user can fill differ by the footnote above. Anyone comparing two tablets should compare the storage tier, the RAM that comes with it and the UFS version, and treat packaging as a detail the datasheet supplies when it matters.

Part 6, Flash in Small Devices, leaves the pocket for the routers, cameras and watches that boot from flash chips with a handful of pins.

KEEP GOING / NEXT CHAPTERContinue to Part 6

Sources

Primary is the original paper, standard or datasheet. Secondary is a review, a vendor summary or a news report. Measured is my own test data.

Show all 10 sources, 10 primary