SSC Course 8 Memory
SSC Course 8 Memory
Systems
Course 8
Memory system
Memory – as main component of a
von Neumann computer
Role:
stores instruction codes and data
Basic types:
registers - contained in the CPU
• register types: general purpose registers, instruction register, program
counter, stack pointer, control and status registers
• access – direct through internal links or buses
• access time – 1 clock period or less
internal or main memory
• access: through the system bus – read/write transfer cycles
• random access to every location, based on the location’s address
• technology: semiconductor circuits
• access time: 1—70ns
external memory
• indirectly accessible through interfaces and system bus
• sequential or partially random access to blocks of memory (e.g. sectors)
• technology: magnetic , optical, semiconductor
• access time: 0.1-10ms
Memory system
New memory types:
Cache memory
• high-speed low capacity memory between the CPU and the
internal memory
• keeps copies of the main memory’s zones (lines)
Virtual memory
• extension of the internal memory on the external memory
• mechanisms for protecting memory zones allocated for
different purposes
Memory hierarchy =
• cache memory
• internal memory
• virtual memory
Memory technologies
(semiconductor technologies)
Basic classification:
ROM
• non-volatile memory
• types: ROM, PROM, EPROM, EEPROM, Flash
RAM
• volatile memory
• types:
Static RAM (SRAM):
• bipolar, CMOS
Dynamic RAM (DRAM)
• (basic) DRAM, FPM DRAM, EDRAM, SDRAM,
DDRAM1, 2, 3, RAMBUS-DRAM
Memory design issues
Access:
address-based:
• random – every location can be accessed randomly based on its address
(e.g. RAM, ROM)
• sequential – the locations are read or written one after the other (magnetic
tape, CCD – charge coupled devices)
partial random – random at block level (e.g. sector) and sequential inside a
memory block (e.g. magnetic and optical disk)
associative – a location is found based on a tag (content) associated to
every location
stack – a location is found on top of the stack – the stack pointer is
automatically incremented or decremented for read and write operations
Volatility:
non-volatile memories – does not lose their content when the power is
switched off (e.g. ROM, PROM, EEPROM, Flash)
volatile memories – lose their content without power supply
• static memories – preserve the data as long as the circuit has power supply
• dynamic memories – lose their content in time (e.g. DRAMs) even if power is
ON - requires periodic refresh cycles
Memory design issues
communication:
through a parallel bus – address, data and control signals
• asynchronous bus – classical bus controlled through control signals
(e.g. 8086 bus)
• synchronous bus – controlled through the clock signal (e.g. P6 bus)
through a serial bus – serial transmission based on a protocol
(e.g. SPI, I2C)
trough an interface – indirect access (e.g. hard-disc interface)
organization:
uniform access – every location accessed in the same way
non-uniform memory access (NUMA) – access depends on the
position of the memory relative to a given CPU
Memory system – basic concepts
memory cell
smallest storing unit
preserves 1 logical variable – 1 bit (binary digit)
usually, not directly accessible
implementations:
• flip-flop (2,4, 6 transistors) - SRAM
• a condenser (1 CMOS transistor) – DRAM
• conductor/isolator – ROM, PROM, EPROM EEPROM
• magnetic polarization – magnetic disc
• transparent/opaque surface – optical disc
memory location
a group of memory cells (8, 16, 32 bits) addressable as an individual
addressing: unique address, incremental or sequential, associative
a memory location has:
• an address and
• a content
Memory system – basic concepts
Examples of memory cells
T
Vcc sel
sel
T1
sel F
T PL
D
D T2 D
D sel/W
D
sel/R
SRAM
T1 T2
T3
seli C
DRAM D
Memory system – basic concepts
memory structure (block)
linear organization – locations placed one after the
other at ascending addresses
....
Address 0 1 2 3 4 5 ..FFD ..FFE ..FFF
Sel
Chip select CS
Write signal Wr Control unit Dir OE
or program
Components
• address decoder
• memory locations
• data amplifier
• control unit
Memory system – basic concepts
Time diagrams for memory read and memory write cycles
Read Memory Cycle
A0-An valid address
CS
Wr
RAW RAW
addr RAW
buf DEC
Address
RAS Control
CAS unit
Din Dout
Memory system – basic concepts
DRAM memory:
Components:
• raw and column address buffers
• raw address decoder
• column data multiplexer
• memory locations
• control unit
Issues
• too many address lines
• memory must be refreshed raw by raw
Solutions:
• address lines are multiplexed in time (half of the address
pins are needed)
• two extra selection signals:
RAS – Raw address select
CAS – Column address select
• no chip select line
• external refresh cycles
Memory system – basic concepts
Time diagram for DRAM memory read cycle
RAS
CAS
Wr
RAS
CAS
Wr
RAS
CAS
Wr
D0-Dm
tcycle
Memory system – basic concepts
Access time
one of the most important parameter of a memory
circuit
measures the time required to perform a read or write
operation
measured from the moment when address lines are
stable until the data is read or written in the memory
smaller access time => higher speed
taccess = taddr_dec + tcell_read/write + ten_amp
Conclusions:
most of today’s computers use DRAM circuits as their
main memory
we have to do something to reduce the access time
RAS
CAS
Wr
Clock
Address
taccess
Block n Block m
New DRAM technologies
DDR – SDRAM – Double Data Rate SDRAM
makes data transfer on both edges of the clock signal (double
pumping) – reduces the required clock frequency to half
very strict timing conditions
64 bit transfers
DDR SDRAM Bus clock Internal Bus Prefetch Transfer Rate Voltage
(MHz) clock (MHz) (min burst) (MT/s)
Sel
Address
Amp.
Data
Amp.
memory
circuites
Module
Dec
Command sig.
Building a sub-module with the required data
width
A1 D0
A2 64K D1
A16 *8
D7
WR\
CSLi\
D8
64K
D9
*8
D15
CSHi\
64K
CSL1\ *16
CSH1\
64K
CSL7\ *16
CSH7\ 512K*16=1M*8
Design of the decoder unit
A17-A23
CS0\
DEC DEC CS1\
CS7\
A23 CSL0\
A17 74LS
A22 A18
138
A21 A19 CSH0\
A20
MRDC\ CSL7\
MWTC\
CSH7\
SelMod\
Design of address and data amplifiers
SA0 A0
SA1 74LS A1
SA7 244 A7
SD0 D0
SD1 74LS D1
245
SD7 D7
RD\
SA8 A8 SelMod\
SA9 74LS A9
SA15 244 A15
SD8 D8
SD9 74LS D9
SD15 245 D15
SA16 A16
74LS
244
SA23 A23
Design of a DRAM memory module
Address bus Data bus
MUX
2:1 MUX Amp
2:1
DRAM
Refresh RAS
W
Counter AdrSel CAS
RefReq
DEC.