+ All Categories
Home > Documents > Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations...

Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations...

Date post: 27-Apr-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
30
Design with Microprocessors Lecture 11 Memory Interfacing Yeas 3 CS Academic year 2019/2020 1 st semester Lecturer: Radu Danescu
Transcript
Page 1: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Design with Microprocessors

Lecture 11 – Memory Interfacing

Yeas 3 CS

Academic year 2019/2020

1st semester

Lecturer: Radu Danescu

Page 2: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Typical memory hierarchy

Second

Level

Cache

(SRAM)

Control

Datapath

Secondary

Memory

(Disk)

On-Chip Components

RegF

ile

Main

Memory

(DRAM)

Da

ta

Cache

Instr

Cache

ITLB

DT

LB

Latency (ns): .1 1 10 100 1000

Size (bytes): 100 10K 100K … M’s 100M … G 100G …T

Cost / capacity: maximum minimum

Page 3: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Memory classification

Read Write (RWM) NVRWM ROM

Random Access Non-Random

Access

EPROM Mask-prog.

ROM

SRAM (cache, registers)

DRAM (main memory)

FIFO, LIFO

Shift registers

EEPROM

FLASH Electrically-

prog. PROM

Classification by operation mode and storage medium:

- Static / dynamic, volatile / nonvolatile (NV); read only (ROM)

Classification by access mode

- Random, serial, content-addressable

Page 4: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Memory classification

Page 5: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Generic memory pinout

Address pins

If N address pins 2N memory locations

Data pins

M the memory location word width

Bi-directional, with 3-state gated output (controlled by #OE)

Control pins

Chip select/enable activates the memory chip

Read (#OE) /write (#WE) operation selection

Page 6: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Memory architecture

Leads to a structure that is too long and narrow

This organization is slow, because the vertical lines are too long.

1-d (linear) organization

Page 7: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Memory architecture

The vertical and horizontal sizes are similar

More words are stored on the same line

2-d organization

Page 8: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

ROM/EPROM

Page 9: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

ROM/EPROM

Page 10: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Bus Timing (8086)

Maximum memory access time = 3T-TCLAV-TDVCL. If the memory cannot

respond in this time interval, wait states must be inserted.

Page 11: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

ROM/EPROM

Address range: FF800h - FFFFFh

Page 12: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

ROM/EPROM

8088, min.mode, EPROM 8 x 2732 = 8 x 4kB = 32 KBytes

Address organization: 0: F8000- F8FFF; 1: F9000- F9FFF; ..…..

7: FF00-FFFFF

• EPROM access time (450ns) + decoder delay (12ns) > 8088

access time

• one wait state is used (1 clock period = 200ns): total access

time 460+200=660 ns

Page 13: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

ROM/EPROM

8088: 8 x 2764 = 8 x 8kB = 64 KB

Address range: F0000 – FFFFF

Page 14: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Address decoders

Page 15: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Connecting the memory chips

Parallel connection: extends

memory depth

Serial connection: extends the

word size

Page 16: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Connecting memory to a 16 bit bus (8086)

Page 17: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

RAMStatic RAM (SRAM)

Page 18: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

SRAM

Similar pinout to EPROM + a write signal

Faster access time

Used for cache memories

Page 19: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

SRAM

Page 20: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

16, 32 …. bit data bus interface

No concern on read operation:

• memory outputs a whole word (16 bit, 32 bit …)

• CPU reads the desired byte (BL, BH) or word

(Ex: MOV AL, mem ; MOV AH, mem; MOV AX, mem)

Only writing must be handled:

• LWR, HWR

Example:

Page 21: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAMDynamic RAM (DRAM)

Size: ½ of the size of a SRAM cell increased capacity

Multiplexed address lines

Refresh: 1 .. 4 msec dedicated circuitry

DRAM control: read, write and refresh cycles

Variations: SDRAM, DDRAM, Rambus…

Page 22: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM

TMS4464 can store 256K bits of data (64 K x 4 bit words)

64K addressable locations – requires 16 address lines, but has only 8

address pins

The row address (A8:A15) is put on the address pins, and latched internally

using the RAS signal

The column address (A7:A0) is latched afterwards, using the CAS signal

Page 23: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM

#RAS and #CAS must be generated by a DRAM controller

The DRAM controller must also multiplex the address lines, as:

• Row address (ex. A8-15)

• Column address (ex. A0-7)

Page 24: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM

Page 25: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

256K X 1 DRAM – internal structure

Page 26: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM refreshSpecial refresh cycle

- Occurs transparently while other memory components operate and is called transparent refresh or cycle stealing.

- A RAS-only cycle strobes a row address into the DRAM,

- The capacitors are recharged for the selected row by reading the bits out internally and then writing them back.

Example:

256K X 1 DRAM (256 rows x 256 columns x 4 blocks)

refresh must occur every 15.6ms (4ms/256).

For the 8086, a read or write occurs every 800ns (4x200=4xTclk).

19 memory reads/writes per refresh (15.6ms/0.8ms = 19.5)

read/write cycle takes 5% of the refresh time

Page 27: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM Controllers address multiplexing and generation of

the DRAM control signals.

These devices tend to get very complex.

We will focus on a simpler device:

Intel 82C08, which can control two banks of 256K X 16 DRAM memories for a total of 1 MB.

Microprocessor adress A1 through A18 (18 bits) drive the 9 Column Address inputs (AL) and 9 RowAddress inputs (AH) of the 82C08.

Either RAS0/CAS0 or RAS1/CAS1 are strobed depending on the address.

WE (from the 82C08), BHE and A0 are used to determine if a write is to be performed and which byte(s) (low or high or both) is to be written.

Page 28: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM Controllers

Page 29: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

Using PALs for memory interface logic

Address decoding:

• The DRAM controller must be activated when the upper address lines

indicate the DRAM space (usually starts at 0)

• PE (port enable) is driven by address decoding logic

Upper/lower byte write enable:

• Low write (LWR), High write (HWR)

A single 16L8 chip can implement all these functions:

Page 30: Design (Systems) with Microprocessorsusers.utcluj.ro/~rdanescu/dmp_c11.pdf64K addressable locations –requires 16 address lines, but has only 8 address pins The row address (A8:A15)

DRAM Controllers


Recommended