Shift Registers
Bi-directional shift register with parallel load
-
Clear control to clear the register to 0
-
CP input for a clock pulse
-
Shift-right control and left input line
-
Shift-left control and right input line
-
Parallel load control and n input lines
-
A state for leaving the register information unchanged
Use MUXs on the D flip-flop input and have 2 input lines:
-
00 = maintain,
-
01 = shift right,
-
10 = shift left,
-
11 = load
-
Clear is buffered
-
Clock is inverted
Register Files
For fast access of a small number of registers (cache, register files in a CPU)
-
2D array of flip-flops
-
read enable
-
write enable
-
input
-
clock
-
D = WE * Input + WE * Q
-
Output is a 3-state buffer with output enable = read enable line
Register files can often read two registers per cycle and write out two registers per cycle
Decoders determine which register (row) to read/write, with one decoder for each operation.
RAM
Static (SRAM)
-
Information stored in flip-flops
-
Faster
-
Valid as long as the power is on
-
Takes more chip space per bit (at least 2 NAND gates (8 transistors) per bit)
-
Typically used for registers and cache
Dynamic (DRAM)
-
Information stored in capacitors
-
Slower
-
Charge dissapates every few milliseconds
-
Takes less chip space per chip (one transistor per bit)
-
Typically used for main memory
RAM read/write process
-
Chip select
-
Decode the address
-
Activate the appropriate locations in memory
-
Write data to the memory cells / Interpret and output data
With each bit you need to be able to get:
-
Input
-
Output
-
Read/write
-
Select
Like in the ROM, a decoder selects the word (N inputs, 2N output lines)
We also need to be concerned about timing
-
Address decoding takes time
-
Chip selection takes time
-
RW select takes time
Timing pattern for reading typically will be:
-
Put address on the address lines
-
Set chip select and RW select
-
Output enable time determines when the data is ready to be read
-
Address can be changed without affecting the output for a certain amount of time
output hold time
-
Chip deselect
-
Outputs are still good for a certain amount of time
output disable time
Timing pattern for writing
-
Put address on the address lines (address setup time)
-
Select chip and set RW select
Data is put into the flip-flops on the falling edge of CS
Data needs to be stable before falling edge of CS (data setup time)
-
Deassert CS and RW select
pulse width of CS and RW need to be sufficiently long (write pulse width)
Data is read into flip-flops
RAM is often organized so there is a row and a column decoder, each with N/2 input bits
For digital design, we are usually concerned with creating RAM circuits from smaller components
-
Use higher address lines to select the RAM chip
-
Use lower address lines to get the data