CHAPTER X MEMORY SYSTEMS

Similar documents
ELCT 912: Advanced Embedded Systems

Logic and Computer Design Fundamentals. Chapter 8 Memory Basics

Memory and Programmable Logic

Lecture 13: Memory and Programmable Logic

Concept of Memory. The memory of computer is broadly categories into two categories:

Memory and Programmable Logic

ECE 341. Lecture # 16

ELCT 501: Digital System Design

Digital Design, Kyung Hee Univ. Chapter 7. Memory and Programmable Logic

EECS 3201: Digital Logic Design Lecture 7. Ihab Amer, PhD, SMIEEE, P.Eng.

Random Access Memory (RAM)

Chapter 6 (Lect 3) Counters Continued. Unused States Ring counter. Implementing with Registers Implementing with Counter and Decoder

Design and Implementation of an AHB SRAM Memory Controller

UNIT V (PROGRAMMABLE LOGIC DEVICES)

Chapter 8 Memory Basics

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

Memory & Logic Array. Lecture # 23 & 24 By : Ali Mustafa

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

Address connections Data connections Selection connections

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

Memory & Simple I/O Interfacing

+1 (479)

ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13

Chapter Two - SRAM 1. Introduction to Memories. Static Random Access Memory (SRAM)

Read Only Memory ROM

Random Access Memory (RAM)

CENG 4480 L09 Memory 2

ECE 331 Digital System Design

ENGIN 112 Intro to Electrical and Computer Engineering

Introduction read-only memory random access memory

Memories. Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu.

Memory Devices. Future?

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

Programmable Logic Devices (PLDs)

MODULE 12 APPLICATIONS OF MEMORY DEVICES:

UMBC. Select. Read. Write. Output/Input-output connection. 1 (Feb. 25, 2002) Four commonly used memories: Address connection ... Dynamic RAM (DRAM)

falling edge Intro Computer Organization

ECE 485/585 Microprocessor System Design

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

I 4 I 3 I 2 I 1 I 0 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0 T-125. ROM Truth Table (Partial) 1997 by Prentice-Hall, Inc.

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver )

Memory and Programmable Logic

CSEE 3827: Fundamentals of Computer Systems. Storage

ECE 2300 Digital Logic & Computer Organization

Overview. Memory Classification Read-Only Memory (ROM) Random Access Memory (RAM) Functional Behavior of RAM. Implementing Static RAM

Summer 2003 Lecture 18 07/09/03

PROGRAMMABLE MODULES SPECIFICATION OF PROGRAMMABLE COMBINATIONAL AND SEQUENTIAL MODULES

Computer Organization and Assembly Language (CS-506)

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Computer Systems Organization

Mark Redekopp, All rights reserved. EE 352 Unit 10. Memory System Overview SRAM vs. DRAM DMA & Endian-ness

IT T35 Digital system desigm y - ii /s - iii

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

Picture of memory. Word FFFFFFFD FFFFFFFE FFFFFFFF

EE251: Thursday November 15

Computer Structure. Unit 2: Memory and programmable devices

eaymanelshenawy.wordpress.com

ECSE-2610 Computer Components & Operations (COCO)

MEMORY AND PROGRAMMABLE LOGIC

8051 INTERFACING TO EXTERNAL MEMORY

Computer Organization & Architecture M. A, El-dosuky

Spiral 2-9. Tri-State Gates Memories DMA

Chapter 5 Internal Memory

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

Memory System Overview. DMA & Endian-ness. Technology. Architectural. Problem: The Memory Wall

Basic Organization Memory Cell Operation. CSCI 4717 Computer Architecture. ROM Uses. Random Access Memory. Semiconductor Memory Types

Learning Outcomes. Spiral 2-9. Typical Logic Gate TRI-STATE GATES

Main Memory (RAM) Organisation

! Memory. " RAM Memory. " Serial Access Memories. ! Cell size accounts for most of memory array size. ! 6T SRAM Cell. " Used in most commercial chips

The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CENG4480 Lecture 09: Memory 1

5. ReAl Systems on Silicon

Memory. Outline. ECEN454 Digital Integrated Circuit Design. Memory Arrays. SRAM Architecture DRAM. Serial Access Memories ROM

Lecture-14 (Memory Hierarchy) CS422-Spring

CPE300: Digital System Architecture and Design

8051 Interfacing: Address Map Generation

Memory Basics. Course Outline. Introduction to Digital Logic. Copyright 2000 N. AYDIN. All rights reserved. 1. Introduction to Digital Logic.

Unit 7: Memory. Dynamic shift register: Circuit diagram: Refer to unit 4(ch 6.5.4)

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

DESIGN RAM MEMORIES BY USING FLIP-FLOP CIRCUITS

The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle. Address, Data and Control Buses

COMPUTER ARCHITECTURES

ECEN 449 Microprocessor System Design. Memories. Texas A&M University

Micron MT54V512H18EF-10 9Mb QDR SRAM Circuit Analysis

Semiconductor Memory Classification

EE 308: Microcontrollers

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Reference Sheet for C112 Hardware

William Stallings Computer Organization and Architecture 8th Edition. Chapter 5 Internal Memory

Background. memcellsf09. Single- and Double-port SRAM building blocks. w Allen Tanner built an SRAM/ROM generator program back in 2004

The Memory Hierarchy Part I

Introduction to Semiconductor Memory Dr. Lynn Fuller Webpage:

The Memory Component

The MC9S12 in Expanded Mode Using MSI logic to build ports Using MSI logic to build an output port Using MSI logic to build an input port

Memory memories memory

EECS150 - Digital Design Lecture 16 Memory 1

Transcription:

CHAPTER X-1 CHAPTER X CHAPTER X READ MEMORY NOTES ON COURSE WEBPAGE CONSIDER READING PAGES 285-310 FROM MANO AND KIME OTHER USEFUL RAM MATERIAL AT ARS TECHNICA

CHAPTER X-2 INTRODUCTION -INTRODUCTION A number of different types of memories and programmable logic devices exist. Random-access memory (RAM) Read-only memory (ROM) Programmable logic devices (PLDs) Programmable logic arrays (PLAs) Programmable array logic (PAL) Programmable gate arrays (PGAs) Programmable sequential arrays (PSAs) Field-programmable gate arrays (FPGAs) Due to time limitations, we will only cover RAM. Memories Two-level combinational networks Two-level Multi-level combinational and sequential networks

CHAPTER X-3 TYPES OF RAM -INTRODUCTION Two main categories of random-access memory (RAM) exist. Static memory or static RAM (SRAM) Information bits are latched such as with a latch or a flip-flop. Typical SRAM implementations require 4 to 6 transistors. Dynamic memory or dynamic RAM (DRAM) Information bits are stored in the form of electric charges on capacitors. The capacitors will discharge over time. Refreshing the memory cell is required before the capacitor has discharged to much of the electric charge. Most DRAM implementations use 1 transistor and 1 capacitor.

CHAPTER X-4 STATIC RAM SRAM CELLS (1) -INTRODUCTION -TYPES OF RAM An inefficient SRAM bit cell can be formed as follows. Select (word line) TG TG D D How many transistors required for this design? 2*4 for inverters + 2*2 for TGs = 12 transistors. Very expensive in terms of silicon real estate!!!

CHAPTER X-5 STATIC RAM SRAM CELLS (2) STATIC RAM -SRAM CELLS The structure for a 6 transistor implementation of an SRAM 1-bit cell is as follows. (We will refer to this as the 6T design) Select (word line) 6T design D D The select, or word line, chooses the bit cell when high. When selected, the new DD / is latched into the feedback loop.

CHAPTER X-6 STATIC RAM SRAM CELLS (3) STATIC RAM -SRAM CELLS Of course, the previous SRAM cell structure can be drawn as follows, replacing each inverter with 2 transistors. Select (word line) V DD 6T design D D

CHAPTER X-7 STATIC RAM SRAM CELLS (4) STATIC RAM -SRAM CELLS A 4 transistor design for an SRAM bit cell is as follows. Select (word line) V DD 4T design D D Notice replacement of pmos transistors with load resistors. This is for your own information. We won t be testing on the 4T design.

CHAPTER X-8 DYNAMIC RAM DRAM CELLS (1) STATIC RAM -SRAM CELLS A dynamic RAM cell stores the bit as a charge in a capacitor. This bit must be refreshed periodically (>100s of times a second). Select (word line) TG Transmission gate opens when selected to charge or discharge capacitor. This charge stores the bit. D How many transistors required for this design? 2*1 for TG and 2*1 for inverter = 4 transistors. Still expensive considering the extra refresh circuitry required!

CHAPTER X-9 DYNAMIC RAM DRAM CELLS (2) STATIC RAM DYNAMIC RAM -DRAM CELLS The capacitor charging structure can be simplified as follows. Select (word line) 1T design Transmission gate opens when selected to charge or discharge capacitor. This charge stores the bit. D This structure for a DRAM bit cell is what is used in practice in real implementations. Very little chip real estate is used!!!

CHAPTER X-10 MEMORY UNITS SPECIFICATION STATIC RAM DYNAMIC RAM -DRAM CELLS Having developed bit cells, either SRAM or DRAM bit cells, they can now be pieced together forming a memory unit. What do we want to specify in the design of a memory unit? The number of bits. This gives the total number of bits that the memory unit can store. The grouping of bits into words. Accessing 1 bit at a time might be inconvenient, so, grouping bits into words is often done. Common examples of word bit sizes are 4, 8, 16, 32, and 64. The number of words in the memory unit (addressable words). This is a function of the word size and total number of bits.

CHAPTER X-11 MEMORY UNITS DESCRIPTION STATIC RAM DYNAMIC RAM MEMORY UNITS -SPECIFICATION In describing the capacity of a memory unit, the following is used # addresses x word size Example: 1Mx8 If a memory unit is described as 1Mx8, then it has 1M = 2 20 = 1048576 addresses, 8 bits per word at each address location, 8 data lines for the 8 bit words, 20 address lines to specify the 1M = 2 20 = 1048576 addresses, and ( 1048576) ( 8) = 8388608 bits in the entire memory unit.

CHAPTER X-12 MEMORY UNITS DESCRIPTION EXAMPLES DYNAMIC RAM MEMORY UNITS -SPECIFICATION -DESCRIPTION Some further examples of memory descriptions are given below. Note that the last four columns are all described with the information in the first column. Try to fill in the empy cells for the last two rows. Memory Total bits # of addresses # address lines # data lines 1Mx8 8388608 1048576 20 8 1Kx4 4096 1024 10 4 2Mx4 8388608 2097152 21 4 4Mx1 4194304 4194304 22 1 2Mx32 67108864 2097152 21 32 16Kx64 8Mx8

CHAPTER X-13 MEMORY UNITS BLOCK DIAGRAM (1) MEMORY UNITS -SPECIFICATION -DESCRIPTION -DESCRIPTION EXAMPLES Below is a general block diagram for a memory unit. n data input lines k address lines k Memory unit Read Write R W 2 k words n bits per word n data output lines The k address lines access a word in the memory for input or output. To simplify drawing, we now form buses of n (or k) lines.

CHAPTER X-14 MEMORY UNITS BLOCK DIAGRAM (2) MEMORY UNITS -DESCRIPTION -DESCRIPTION EXAMPLES -BLOCK DIAGRAM To conserve pins, the following layout is more common in practice. k address lines k Memory unit Read/Write Enable R/W CS 2 k words n bits per word n data lines (input and output) The data lines are both input and output lines (not simultaneously). This is done by using tristate buffers to form a tristate bus (or sometimes referred to as a three-state bus).

CHAPTER X-15 MEMORY UNITS INTERNAL STRUCTURE MEMORY UNITS -DESCRIPTION -DESCRIPTION EXAMPLES -BLOCK DIAGRAM The bit cells are arranged in matrix. (more efficient!) Row and column decoders access specific bit cells. Row Decoder Bit Cell Matrix Accessed bit Writing a bit Input Output Column Decoder Reading a bit

CHAPTER X-16 MEMORY UNITS READ/WRITE OF 1-BIT MEMORY UNITS -DESCRIPTION EXAMPLES -BLOCK DIAGRAM -INTERNAL STRUCTURE In read mode: Row decoder activates all bit cells in that row. Each bit cell in the row outputs their stored bit. Column decoder takes the bit from only one column of the activated row. In write mode: Row decoder activates all bit cells in that row. Each bit cell in the row effectively outputs their stored bit. Column decoder selects the appropriate column and writes the input bit. SRAM: This writing is done by overpowering what is being read by the bit cell with a stronger voltage/current. DRAM: This writing is done by recharging the capacitor for writing a 1 or discharging the capacitor for writing a 0.

CHAPTER X-17 MEMORY UNITS CONTROL LINES (1) MEMORY UNITS -BLOCK DIAGRAM -INTERNAL STRUCTURE -READ/WRITE OF BIT Now include k address lines, 1-bit data line, Enable, and ~Read/Write. Bit Cell Matrix Address lines p Row Decoder D Enable TG Input Output Column Decoder TG R/W k-p Address lines

CHAPTER X-18 MEMORY UNITS CONTROL LINES (2) MEMORY UNITS -INTERNAL STRUCTURE -READ/WRITE OF BIT -CONTROL LINES Things to note about the previous implementation. The k address lines are split into two parts (not necessarily equal parts) p of the k address lines are sent to the row decoder. k-p of the k address lines are sent to the column decoder. There is only one bit line for input/output, D. If we desire multiple bits, say n bits, for each address location, the entire structure must be duplicated n times. The enable line, or often called chip select (CS), either allows the transmission gates to be closed or prevents them from being closed. This makes it so that the D can be in one of three modes; reading, writing, or high impedence. The ~read/write line controls which transmission gate is closed.

CHAPTER X-19 MEMORY UNITS # BITS FOR ROWS/COLUMNS MEMORY UNITS -INTERNAL STRUCTURE -READ/WRITE OF BIT -CONTROL LINES In general, given a certain size memory chip, such as a 1Mx1 memory chip, we would not know how the internal matrix is configured. For a 1Mx1 memory chip, we know it has 20 address lines (for our purposes in any case, there are exceptions in the real world). Any combination of address lines for the row and column decoder could be used to form the matrix. Example: 10 row address lines and 10 column address lines for a 1024x1024 matrix of bit cells. Example: 12 row address lines and 8 column address lines for a 4096x256 matrix of bit cells. Example: 5 row address lines and 15 column address lines for a 32x32768 matrix of bit cells.

CHAPTER X-20 MEMORY UNITS MULTIPLE BITS (WORDS) MEMORY UNITS -READ/WRITE OF BIT -CONTROL LINES -# BITS FOR ROWS/COLS. As noted, the described internal bit cell matrix structure accesses only 1 bit at a time. Multiple bits to form an n-bit word could be accessed in a few different methods. One method is to have the column decoder select a set of n columns simultaneously to form the word. This only works if the entire word is stored in one row. Hence, there should be a multiple of n columns in the bit cell matrix. For instance, the given bit cell matrix with 8 columns could easily have words of size 1, 2, 4, or 8. Another method, though arguably very similar, is to duplicate the entire bit cell matrix n times to form the n-bit word.

CHAPTER X-21 MEMORY UNITS MULTIPLE BITS (WORDS) MEMORY UNITS -CONTROL LINES -# BITS FOR ROWS/COLS. -MULTIPLE BITS (WORDS) The following illustrates these approaches for accessing a 4-bit word. On the left, four column bits from the second row are selected to form the 4-bit word. On the right, the first column bit from the second row for 4 duplicates of the bit cell matrix are accessed to form the 4-bit word.

CHAPTER X-22 BUILDING SYSTEMS DESIGNING MEMORY UNITS -CONTROL LINES -# BITS FOR ROWS/COLS. -MULTIPLE BITS (WORDS) What if we don t have the right type of memory chips to build a desired computer system? Must learn to use combinations of existing memory chips to form a memory system according to specifications. Example: We want a 1Mx8 memory system but can only cheaply buy 1Mx4 memory chips. What to do? Become Bill Gates so you can afford it. Get a better job. Go back to storing your valuable information on little pieces of paper in your pocket. (be careful of washing machines!!!) Design a memory system that uses 1Mx4 memory chips but logically forms a 1Mx8 memory system.

CHAPTER X-23 BUILDING SYSTEMS EXAMPLE #1 MEMORY UNITS BUILDING SYSTEMS -DESIGNING MEMORY SYST. Build a 1Mx8 memory system using 1Mx4 memory chips. First identify the specifications for the 1Mx4 memory chips and the desired 1Mx8 memory system? Memory Total bits # of addresses # address lines # data lines 1Mx8 8388608 1048576 20 8 1Mx4 4194304 1048576 20 4 As the table shows, the # of addresses and # of address lines are the same for both. So, we do not have to change that. The number of data lines for the 1Mx8 are double that of the 1Mx4 as well as the total # of bits stored in the memory. Therefore, we require two 1Mx4 memory chips arranged with the same address lines and concatenated data lines.

CHAPTER X-24 BUILDING SYSTEMS EXAMPLE #1 MEMORY UNITS BUILDING SYSTEMS -DESIGNING MEMORY SYST. -EXAMPLE #1 Forming the described 1Mx8 memory system with 1Mx4 chips, the following 1Mx8 memory system can be designed. A 19 :A 0 1MX4 CS R/W D 0 D 1 D 2 D 3 Enable ~R/W 1MX4 CS R/W D 4 D 5 D 6 D 7

CHAPTER X-25 BUILDING SYSTEMS EXAMPLE #2 MEMORY UNITS BUILDING SYSTEMS -DESIGNING MEMORY SYST. -EXAMPLE #1 Build a 2Mx4 memory system using 1Mx4 memory chips. First identify the specifications for the 1Mx4 memory chips and the desired 2Mx4 memory system? Memory Total bits # of addresses # address lines # data lines 2Mx4 8388608 2097152 21 4 1Mx4 4194304 1048576 20 4 As the table shows, the # of data lines are the same for both. There is an extra address line in the 2Mx4 giving double the # of addresses and double the # of bits Therefore, we require two 1Mx4 memory chips arranged where one address line is used to decode which 1Mx4 chip is enabled.

CHAPTER X-26 BUILDING SYSTEMS EXAMPLE #2 BUILDING SYSTEMS -DESIGNING MEMORY SYST. -EXAMPLE #1 -EXAMPLE #2 The following implements the desired 2Mx4 using 1Mx4 memory. A 20 Enable 2 0 E A 19 :A 0 1-to-2 Decoder 0 1 1MX4 CS R/W D 0 D 1 D 2 D 3 ~R/W 1MX4 CS R/W Notice that A 20 is used to activate one of the 1Mx4 memory chips.

CHAPTER X-27 MEMORY MODEL PROGRAMMER S MODEL BUILDING SYSTEMS -DESIGNING MEMORY SYST. -EXAMPLE #1 -EXAMPLE #2 Goal is to abstract the memory model so that a programmer of the system does not need to know the physical layout of the memory. Below is an example addressable memory map of byte. This, for 2 32 instance, could be implemented with a 4Gx8 memory system. 0x00000000 0x00000001 0x00000002 0x00000003 0x43 0x78 0x12 0x04 0xFFFFFFFF 0x7c

CHAPTER X-28 MEMORY MODEL ENDIAN BYTE ORDERING (1) BUILDING SYSTEMS MEMORY MODEL -PROGRAMMER S MODEL How should a multiple byte word be stored? The two most common orderings are Big endian The address is of the most significant byte location. Sun Workstations and Macs use this ordering. Little endian The address is of the least significant byte location. Intel x86 architectures use this ordering. Origins of the terms big and little endian. Gulliver s Travels: Feud between the two mythical islands, Lilliput and Blefescu, over the correct end (big or little) at which to crack an egg.

CHAPTER X-29 MEMORY MODEL ENDIAN BYTE ORDERING (2) BUILDING SYSTEMS MEMORY MODEL -PROGRAMMER S MODEL -ENDIAN BYTE ORDERING An example of a 4-byte word stored in big endian order 0x12345678 would be stored as 0x10010000 0x10010001 0x10010002 0x10010003 0x12 0x34 0x56 0x78 12345678 An example of a 4-byte word stored in little endian order 0x12345678 would be stored as 0x10010000 0x10010001 0x10010002 0x10010003 0x78 0x56 0x34 0x12 78563412

CHAPTER X-30 MEMORY MODEL ASSEMBLER DIRECTIVES BUILDING SYSTEMS MEMORY MODEL -PROGRAMMER S MODEL -ENDIAN BYTE ORDERING Let s assume we have a memory system with 32 bit words using little endian byte ordering..word n 10 Store the value n 10 in memory as a 32 bit word binary value..byte n 10 Store the value n 10 in memory as a byte value (8 bits)..asciiz string Store the ASCII string in memory with a null character..space n 10, Skip the next n bytes..align k Force loader to go to next 2 k byte boundary.

CHAPTER X-31 MEMORY MODEL EXAMPLE DIRECTIVE USE (1) MEMORY MODEL -PROGRAMMER S MODEL -ENDIAN BYTE ORDERING -ASSEMBLER DIRECTIVES One example assembly memory directive set could be as follows. Assume loader starts at 0x10010000.data.word 24.byte 7.ascii help 0x10010000 0x10010004 0x10010008 Notice null character 0x18 0x00 0x00 0x00 0x07 0x68 0x65 0x6c 0x70 0x00 h e l p \0

CHAPTER X-32 MEMORY MODEL EXAMPLE DIRECTIVE USE (2) MEMORY MODEL -ENDIAN BYTE ORDERING -ASSEMBLER DIRECTIVES -EXAMPLE DIRECTIVE USE Continuing with the previous example. 0x10010008 0x70 0x00 p \0.align 2.word 186548547.byte 52 0x1001000C 0x10010010 0x43 0x81 0x1E 0x0B 0x34

CHAPTER X-33 MEMORY MODEL EXAMPLE DIRECTIVE USE (3) MEMORY MODEL -ENDIAN BYTE ORDERING -ASSEMBLER DIRECTIVES -EXAMPLE DIRECTIVE USE Continuing with the previous example. 0x10010010 0x34.align 2.byte 16.space 3.byte 67 0x10010014 0x10010018 0x10 0x25 Notice the difference between align and space.