Flash Memory: FTL versus ATA

December 1995 Dr. Dobb's Developer Update

by Kevin Culcasi and Nick Schwartzman

Kevin Culcasi works for Intel, and Nick Schwartzman, for SCM Microsystems.
In emerging flash-memory applications such as digital cameras, voice recorders, and related consumer-electronics products, flash memory is both a data-storage and data-transfer medium. Unlike traditional analog data-storage methods that use magnetic tape and photoresistive film, solid-state recording using flash memory makes it possible for users to transfer captured data to a desktop or notebook PC for manipulation.

There are two types of flash memory cards: linear and ATA (AT Attachment). Linear flash cards consist of an array of flash memory chips mounted on a card with nearly no additional logic required. The memory space is accessed by providing the direct address of the memory array. A host-based file system known as a "flash filing system" is required to emulate a hard-disk drive. In this implementation, the management of the flash media is done by the host processor, operating system, and flash filing system. Linear flash cards are supported by Intel, SCM, M-Systems, SystemSoft, AMD, Microsoft, and other companies.

ATA flash cards, on the other hand, use embedded logic--a microprocessor, RAM, and complex ASIC. This circuitry performs the flash--media management, rather than using the flash filing-system software on the host system. In this implementation, the host operating system views the ATA flash card as an IDE disk drive. The ATA approach to flash memory is supported by companies such as IBM, SanDisk (formerly SunDisk), Apple, Compaq, and Hewlett-Packard. Windows 95 includes built-in support for both linear and ATA-based approaches.

Different Flash Filing-System Solutions

Several methods have been developed for organizing data on the linear flash card using the flash filing system: The most recognized are Flash Translation Layer (FTL) and Flash File System FFS.

FTL is a software driver that acts as a translator between the flash media and the built-in DOS BPB/FAT (BIOS Parameter Block/File Allocation Table) file system. FTL allows the host operating system to view the linear flash card exactly as it would a sector-organized hard-disk drive. This disk emulation makes the flash card compatible with DOS/Windows software, including disk-compression utilities and software-caching programs such as SMARTDRV. FTL contains sophisticated wear-leveling and block retirement schemes, providing effective defect management. Also, since FTL is not a complete file system, its size is quite small, averaging a 21-KB footprint. For more information on flash file systems, see "The Microsoft Flash File System," by Peter Torelli (Dr. Dobb's Journal, February 1995), and "Flash File Systems," by Drew Gislason (Dr. Dobb's Journal, May 1993). Companies supporting the FTL linear flash card approach include Intel and SCM Microsystems.

FFS, on the other hand, is an additional DOS file system and does not work with DOS BPB/FAT. Thus, FFS is relatively large in size (70-90 KB), and incompatible with DOS/Windows programs that use standard low-level BPB/FAT routines to access only sector-organized media such as hard- and floppy-disk drives. Microsoft's approach to FFS-based linear flash support focuses on its "FFS2," which installs under Windows 95.

Linear flash cards can also perform XIP (eXecute In Place) execution of code directly on the flash card without downloading to host-system RAM. (For more details, see "Inside Flash Memory," by Brian Dipert, Dr. Dobb's Journal, October 1995.) ATA flash-card memory space, however, is not directly accessible to the host system due to the ATA hardware layer. For this reason, ATA flash cards can't be viewed as a RAM extension by the host system.

Performance

Is there a performance difference between linear flash and ATA flash cards? To answer this question, let's examine the user model of a typical consumer product, the digital camera. In this application, the user captures perhaps an entire flash card full of digital images. The user then removes the flash card from the camera, inserts it into the PC, manipulates the images if desired, and archives them to the PC's hard-disk drive.

In this application, fast read performance is paramount. Currently, the read performance of Intel linear flash cards with FTL is up to three to four times faster than competitive ATA flash cards tested in the same system environment. In fact, linear flash-card read performance will likely always be faster than ATA because as processor speed increases, operating system and FTL software overhead diminish, and the native card-access speed (approximately 150ns for the Intel Series 2+ card) becomes more attainable to the host application software. Also, as flash-component access times decrease through semiconductor engineering gains and linear flash-card design does away with front-end decoding logic (removing dual ASICs on Intel Series 2/2+cards, for example), card access speed becomes even faster. Comparatively, strict ATA/IDE interface timings and I/O access dictate ATA flash-card access speed, which can never reach "native" component access speed due to the ATA hardware layer.

Flash memory technology inherently offers very fast read rates and moderate write rates. Also, flash data cannot be overwritten: Part of the flash component must first be erased before writing to it. This operation is known as "clean-up," and occurs whenever attempting to write to a previously written area on the flash component (also known as "dirty" flash). For these reasons, all flash cards (linear and ATA) offer faster read rates than write rates.

On average, the Intel Series 2+ fully erased card-write performance is 70 percent faster than competitive ATA flash cards. It must be noted though, that some ATA flash cards gain an advantage over linear flash cards as the flash memory becomes more "dirty."

In digital cameras and other consumer products that use flash cards, getting the data back to the PC is of ultimate importance. Clearly, this requires fast read rates-something that both linear and ATA card manufacturers will be pushing for in the future. In short, linear flash is more suitable for consumers because it is cheaper and uses off-the-shelf components.

DDJ