

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























The memory stores the instructions and data for an executing program. Memory is characterized by the smallest addressable unit: Byte addressable the smallest unit is an 8–bit byte. Word addressable the smallest unit is a word, usually 16 or 32 bits in length. Most modern computers are byte 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: Const MemSize = byte Memory[MemSize] // Indexed 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 the memory or being read from the memory. This is sometimes called the Memory Data Register.
N
N
The Linear View of Memory Memory may be viewed as a linear array, for example a byte–addressable memory byte memory [N] ; // Addresses 0 .. (N – 1) This is a perfectly good logical view, it just does not correspond to reality.
Managing Pin-Outs Consider now the two–dimensional memory mentioned above. What pins are needed? Pin Count Address Lines 22 Address Lines 11 Row/Column 0 Row/Column 2 Power & Ground 2 Power & Ground 2 Data 1 Data 1 Control 3 Control 3 Total 28 Total 19 Separate row and column addresses require two cycles to specify the address.
Four–Megabyte Memory Do we have a single four–megabyte chip or eight four–megabit memory chips? One common solution is to have bit–oriented chips. This facilitates the two–dimensional addressing discussed above. For applications in which data integrity is especially important, one might add a ninth chip to hold the parity bit. This reflects the experience that faults, when they occur, will be localized in one chip. Parity provides a mechanism to detect, but not correct, single bit errors. Correction of single bit errors requires twelve memory chips. This scheme will also detect all two–bit errors.
Faster Memory Chips We can use the “2 dimensional” array approach, discussed earlier, to create a faster memory. This is done by adding a SRAM (Static RAM) buffer onto the chip. Consider the 4Mb (four megabit) chip discussed earlier, now with a 2Kb SRAM buffer. In a modern scenario for reading the chip, a Row Address is passed to the chip, followed by a number of column addresses. When the row address is received, the entire row is copied into the SRAM buffer. Subsequent column reads come from that buffer.
One major classification of computer memory is into two technologies SRAM Static Random Access Memory DRAM Dynamic Random Access Memory (and its variants) SRAM is called static because it will keep its contents as long as it is powered. DRAM is called dynamic because it tends to lose its contents, even when powered. Special “refresh circuitry” must be provided. Compared to DRAM, SRAM is faster more expensive physically larger (fewer memory bits per square millimeter) SDRAM is a Synchronous DRAM. It is DRAM that is designed to work with a Synchronous Bus , one with a clock signal. The memory bus clock is driven by the CPU system clock, but it is always slower.
“Plain” SDRAM makes a transfer every cycle of the memory bus. For a 100 MHz memory bus, we would have 100 million transfers per second. DDR–SDRAM is Double Data Rate SDRAM DDR–SDRAM makes two transfers for every cycle of the memory bus, one on the rising edge of the clock cycle one on the falling edge of the clock cycle. For a 100 MHz memory bus, DDR–SDRAM would have 200 million transfers per second. To this, we add wide memory buses. A typical value is a 64–bit width. A 64–bit wide memory bus transfers 64 bits at a time. That is 8 bytes at a time. Thus our sample DDR–SDRAM bus would transfer 1,600 million bytes per second. This might be called 1.6 GB / second, although it more properly is 1.49 GB / second, as 1 GB = 1, 073, 741, 824 bytes.
The addressing capacity of a computer is dictated by the number of bits in the MAR. Suppose the MAR (Memory Address Register Contains) N bits. Then 2 N items can be addressed. In a byte addressable machine, the maximum memory size is 2 N bytes. If the machine supports longword addressing, but not byte or word addressing, the maximum memory size is 2 N+ bytes. Word and longword addressable machines might have their memory sized quoted in bytes, but they do not access individual bytes. Example: 256 KB PDP–11/70 vs. the CDC–6600 with 256 K words (60 bits each). The CDC–6600 could have been considered to have 1,920 KB of memory. However, it was not byte addressable; the smallest addressable unit was a 60–bit integer. Almost every modern computer is byte addressable to allow direct access to the individual bytes of a character string. A modern computer that is byte addressable can still issue both word and longword instructions. These just reference data two bytes at a time and four bytes at a time.