The Brains Behind Storage: What Does a NAND Flash Memory Controller Actually Do?

By Katrin Zinn

Technical Marketing Manager

Hyperstone

August 12, 2022

Blog

The Brains Behind Storage: What Does a NAND Flash Memory Controller Actually Do?

The conversation around NAND flash-based storage systems has become muddled. Often when people discuss storage, they only talk about the NAND flash memory, overlooking the separate, yet equally essential component, the controller. But why is the controller needed at all? Simply put, nothing works without it.

NAND flash memory controllers, or "controllers" for short, are designed for different interfaces like PCIe, eMMC, SD, SATA, and USB in different qualities and for different use cases. What they have in common is that they manage the data on the NAND flash. This storage technology has become increasingly popular over the last decade, and it is impossible to imagine our world today without it.

The steady progress in the development of NAND flash technology towards 3D structures has, with the help of complex controllers and firmware, managed to replace the HDD as the most widely used mass storage medium. Simultaneously, the challenges for the controller are becoming greater in order to perform tasks such as error correction, mapping, garbage collection, and data refreshing.

So, what are the advantages of one controller and its firmware over another and what are the differences?

Controllers and Their Basic Functions:   

   

The controller is the brain behind any NAND flash storage system. It ensures that the data received from the host is sent to the flash memory and can be retrieved later. It translates and modifies the host system's read/write/status commands into the flash component's various read/write/status commands. It also translates the host's logical block addresses (LBAs) or sector addresses, which are managed by the file system, into addresses on the flash that are organized into blocks and pages. The controller ensures compatibility on both sides and handles any inherent flash deficiencies.

And why not just write the data to the flash using a small program? Surely it can't be that difficult!

NAND flash is inherently unreliable. This is because semiconductors (of which NAND flash is one type) are significantly stressed by heat generated during operation. In addition, electrons migrate within the silicon, destroying internal structures over time. Since heat moves the electrons, all aging processes are exponentially accelerated as heat increases. The smaller the geometries or cell structures within a semiconductor, the more susceptible the device is to these effects. Today's semiconductors have structures smaller than ever before, and a tremendous amount of development is required to adequately address these effects. 

At the same time, different application areas have different requirements. A semiconductor intended for consumer products that will operate six hours a day, five days a week, for five years primarily at room temperature will be designed differently to an industrial product that will operate 24/7 for more than ten years in an outdoor setting. Concurrently, the amount of data that needs to be stored per area is continually increasing. Flash memory developers' answer to this is to move into the third dimension.

Newer is always better! Let's go for 3D flash, it's cheaper too, isn’t it?

Devices based on NAND flash have the advantages of low power consumption, high speed, and reliability. The cost of a silicon chip is proportional to area and largely independent of what is on it. Therefore, the cost per byte of NAND flash memory depends on how many bits can be stored on a chip of any given size. In this regard, there are several techniques that have been used to increase the storage density of NAND flash.

The first technique was to reduce the size of each individual cell. However, this reduction in size reached its logical limits. It also led to some undesirable side effects, such as larger leakage currents and higher error rates.

Another technique was to store more bits in each cell. Instead of a single-level cell (SLC) that can only store one bit of data, modern flash memories can store two (MLC), three (TLC) or four (QLC) bits per cell, and this development continues. This has meant that precise programming and measurement is required. While this technology increases storage density, it too is only a compromise when considering lower performance, shorter lifetime, and higher error rates.

The main advantage of 3D NAND flash is the cost reduction per byte. This is because more bits can be accommodated in the same area of the chip. The memory cells in a 3D NAND chip are closer together than in a 2D device, where they are spread out on the outside of the surface. Instead of placing an array of memory cells across the surface of the chip, modern flashes create multiple layers of memory cells to create a full three-dimensional structure within the silicon. This allowed for much greater storage capacity in the same area and, just as importantly, shorter connections to the data, which in turn allowed for faster data transfers.

While 3D NAND flash may be the right choice in terms of storage capacity and cost per byte, effective use of 3D NAND flash memory depends heavily on the flash memory controller. Sophisticated mechanisms in the controller are needed to efficiently manage the large memory capacity, minimize the impact of cell programming, and ensure maximum lifetime and reliability within the towering cell structures.

So, what characterizes a good controller?

There are many differences in the range of functions and features of controllers. You can basically divide controllers into two categories: DRAM-based and DRAM-less controllers.

DRAM-less controllers are ideal for use in industrial settings or applications that require absolute data reliability (medical technology devices or mobile radio stations). Controllers with DRAM may enable a higher performance, however, when it comes to reliability, DRAM-less controllers are the better alternative as they guarantee data transfers onto the NAND flash. In the event of a sudden power failure, data being processed through DRAM-based controllers will lose the data passing through the DRAM cache as soon as it is no longer supplied with power. Furthermore, one less component is also one less cost, consideration, and potential complication.

Cells age over time and lose their charge state; the value of a cell "flips" and a so-called bit flip happens. A controller can detect these incorrect bits and compensate for them with the help of error correction. If these bit errors accumulate, however, the controller must take countermeasures. Most flash controllers include a refresh algorithm that detects when the data becomes old and thus unstable, e.g., by timestamping or recording bit error statistics. Less expensive controllers detect and check data only when it is read, i.e., only when the host requests a read. More sophisticated controllers schedule drive scans of all data as another background maintenance operation.

Reading a block in a page can also have a negative impact on the physical data quality of neighbouring pages over time. To counteract this, controllers have Read Disturb Management that monitors reads in flash and updates the surrounding data as needed.

 

Self-Monitoring, Analysis, and Reporting Technology (SMART) provides information about the health and lifetime of the NAND flash memory. It allows users to monitor the life of the flash device based on various attributes. For example, spare blocks, erase operations, total number of reads or total number of ECC errors can be counted and the lifetime can be accurately estimated if the corresponding data can be retrieved from the flash. This feature is standard on ATA interfaces. However, in other demanding applications for which Hyperstone controllers are designed, this functionality is also implemented for other interfaces, such as USB or SD and dem accordingly.  With the knowledge of the particular use case, based on the SMART data, the design can also be adapted accordingly. Depending on the requirements, controller and firmware can be optimized in terms of cost, performance, or reliability.

Are these high-end features also available for SD cards or USB drives?

Yes, infact specifically for these products, which were designed to be cheap, there is a parallel universe, an ecosystem of controllers, firmware, manufacturing, and storage providers whose focus is reliability and long-term availability.

 

Hyperstone’s new SD controller, the S9, was designed with turnkey firmware to meet the needs of even the most demanding applications. For extended life and high data integrity, the controller includes FlashXE® ECC and hyReliability™ features. The hyMap® Flash Translation Layer ensures only minimal write amplification with the highest endurance. The result: efficient use of NAND flash and lowest failures. The functional scope is supplemented by the hySMART™ monitoring tool. Additional security features which can be implemented in the S9S version of Hyperstone’s controller using an Application Programming Interface (API).

When it comes to storage systems and controllers, there are many alternatives both in terms of interface options and quality. To achieve a design that considers trade-off between performance and reliability as well as cost and benefit, a lot of insight and experience is required. Hyperstone can assist not only from a design and consulting standpoint but also with a range of controllers and complete solutions, such as µSD cards with firmware customizations for special applications. If data storage is vital to your application or failure would result in expensive downtime, it is key to choose your controller and storage technology carefully.


Katrin Zinn is a Technical Marketing Manager responsible for the product management of Hyperstone controllers from their introduction and throughout their entire product life. Thanks to her experience in sales, she understands the needs of customers, their unique requirements and use cases. She studied Economy and Politics of East Asia at the Ruhr University Bochum.

Katrin Zinn is a Technical Marketing Manager responsible for the product management of Hyperstone controllers from their introduction and throughout their entire product life. Thanks to her experience in sales, she understands the needs of customers, their unique requirements and use cases. She studied Economy and Politics of East Asia at the Ruhr University Bochum.

More from Katrin

Categories
Storage