微机原理ch06MEMORYANDMEMORYINTERFACING.doc_第1页
微机原理ch06MEMORYANDMEMORYINTERFACING.doc_第2页
微机原理ch06MEMORYANDMEMORYINTERFACING.doc_第3页
微机原理ch06MEMORYANDMEMORYINTERFACING.doc_第4页
微机原理ch06MEMORYANDMEMORYINTERFACING.doc_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

6 MEMORY AND MEMORY INTERFACING6.1 SEMICONDUCTOR MEMORY FUNDAMENTALSIn the design of all computers, semiconductor memories are used as primary storage for code and data. Semiconductor memories are connected directly to the CPU and they are the memory that the CPU first asks for information (code and data). For this reason, semiconductor memories are referred to as primary memory.6.1.1 Memory capacityThe number of bits that a semiconductor memory chip can store is called its chip capacity. It can be in units of Kbits (kilobits), Mbits (megabits), and so on.This must be distinguished from the storage capacity of computers. While the memory capacity of a memory IC chip is always given in bits, the memory capacity of a computer is given in bytes.6.1.2 Memory organizationMemory chips are organized into a number of locations within the IC. Each location can hold 1 bit, 4 bits, 8 bits, or even 16 bits, depending on how it is designed internally.The number of bits that each location within the memory chip can hold is always equal to the number of data pins on the chip.How many locations exists inside a memory chip depends on the number of address pins. The number of locations within a memory IC always equals 2x where x is the number of address pins.Therefore, the total number of bits that a memory chip can store is equal to the number of locations times the number of data bit per location.To summary:1) Each memory chip contains 2x locations, where x is the number of address pins on the chip.2) Each location contains y bits, where y is the number of data pins on the chip.3) The entire chip will contain 2x y bits, where x is the number of address pins on the chip and y is the number of data pins on the chip.4) The 2x y is referred to as the organization of the memory chip, where x is the number of address pins on the chip and y is the number of data pins on the chip.5) For 2x , use 表 61 to give the number of locations in K or M units.表 61 Powers of 2x2x101K112K124K138K1416K1532K1664K17128K18256K19512K201M212M224M238M2416M324GExample 1A given memory chip has 12 address pins and 8 data pins. Find:1) the organization2) the capacitySolution:1) This memory chip has 4096 locations (212 = 4096), and each location can hold 8 bits of data. This organization of 4096 8, often represented as 4K8.2) The capacity is equal to 32K bits since there is a total of 4K locations and each locations can hold 8 bits of data.Example 2A 512K memory chip has 8 pins for data. Find:1) the organization2) the number of address pins for this memory chipSolution:1) A memory chip with 8 data pins means that each location within the chip can hold 8 bits of data. To find the number of locations within this memory chip, divide the capacity by the number of data pins. 512K/8 = 64K; therefore, the organization for this memory chip is 64K8.2) This chip has 16 address lines since 216 = 64K.6.1.3 SpeedOne of the most important characteristics of a memory chip is the speed at which data can be accessed from it.To access the data, the address is presented to the address pins, and after a certain amount of time has elapsed, the data show up at the data pins. The shorter this elapsed time, the better, and consequently, the more expensive the memory chip.The speed of the memory chip is commonly referred to as its access time. The access time of memory chips varies from a few nanoseconds to hundreds of nanoseconds, depending on the IC technology used in the design and fabrication.6.1.4 ROM (read-only memory)ROM is a type of memory that does not lose its contents when the power is turned off. For this reason, ROM is also called nonvolatile memory.There are different types of read-only memory, such as PROM, EPROM, EEPROM, flash ROM, and mask ROM.6.1.5 PROM (programmable ROM) or OTP ROMPROM is referred to the kind of ROM that the user can burn information into, PROM is a user-programmable memory.For every bit of the PROM, there exists a fuse. PROM is programmed by blowing the fuses (blow a fuse 使保险丝熔断). If the information burned into PROM is wrong, PROM must be discarded since internal fuses are blown permanently. For this reason, PROM is also referred to as OTP (one-time programmable). The process of programming ROM is also called burning ROM and requires special equipment called a ROM burner or ROM programmer.6.1.6 EPROM (erasable programmable ROM)EPROM was invented to allow changes in the contents of PROM after it is burned. In EPROM, one can program the memory chip and erase it thousands of times.All EPROM chip have a window that is used to shine ultraviolet (UV)(紫外线) radiation to erase its contents. The only problem with EPROM is that erasing its contents can take up to 20 minutes. EPROM is also referred to as UV-erasable EPROM or simply UV-EPROM.The major disadvantage of UV-EPROM is that it cannot be programmed while in the system board (motherboard).6.1.7 EEPROM (electrically erasable programmable ROM)EEPROM has several advantages over EPROM, such as the fact that its method of erasure is electrical and therefore instant.6.1.8 Flash memorySince the early 1990s, flash ROM has become a popular user-programmable memory chip. The process of erasure of the entire contents takes only a few seconds, or one might say in a flash, hence its name: Flash memory.The erasure method is electrical and for this reason it is sometimes referred to as Flash EEPROM. To avoid confusion, it is commonly called Flash ROM.The major difference between EEPROM and Flash memory is the fact that when flash memorys contents are erased the entire device is erased, in contrast to EEPROM, where one can erase a desired section or byte. Although there are some flash memories recently made available in which the contents are divided into blocks and the erasure can be done by block, unlike EEPROM, no byte erasure option is available.Some designers believe that flash memory will replace the hard disk as mass storage medium. This would increase the performance of computers tremendously, since flash memory is semiconductor memory with access range of tens of milliseconds. For this to happen, flash memorys program/erase cycles must become infinite, just like hard disks. Program/erase cycle refers to the number of times that a chip can be erased and programmed before it becomes unusable.At this time, the program/erase cycle is 500,000 for flash and EEPROM, 2000 for UV-EPROM, and infinite for RAM and disks.表 62 Examples of ROM memory chipsTypePart NumberSpeed (ns)CapacityOrganizationPinsVppUV-EPROM271645016K2K824252716-135016K2K824252716B45016K2K82412.52732A-4545032K4K824212732A-2020032K4K8242127C3245032K4K824252764A-2525064K8K82812.527C64-1515064K8K82812.527128-20200128K16K82812.527C128-25250128K16K82812.527256-20200256K32K82812.527C256-20200256K32K82812.527512-25250512K64K82812.527C512-25250512K64K82812.527C010-121201M128K83212.527C201-121202M256K83212.527C410-121204M512K83212.5EEPROM28C16A-2525016K2K82452864A25064K8K828528C256-15150256K32K828528C256-25250256K32K8285Flash ROM28F256-20200256K32K8321228F256-15150256K32K8321228F010-202001M128K8321228F020-151502M256K83212In part numbers, C referred to CMOS technology, where 27xx is for UV-EPROM, 28xx for EEPROM.图 61 6116 2K x 8 SRAM6.1.9 Mask ROMMask ROM referred to a kind of ROM whose contents are programmed by the IC manufacturer. In other word, it is not user-programmable ROM. The terminology mask is used in IC fabrication.6.1.10 RAM (random access memory)RAM memory is called volatile memory since cutting off power to the IC will mean the loss of data.There three types of RAM:l static RAM (SRAM)l dynamic RAM (DRAM)l NV-RAM (nonvolatile RAM)6.1.11 SRAM (static RAM)Storage cells in static RAM memory are made of flip-flops and therefore do not require refreshing in order to keep their data. The problem with the use of flip-flops for storage cells is that each cell requires at least 6 transistors to build, and the cell holds only 1 bit of data. In recent years, the cells have been made of 4 transistors, which is still too many.The use of 4-transistor cell plus the use CMOS technology has given birth to a high-capacity SRAM, but the capacity of SRAM is far below DRAM. SRAMs are widely used for cache memory.图 62 6116 2K x 8 SRAMA0-A11 are for address inputs, where 12 address lines gives 16K.I/O0-I/O7 are for data I/O, while 8-bit data lines gives an organization of 2K x 8.WE (write enable) is for writing data into SRAM (active-low).OE (output enable) is for reading data out of SRAM (active-low)CS (chip select) is used to select the memory chip.The following are steps to write data into SRAM:1) Provide the addresses to pins A0-A11.2) Activate the CS pin.3) Make WE = 0 while OE = 14) Provide the data to pins I/O0-I/O7.5) Make WE = 1 and data will be written into SRAM on the positive edge of the WE signal.图 63 Memory write timing for SRAMThe following are steps to read data from SRAM:1) Provide the addresses to pins A0-A11. This is the start of the access time (tAA)2) Activate the CS pin.3) While WE = 1, a high-to-low pulse on the OE pin will read the data out of the chip.图 64 Memory read timing for SRAMIn the 6116 SRAM, the access time, tAA, is measured as the time elapsed from the mount the address is provided to the address pins to the moment that the data is available at the data pins. The speed for the 6116 chip can vary from 100ns to 15ns.The read cycle time (tRC) is defined as minimum amount of time required to read one byte of data. That is, from the moment we apply the addresses of the byte to the moment we can begin the next operation.In SRAM for which tAA = 100ns, tRC is also 100ns. This implies that we can read the contents of consecutive address locations with each taking no more than 100ns. Hence, in SRAM and ROM, tAA = tRC .6.1.12 DRAM (dynamic RAM)Since the early days of the computer, the need for huge, inexpensive read/write memory was a major preoccupation (当务之急) of computer designers. In 1970, Intel Corporation introduced the first dynamic RAM. Its density (capacity) was 1024 bits and it used a capacitor to store each bit. The use of a capacitor as a means to store data cuts down the number of transistors needed to build the cell; however, it requires constant refreshing due to leakage (泄漏).The major advantages of DRAM memory are high density (capacity), cheaper cost per bit, and lower power consumption per bit.The disadvantage is that it must be refreshed periodically, due to the fact that the capacitor cell loses its charge; furthermore, while it is being refreshed, the data cannot be accessed.After the 1K-bit chip came the 4K-bit in 1973, and then the 16K chip in 1976. The 1980s saw the introduction of 64K, 256K, and finally 1M and 4M memory chip. The 1990s saw the 16M, 64M, and 256M DRAM chip.图 65 256Kx1 DRAM6.2 MEMORY ADDRESSING DECODINGCurrent system designs use CPLDs (complex programmable logic devices), in which memory and address decoding circuitry are integrated into one programmable chip. However it is important to understand how this task can be performed with common logic gates.6.2.1 Simple logic gates as address decoderIn connecting a memory chip to the CPU, the data bus is connected directly to the data pins of the memory.Control signals MEMR and MEMW are connected to the OE and WR pins of the memory chip, respectively.In the case of the address buses, while the lower bits of the address go directly to the memory chip address pins, the upper ones are used to activate the CS (sometimes the chip select is also referred to as a chip enable (CE) pin of the memory chip. It is the CS pin along with RD/WR that allows the flow of data in or out of the memory chip.The CS input is active low and can be activated using some simple logic gates, such as NAND and inverters.图 66 Using simple logic gates as decoder图 67 Decoder and its associated address range6.2.2 Using the 74LS138 as decoder图 68 74LS138 decoderThe 3 inputs A, B, and C of the 74LS138 generate 8 active-low outputs Y0-Y7. Each Y output is connected to the CS of a memory chip, allowing control of 8 memory blocks by a single 74LS138.G2A, G2B, and G1 can be used for address or control signal selection., Notice that G2A and G2B are both active low, while G1 is active high. If any one of the inputs G1, G2A, and G2B is not connected, they must be activated permanently by either Vcc or ground, depending on the activation level.图 69 74LS138 as decoderExample:Looking at the design in the following figure, find the address range for (a) Y4, (b) Y2, and (c) Y7, and verify the block size controlled by each Y.图 610 74LS138 as decoderSolution:(a) The address range for Y4 is calculated as follows:A19A18A17A16A15A14A13A12A11A10A9A8A7A6A5A4A3A2A1A01111000000000000000011110011111111111111The above shows that the range for Y4 is F0000H to F3FFFH.Notice that A19, A18, and A17 must be 1 for the decoder to be activated. Y4 will be selected when A16, A15 and A14 = 100BA13-A0 will be 0 for the lowest address and 1 for the highest address.(b) The address range for Y2 is E8000H to EBFFFHA19A18A17A16A15A14A13A12A11A10A9A8A7A6A5A4A3A2A1A01110100000000000000011101011111111111111(c) The address range for Y7 is FC000H to FFFFFHThe block size is 16K.6.3 IBM PC MEMORY MAP6.4 16-BIT MEMORY INTERFACING图 611 ISA (IBM PC AT) bus slot signals6.4.1 Address bus signals6.4.1.1 SA0-SA19 (system address)The system address bus provides the address signals for the desired memory (or I/O) location. The chipset latches these signals and holds them valid throughout the bus cycle.6.4.1.2 LA17-LA23 (latchable address)These signals, along with SA0-SA19, allow access to 16M bytes of memory space from the ISA expansion slot. The chipset does not latch these signals. They must be latched by the board designed for the expansion slot.6.4.1.3 SBHE (system byte high enable)Because it is an active low signal, when it is low it indicates that data is being transferred on the upper byte (D8-D15) of the data bus6.4.2 Data bus signalsThe system data bus (SD0-SD15) is used to transfer data between the CPU, memory, and I/O devices.6.4.3 Memory control signals6.4.3.1 MEMW

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论