Primary Memory.doc
《Primary Memory.doc》由会员分享,可在线阅读,更多相关《Primary Memory.doc(34页珍藏版)》请在三一办公上搜索。
1、The Memory ComponentThe memory stores the instructions and data for an executing program.Memory is characterized by the smallest addressable unit:Byte addressablethe smallest unit is an 8bit byte.Word addressablethe smallest unit is a word, usually 16 or 32 bits in length.Most modern computers are b
2、yte addressable, facilitating access to character data.Logically, computer memory should be considered as an array.The index into this array is called the address or “memory address”.A logical view of such a byte addressable memory might be written in code as:ConstMemSize = byteMemoryMemSize / Index
3、ed 0 (MemSize 1)The CPU has two registers dedicated to handling memory.The MAR(Memory Address Register) holds the address being accessed.The MBR(Memory Buffer Register) holds the data being written to thememory or being read from the memory. This is sometimescalled the Memory Data Register.Primary M
4、emoryAlso called “core memory”, “store”, or “storage”.Beginning with the MIT Whirlwind and continuing for about 30 years, the basic technology for primary memory involved “cores” of magnetic material.A rather large picture of magnetic core memory (lots of kilobytes here) has been removed from the sl
5、ide, so that it will download more quickly.Requirements for a Memory Device1.Random access by address, similar to use of an array. Byte addressable memory can be considered as an array of bytes.byte memory N/ Address ranges from 0 to (N 1)2.Binary memory devices require two reliable stable states.3.
6、The transitions between the two stable states must occur quickly.4.The transitions between the two stable states must not occurspontaneously, but only in response to the proper control signals.5.Each memory device must be physically small, so that a large numbermay be placed on a single memory chip.
7、6.Each memory device must be relatively inexpensive to fabricate.Varieties of Random Access MemoryThere are two types of RAM1.RAMread/write memory2.ROMreadonly memory.The double use of the term “RAM” is just accepted. Would you say “RWM”?Types of ROM1.“Plain ROM”the contents of the memory are set at
8、 manufactureand cannot be changed without destroying the chip.2.PROMthe contents of the chip are set by a special devicecalled a “PROM Programmer”. Once programmedthe contents are fixed.3.EPROMsame as a PROM, but that the contents can be erasedand reprogrammed by the PROM Programmer.Memory Registers
9、MARMemory Address RegisterThis specifies the address of the instruction or data item.For a byte addressable memory, each byte has a distinct address.For a word addressable memory, only the words have individual addresses.MBRMemory Buffer RegisterThis holds the data read from memory or to be written
10、to memory.Occasionally called MDR for Memory Data RegisterIn a byte addressable memory, the MBR is usually 8 bits wide; that is, itholds one byte.In a 16bit word addressable memory, the MBR would be 16 bits wide.The size of the MBR is the size of an addressable item.Memory Control SignalsRead / Writ
11、e Memory must do three actions:READcopy contents of an addressed word into the MBRWRITEcopy contents of the MBR into an addressed wordNOTHINGthe memory is expected to retain the contents written intoit until those contents have been rewritten.One set of control signals Select the memory unit is sele
12、cted.if 0 the CPU writes to memory, if 1 the CPU reads from memory.SelectAction00Memory contents are not changed.01Memory contents are not changed.10CPU writes data to the memory.11CPU reads data from the memory.A ROM has only one control signal: Select.If Select = 1 for a ROM, the CPU reads data fr
13、om the addressed memory slot.Another Notation for Control SignalsThere are several notations for control signals that are asserted low.Consider the signal Select, which we have assumed to be asserted high.Were this signal asserted low, it would be notated as eitherThe more modern notation uses a “#”
14、 after a signal name to indicate that it is asserted low.A similar notation is used with the “two option selector” control signals; e.g.,Here, the “#” notation indicates what the signal indicates when it is low.If R/W# = 0, a memory write is called for.If R/W# = 1, a memory read is called for.Memory
15、 Example with New NotationSuppose that a memory is selected with an active low signal and has another signal to indicate the operation.The two tables below convey the same information.Action10Memory contents are not changed.11Memory contents are not changed.00CPU writes data to the memory.01CPU read
16、s data from the memory.Select#R/W#Action10Memory contents are not changed.11Memory contents are not changed.00CPU writes data to the memory.01CPU reads data from the memory.Memory TimingsMemory Access TimeDefined in terms of reading from memory. It is the time between the address becoming stable in
17、the MAR and the data becoming available in the MBR.Memory Cycle TimeLess used, this is defined as the minimum time between two independent memory accesses.The Idea of an Address SpaceThe memory size is defined in terms of the amount of primary memoryactually installed.The address space, determined b
18、y the size of the MAR, indicates the rangeof addresses that actually can be generated.Absent such kludges such as Expanded Memory and Extended Memory (both obsolete, dating to about 1980), the memory size does not exceed the size of the address space.An Nbit MAR can address 2N distinct memory locati
19、ons, 0 2N 1ComputerMAR bitsAddress RangePDP-11/20160 to 65 535Intel 8086200 to 1 048 575Intel Pentium320 to 4 294 967 295Memory Mapped Input / OutputThough not a memory issue, we now address the idea of memory mapped input and output. In this scheme, we take part of the address space that would othe
20、rwise be allocated to memory and allocate it to I/O devices.The PDP11 is a good example of a memory mapped device. It was a byte addressable device, meaning that each byte had a unique address.The old PDP11/20 supported a 16bit address space. This supported addresses in the range 0 through 65,535 or
21、 0 through 0177777 in octal.Addresses 0 though 61,439 were reserved for physical memory.In octal these addresses are given by 0 through 167,777.Addresses 61,440 through 65,535 (octal 170,000 through 177,777) were reserved for registers associated with Input/Output devices.Examples:CR11 Card Reader17
22、7,160Control & Status Register177,162Data buffer 1177,164Data buffer 2Reading from address 0177162 would access the card reader data buffer. The Linear View of MemoryMemory may be viewed as a linear array, for example a byteaddressable memorybyte memory N ; / Addresses 0 . (N 1)This is a perfectly g
23、ood logical view, it just does not correspond to reality.Memory Chip OrganizationConsider a 4 Megabit memory chip, in which each bit is directly addressable.Recall that 4M = 222 = 211 211, and that 211 = 2, 048.The linear view of memory, on the previous slide, calls for a 22to222 decoder,also called
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Primary Memory

链接地址:https://www.31ppt.com/p-3024191.html