memory Flashcards
types of memory
ROM
SRAM -static
DRAM -dynamic
structure of memory
2 dimensional array of bits (latches) - each cell contains a single bit
N address bits, M data bits
2^N rows, M columns
array size 2^N x M. depth = rows = number of words
width = columns = size of words
wordline
comes out of decoder, single row in memory array to be read/written. only one word (address) line to be high at a time
if wordline is high, stored bit should drive the bitline, otherwise leaves bitline floating
how activating wordline works
MAR sends bits to decoder, bit on each line put together and translated- points to number of wordline. required wordline is active. stored bits drive the bitline value. the bitlines go to the MDR
interface between CPU and memory
MAR: holds the ‘open’ address - CPU activates the groups of bytes required using the address line
MDR: holds the activated data
normal to address .8 bytes at a time but CPU can isolate individual bytes
lines controlling a memory cell
wordline/address line: activates a set of bits driving the bitline
read/write line: determines whether data will be transferred to (write) or from the MDR (read)
read from MDR takes place when?
bitlines are left floating at the MDR so take their values (weakly) from the active memory cells in the address line
R/W line = 1
write from MDR takes place when?
bitlines strongly driven by MDR data + overpower the weakly held bits in the active memory cells, overwriting contents
R/W line = 0
RAM
-named to distinguish from serial memory i.e. magnetic tape
DRAM: more dense but needs refreshing
SRAM: less dense but more stable
volatile, memory lost in power off
ROM
-named bc originally read only
memory persists even when power removed
modern ROM can be written to e.g. flash/SSD
DRAM consists of
- one transistor and capacitor for each bit
- capacitor charged or discharged to represent a bit
how DRAM works
when address line activated, the capacitor is connected to the bit line. if bit line = floating, the bits set the bit line voltage weakly to high or low.
if bit line is driven, it overrides the capacitor and sets it to a new value
adv DRAM
- structural simplicity: only one transistor/ capacitor needed for each bit = more dense vs 6 transistors for SRAM
- cheaper, less power required
disadv DRAM
-reading and time causes bits to decay/capacitors to discharge. so reading/writing needs to be done every few (64ms) ms = refreshing memory = more circuitry, adding to cost
SRAM consists of
6 transistors. uses bistable latching circuitry (flip flops) to store each bit as a voltage