ROM, RAM and Flash understanding

Source: Internet
Author: User

Rom and Ram refer to the semiconductor memory, ROM is the abbreviation ofRead on LY memory, RAM is the abbreviation of random Access memory. Rom can still hold data while the system is powered off, and ram usually loses data after power-down, typical RAM is the memory of the computer.

There are two main types of RAM, a static RAM, which is very fast, is the fastest storage device to read and write, but it is also very expensive, so it is only used in very demanding places, such as CPU Ram/sram, level two buffering. Another known as Dynamic RAM (Ram/dram), DRAM retains data for a short time and is slower than SRAM, but it is faster than any ROM, but the price of DRAM is much cheaper than SRAM, and computer memory is DRAM.

There are many types of dram, common mainly fpram/fastpage, Edoram, SDRAM, DDR RAM, RDRAM, Sgram, and Wram, which are described in one of the DDR RAM.

DDR RAM (Double-date-rate RAM) is also known as DDR SDRAM, which is basically the same as the improved RAM and SDRAM, except that it can read and write two of times on a single clock, thus doubling the data transfer speed. This is the most used memory in the current computer, and it has a cost advantage, in fact defeating Intel's other memory standard-rambus DRAM. On many high-end graphics cards, high-speed DDR RAM is also available to increase bandwidth, which significantly improves the pixel rendering capabilities of 3D accelerator cards.

How Memory Works

Memory is used to store data and programs that are currently in use (that is, in progress), the memory of the computer we refer to is dynamic memory (that is, DRAM), the so-called "dynamic" in dynamic memory, that is, when we write data to DRAM, the data is lost after a period of time, Therefore, an additional circuit is required for the memory refresh operation.

The specific work process is this: a DRAM storage unit is stored in 0 or 1 depending on whether the capacitor has an electric charge, an electric charge represents 1, and no charge represents 0. But a long time, representing 1 of the capacitance will discharge, representing 0 of the capacitance will absorb the charge, this is the reason for the loss of data; The refresh operation periodically checks the capacitance, if the charge is greater than 1/2 of the charge, it is considered to represent 1, and the capacitance is fully charged, if the charge is less than 1/2, it is considered to represent 0 To maintain the continuity of the data.

There are many types of ROM, the prom is a programmable rom,prom and EPROM (erasable programmable ROM) The difference is that the prom is a one-time, that is, after the software is poured, it can not be modified, this is an early product, it is now impossible to use, The EPROM is a kind of universal memory by wiping out the original program by ultraviolet light irradiation. Another type of EEPROM is an electronic erase, which is very expensive, has a long write time, and writes slowly.

For example, mobile phone software is generally placed in the EEPROM, we call, some of the last dialed number, is currently in the SRAM, not immediately write through the record (call record saved in the EEPROM), because there is very important work (call) to do, if written, The long wait is unbearable to the user.

Flash memory, also known as Flash, combines the advantages of ROM and RAM, not only with electronic erasable programmable (EEPROM) performance, but also without power loss data can be quickly read data (NVRAM advantage), u disk and MP3 used in this kind of memory. In the past 20 years, embedded systems have been using ROM (EPROM) as their storage devices, but in recent years Flash has replaced the ROM (EPROM) in the embedded system, Used as storage bootloader as well as operating system or program code or directly on the hard disk (USB drive).

There are two main flash and Flash and NADN Flash.

Nor Flash read the same as our common SDRAM read, the user can directly run the code loaded in nor flash, which can reduce the capacity of SRAM and thus save costs.

NAND Flash does not take the memory of random read technology, its reading is in a single read a piece of the form, usually read 512 bytes at a time, the use of this technology flash relatively inexpensive. The user cannot directly run the code on NAND flash, so a lot of the development boards using NAND flash use a small nor flash to run the startup code in addition to the NAND Flah.

Generally small-capacity with nor Flash, because of its fast reading speed, much to store the operating system and other important information, while the large capacity of NAND flash, the most common NAND flash applications are embedded system using the doc (disk on Chip) and our usual "flash disk", can be erased online. The current flash on the market mainly comes from Intel,amd,fujitsu and Toshiba, while the main manufacturers of NAND Flash are Samsung and Toshiba.

Comparison of NAND Flash and NOR flash

Nor and NAND are two of the main non-slipped technologies in the market today. Intel first developed nor Flash technology in 1988, radically altering the original eminence of Eprom and EEPROM. Then, in 1989, Toshiba released the NAND flash structure, emphasizing lower cost per bit, higher performance, and easily upgradeable through interfaces like disks. But after more than 10 years, there are still quite a few hardware engineers who are not clear nor and NAND flash.

The phase "flash memory" can often be used interchangeably with the phase "nor memory". Many in the industry are also confused about the superiority of NAND flash technology to nor technology, because in most cases flash memory is used only to store a small amount of code, and nor flash memory is more appropriate. NAND is an ideal solution for high data storage densities.

Nor is the main non-slipped technology currently on the market. Nor is generally used only to store a small amount of code, nor is it primarily used in code storage media. Nor is characterized by simple application, no special interface circuit, high transmission efficiency, it belongs to in-chip execution (XIP, execute in place), so that the application can be directly in the (nor type) flash flash memory, no longer need to read the code into the system RAM. It is cost-effective to 1~4MB small capacity, but very low write and erase speeds greatly affect its performance. NOR Flash has an SRAM interface with enough address pins to be addressable, which makes it easy to access every byte inside of it. NOR Flash occupies much of the capacity for the 1~16MB flash market.

The NAND structure provides very high cell density, high storage density, and fast write and erase speeds. The difficulty of applying NAND lies in the management of Flash and the need for special system interfaces.

1, performance comparison:

Flash Flash memory is non-volatile memory, can be called Block of memory unit block for Erasure and re-programming. The write operation of any flash device can only be done within an empty or erased unit, so in most cases the erase must be performed before the write operation. The erasure of NAND devices is straightforward, and nor does it require that all bits in the target block be written to 1 before erasing.

Since the erase nor device is carried out in a 64~128kb block, the time to perform a write/erase operation is 5s, in contrast, the erasure of the NAND device is carried out in a 8~32kb block, and the same operation is performed for up to 4ms.

The difference in block size when performing the erase further widens the performance gap between nor and NADN, and the statistics show that for a given set of writes (especially when updating small files), more erase operations must be done in the nor-based unit. This way, when choosing a storage solution, the designer must weigh the following factors:

* Nor reads a bit faster than NAND.

* NAND writes much faster than nor.

* NAND's 4ms erase speed is much faster than nor 5s.

* Most write operations require a wipe operation first.

* The NAND erase unit is smaller and the corresponding erase circuit is less.

(Note: NOR FLASH Sector erase time depending on the brand, size and different, for example, 4M FLASH, some sector erase time is 60ms, and some need maximum 6s. )

2, interface differences:

NOR Flash has an SRAM interface with enough address pins to be addressable, which makes it easy to access every byte inside of it.

NAND devices use complex I/O ports to sequentially access data, and the methods of each product or vendor may vary. 8 pins are used to transmit control, address, and data information.

NAND read and write operations take a 512-byte block, which is a bit like a hard drive to manage such operations, and it is natural that NAND-based storage can replace hard disks or other block devices.

3. Capacity and Cost:

NAND Flash unit sizes are almost half the size of nor devices, and because of the simpler production process, NAND structures can provide higher capacity within a given mold size and correspondingly lower prices.

Nor Flash occupies the bulk of the 1~16MB flash market, while NAND flash is used only in 8~128MB products, which also shows that nor is it primarily used in code storage media, NAND is suitable for data storage, NAND in CompactFlash, The largest share of Secure Digital, PC cards and MMC memory cards is in the market.

4. Reliability and Durability:

One of the key issues to consider when using flahs media is reliability. Flash is a very suitable storage solution for systems that require extended MTBF. The reliability of nor and NAND can be compared from three aspects of longevity (durability), bit switching and bad block handling.

A) Life (durability)

The maximum number of erase times per block in the NAND flash memory is 1 million, and nor is 100,000 times the number of erase writes. In addition to the 10:1 block erase cycle advantage of NAND memory, the typical NAND block size is 8 times times smaller than nor, and each NAND memory block is removed less frequently within a given time.

B) Bit Exchange

All flash devices are subject to the phenomenon of bit switching. In some cases (rarely, NAND occurs more often than nor), a bit (bit) is reversed or is reported reversed.

One change may not be obvious, but if it happens on a critical file, this small glitch can lead to system downtime. If you just report a problem, read it a few times and it can be solved.

Of course, if this bit really changes, then the error detection/error correction (EDC/ECC) algorithm must be used. Bit reversal issues are more common in NAND flash, NAND vendors recommend using NAND flash while using the EDC/ECC algorithm.

This problem is not fatal when storing multimedia information in NAND. Of course, if you are using a local storage device to store operating systems, configuration files, or other sensitive information, you must use the EDC/ECC system to ensure reliability.

C) Bad block handling

The bad blocks in the NAND device are randomly distributed. There have been efforts to eliminate the bad block, but found that the yield is too low, the price is too high, it is not cost-effective.

The NAND device requires an initial scan of the media to discover the bad block and mark the bad block as unavailable. In devices that have been made, failure to do so through a reliable method will result in high fault rates.

5. Easy to use:

You can use nor-based flash memory very directly, you can connect like other storage, and you can run code directly on it.

NAND is much more complex due to the need for I/O interfaces. Access methods for various NAND devices vary by manufacturer.

When using a NAND device, you must write to the driver before you can continue with other operations. Writing information to NAND devices requires considerable skill, as designers must never write to bad blocks, which means that virtual mapping is required throughout the NAND device.

6. Software support:

When discussing software support, you should distinguish between basic read/write/erase operations and high-level software for disk emulation and flash management algorithms, including performance optimizations.

No software support is required to run code on nor devices, and in the same operation on NAND devices, drivers are often required, i.e. memory technology drivers (MTD), and NAND and nor devices require MTD for both write and erase operations.

There is a relatively small amount of MTD required to use nor devices, and many vendors offer more advanced software for nor devices, including the M-system TrueFFS driver, which is driven by Wind River System, Microsoft, QNX software Used by vendors such as System, Symbian, and Intel.

The drive is also used to simulate and manage NAND flash for diskonchip products, including error correction, bad block handling, and loss balancing.

NOR Flash is the main supplier of Intel, micro and other manufacturers, used to be flash mainstream products, but now by the NAND flash squeeze more uncomfortable. Its advantage is that you can run the program directly from Flash, but the process is complex, the price is more expensive.

NAND Flash is the main supplier of Samsung and Toshiba, in the U disk, all kinds of memory cards, MP3 player is the flash, because of the different process, it has more storage capacity than nor flash, and cheap. But there are also shortcomings, that is, can not be addressed directly to run the program, can only store data. In addition, NAND FLASH is very prone to bad areas, so it needs to have a checksum algorithm.

Use NAND flash to store data and programs on your PDA, but you must have nor FLASH to start. In addition to Samsung processors, other mainstream processors that are used in handheld computers do not support direct NAND FLASH startup programs. Therefore, you must first start the machine with a small nor FLASH, in the OS and other software from the NAND flash loaded into the SDRAM run only, very troublesome.

DRAM Use the MoS tube gate capacitance on the charge to store information, once the power-down information will be lost all, because the gate will be leakage, so every time you need a refresh mechanism to recharge these gate capacitance, and every time after reading the data also need to recharge the charge, this is called dynamic refresh, So it is called dynamic random memory. Since it uses only one MOS tube to store information, the level of integration can be high and the capacity can be made very large. SDRAM is one more than it synchronizes with the CPU clock.

SRAM uses registers to store information, so once the power down, the data will be all lost, as long as the power supply, its data will always exist, do not need dynamic refresh, so called static random memory.

The above is mainly used in the system memory, large capacity, do not need to save data after the power outage.

Flash ROM uses the capacitance stored on the floating grille to store the information, because the floating grid will not leak, so the information can still be saved after the power outage. Also because of its simple mechanism, the integration can be done very high, capacity can be very large. Before the Flash ROM is written, it needs to be wiped with electricity, and the EEPROM can be in byte (bytes), and the Flash ROM can only be in sector (sector) units. However, it can be written in byte units. Flash ROM is mainly used for bios,u disks, MP3 and other devices that require large capacity and power loss without data loss.

ROM, RAM and Flash understanding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.