Lecture 06: Memory Address Decoding. The 80x86 IBM PC and Compatible Computers Chapter 10 Memory and Memory Interfacing Chapter 11 I/O and the 8255.

Slides:



Advertisements
Similar presentations
MICROPROCESSOR BASED SYSTEM DESIGN
Advertisements

MEMORY popo.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 4.
Memory & IO Interfacing to CPU
MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
Lecture 07: 8255 PPI Chip. The 80x86 IBM PC and Compatible Computers Chapter PPI Chip PPI: Programmable Parallel Interface (so it is an I/O.
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
The 8085 Microprocessor Architecture
Introduction to 8086 Microprocessor
The 8085 Microprocessor Architecture. Contents The 8085 and its Buses. The address and data bus ALU Flag Register Machine cycle Memory Interfacing The.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
Chapter 0 Introduction to Computing
I/O Subsystem Organization and Interfacing Cs 147 Peter Nguyen
P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM)
MANINDER KAUR RAM and ROM Chips 24-Nov
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
An Introduction to 8086 Microprocessor.
CPU Interfacing Memory.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Lecture 06: Memory Address Decoding
Computer Architecture Lecture 8 by Engineer A. Lecturer Aymen Hasan AlAwady 30/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
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,
Input/Output Interface Circuits and LSI Peripheral Devices
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Input-Output Organization
ELEC4601 Microprocessors Lab 2 Tutorial Signal Waveforms and Parallel port programming.
Introduction to Microprocessors
INTRODUCTION.  Upon completing this topic, you should be able to: Illustrate a basic elements of digital computer system and their functions, Depicts.
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.
I/O AND THE 8255; ISA BUS INTERFACING
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Concepts of Engineering and Technology Copyright © Texas Education Agency, All rights reserved.
Basic I/O Interface Fixed Address Variable Address
Block diagram of 8086.
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Internal Programming Architecture or Model
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
University of Tehran 1 Microprocessor System Design Omid Fatemi.
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
The 8085 Microprocessor Architecture
Microprocessor Systems Design I
Memory Interfacing.
Introduction to 8086 Microprocessor
Computer Architectures M
The 8085 Microprocessor Architecture
8086 Microprocessor.
Interfacing 64Kb EPROM with 8085
Dr. Rabie A. Ramadan Al-Azhar University Lecture 5
Computer Architectures M
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Interfacing Memory Interfacing.
Memory Systems Digital Systsems M.
8086 Registers Module M14.2 Sections 9.2, 10.1.
Microprocessor Lab CSL1543 0:0:2
Unit – Microcontroller Tutorial Class - 2 ANITS College
COMP 1321 Digital Infrastructure
COMP 1321 Digital Infrastructure
The 8085 Microprocessor Architecture
Lecture 06 Programming language.
Flags Carry flag Overflow Parity flag Direction Interrupt enable
Unit-I 80386DX Architecture
Microprocessor I 7/18/2019.
Presentation transcript:

Lecture 06: Memory Address Decoding

The 80x86 IBM PC and Compatible Computers Chapter 10 Memory and Memory Interfacing Chapter 11 I/O and the 8255

Review on Memory Chips zKey concepts: capacity, organization (the number of locations X the size of addressable unit), access time zPackaging RAM chip ROM chip

What to Learn? zHow does the 8086 CPU execute an instruction like MOV BX, [1000h]? zWhat is the difference between executing MOV BX, [1000h] and executing MOV [1001h], BX? zWhat is the difference between accessing memory and accessing I/O devices?

Memory Address Decoding zAccording to your instructions that access memory  E.g., MOV AX, [0012H] zCPU calculates the physical address and put corresponding signals on the address bus yE.g., if DS=0900H, what’s the PA? zMemory address decoding circuitry locates the specific memory chip that stores the desired data yExamine address decoding using logic gates and 74LS138 decoder chips

Memory Address Decoding PA of 0900:0012 = 09012H

Quiz What’s the type and the address range of this memory chip?

The 74LS138 Decoder Chip

Using 74LS138 to Decode Grounded

Quiz 2 What’s the address range for Y4 and Y7?

More on Address Decoding zAbsolute address decoding yAll address lines are decoded zLinear select decoding yOnly selected lines are decoded yCheap yBut with aliases: the same memory unit (I/O port) with multiple addresses xWhy this happens?

Example 1. In a particular computer, the address range from 0000h to 3FFFh is used for ROM, the range from 4000h to 5FFFh is reserved for future use, and the range from 6000h to 0FFFFh is used for RAM. Assume that the control signals for RAM are CS~ and WE~, and the CPU has 16 address pins (i.e., A15~A0), 8 data pins (i.e., D7~D0), and R/W~ and MREQ~ control signals. Achieve the following requests. (1) draw the address decoding solution using a 74LS138 chip (2) if both ROM and RAM are built with 8K×1 memory chips, try to draw the connection between the CPU and the memory. (3) if ROM is built with 8K×8 memory chips and RAM is built with 4K×8 chips, try to draw the connection between the CPU and the memory. (4) what if ROM is built with 16K×8 memory chips and RAM is built with 8K×8 memory chips?

Solution. (1) draw the address decoding solution using a 74LS138 chip

(2) if both ROM and RAM are built with 8K×1 memory chips, try to draw the connection between the CPU and the memory. Solution.

(3) if ROM is built with 8K×8 memory chips and RAM is built with 4K×8 chips, try to draw the connection between the CPU and the memory. Solution.

(4) what if ROM is built with 16K×8 memory chips and RAM is built with 8K×8 memory chips? Solution.

Example 2. Assume one computer system needs 512 byte RAM and 512 byte ROM. If RAM is built with 128×8 memory chips and ROM is built with 512×8 memory chips, please specify the address range of each memory chip. Given that RAM chips need CS~ and WE~ control signals, ROM chips need only CS~ control signal, and the CPU has 16 address pins (A15~A0), 8 data pins (D7~D0) and R/W~ and MREQ~ control signals, draw the connection between the CPU and the memory. Solution. The address range of each memory chip :

As the total volume of the memory is 1K, we need 10 address lines. RAM chips need 7 address lines and ROM chips need 10 address lines. CPU MREQ# A 15 ~A 0 R/W# D 7 ~D 0 128x8 WE A CS D 7 ~D 0 128x8 WE A CS D 7 ~D 0 128x8 WE A CS D 7 ~D 0 128x8 WE A CS D 7 ~D 0 512x8 A CS D 7 ~D decoder A7A8A9A7A8A9 A 6 ~A 0 A 8 ~A 0 & OE#

Data Integrity zChecksum byte for ROM zParity bit for DRAM zCRC for disks and the Internet

Checksum Byte zCheck the integrity of a series of bytes yCalculation xAdd all bytes together and drop all carries xTake the 2’s complement of the sum yStore the checksum byte together with data ycheck the integrity by adding data and the checksum together yThen how to prove the integrity of the data? yE.g., 38H, 23H, 33H, 07H, what is the checksum byte? 6BH

Parity bit zCheck the integrity of a series of bits (a byte) yeven parity: if the number of 1s in the series of bits is odd, then the parity bit is set to 1; otherwise, set to 0, making the total number of 1s even (Data + the parity bit) yodd parity: if the number of 1s in the series of bits is odd, then the parity bit is set to 0; otherwise, set to 1 yIn 8086, odd parity is used, i.e., if data have even number of 1s, the parity bit is set

Memory Organization in 8086 zEven and odd banks

Byte-Memory Operations zByte-memory operation at even address X MOV AL, [100h] zByte-memory operation at odd address X+1 MOV AL, [101h]

Aligned Word-Memory Operations zAccessing an aligned word at even address X MOV AX, [100h]

Misaligned Word-Memory Operations zAccessing an misaligned word at odd address X+1 MOV AX, [101h]

Let's Tell the Stories Could you possibly tell the complete procedure of the 8086 CPU executing an instruction like MOV BX, [1000h]? What about MOV [1001h], BX?

I/O in X86 family – The Other Space from Memory zX86 microprocessors have an I/O space in addition to memory space zUse special I/O instructions accessing I/O devices at ports (i.e., addresses for I/O) zMemory can contain machine codes and data, I/O ports only contain data zAlso referred to as peripheral I/O or isolated I/O

I/O Instructions – 8-Bit Instance zDirect I/O instructions: yport# ranges from 00h to 0ffh, 256 ports in total zIndirect I/O instructions: yport# ranges from 0000h to 0ffffh, ports in all yuse a 16-bit address that resides in the DX register zNote: no segment concept for port addresses

I/O Example ‘Y’‘Y’

I/O Instructions – 16-Bit Instance zFor 16-bit I/O modules zDirect I/O instructions: yport# ranges from 00h to 0ffh, 256 ports in total IN AX, port# OUT port#, AX zIndirect I/O instructions: yport# ranges from 0000h to 0ffffh, ports in all yuse a 16-bit address that resides in the DX registerMOV DX, port# IN AX, DX OUT DX, AX

Interfacing 8-bit I/O Modules to a 16-bit Data Bus zFor 8086, data for even-address ports are carried on data bus D0-D7 and data for odd-address ports are carried on data bus D8-D15

Output Port Design zLatch the data coming from the CPU zAddress decoding What is the address of this port?

Input Port Design zUse tri-state buffer to connect to system data bus zAddress decoding What is the address of this port?