EDN logo


Design Feature: July 4, 1996

Designing with flash memory: a tool exhibition

Markus Levy,
Technical Editor

Flash memory has evolved from a single EPROM replacement to an integral part of many systems. The development tool's importance has increased with the application's complexity. Only a handful of vendors, however, provides the tools to help you navigate the flash-memory maze.

With flash memory fast achieving iconlike status in the design community, you might think that flash has become a standard product, like DRAM. But, flash memory is available in countless varieties with many densities, package types, erase-block sizes, operating voltages, and programming algorithms. However necessary such a smorgasbord may be for supporting a wide range of applications, it brings complications to your design. If device compatibility and design simplicity are important, you should probably explore other options before becoming a flash convert. If you do use flash, be sure to check out design tools that can help you.

Some flash vendors tout the ease of use of their devices. Consequently, these vendors offer minimal or no tool support—hardware or software—for your designs. Other vendors have gone in the opposite direction and have created an abundance of support tools. Their philosophy is that, when quick time to market is critical, you can never get enough support.

The down side to the variety of flash devices is the lack of compatibility. Program-and-erase algorithms, pinouts, and supply voltages vary from vendor to vendor. Incompatibility is not a problem if you use one device and solder it to the motherboard. But, if you

want to switch devices, you must be able to redesign a board or to multiplex the functionality of a few pins. Depending on what flash devices you plan to accommodate, a flexible design may be too difficult, because the flash interfaces may vary too much (Figure 1). For example, the standard NOR flash devices have an 8- or a 16-bit parallel-data interface, compared with the NAND flash's multiplexed address/ data interface, compared with the serial data interfaces used with several flash EEPROM devices.

Software compatibility may be even trickier than hardware interfacing. If your hardware accommodates different flash devices, you probably have to write different program-and-erase algorithms. Be careful: In some cases, the difficult part is not writing the algorithm; watch for device program-and-erase performance differences that may affect your application. Even if the vendors claim to have algorithmically compatible designs, the devices could differ by something as mundane as the device-ID value.

Soldering the flash components to the system board ensures that the corresponding algorithms are part of your system. But, a more difficult situation arises if you use flash single in-line memory modules (SIMMs) or PCMCIA cards (PC Cards), in which the user determines which flash to install. Your system must read the flash's JEDEC identifier or the card's card-information structure (CIS) to determine the installed flash type. System software must then determine the appropriate algorithms to use. If the algorithms are unavailable, the system must gracefully reject the card.

Many vendors offer their flash devices within a PC Card with an ATbus-attachment (ATA) interface. The ATA interface hides the differences of the flash devices from the end user; the card functions as a disk drive. To build your own cards, you can obtain controller chips that mate specific flash devices to the ATA interface. Silicon Systems' (SSI's) 36C3951 controller ($30 (100)) bridges Intel's NOR flash and the ATA interface. The 36C3951 supports as many as 10 flash devices, regardless of the density. SSI offers a reference design, which includes sche-matics and source-code firmware. The reference design specifies an 80C188 to handle the basic housekeeping.

SSI offers the 36C3950 controller that supports the Toshiba/Samsung/National Semiconductor NAND flash memories. The 36C3950 has a programmable sequencer, which allows the controller to handle different page and block sizes, depending on the NAND flash's density. The controller runs the sequencer, issues commands, reads and buffers data, performs error-correction code (ECC), and negotiates the transfer to the host. The 36C3950's ($25 (100)) reference design uses an 8051 to do basic tasks. Cirrus Logic also offers an ATA controller for NAND flash, but the company sells the device only or non-PCMCIA designs; that is, components mounted on the system board. Cirrus provides a reference design that includes schematics and firmware.

Most flash vendors, at a minimum, offer application notes and source code to support their devices. Intel takes design-information sharing a step further with a Windows-based tool, SoftwareBuilder. The tool guides you through algorithm development (Figure 2). SoftwareBuilder is a hypertext version of Intel's flash-memory data book and includes all the program-and-erase algorithms in C and assembly. You can cut and paste the algorithms directly into your application. The tool also contains a flash-cycling utility that provides a quantitative profile of flash-memory cycling due to periodic system updates. The cycling utility allows you to change system parameters (for example, the read-to-write ratio) and determine how they affect cycling at various time intervals.

Processors with integrated flash
Vendors have long integrated various types of memory in their µCs. Recent improvements in process technology make it possible to add flash to the list of on-chip memory types. On-chip flash allows you to quickly change code without having to remove the device or purchase a device, as in the case of one-time-programmable memory. And, theoretically, on-chip flash is less expensive to manufacture than EEPROM. On-chip flash also results in fast memory access, exemplified by NEC's V853 µC with 128-kbyte, 30-nsec access NOR flash.

The V853 accepts serial data for programming into the chip's flash memory. The serial data enters the V853's UART and clocked-serial interface (CSI) at transfer rates up to 76,800 bps and 1 Mbps, respectively. You need to design a serial port on your target system, which you connect to the V853's UART or CSI, which is then connected to NEC's flash-programmer tool (similar to an EPROM programmer). For programming in the field, you download the new firmware code into the target system's serial port after placing the device in program mode.

Motorola's 16-bit HC12 µC contains 32 kbytes of on-chip flash. The HC12 supports a background-debug-mode (BDM) feature that you use primarily to set hardware breakpoints. The BDM communicates off-chip using a single-wire implementation. Once your HC12-based product is in the field, you don't want end users making updates to the flash through the BDM, because it gives them access to all on-chip resources. The on-chip flash has a 1-kbyte boot block that is separate from the rest of the flash array. This boot block does not erase when you bulk erase the on-chip flash. To erase this boot block, you have to change a bit in one of the chip's registers. You should use the boot block to store enough code to initialize the basic system functionality, including the code that controls the programming of the device through a serial port.

Atmel's AT89x, an 80C52-compatible µC, contains up to 8 kbytes of flash and 2 kbytes of EEPROM. A C series has byte-writeable, block-erasable flash. The S series' on-chip flash is programmable and erasable at the single-byte level but is guaranteed for only 1000 cycles. Typically, this guarantee is adequate for any application in which you perform an occasional code update. You can use the chip's serial peripheral interface for programming the flash without CPU intervention.

If debugging algorithms is making you a flash agnostic, Grammar Engine offers a real-time flash-memory emulator, FlashIce. The $1995 tool monitors, verifies, and responds to flash commands and logs all flash activity. You can use the information to profile actual flash usage on a block basis, to project cycling rates, and to ensure proper wear leveling. Currently, the tool supports only 8-bit AMD flash and 8- and 16-bit Intel flash. You can choose to use an external or a parasitic power supply under FlashIce. For $395 more, Grammar Engine offers TSOP and PSOP emulation cables, which you can solder directly to your target or plug in to Meritec's TSOP and PSOP sockets.

If you're using flash memory for anything beyond basic reads and writes, you want to integrate flash media-management software, which handles cleanup and wear leveling. A fundamental characteristic of flash memory is that you must erase it before you can rewrite it. Therefore, as you replace old data with new, the flash software should write the new data to an erased portion of the flash array and leave the old data intact until you need to reclaim the dirty space. Wear leveling ensures that you equally cycle each flash-erase block, so that the flash media doesn't develop overused portions, or "hot spots."

Vendors offer several types of flash media-management software. Your application should determine your choice. The software ranges from basic data loggers to solid-state disks (SSDs).

The original file system for a flash-based SSD was Microsoft's (Redmond, WA) flash-file system (FFS). Poor performance and a large system-memory footprint (68 kbytes) were the nails in the FFS's coffin. Today, the most popular file system for SSDs is based on the flash-translation-layer (FTL) format, which M-Systems developed and sells. (You can obtain FTL from SystemSoft and Phoenix Technologies, and Microsoft plans to include FTL support in the next release of Windows 95.) FTL is a set of data structures, accepted by the PCMCIA, that define how a flash-device driver should store files on the flash media. FTL, similar to a RAM disk, turns physical memory locations into virtual sectors, so that the flash media behaves as a mechanical disk. (For more information on the FTL file system, check out the Web page http://www.systemsoft.com/wpapers/flash.htm.)

Some embedded applications, such as digital cameras and handheld organizers, store data in a PC-compatible file format to allow you to transfer the data back to a PC. M-System's FTL product, targeting a DOS- or Windows-compatible system, may provide more file-system capabilities than an embedded application needs. M-Systems and Intel codeveloped a light form of the FTL-file system to better accommodate these "reduced-functionality" applications. This product, FLite, works with every computing platform, including processors, such as the 8051. Although FLite supports the file-allocation-table (FAT) file system, you can select which features to incorporate. For example, a digital camera that stores images doesn't need subdirectory support. M-Systems offers an FLite development kit, which includes the FLite source code plus the pieces of software required for a PCMCIA-compatible interface (card services and socket services, for example).

Datalight offers another DOS/Windows-compatible FFS, variable-block flash (VBF). The 6-kbyte VBF kernel supports Intel and AMD flash. The file system writes data in variable lengths up to 64 kbytes, as opposed to the FTL file system, which writes a sector at a time. The VBF's data is incompatible with the PCMCIA-standard FTL. But, for systems with only onboard flash (that is, not PCMCIA), the VBF's incompatibility does not cause a problem.

Some applications, such as answering machines, don't need FTL compatibility or can't accommodate the FTL file manager's code size. Intel has developed a virtual-small-block (VSB)-flash-file manager (VFM) that tracks all aspects of files broken into sectors or into VSBs and manages the flash media. VFM maintains wear leveling and cleanup. VFM is also portable to any operating system (OS) or hardware platform and is, therefore, not burdened by PC-compatibility requirements. Intel provides reference code in C, so that you can compile VFM for any processor.

Intel also offers source code for a linear file manager (LFM) that maintains data as continuous, variably sized file objects rather than as sectors. LFM contiguously stores the file objects in a partition and arranges them in a one-way linked list. You should use a file manager, such as LFM, if your application must execute-in-place (XIP) or perform other functions in which the data cannot be broken. LFM is a device driver, not a complete file system.

Most embedded PCs and real-time OSs (RTOSs) come with ready-made flash memory support; the flash integration has already been done. The level of support ranges from BIOS storage to SSDs. QNX Software Systems' Posix-certified microkernel OS is an example of an RTOS with flash support. QNX has developed its own drivers for FTL, but, instead of the standard DOS device-driver interface, the interface looks like a standard Posix/ANSI I/O.

Nexcom offers an application-development board, FDB1, and associated firmware ($595) that use the company's flash memory in a digital voice recorder. FDB1 serves as a reference design and provides a firmware example of the basic read-and-erase/write instruction sequences. The board comes in 5 and 3V versions. The 3V version includes a dual-AAA battery pack that powers the entire board, when active, at approximately 15 mA.

Basic hardware-design tools

Flash-hardware-design tools, al-though not unique to flash, include behavioral models, I/O-buffer-information-specification (IBIS) models, timing models, and Gerber layout files. Synopsys licenses VHDL and Verilog models for Intel and AMD devices. Synopsys' models, called "SmartModels," are available in executable code only. SmartModels are bus-functional models that you can use for subsystem simulation and software development. If you are developing a system with another company's flash, you can use Synopsys' custom-modeling service to develop the appropriate model.

IBIS models are useful to simulate and determine electrical stability of high-speed buses. IBIS models provide information on a device's I/O electrical characteristics at various operating conditions, such as voltages and temperatures. You can use IBIS models to resolve issues related to the analog behavior of flash components, such as overshoot, undershoot, ringing, and transmission-line effects. You can also import the ASCII IBIS text file for the flash device into a Spice simulation.

To help you perform timing analysis, Chronology offers its TimingDesigner models. These models are interactive data books with electronic diagrams that you can view and manipulate with TimingDesigner. After you purchase TimingDesigner for $2000, all models are free. The package runs under Windows, NT, and Unix. Currently, Chronology supports only the Intel flash but has set the model's timing parameters in a spreadsheet format, so that you can change the fundamental parameters.

For board layout, ask the flash vendor if it can provide you with Gerber layout files for its devices. Gerber files are electronic representations of footprint dimensions and pin-pad locations. Schematic symbols are also helpful for designing your system using schematic capture. OrCad (Beaverton, OR) and Viewlogic (Marlborough, MA) schematic symbols are available for many flash-memory components.

Flash's most prevalent application, typically for code storage, is EPROM replacement. In this application, the advantages of flash include just-in-time (JIT) manufacturing and in-field upgrading. JIT manufacturing allows you to load the system's code just before a product ships, making simple customization or last-minute changes. JIT also allows you to add test code before loading the final operating code.

You can use several methods to load code into flash. The more traditional method is to use a commercially available programmer. (There are at least 20 companies that offer such devices.) The surface-mounting PLCC and TSOP packages, frequently used for flash, make using dedicated programming equipment and subsequently transferring the devices to the application board difficult and expensive. Soldering the components to the pc board and using onboard programming (OBP) are easier. OBP uses off-board hardware to control the update operations after first isolating the pc board from the rest of the system. The OBP powers down the processor or holds it in a high impedance state. The disadvantage of OBP is that it requires additional hardware. For example, to link the OBP to the pc board, the design engineer may require adding an interface connector. Isolating the processor or other system components may also require additional hardware in the form of jumpers, FET switches, or tri-state buffers.

Looking ahead
Flash is starting to move into high-volume consumer products, especially digital cameras. According to TechnoSystems Research (Japan), sales of these cameras will increase from 278,000 in 1995 to 5.5 million in 1999. The memory capacity of flash-storage cards used in these cameras will also increase, from 2 to 4 Mbytes for 0.3 million pixels to 15 to 30 Mbytes for 2 million to 4 million pixels. Intel and SanDisk (Santa Clara, CA) are distributing small cards in a number of applications, including digital cameras, personal digital assistants, and ruggedized handheld computers. Microsoft plans to include FTL support in the next release of Windows 95. This implementation will make developing flash applications easier.

OBP, however, can eliminate the need to include a voltage converter on your board. Many flash devices feature single-voltage operation, in which the same voltage is used for read and program. Some devices still require an extra programming voltage, that is, 12V. Intel and Micron offer flash devices that program with 5 or 12V, automatically switching, depending on the supplied voltage. This voltage-switching capability, SmartVoltage, can be beneficial for OBP. If you can supply 12V to the flash, it programs 30% faster than with a 5V supply. This speed allows you to perform faster programming during manufacturing. Once the system is in the field, the system can supply 5V to the flash.

If your board contains a JTAG-compliant µP and you can tolerate long programming times, use the JTAG test-access port (TAP) to program the flash memory. Corelis Inc, a maker of JTAG TAP equipment, offers a JTAG 1149.1 boundary-scan controller in a PCMCIA format. This controller can program 0.5 Mbytes of flash in less than 1.5 minutes. The PCMCIA-1149.1 controller sells for $2950.

Alternatively, designers are using automatic test equipment (ATE) to program flash at full speed. Software enables the ATE to drive signals on test points that contact appropriate flash- memory-device pins and disable test points that do not contact flash-memory pins. You can create program-and-erase algorithms on your ATE and incorporate them into the test flow to program the flash. A basic ATE setup, such as one from Teradyne, costs $50,000 to $500,000, plus $18,000 for the flash-programming portion.

Manufacturers of flash and flash-related products
Flash manufacturers
AMD
Austin, TX
(512) 462-4360
www.amd.com
Atmel Corp
San Jose, CA
(408) 441-0311
www.atmel.com
Catalyst Semiconductor
Sunnyvale, CA
(408) 752-9600
www.catsemi.com
Intel Literature Center
Mount Prospect, IL
(800) 548-4725
www.intel.com
ISSI
Sunnyvale, CA
(408) 733-4774
Micron Technology Inc
Boise, ID
(208) 368-3900
www.micron.com
Mitsubishi Electronics America
Sunnyvale, CA
(408) 730-5900
Motorola
Phoenix, AZ
(800) 441-2447
www.mot.com
National Semiconductor
Santa Clara, CA
(800) 272-9959
www.national.com
NEC Electronics Inc
Mountain View, CA
(800) 366-9782
Nexcom Technology Inc
Sunnyvale, CA
(408) 730-3690
Samsung Semiconductor Inc
San Jose, CA
(408) 954-6972
www.sec.samsung.com
SGS-Thomson
Microelectronics
Lincoln, MA
(617) 259-0300
www.st.com
Sharp Microelectronics Corp
Mahwah, NJ
(201) 529-8200
SST
Sunnyvale, CA
(408) 735-9110
Texas Instruments Inc
Dallas, TX
(800) 477-8924
www.micro.ti.com
Toshiba America
Electronic Co
Irvine, CA
(714) 455-2000
www.toshiba.com
Xicor Inc
Milpitas, CA
(408) 432-8888
www.xicor.com
Flash-support products
Chronology Corp
Redmond, WA
(206) 869-4227
www.chronology.com
Cirrus Logic
Fremont, CA
(510) 623-8300
www.cirrus.com
Corelis Inc
Cerritos, CA
(310) 926-6727
www.corelis.com
Datalight
Arlington, WA
(360) 435-8086
www.datalight.com
Grammar Engine Inc
Westerville, OH
(614) 899-7878
www.gei.com
M-Systems
Santa Clara, CA
(408) 654-5820
www.m-sys.com
Meritec
Painseville, OH
(216) 354-3148
Microsoft Corp
Redmond, WA
(206) 882-8080
www.microsoft.com
Phoenix Technologies Ltd
Norwood, MA
(617) 551-4000
QNX Software Systems Ltd
Kanata, ON, Canada
(613) 591-0931
www.qnx.com
Silicon Systems Inc
Tustin, CA
(714) 731-7110
Synopsys
Mountain View, CA
(415) 694-4272
www.synopsys.com
SystemSoft
Natick, MA
(508) 651-0088
www.systemsoft.com
Teradyne Inc
Walnut Creek, CA
(800) 420-8456


References

  1. Dipert, Brian, and Markus Levy, Designing with Flash Memory, Annabooks, San Diego, CA, 1993. (ISBN: 0-929392-17-5.) To order, call (800) 462-1042.

  2. Levy, Markus, "High-density flash memory now a practical option for system design,"EDN, Feb 16, 1995, pg 53.

  3. Introduction to On-Board Programming with Intel Flash Memory, Intel Corp, Order number 292179.

  4. On-board programming of OTP EPROM, AN620, SGS-Thomson.

Acknowledgment

Special thanks to Brian Dipert at Intel.

You can reach Technical Editor Markus Levy at (916) 939-1642, fax (916) 939-1650, e-mail ednlevy@mcimail.com.


| EDN Access | feedback | subscribe to EDN! |
| design features | out in front | design ideas | columnist | departments | products|


Copyright © 1996 EDN Magazine. EDN is a registered trademark of Reed Properties Inc., used under license.