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



Similar documents
Memory. The memory types currently in common usage are:

Computer Systems Structure Main Memory Organization

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

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

Memory Basics. SRAM/DRAM Basics

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

A N. O N Output/Input-output connection

Computer Architecture

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

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

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

Chapter 5 :: Memory and Logic Arrays

Chapter 7 Memory and Programmable Logic

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

1. Memory technology & Hierarchy

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

Main Memory & Backing Store. Main memory backing storage devices

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

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

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

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

Computer Architecture

Microprocessor or Microcontroller?

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

Flash Memories. João Pela (52270), João Santos (55295) December 22, 2008 IST

Chapter 2 Logic Gates and Introduction to Computer Architecture

FLASH TECHNOLOGY DRAM/EPROM. Flash Year Source: Intel/ICE, "Memory 1996"

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

CHAPTER 7: The CPU and Memory

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

Memory unit. 2 k words. n bits per word

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

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

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)

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

Semiconductor Memories

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

Chapter 8 Memory Units

CSCA0201 FUNDAMENTALS OF COMPUTING. Chapter 5 Storage Devices

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

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

AN1837. Non-Volatile Memory Technology Overview By Stephen Ledford Non-Volatile Memory Technology Center Austin, Texas.

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

Yaffs NAND Flash Failure Mitigation

SDRAM and DRAM Memory Systems Overview

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

TECHNOLOGY BRIEF. Compaq RAID on a Chip Technology EXECUTIVE SUMMARY CONTENTS

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

Memory Systems. Static Random Access Memory (SRAM) Cell

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

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

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

(Refer Slide Time: 00:01:16 min)

CHAPTER 16 MEMORY CIRCUITS

PowerPC Microprocessor Clock Modes

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

The Central Processing Unit:

Memory Testing. Memory testing.1

Price/performance Modern Memory Hierarchy

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

MULTIPLE CHOICE FREE RESPONSE QUESTIONS

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Lecture N -1- PHYS Microcontrollers

The Quest for Speed - Memory. Cache Memory. A Solution: Memory Hierarchy. Memory Hierarchy

Discovering Computers Living in a Digital World

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

Lecture 9: Memory and Storage Technologies

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Understanding Memory TYPES OF MEMORY

DS1220Y 16k Nonvolatile SRAM

Sequential Circuit Design

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Programming Logic controllers

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

Data remanence in Flash Memory Devices

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

路 論 Chapter 15 System-Level Physical Design

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

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

Computer Hardware Submitted in partial fulfillment of the requirement for the award of degree Of MCA

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Primary Memory. Input Units CPU (Central Processing Unit)

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

Basic Computer Organization

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

Am186ER/Am188ER AMD Continues 16-bit Innovation

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

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

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

The Motherboard Chapter #5

Chapter 13. PIC Family Microcontroller

MICROPROCESSOR AND MICROCOMPUTER BASICS

User s Manual HOW TO USE DDR SDRAM

Spacecraft Computer Systems. Colonel John E. Keesee

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

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division

DS1307ZN. 64 x 8 Serial Real-Time Clock

DS1225Y 64k Nonvolatile SRAM

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

Candidates should be able to: (i) describe the purpose of RAM in a computer system

Transcription:

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

Lesson 5 Memory-I Version 2 EE IIT, Kharagpur 2

Instructional Objectives After going through this lesson the student would Pre-Requisite o Different kinds of Memory Processor Memory Primary Memory Memory Interfacing Digital Electronics, Microprocessors 5.1 Introduction This chapter shall describe about the memory. Most of the modern computer system has been designed on the basis of an architecture called Von-Neumann Architecture 1 Input Output Devices Central Processing Unit Memory Fig. 5.1 The Von Neumann Architecture The Memory stores the instructions as well as data. No one can distinguish an instruction and data. The CPU has to be directed to the address of the instruction codes. The memory is connected to the CPU through the following lines 1. Address 2. Data 3. Control 1 http://en.wikipedia.org/wiki/john_von_neumann. The so-called von Neumann architecture is a model for a computing machine that uses a single storage structure to hold both the set of instructions on how to perform the computation and the data required or generated by the computation. Such machines are also known as storedprogram computers. The separation of storage from the processing unit is implicit in this model. By treating the instructions in the same way as the data, a stored-program machine can easily change the instructions. In other words the machine is reprogrammable. One important motivation for such a facility was the need for a program to increment or otherwise modify the address portion of instructions. This became less important when index registers and indirect addressing became customary features of machine architecture. Version 2 EE IIT, Kharagpur 3

Data Lines CPU Address Lines Memory Control Lines Fig. 5.2 The Memory Interface In a memory read operation the CPU loads the address onto the address bus. Most cases these lines are fed to a decoder which selects the proper memory location. The CPU then sends a read control signal. The data is stored in that location is transferred to the processor via the data lines. In the memory write operation after the address is loaded the CPU sends the write control signal followed by the data to the requested memory location. The memory can be classified in various ways i.e. based on the location, power consumption, way of data storage etc The memory at the basic level can be classified as 1. Processor Memory (Register Array) 2. Internal on-chip Memory 3. Primary Memory 4. Cache Memory 5. Secondary Memory Processor Memory (Register Array) Most processors have some registers associated with the arithmetic logic units. They store the operands and the result of an instruction. The data transfer rates are much faster without needing any additional clock cycles. The number of registers varies from processor to processor. The more is the number the faster is the instruction execution. But the complexity of the architecture puts a limit on the amount of the processor memory. Version 2 EE IIT, Kharagpur 4

Internal on-chip Memory In some processors there may be a block of memory location. They are treated as the same way as the external memory. However it is very fast. Primary Memory This is the one which sits just out side the CPU. It can also stay in the same chip as of CPU. These memories can be static or dynamic. Cache Memory This is situated in between the processor and the primary memory. This serves as a buffer to the immediate instructions or data which the processor anticipates. There can be more than one levels of cache memory. Secondary Memory These are generally treated as Input/Output devices. They are much cheaper mass storage and slower devices connected through some input/output interface circuits. They are generally magnetic or optical memories such as Hard Disk and CDROM devices. The memory can also be divided into Volatile and Non-volatile memory. Volatile Memory The contents are erased when the power is switched off. Semiconductor Random Access Memories fall into this category. Non-volatile Memory The contents are intact even of the power is switched off. Magnetic Memories (Hard Disks), Optical Disks (CDROMs), Read Only Memories (ROM) fall under this category. Version 2 EE IIT, Kharagpur 5

CPU Control Unit ALU Registers Input Output Memory Fig. 5.3 The Internal Registers 5.2 Data Storage An m word memory can store m x n: m words of n bits each. One word is located at one address therefore to address m words we need. k = Log2(m) address input signals or k number address lines can address m = 2 k words Example 4,096 x 8 memory: 32,768 bits 12 address input signals 8 input/output data signals m n memory m words n bits per word Fig. 5.4 Data Array Version 2 EE IIT, Kharagpur 6

Memory access The memory location can be accessed by placing the address on the address lines. The control lines read/write selects read or write. Some memory devices are multi-port i.e. multiple accesses to different locations simultaneously r/w enable memory external view 2 k n read and write memory A 0 A k-1 Q n-1 Q 0 Fig. 5.5 Memory Array Memory Specifications The specification of a typical memory is as follows The storage capacity: The number of bits/bytes or words it can store The memory access time (read access and write access): How long the memory takes to load the data on to its data lines after it has been addressed or how fast it can store the data upon supplied through its data lines. This reciprocal of the memory access time is known as Memory Bandwidth The Power Consumption and Voltage Levels: The power consumption is a major factor in embedded systems. The lesser is the power consumption the more is packing density. Size: Size is directly related to the power consumption and data storage capacity. Generation 1 Generation 2 Version 2 EE IIT, Kharagpur 7

Generation 3 Generation 4 Fig. 5.6 Four Generations of RAM chips There are two important specifications for the Memory as far as Real Time Embedded Systems are concerned. Write Ability Storage Performance Write ability It is the manner and speed that a particular memory can be written Ranges of write ability High end processor writes to memory simply and quickly e.g., RAM Middle range processor writes to memory, but slower e.g., FLASH, EEPROM (Electrically Erasable and Programmable Read Only Memory) Lower range special equipment, programmer, must be used to write to memory EPROM, OTP ROM (One Time Programmable Read Only Memory) Low end bits stored only during fabrication e.g., Mask-programmed ROM In-system programmable memory Can be written to by a processor in the embedded system using the memory Memories in high end and middle range of write ability Storage permanence It is the ability to hold the stored bits. Range of storage permanence High end essentially never loses bits e.g., mask-programmed ROM e.g., Version 2 EE IIT, Kharagpur 8

Middle range holds bits days, months, or years after memory s power source turned off e.g., NVRAM Lower range holds bits as long as power supplied to memory e.g., SRAM Low end begins to lose bits almost immediately after written e.g., DRAM Nonvolatile memory Holds bits after power is no longer supplied High end and middle range of storage permanence 5.3 Common Memory Types Read Only Memory (ROM) This is a nonvolatile memory. It can only be read from but not written to, by a processor in an embedded system. Traditionally written to, programmed, before inserting to embedded system Uses Store software program for general-purpose processor program instructions can be one or more ROM words Store constant data needed by system Implement combinational circuit External view enable 2 k n ROM A 0 A k-1 Example Q n-1 Q 0 Fig. 5.7 The ROM Structure The figure shows the structure of a ROM. Horizontal lines represents the words. The vertical lines give out data. These lines are connected only at circles. If address input is 010 the decoder sets 2 nd word line to 1. The data lines Q3 and Q1 are set to 1 because there is a programmed Version 2 EE IIT, Kharagpur 9

connection with word 2 s line. The word 2 is not connected with data lines Q2 and Q0. Thus the output is 1010 Internal view 8 4 ROM enable A 0 3 8 decoder word 0 word 1 word 2 word line A 1 A 2 data line programmable connection wired-or Q 3 Q 2 Q 1 Q 0 Fig. 5.8 The example of a ROM with decoder and data storage Implementation of Combinatorial Functions Any combinational circuit of n functions of same k variables can be done with 2 k x n ROM. The inputs of the combinatorial circuit are the address of the ROM locations. The output is the word stored at that location. Truth table Inputs (address) Outputs a b c y z 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 enable c b a 8 2 ROM word 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 1 y z word 1 word 7 Mask-programmed ROM Fig. 5.9 The combinatorial table The connections programmed at fabrication. They are a set of masks. It can be written only once (in the factory). But it stores data for ever. Thus it has the highest storage permanence. The bits never change unless damaged. These are typically used for final design of high-volume systems. Version 2 EE IIT, Kharagpur 10

OTP ROM: One-time programmable ROM The Connections programmed after manufacture by user. The user provides file of desired contents of ROM. The file input to machine called ROM programmer. Each programmable connection is a fuse. The ROM programmer blows fuses where connections should not exist. Very low write ability: typically written only once and requires ROM programmer device Very high storage permanence: bits don t change unless reconnected to programmer and more fuses blown Commonly used in final products: cheaper, harder to inadvertently modify EPROM: Erasable programmable ROM This is known as erasable programmable read only memory. The programmable component is a MOS transistor. This transistor has a floating gate surrounded by an insulator. The Negative charges form a channel between source and drain storing a logic 1. The Large positive voltage at gate causes negative charges to move out of channel and get trapped in floating gate storing a logic 0. The (Erase) Shining UV rays on surface of floating-gate causes negative charges to return to channel from floating gate restoring the logic 1. An EPROM package showing quartz window through which UV light can pass. The EPROM has Better write ability can be erased and reprogrammed thousands of times Reduced storage permanence program lasts about 10 years but is susceptible to radiation and electric noise Typically used during design development floating 0V +15V (b) (a) (d) 5-30 min (c) EEPROM Fig. 5.10 The EPROM EEPROM is otherwise known as Electrically Erasable and Programmable Read Only Memory. It is erased typically by using higher than normal voltage. It can program and erase individual words unlike the EPROMs where exposure to the UV light erases everything. It has Version 2 EE IIT, Kharagpur 11

Better write ability can be in-system programmable with built-in circuit to provide higher than normal voltage built-in memory controller commonly used to hide details from memory user writes very slow due to erasing and programming busy pin indicates to processor EEPROM still writing can be erased and programmed tens of thousands of times Similar storage permanence to EPROM (about 10 years) Far more convenient than EPROMs, but more expensive Flash Memory It is an extension of EEPROM. It has the same floating gate principle and same write ability and storage permanence. It can be erased at a faster rate i.e. large blocks of memory erased at once, rather than one word at a time. The blocks are typically several thousand bytes large Writes to single words may be slower Entire block must be read, word updated, then entire block written back Used with embedded systems storing large data items in nonvolatile memory e.g., digital cameras, TV set-top boxes, cell phones RAM: Random-access memory Typically volatile memory bits are not held without power supply Read and written to easily by embedded system during execution Internal structure more complex than ROM a word consists of several memory cells, each storing 1 bit each input and output data line connects to each cell in its column rd/wr connected to every cell when row is enabled by decoder, each cell has logic that stores input data bit when rd/wr indicates write or outputs stored bit when rd/wr indicates read Version 2 EE IIT, Kharagpur 12

r/w enable external view 2 k n read and write memory A 0 A k-1 Q n-1 Q 0 Fig. 5.11 The structure of RAM internal view I 3 I 2 I 1 I 0 4 4 RAM enable 2 4 decoder A 0 A 1 rd/wr To every cell Memory cell Q 3 Q 2 Q Q Fig. 5.12 The RAM decoder and access Basic types of RAM SRAM: Static RAM Memory cell uses flip-flop to store bit Requires 6 transistors Holds data as long as power supplied DRAM: Dynamic RAM Memory cell uses MOS transistor and capacitor to store bit More compact than SRAM Refresh required due to capacitor leak word s cells refreshed when read Typical refresh rate 15.625 microsec. Slower to access than SRAM Version 2 EE IIT, Kharagpur 13

SRAM DRAM Data' Data W Data W Ram variations PSRAM: Pseudo-static RAM DRAM with built-in memory refresh controller Popular low-cost high-density alternative to SRAM NVRAM: Nonvolatile RAM Holds data after external power removed Battery-backed RAM SRAM with own permanently connected battery writes as fast as reads no limit on number of writes unlike nonvolatile ROM-based memory SRAM with EEPROM or flash stores complete RAM contents on EEPROM or flash before power 5.4 Example: HM6264 & 27C256 RAM/ROM devices Low-cost low-capacity memory devices Commonly used in 8-bit microcontroller-based embedded systems First two numeric digits indicate device type RAM: 62 ROM: 27 Subsequent digits indicate capacity in kilobits Version 2 EE IIT, Kharagpur 14

11-13, 15-19 data<70> 11-13, 15-19 data<70> 2,23,21,24, 25, 3-10 22 addr<15...0> /OE 27,26,2,23,21, 24,25, 3-10 22 addr<15...0> /OE 27 /WE 20 /CS 20 /CS1 26 CS2 HM6264 block diagrams 27C256 Device Access Time (ns) Standby Pwr. (mw) Active Pwr. (mw) Vcc Voltage (V) HM6264 85-100.01 15 5 27C256 90.5 100 5 device characteristics Read operation data addr OE /CS1 CS2 Write operation data addr WE /CS1 CS2 timing diagrams 5.5 Example: TC55V2325FF-100 memory device 2-megabit synchronous pipelined burst SRAM memory device Designed to be interfaced with 32-bit processors Capable of fast sequential reads and writes as well as single byte I/O Version 2 EE IIT, Kharagpur 15

data<310> addr<150> addr<10...0> Device Access Time (ns) Standby Pwr. (mw) Active Pwr. (mw) Vcc Voltage (V) TC55V23 10 na 1200 3.3 25FF-100 device characteristics /CS1 /CS2 A single read operation CS3 /WE /OE MODE /ADSP /ADSC /ADV CLK TC55V2325 FF-100 block diagram CLK /ADSP /ADSC /ADV addr <150> /WE /OE /CS1 and /CS2 CS3 data<310> timing diagram 5.6 Composing memory Memory size needed often differs from size of readily available memories When available memory is larger, simply ignore unneeded high-order address bits and higher data lines When available memory is smaller, compose several smaller memories into one larger memory Connect side-by-side to increase width of words Connect top to bottom to increase number of words added high-order address line selects smaller memory containing desired word using a decoder Combine techniques to increase number and width of words Version 2 EE IIT, Kharagpur 16

A 0 A m-1 A m 1 2 decoder Increase number of words (2 m+1 ) n ROM 2 m n ROM enable 2 m n ROM Q n-1 Q 0 2 m 3n ROM Increase width of words enable A 0 A m 2 m n ROM 2 m n ROM 2 m n ROM Q 3n-1 Q 2n-1 Q 0 Increase number and width of words A enable outputs Fig. 5.13 Composing Memory 5.7 Conclusion In this chapter you have learnt about the following 1. Basic Memory types 2. Basic Memory Organization 3. Definitions of RAM, ROM and Cache Memory Version 2 EE IIT, Kharagpur 17

4. Difference between Static and Dynamic RAM 5. Various Memory Control Signals 6. Memory Specifications 7. Basics of Memory Interfacing 5.8 Questions Q1. Discuss the various control signals in a typical RAM device (say HM626) Ans: 11-13, 15-19 2,23,21,24, 25, 3-10 22 27 data<70> addr<15...0> /OE /WE 20 26 /CS1 CS2 HM6264 /OE: output enable bar: the output is enables when it is low. It is same as the read bar line /WE: write enable bar: the line has to made low while writing to this device CS1: chip select 1 bar: this line has to be made low along with CS2 bar to enable this chip Q2. Download the datasheet of TC55V2325FF chip and indicate the various signals. Version 2 EE IIT, Kharagpur 18

Version 2 EE IIT, Kharagpur 19

Version 2 EE IIT, Kharagpur 20