SYSC Microprocessor Systems. SYSC3601 Microprocessor Systems. Unit 5: Memory Structures and Interfacing

Similar documents
Memory Basics. SRAM/DRAM Basics

A N. O N Output/Input-output connection

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Objectives. Units of Memory Capacity. CMPE328 Microprocessors (Spring ) Memory and I/O address Decoders. By Dr.

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Memory. The memory types currently in common usage are:

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

With respect to the way of data access we can classify memories as:

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

Chapter 7 Memory and Programmable Logic

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Handout 17. by Dr Sheikh Sharif Iqbal. Memory Unit and Read Only Memories

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Computer Architecture

Semiconductor Memories

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

Computer Systems Structure Main Memory Organization

Algorithms and Methods for Distributed Storage Networks 3. Solid State Disks Christian Schindelhauer

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Microprocessor & Assembly Language

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

1. Memory technology & Hierarchy

Chapter 5 :: Memory and Logic Arrays

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

Chapter 2 Logic Gates and Introduction to Computer Architecture

1 / 25. CS 137: File Systems. Persistent Solid-State Storage

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

MICROPROCESSOR AND MICROCOMPUTER BASICS

W25Q80, W25Q16, W25Q32 8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI

Memory Systems. Static Random Access Memory (SRAM) Cell

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Chapter 9 Semiconductor Memories. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded

EXERCISES OF FUNDAMENTALS OF COMPUTER TECHNOLOGY UNIT 5. MEMORY SYSTEM

MACHINE ARCHITECTURE & LANGUAGE

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

SDRAM and DRAM Memory Systems Overview

Computer Architecture

CHAPTER 7: The CPU and Memory

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

Discovering Computers Living in a Digital World

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

Chapter 13. PIC Family Microcontroller

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER

Byte Ordering of Multibyte Data Items

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

Lecture 9: Memory and Storage Technologies

Embedded Systems Design Course Applying the mbed microcontroller

PART B QUESTIONS AND ANSWERS UNIT I

The Programming Interface

8051 hardware summary

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Sequential Circuit Design

Microprocessor or Microcontroller?

Lecture N -1- PHYS Microcontrollers

Memory ICS 233. Computer Architecture and Assembly Language Prof. Muhamed Mudawar

Understanding Memory TYPES OF MEMORY

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

DS1225Y 64k Nonvolatile SRAM

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Programming NAND devices

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Booting from NAND Flash Memory

Data remanence in Flash Memory Devices

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

W25Q128FV 3V 128M-BIT SERIAL FLASH MEMORY WITH DUAL/QUAD SPI & QPI. Publication Release Date: August 24, 2015 Revision L

Price/performance Modern Memory Hierarchy

The Central Processing Unit:

Bandwidth Calculations for SA-1100 Processor LCD Displays

Single 2.5V - 3.6V or 2.7V - 3.6V supply Atmel RapidS serial interface: 66MHz maximum clock frequency. SPI compatible modes 0 and 3

Programming Logic controllers

CHAPTER 16 MEMORY CIRCUITS

DS18B20 Programmable Resolution 1-Wire Digital Thermometer

OpenSPARC T1 Processor

DS1220Y 16k Nonvolatile SRAM

Memory Testing. Memory testing.1

Table 1: Address Table

Computer Organization and Architecture. Characteristics of Memory Systems. Chapter 4 Cache Memory. Location CPU Registers and control unit memory

Basic Computer Organization

Am186ER/Am188ER AMD Continues 16-bit Innovation

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

2.0 Command and Data Handling Subsystem

Lecture 16: Address decoding

3 Mbit / 4 Mbit / 8 Mbit LPC Flash SST49LF030A / SST49LF040A / SST49LF080A

8741A UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

Lecture 5: Gate Logic Logic Optimization

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

361 Computer Architecture Lecture 14: Cache Memory

Using Altera MAX Series as Microcontroller I/O Expanders

Transcription:

SYSC3601 1 Microprocessor Systems SYSC3601 Microprocessor Systems Unit 5: Memory Structures and Interfacing

Topics/Reading SYSC3601 2 Microprocessor Systems 1. Memory Types 2. Interfacing 8-bit memory/io (8088) 3. Interfacing 16-bit memory/io (8086) 4. Interfacing 32/64-bit memory/io Reading: Chapter 10, skim 10-5 &10-6

Memory Types SYSC3601 3 Microprocessor Systems Read-Only Memory (ROM) Non-volatile! ROM Read-Only Memory programmed during fabrications at factory. control program in dedicated µp systems is stored in ROM. PROM Programmable Read-Only Memory. programmed by burning (blowing) tiny Nichrome or silicon-oxide fuses. Once programmed, it cannot be erased.

Memory Types SYSC3601 4 Microprocessor Systems Read-Only Memory (ROM) con t EPROM Erasable Programmable Read Only Memory. Memory can be erased by exposure to UV light (up to 20min) can be programmed by user, but it is usually removed to be erased. Ex: 2716, 2764, 27256. EEPROM Electrically Erasable Programmable Read-Only Memory Also called Flash MemoryTM (Intel), or EARM (Electrically Alterable ROM). Can be erased and reprogrammed in and by the system.

Memory Types SYSC3601 5 Microprocessor Systems Random Access Memory (RAM) 2 types: 1) Static (SRAM) Retains data for as long as power is applied FAST, EXPENSIVE, BIG higher gate count 4 or 6, needs a flip flop Used for cache

SYSC3601 6 Microprocessor Systems Memory Types Random Access Memory (RAM) con t 2) Dynamic (DRAM) Retains data for only 2-4ms, then must be refreshed. Slower but cheaper and can be larger (e.g. 2GB DIMM) High density (1 transistor plus capacitor) Usually use a DRAM controller to handle interfacing and refresh.

Memory Types SYSC3601 7 Microprocessor Systems

Memory Types SYSC3601 8 Microprocessor Systems DRAM Organization

Memory Types SYSC3601 9 Microprocessor Systems

Memory & I/O Interfacing SYSC3601 10 Microprocessor Systems General steps for memory and I/O interfacing Generic memory device:

Memory & I/O Interfacing SYSC3601 11 Microprocessor Systems N address lines can address 2N memory locations: 1k 1024 2k 2048 4k 4096 Size Lines Range 21 0 21 1 21 2 10 00000-003FF 11 00000-007FF 12 00000-00FFF 1M 10848576 22 0 20 00000-FFFFF

Memory & I/O Interfacing SYSC3601 12 Microprocessor Systems Steps to success: 1) Architectural questions: How many chips are required? How many address lines go to each chip? How will chips be organized into banks and which parts of the address bus will be used? 2) Determine address range: Typically problem is to place devices within memory map Determine START, SIZE, LO (=START), HI (=LO+SIZE-1) Determine CONST, SEL, and MEM address lines 3) Generate overall chip select signal (MSEL) from CONST portion of address range and M/IO 4) Generate bank-specific write signals if required 5) Complete interface design! (often using decoders) Be sure to connect address bus, data bus, and control bus (RD, WR)

SYSC3601 13 Microprocessor Systems Memory & I/O Interfacing Example 1 Ex: Design an interface for an 8088 µp to connect a single 2716 (2K x 8) EPROM such that memory starts at address FF800H. Notes: The 8088 has 20 address lines and 8 data lines (assuming that it is already fully demultiplexed and buffered) The 2716 has 1 CS (chip select) pin and one OE (output enable) pin. Standard logic gates (NAND, NOR, NOT) may be used.

SYSC3601 14 Microprocessor Systems Memory & I/O Interfacing Example 1 Steps to success: 1) Architectural questions: How many chips are required? ONE How many address lines go to each chip? The 2716 has 2k = 21 x 210 = 211 locations, so we need 11 address lines to the 2716 chip. How will chips be organized into banks and which parts of the address bus will be used? Only 8-bit data bus -> only one bank. No bank-enable signals required. 2) Determine address range: START = SIZE = LO (=START) = HI (=LO+SIZE-1) Determine CONST, SEL, and MEM address lines 3) Generate overall chip select signal from CONST portion of address range and M/IO 4) Generate bank-specific write signals if required 5) Complete interface design! (often using decoders) Be sure to connect address bus, data bus, and control bus (RD, WR)

SYSC3601 15 Microprocessor Systems Memory & I/O Interfacing Example 1 Steps to success: 1) Architectural questions: 2) Determine address range: START = FF800h SIZE = 800h (2K) LO (=START) = FF800h HI (=LO+SIZE-1) = FFFFFh (FF800h+800h-1) Determine CONST, SEL, and MEM address lines: 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 CNST (decode) To Memory Device

Memory & I/O Interfacing Example 1 SYSC3601 16 Microprocessor Systems Steps to success: 1) Architectural questions: 2) Determine address range: 3) Generate overall chip select signal from CONST portion of address range and M/IO: 19 18 17 16 15 14 13 12 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 CNST (decode) (IO/M since 8088) =1 only when A19 through A11 are all =1

SYSC3601 17 Microprocessor Systems 8-bit Memory Interfacing Example 1 4) Generate bank-specific write signals if required NOT 5) Complete interface design! (often using decoders) Be sure to connect address bus, data bus, and control bus (RD, WR): From previous slide Don t forget! (can include in SEL)

Address Decoding SYSC3601 18 Microprocessor Systems Notes on Address Decoding Address range will look something like this: 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 0 1 1 1 0 0 1 D D D M M M M M M M M M Constant Sel Memory device 1) Constant: to decoder or gate logic to select bank or enable decoders for DDD. 2) DDD: to decoder to select a memory device. 3) MMM: to memory devices depending on available address pins.

Address Decoding SYSC3601 19 Microprocessor Systems Logic decoders:

SYSC3601 20 Microprocessor Systems Address Decoding Programmable Decoders PLD Programmable logic device Arrays of logic elements that are programmable. 3 types: PLA Programmable logic array PAL Programmable array logic GAL Gated array logic PAL has replaced PROM address decoders in latest memory interfaces. typically constructed with AND/OR/NOT logic. PALs are programmed using software such as PALASM. Many examples in text use PAL decoders. In class, we will use logic gates directly, but in practice, PALs can reduce the chip count.

Sample PLD SYSC3601 21 Microprocessor Systems

Address Decoding SYSC3601 22 Microprocessor Systems The 74LS138 3-to-8 decoder

SYSC3601 23 Microprocessor Systems 8-bit Memory Interfacing Example 2 Ex: Design a 64k x 8 section of memory for the 8088 using 8k x 8 (2764) EPROMs. The memory start address is A0000H. Steps to success: 1) Architectural questions: How many chips are required? EIGHT We need 8 2764s (8k each) for 64k total memory. How many address lines go to each chip? The 2764 has 8k = 23 x 210 = 213 locations, so we need 13 address lines to each 2764 chip (the same 13 lines go to ALL chips). How will chips be organized into banks and which parts of the address bus will be used? Only 8-bit data bus -> only one bank. No bank-enable signals required.

Memory & I/O Interfacing Example 2 Steps to success: 1) Architectural questions: 2) Determine address range: We need a 64k = 26 x 210 = 216 byte memory block. START = A0000h SIZE = 10000h (64K = size of ALL chips put together) LO (=START) = A0000h HI (=LO+SIZE-1) = AFFFFh (A0000h+10000h-1) Determine CONST, SEL, and MEM address lines: 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 CNST SEL Memory Device Will enable decoder Goes to 74LS138 decoder Goes to each mem chip SYSC3601 24 Microprocessor Systems

8-bit Memory Interfacing Example 2 Steps to success: 1) Architectural questions: 2) Determine address range: 3) Generate overall chip select signal from CONST portion of address range and M/IO: 19 18 17 16 1 0 1 0 1 0 1 0 CNST ONES MSEL ZEROS SYSC3601 25 Microprocessor Systems

8-bit Memory Interfacing Example 2 SYSC3601 26 Microprocessor Systems 4) Generate bank-specific write signals if required NOT REQUIRED 5) Complete interface design! (often using decoders) Be sure to connect address bus, data bus, and control bus (RD, WR): 1 2 3 4 5 6 MSEL 7

EPROM location in 8088/8086 systems SYSC3601 27 Microprocessor Systems Note: Normally, the 8088 has EPROM located from F8000H to FFFFFH (upper 32k) since a hardware reset starts execution at FFFF0H. Note: Slower versions of many 2764 EPROMs have memory access times of 450nS. 8088 allows 460nS. Decoder ( 138) delay is 12nS Must use READY signal to insert wait state using 8284A clock generator. (how many?)

8086 Memory Interface SYSC3601 28 Microprocessor Systems The 8086 has a 16-bit data bus. Memory is arranged in two 8-bit banks low bank: contains all even addresses. high bank: contains all odd addresses.

8086 Memory Interface SYSC3601 29 Microprocessor Systems Aligned/unaligned words W1 is stored on an even (aligned) address. It can be accessed in a single read cycle. W2 is stored at an odd (unaligned) address. It will require two read cycles (8 T-cycles). (a) During first read, W2L (odd address) will appear on the high byte of the data bus. (b) During the second read, W2H (even address) will appear on the low byte of data bus. During a read operation, both banks may (and often are) activated. The µp will read 16-bits for read operations, or will only read the correct half of the data bus for byte operations. Note that AL may receive data from the high half of the data bus when reading a byte from an odd address!

8086 Memory Interface Write cycles must activate the correct bank(s) based on BHE and BLE (A0). BHE is supplied by µp (multiplexed with S7) A0 is used as BLE i.e. A0=0 for an even address and A0=1 for an odd address (A0 is not even a pin on the 386 and up) BHE BLE Function 0 0 Both banks (16 bits) 0 1 High bank (8 bits) 1 0 Low bank (8 bits) 1 1 No banks enabled SYSC3601 30 Microprocessor Systems

Memory & I/O Interfacing SYSC3601 31 Microprocessor Systems Remember the Steps to Success: 1) Architectural questions: How many chips are required? How many address lines go to each chip? How will chips be organized into banks and which parts of the address bus will be used? 2) Determine address range: Typically problem is to place devices within memory map Determine START, SIZE, LO (=START), HI (=LO+SIZE-1) Determine CONST, SEL, and MEM address lines 3) Generate overall chip select signal (MSEL) from CONST portion of address range and M/IO 4) Generate bank-specific write signals if required 5) Complete interface design! (often using decoders) Be sure to connect address bus, data bus, and control bus (RD, WR)

SYSC3601 32 Microprocessor Systems 16-bit Memory Interfacing Example 1 Design a memory interface for the 8086 which will provide 256k bytes of SRAM, organized as 128k x 16bits, starting at address 40000H and using 62256 SRAM chips (32k x 8bit). Assume that 8086 address, data, status, and control busses are already demultiplexed and buffered. 1. Architectural questions: We want 128k x 16 bits i.e. 128k x 16bits 4 chips for both the high and low banks. 8 chips total 62256 chips are 32k x 8bit; 32k = 25 x 210 15 address lines We will use a 2-to-4 decoder (74LS139) to select one out of four chips from each bank.

16-bit Memory Interfacing Example 1 SYSC3601 33 Microprocessor Systems 2a. Address Range: Start address is 40000h SIZE: 256k bytes is 28 x 210 40000h bytes Therefore address range is: Low = start = 40000h High = (start+size-1) = (40000h+40000h-1) = 7FFFFh

16-bit Memory Interfacing Example 1 SYSC3601 34 Microprocessor Systems 2b. Address Decoding: 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 DD SS Address Lines B 3. MSEL:

16-bit Memory Interfacing Example 1 SYSC3601 35 Microprocessor Systems 4. Bank-specific write signals: The 8086 already handles read from high/low/both banks as needed (W bit) We must select hi/low/both for write control 5. Design memory interface (next slide). Be sure to connect address bus, data bus, and control bus (RD, WR)

16-bit Memory Interfacing Example 1 SYSC3601 36 Microprocessor Systems Y0 Y1 Y2 Y3 What address range does each chip respond to?

32-bit Wide Memory SYSC3601 37 Microprocessor Systems Requires 4 banks, each 8-bits wide to generate (up to) 32-bits per read/write Bank ID is system address mod 4 Requires 4 bank enable signals for writes:

32-bit Wide Memory SYSC3601 38 Microprocessor Systems Click to edit Master text styles Second level Third level Fourth level Fifth level

64-bit Wide Memory SYSC3601 39 Microprocessor Systems