memory Flashcards
(35 cards)
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
adv SRAM
high speed as uses 6 transistors for each memory cell + refreshing not necessary/more stable
disadv SRAM
uses more power + more expensive + lower density
basic ROM, how to read
the bit line is weakly set to high, and the address line is activated.
if cell contains 0: transistor connects bitline to ground, and bitline goes low
if cell contains 1: bitline retains weak high it was initialised with
PROM- programmable ROM
all bit cells have a transistor. at a sufficient voltage, fuse of transistor can be blown, disconnecting transistor from ground, allowing memory cell to hold 0, instead of 1
FLASH memory works how?
floating gate transistors can be activated or deactivated electrically
multi-ported memory
memory that can access more than one address line at once
multi-ported memory consists of
inputs AD1, AD2: address always used for read
AD3: address used for optional writing
WD3: data line for data to be written
outputs WD1, WD2: holds data read from AD1/AD2
WE1: write enable line. 0 = no write, 1 = write WD3 to A3
CLK
how many different address locations can be decoded depends on
number of bits of MAR: k bits, number of memory locations = 2^k
memory hierarchy
virtual memory -> main memory -> cache
largest -> smallest capacity
slowest -> fastest speed