Play

← fab24hr Blog

Chip basics7 min read

How is memory different from a processor, and DRAM from flash?

A processor computes, and memory remembers. The processor, also called a logic chip, works through a program step by step, calculating and making decisions; memory holds the program and the data until the processor asks for them. The two most common kinds of memory are DRAM, which is fast but forgets everything when the power goes off (it's the "RAM" on a phone's spec sheet), and flash, which is much slower but remembers without power (it's the phone's "128 GB" or "256 GB" of storage). A phone has all three kinds of chip.

How do the processor and memory split the work?

Think of the processor as you, sitting at a desk.

  • DRAM is the desk: anything spread out on it is within reach, but the desk isn't big, and when the lights go out (power off), it's cleared.
  • Flash is the bookcase: it holds a lot and nothing disappears, but you have to get up to fetch things, so it's slower.

Opening an app is like taking a book off the shelf and opening it on the desk: the program is copied from flash into DRAM, and the processor takes what it needs from DRAM, piece by piece. For the other kinds of chips, start with "What is a chip?".

Why is a processor called a "logic" chip?

What a chip has most of is transistors: tiny switches controlled by electricity, on for 1, off for 0 ("What is a transistor?"). Wire a few switches together and you get small circuits like "output 1 only if both inputs are 1", "output 1 if either input is 1", or "1 in, 0 out". These are called logic gates. Combine logic gates layer upon layer and they can add, compare numbers, and decide what to do next based on a condition. That's where the word "logic" comes from. The processors in computers and phones, and the chips on graphics cards that draw images, are all logic chips.

A processor also carries a little memory of its own, like a notepad next to the desk. It's called SRAM. It uses six transistors to remember one 0 or 1. It needs no refreshing and it's very fast, but it takes up a lot of room, so there's only a little of it, holding what the processor needs in the next instant.

Why does DRAM forget when the power goes off?

One DRAM cell is one transistor plus one capacitor. The capacitor is like a tiny cup: holding charge, it's a 1; empty, it's a 0. The transistor is the cup's door, opened only to read or write.

The trouble is that the cup leaks. The charge slowly drains away. So DRAM has to keep reading every cell and filling it back up. This is called refresh. Under the public standards, at normal temperatures, every cell has to be refreshed every few tens of milliseconds (64 ms in some standards, 32 ms in others), which is roughly 15 to 30 times a second. The D in DRAM stands for "dynamic", and this is what it means. Cut the power and nothing refreshes, so the data is soon gone. Even with the phone's screen off, if what's in DRAM is to stay there, DRAM has to keep refreshing, and that uses a little power too.

What it gets in return is speed: reading a piece of data takes only tens of nanoseconds (a nanosecond is a billionth of a second).

Why does flash remember without power?

A flash cell is also a transistor, but between its gate (the door that controls the switch) and the channel below, there's an extra spot made for holding electrons, sealed all around by insulation, like a little room with no door. To write, a fairly high voltage forces electrons through a very thin insulating layer and locks them in that room. They can't get out, so they stay even when the power is off, typically for years. With electrons locked inside, the switch becomes harder to turn on; to read, the chip checks how easily it turns on, and that tells it whether the cell holds a 0 or a 1.

The price is speed. Pushing electrons in and out takes time, and you can't erase just one cell: a whole block is erased at once. The name "flash" is said to come from exactly that: erasing a big block at one go reminded someone of a camera flash. Even reading takes tens of microseconds (a microsecond is a millionth of a second), hundreds to a thousand times slower than DRAM, and writing and erasing are slower still. Each cell can also be erased and rewritten only so many times, so a control circuit spreads the writes evenly across the cells.

The NAND you see in the news is this kind of flash, the kind in phones and solid-state drives. Its cells are wired one after another in a string, a bit like a logic gate called NAND, and that's where the name comes from. Some spec sheets call a phone's storage "ROM". That's an old name; it's flash too.

Why does a phone need both kinds of memory?

Because each one lacks something:

  • Flash is too slow: a processor reading straight from it would spend its time waiting, and this kind of flash can't run a program directly. The program has to be moved into DRAM first.
  • DRAM forgets, and it costs more: for the same capacity, DRAM is much more expensive, and it's wiped every time the power goes off, so it can't hold your photos.

So photos, apps and the operating system live in flash, and whatever is in use right now is copied into DRAM. A phone's RAM is usually a few GB to a dozen or so, and its storage is often ten times that or more. When you restart a phone, apps open from scratch because DRAM was wiped and everything has to be copied from flash again.

How are memory chips and logic chips made differently?

Memory chips: one kind of cell, repeated billions of times. A DRAM chip has billions to tens of billions of cells, and every cell looks the same, like a huge floor laid with a single kind of tile. The race is to make each cell a bit smaller: the smaller the cell, the more one chip holds, and the cheaper each bit becomes. Because all the cells are alike, designers also add a few spare rows. If testing finds a bad cell in a row, a spare row takes its place and the chip still works, which raises the yield.

Shrinking the cells is hard in a different way for each kind of memory:

  • DRAM: the cup gets narrower but still has to hold enough charge, so it grows upward into tall, thin pillars, tens of times taller than they are wide.
  • Flash: it can't shrink much more on a flat surface, so the cells are stacked layer upon layer, now more than a hundred layers, and then deep, narrow holes are etched from the top down through layer after layer.

Logic chips: more varied circuits, and what counts is switching speed. Much of the circuitry in a processor differs from one part to the next, with few repeating patterns. The wiring is more complex too: the most advanced chips stack ten or more wiring layers, while DRAM usually has far fewer. A logic chip cares most about how fast its transistors switch, so new ways of making transistors often show up in logic chips first. Memory cares more about a cheap bit, so the transistors in the control circuits around the cells are often deliberately not the newest kind.

One more thing: the "2 nm" and "3 nm" in the news are generations of logic chips (see The news says "2 nm". What exactly is 2 nm?). Memory counts its own way: DRAM has its own set of generation codes, and flash is often compared by how many layers it stacks. For the special memory that sits next to AI chips, read "High bandwidth memory (HBM)".

In fab24hr

The R&D line, production fab and test-and-assembly house in the game are fictional. There's no memory maker among them, and the game doesn't say which part of a chip computes and which remembers. The main story, The life of a chip, follows a made-up hearing-aid chip, Glowmere. It's meant to make one button cell last several days longer, so the current the chip still leaks while doing nothing (leakage) is, as the customer's product engineer puts it, the single most important number for this chip. In chapter 10, Standby Current, you're the test engineer: you decide where the limit on that current goes at wafer sort and write it into the test program. Tighten it and yield drops; loosen it and batteries don't last. The companies, chips, people and numbers in the game are fictional; how processors and memory split the work, and how DRAM and flash remember, come from public, general sources. For other jargon, see Chip fab jargon in plain English.

Where you'll meet it in the gameThe main story, The life of a chip, follows a made-up hearing-aid chip, Glowmere, meant to make one button cell last several days longer. In chapter 10, Standby Current, the test engineer decides how much a chip may still leak while doing nothing before it gets stopped.

In fab24hr, how much a chip still leaks while doing nothing is a number the test engineer has to set a limit on.

Start at chapter 10, Standby Current

More articles

More on this site