Besides its address and data lines, a memory chip has a few control signals:
- Chip select (CS): "this access is for you". With CS inactive the chip ignores everything and lets go of the data lines.
- Read/write (R/W): chooses the direction. On this site R/W = 1 means read and 0 means write. Some chips use a separate write enable (WE) instead.
- Output enable (OE): allows the chip to drive the data lines during a read.
With active-high signals, CS = 1 and R/W = 1 means "read": the chip drives the selected word onto the data lines. CS = 1 and R/W = 0 means "write": the chip stores the word on the data lines. CS = 0 means do nothing, and the outputs go to high impedance.
In equations: Drive = C·R and Store = C·R', with C the chip select and R the read/write line.
In this course the controls are active-high unless a question says otherwise. Real chips usually make them active low, marked with a bar. Then "selected" is the complement of the pin: .
The order matters in a real cycle: set up the address first, then assert CS and the write signal, so the chip never stores into a wrong row while the address is still changing.
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 |