Lecture07-Memory IF
Lecture07-Memory IF
Memory Devices
Address Decoding
Random-Access Memory:
• Each word is separately accessible
• Equal access time
e.g. Semiconductor memories, like RAM
Sequential-Access Memory:
• Information stored is not immediately accessible
• Access time is variable
e.g. Magnetic/optical disks
Memory Types…cntd
Static vs. Dynamic
R/W An
CLK
…
D Q D Q D Q
An …
> > >
An-1
Q Q
…
D Q D D
An-1
> >
… >
…
…
A0
D Q D Q D Q …
…
A0 > > >
SRAM…..with D latches DRAM
Memory Types…cntd
DRAM:
Pros:
• High density (capacity) -> 1GB x 8, currently
• Cheaper cost per bit
Cons:
has to be refreshed every 2ms – 4ms
• While it is being refreshed, data can’t be accessed
• Larger access times
• Complex address decoding
• Higher power consumption
Memory Types…cntd
DRAM…addressing
Memory Types…cntd
DRAM…timing
DRAM…packaging
DRAMs are typically placed on SIMM (Single In-line Memory Modules) boards.
Volatile:
• stored information is lost when power is turned off
Typical example: RAM
Non-volatile:
• Data is retained even after power is off
• suitable for permanent storage
Typical example: ROM devices
Memory Capacity
The number of bits that a memory device
can store; for semiconductor memories:
In parallel mode:
• Each memory chip contains 2 x locations
x = number of address pins on the chip
• Each location contains y bits:
y = number of data pins on the chip
Thus, the entire chip will contain 2x * y bits
In serial mode, two pins are required (data & clock)
• address and Data are time-multiplexed
• (x + y) times slower…x, y as defined above.
Memory Control
BHE
Memory Interface
Address Bus system…Address decoder
IO/M
A0 – A19 Valid
SEL
Memory Interface
Address decoder
E.g. 1
E.g. 3 A0 D0
A1 D1
. .
Now assume you have eight
27C64
Intel
. .
8K x 8 (8KB) EPROMs 27C64 . D7
to be mapped from F0000h to FFFFFh A12
CS
to form a total of 64KB:
Memory Interface
Address decoder…cnt’d
Memory Interface
Address decoder…74138 (3 to 8 decoder)
Introduction
Programmed
Synchronous
Asynchronous with hand-shaking
Interrupt driven
I/O Port
Input
Basic input device has a set of tri-state buffers.
Output
Basic output interface receives data from microprocessor
and must hold it.
Flip-flop latches (buffers) are built into these devices
I/O Ports…a simple O/P ckt.
I/O Ports
e.g. Blinking an LED at an O/P port with a delay loop
I/O Ports
…cnt’d
CS
A1
Port C
{ CL
4
A0
PPI example
8255 – stepper motor control