Section 7.5 Memory Organization
Subsection 7.5.1 Registers
Registers are used in places where small amounts of very fast memory is required. The CPU contains many registers, where they are used for numerical computations, temporary data storage, etc. Some registers are directly accessible by the programmer (Section 8.2), others are hidden. They are also used in the hardware that serves to interface between the CPU and other devices in the computer system. We begin with a design for a simple 4-bit register, which allows us to store four bits. Figure 7.5.1 shows a design for implementing a 4-bit register using D flip-flops. As described above, each time the clock cycles, the state of each of the D flip-flops is set according to the value of- Register File
A group of two or more registers.
r0
βr7
. We could build eight copies of the circuit shown in Figure 7.5.2. Let the 4-bit data input, r0
βr7
.
Keep in mind that four of these output circuits would be required for 4-bit registers. The same Subsection 7.5.2 Shift Registers
There are many situations where it is desirable to shift a group of bits. A shift register is a common device for doing this. Common applications include:Inserting a time delay in a bit stream.
Converting a serial bit stream to a parallel group of bits.
Converting a parallel group of bits into a serial bit stream.
Shifting a parallel group of bits left or right to perform multiplication or division by powers of
Subsection 7.5.3 Static Random Access Memory (SRAM)
There are several problems with trying to extend the multiplexer design to large memory systems. Although a multiplexer works for selecting the output from several registers, one that selects from many millions of memory cells is simply too large. From Figure 7.1.10, we see that such a multiplexer would need an AND gate for each memory cell, plus an OR gate with an input for each of these millions of AND gate outputs. We need another logic element called a tri-state buffer.- Tri-State Buffer
A device that has three possible outputs:
and βno connection.β
- Static Random Access Memory (SRAM)
Memory that retains its stored values as long as power to the circuit is maintained.
Subsection 7.5.4 Dynamic Random Access Memory (DRAM)
Each bit in SRAM requires about six transistors for its implementation. A less expensive solution is found in Dynamic Random Access Memory (DRAM).- Dynamic Random Access Memory (DRAM)
Memory in which each bit value decays in time, even while power remains on. The bit values must be refreshed periodically.