Address Decoding Memory/IO.

Slides:



Advertisements
Similar presentations
Khaled A. Al-Utaibi 8086 Bus Design Khaled A. Al-Utaibi
Advertisements

5-1 Memory System. Logical Memory Map. Each location size is one byte (Byte Addressable) Logical Memory Map. Each location size is one byte (Byte Addressable)
Memory & IO Interfacing to CPU
Microprocessor System Design. Outline Address decoding Chip select Memory configurations.
Contents Even and odd memory banks of 8086 Minimum mode operation
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
SYSTEM CLOCK Clock (CLK) : input signal which synchronize the internal and external operations of the microprocessor.
Chapter 2 Number conversion (BCD) 8086 microprocessor Internal registers Making of Memory address.
Chapter 2 Microprocessor Architecture
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
Memory Interface Dr. Esam Al_Qaralleh CE Department
Designing the 8086/8088 Microcomputer System
4-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Hardware Detail of Intel.
Chapter 10 Hardware Details on the 8088 Objectives: The general specification on the 8088 microprocessors The processor’s control signal names and specifications.
I/O Subsystem Organization and Interfacing Cs 147 Peter Nguyen
P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM)
TK Memory Interface DR MASRI AYOB. 2 Requirement and memory structure There are two types of memory: –RAM: read and write –ROM: read only Figure.
Design of Microprocessor-Based Systems Hardware Detail of Intel 8088 Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology.
Memory Interfacing ECE 511: Digital System & Microprocessor.
Microcomputer & Interfacing Lecture 2
Khaled A. Al-Utaibi  8086 Pinout & Pin Functions  Minimum & Maximum Mode Operations  Microcomputer System Design  Minimum Mode.
MANINDER KAUR RAM and ROM Chips 24-Nov
University of Tehran 1 Microprocessor System Design Omid Fatemi Memory Interfacing
MODES OF Details of Pins Pin 1 –Connected Ground Pins 2-16 –acts as both input/output. Outputs address at the first part of the cycle and outputs.
Khaled A. Al-Utaibi Memory Devices Khaled A. Al-Utaibi
Memory interface Memory is a device to store data
Memory interface Memory is a device to store data
Memory and I/O Interfacing
8088 I/F with basic IO, RAM and 8255
Microprocessor Address Decoding.
CPU Interfacing Memory.
BASIC INPUT AND OUTPUT INTERFACING.  8085A communicate with outside world using the I/O devices.  Since memory and I/O devices share the system bus,
Memory interface Memory is a device to store data
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
Minimum System Requirements Clock Generator Memory Interfacing.
Memory Interface A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
Khaled A. Al-Utaibi  Memory Interface and the 3 Buses  Interfacing the 8088 Processor  Interfacing the 8086 Processor  Interfacing.
MODES OF Details of Pins Pin 1GND –Connected Ground Pins 2-16 AD14-AD0–acts as both input/output. Outputs address at the first part of the cycle.
Chapter 11Chapter 12 Memory system designI/O system design Objectives: The importance of bus buffering How the 8088 addresses (accesses) memory - I/O ports.
Memory Read only memory (ROM) – nonvolatile
Semiconductor memory utilization. Memories 2/20 Main memory map Timings Power supplying.
Programmable Peripheral Interface Parallel port Interface 8255
1 Memory Systems Computer Architectures M. 2 EPROM memories Access time: ns VPP A16 A15 A12 A7 A6 A5 A4 A3 A2 A1 A0 D0 D1 D2 GND VCC PGM* NC A14.
Computer Architecture Lecture 6 by Engineer A. Lecturer Aymen Hasan AlAwady 1/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
MICROPROCESSORS AND APPLICATIONS
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Memory Interface Every µP-based system has a memory system. All systems contain two types of memories.  Read-Only Memory (Volatile Memory)  Random Access.
8085 Microprocessor: Architecture & Support Components.
Memory Systems 3/17/ Memory Classes Main Memory Invariably comprises solid state semiconductor devices Interfaces directly with the three bus architecture.
3/19/  Differentiate the class of memory  List the type of main memory  Explain memory architecture and operation  Draw memory map  Design.
5-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL
Objectives : At the end of this lesson, students should be able to : i.Identify the types of memory chip and their functions. ii.Define the difference.
Memory Interface EEE 365 [FALL 2014] LECTURER 12 ATANU K SAHA BRAC UNIVERSITY.
University of Tehran 1 Microprocessor System Design Omid Fatemi.
EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing
The 8085 Microprocessor Architecture
Memory Interfacing.
Computer Architectures M
The 8085 Microprocessor Architecture
EE3541 Introduction to Microprocessors
Interfacing 64Kb EPROM with 8085
8086/8088 Hardware Specifications
Computer Architectures M
Interfacing Memory Interfacing.
Memory Systems Digital Systsems M.
MICROPROCESSOR MEMORY ORGANIZATION
The 8085 Microprocessor Architecture
第四章 80386的存贮器和输入/输出接口 作业:P335 5,7,13,17,21,25,36,37,41,44,45,46,48,52,65 21:46.
Presentation transcript:

Address Decoding Memory/IO

CS 1M locations FFFFF A0 – A19 1 Mbyte memory 8088 D0 – D7 Starting Address = 00000 End Address = FFFFF 1 1M locations 00000 FFFFF A0 – A19 1 Mbyte memory 8088 D0 – D7 CS CS= Chip Select. If CS = 0 then the memory will be ON If CS = 1 then the memory will be sleeping and all its pins will be Z

CS 1M locations A19 FFFFF 7FFFF A0 – A19 A0 – A18 8088 512 KB memory Starting Address = 00000 End Address = FFFFF 1 1M locations A19 FFFFF A0 – A19 A0 – A18 7FFFF CS 8088 512 KB memory D0 – D7 D0 – D7 7FFFF 00000 00000

CS 1M locations A19 FFFFF 7FFFF A0 – A19 A0 – A18 8088 512 KB memory Starting Address = 00000 1 End Address = FFFFF 1M locations A19 FFFFF A0 – A19 A0 – A18 7FFFF CS 8088 512 KB memory D0 – D7 D0 – D7 80000 00000 00000

CS 1M locations FFFFF A16 – A19 Address Decoding A0 – A19 8088 FFFF Starting Address = 00000 End Address = 0FFFF 1 1M locations FFFFF A16 – A19 Address Decoding A0 – A19 8088 FFFF CS A0 – A15 64 KB memory D0 – D7 D0 – D7 0000 0FFFF 00000

CS 1M locations FFFFF This memory should be selected only when A16 = 0 Starting Address = 00000 End Address = 0FFFF 1 1M locations FFFFF This memory should be selected only when A16 = 0 A17 = 0 A18 = 0 A19 = 0 A16 – A19 FFFF CS A0 – A15 64 KB memory D0 – D7 0FFFF 0000 00000

CS 1M locations FFFFF This memory should be selected only when A16 = 1 Starting Address = 00000 End Address = 0FFFF 1 1M locations FFFFF This memory should be selected only when A16 = 1 A17 = 0 A18 = 0 A19 = 0 A16 – A19 FFFF CS A0 – A15 1FFFF 64 KB memory D0 – D7 10000 0000 00000

CS 1M locations FFFFF This memory should be selected only when A16 = 1 Starting Address = 00000 End Address = 0FFFF 1 1M locations FFFFF This memory should be selected only when A16 = 1 A17 = 0 A18 = 0 A19 = 0 A16 – A19 20000 2FFFF FFFF CS A0 – A15 64 KB memory D0 – D7 0000 00000

CS 1M locations FFFFF This memory should be selected only when A16 = 1 Starting Address = 00000 End Address = 0FFFF 1 1M locations FFFFF This memory should be selected only when A16 = 1 A17 = 0 A18 = 0 A19 = 0 A16 – A19 30000 3FFFF FFFF CS A0 – A15 64 KB memory D0 – D7 0000 00000

Connections Between CPU and Memory Control signals Memory 8088 Data Bus Address bus What are the control signals from the microprocessor to memory? What are the control signal from memory to the microprocessor? Address and data signals should be buffered The use of buffers on address bus increases driving capability Bi-directional buffers are used to control the data transferring directions on data bus D latches are used to de-multiplex signals on AD[7:0] (and A[19:16])

Timing Diagram of A Memory Operation Example: 8088 sends address 70C12 to memory in a memory read operation assume that data 30H is read T1 T2 T3 T4 CLK Addr[15:0] D latch ALE 8088 A[15:8] A[19:16] 7H S3-S6 Buffer A[15:8] 0CH AD[7:0] Memory D latch AD[7:0] 12H 30H D[7:0] Trans -ceiver Addr[19:16] 7H DT/R DEN Addr[15:8] 0CH IO/M Addr[7:0] 12H WR RD D[7:0] 30H

Memory Chips The number of address pins is related to the number of memory locations . Common sizes today are 1K to 256M locations. (10 and 28 address pins are present.) The data pins are typically bi-directional in read-write memories. The number of data pins is related to the size of the memory location . For example, an 8-bit wide (byte-wide) memory device has 8 data pins. Catalog listing of 1K X 8 indicate a byte addressable 8K memory. Each memory device has at least one chip select ( CS ) or chip enable ( CE ) or select ( S ) pin that enables the memory device. Each memory device has at least one control pin. For ROMs, an output enable ( OE ) or gate ( G ) is present. The OE pin enables and disables a set of tristate buffers. For RAMs, a read-write ( R/W ) or write enable ( WE ) and read enable (OE ) are present. For dual control pin devices, it must be hold true that both are not 0 at the same time.

Memory Address Decoding The processor can usually address a memory space that is much larger than the memory space covered by an individual memory chip. In order to splice a memory device into the address space of the processor, decoding is necessary. For example, the 8088 issues 20-bit addresses for a total of 1MB of memory address space. However, the BIOS on a 2716 EPROM has only 2KB of memory and 11 address pins. A decoder can be used to decode the additional 9 address pins and allow the EPROM to be placed in any 2KB section of the 1MB address space.

Memory Address Decoding

Decoding Circuits NAND gate decoders are not often used. 3-to-8 Line Decoder (74LS138) is more common.

Memory Address Decoding Using Full memory addressing space Addr[19:0] FFFFF 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Highest address 37FFF 32KB Lowest address 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30000 These 5 address lines are not changed. They set the base address These 15 address lines select one of the 215 (32768) locations inside the RAMs 00000 Addr[19] Addr[18] Addr[17] Addr[16] Addr[15] IO/M Addr[14:0] CS 32KB Can we design a decoder such that the first address of the 32KB memory is 37124H?

Memory Map - Full address decoding All the address lines used by the decoder or memory chip => each byte is uniquely addressed = full address decoding Full address decoding A14 A15 A16 A17 A18 A19 CS2 A0-A13 16KB EPROM chip OE FFFFF FC000 3FFFF 00000 FFFFF FC000 83FFF 80000 3FFFF 00000 FFFFF 3FFFF 00000 FFFFF 00000 FFFFF FC000 9FFFF 9C000 83FFF 80000 3FFFF 00000 8088 Memory Map 220 = 1,048,576 different byte addresses = 1Mbyte 16KB EPROM chip OE CS3 A0-A13 A19=A18=...=A14=1 select the EPROM 16KB EPROM chip CS4 CS5 CS6 CS7 CS8 CS9 CS10 MRDC A 7 B 6 C 5 74LS138 4 3 E1 2 E2 1 E 0 A17 A18 A19 A14 A15 A16 A19 = 1, A18 = 0, A17 = 0 activate the decoder A16, A15, A14 select one EPROM chip A0 ... A17 256KB RAM chip A18 A19 CS1’ MWTC MRDC The same Memory-map assignment A0 ... A17 256KB RAM chip WR RD A 256Kbyte = 218 RAM chip has 18 address lines, A0 - A17 CS1 A18 A19 IO/M A19, A18 assigned to 00 => CS active for every address from 00000 to 3FFFF A18 = 0 A19 = 0 IO/M = 0 IO/M = 0 => Memory map WR RD

Memory Address Decoding Design a 1MB memory system consisting of multiple memory chips Solution 1: 256KB Addr[17:0] Addr[18] Addr[19] IO/M CS 2-to-4 decoder

Memory Address Decoding Design a 1MB memory system consisting of multiple memory chips Solution 2: 256KB Addr[19:2] Addr[1] Addr[0] IO/M CS 2-to-4 decoder

Memory Address Decoding Design a 1MB memory system consisting of multiple memory chips Solution 3: 256KB Addr[19:18] Addr[17] Addr[6] IO/M CS 2-to-4 decoder Addr[16:7] Addr[5:0] It is a bad design, but still works!

Memory Address Decoding Design a 1MB memory system consisting of multiple memory chips Solution 4: 256KB 256KB 512KB CS CS CS Addr[17:0] Addr[18] Addr[18] Addr[19] IO/M Addr[19] Addr[18] Addr[19] IO/M IO/M

Memory Address Decoding Exercise Problem: A 64KB memory chip is used to build a memory system with the starting address of 7000H. A block of memory locations in the memory chip are damaged. FFFFH 7FFFFH 733FFH 3317H 73317H Replace this block 3210H 73210H 73200H 0000H 70000H 64KB Damaged block 1M addressing space 1M addressing space

Memory Address Decoding CS A[19] A[18] A[17] A[16] IO/M A[15] A[14] A[13] A[12] A[11] A[10] A[9] 64KB A[15:0] 512B A[8:0]

Memory Address Decoding Exercise Problem: A 2MB memory chip with a damaged block (from 0DCF12H to 103745H) is used to build a 1MB memory system for an 8088-based computer 1FFFFFH 1FFFFFH 512K 180000H 103745H Use these two blocks 0FFFFFH 0DCF12H 07FFFFH 512K 000000H 000000H Damaged block A[19] A[20] A[19:0] A[19:0] CS

Memory Address Decoding Partial decoding Example: build a 32KB memory system by using four 8KB memory chips The starting address of the 32KB memory system is 30000H 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 high addr. of chip #4 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Low addr. of chip #4 0 0 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 high addr. of chip #3 Chip #4 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36000H Low addr. of chip #3 Chip #3 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 34000H high addr. of chip #2 Chip #2 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Low addr. of chip #2 32000H Chip #1 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 30000H high addr. of chip #1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Low addr. of chip #1

Memory Address Decoding Implementation of partial decoding Addr[12:0] IO/M CS 2-to-4 decoder Addr[13] Addr[14] 8KB With the above decoding scheme, what happens if the processor accesses location 02117H, 32117H, and 9A117H? If two 16KB memory chips are used to implement the 32KB memory system, what is the partial decoding circuit? What are the advantage and disadvantage of partial decoding circuits?

Partial address decoding Memory Map - Some address lines not used by the decoder or memory chip => mirror images = partial address decoding Partial address decoding MRDC A0-A13 16KB EPROM chip OE A14 A15 A16 A17 A18 CS2 A18=...=A14=1 select the EPROM mirror image base image FFFFF 3FFFF 00000 FFFFF 3FFFF 30000 2FFFF 20000 1FFFF 10000 0FFFF 00000 FFFFF FC000 7FFFF 7C000 3FFFF 30000 2FFFF 20000 1FFFF 10000 0FFFF 00000 FFFFF FC000 DFFFF DC000 CF000 CC000 9FFFF 9C000 83FFF 80000 7FFFF 7C000 3FFFF 30000 2FFFF 20000 1FFFF 10000 0FFFF 00000 FFFFF 00000 FFFFF FC000 9FFFF 9C000 83FFF 80000 7FFFF 7C000 3FFFF 30000 2FFFF 20000 1FFFF 10000 0FFFF 00000 8088 Memory Map 16KB EPROM chip CS4 CS5 CS6 CS7 CS8 CS9 CS10 OE CS3 A0-A13 A 7 B 6 C 5 74LS138 4 3 E1 2 E2 1 E 0 A17 A19 A14 A15 A16 A19 = 1, A17 = 0 activate the decoder A16, A15, A14 select one EPROM chip mirror image base image A0 ... A15 64KB RAM chip A18 A19 CS1’ MWTC MRDC The same Memory-map assignment A0 ... A15 64KB RAM chip WR RD A 64Kbyte = 216 RAM chip has 16 address lines, A0 - A15 CS1 A18 A19 IO/M mirror images A19, A18 assigned to 00 => CS active for every address from 00000 to 3FFFF A18 = 0 A19 = 0 IO/M = 0 IO/M = 0 => Memory map A16, A17 not used => four images for the same chip base image WR RD

Generating Wait States Wait states are inserted into memory read or write cycles if slow memories are used in computer systems Ready signal is used to indicate if wait states are needed data Address memory 8088 Delay circuit decoder Ready clr Ready clr Q D Q D clk

Generating Wait States (Timing)