Hierarchical Memory Systems Prof. Sin-Min Lee Department of Computer Science.

Slides:



Advertisements
Similar presentations
M. Mateen Yaqoob The University of Lahore Spring 2014.
Advertisements

Chapter 12 Memory Organization
CMPE 421 Parallel Computer Architecture MEMORY SYSTEM.
What is memory? Memory is used to store information within a computer, either programs or data. Programs and data cannot be used directly from a disk or.
1 Lecture 20 – Caching and Virtual Memory  2004 Morgan Kaufmann Publishers Lecture 20 Caches and Virtual Memory.
Characteristics of Computer Memory
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Nov. 13, 2002 Topic: Main Memory (DRAM) Organization.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
Overview: Memory Memory Organization: General Issues (Hardware) –Objectives in Memory Design –Memory Types –Memory Hierarchies Memory Management (Software.
Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science.
IT Systems Memory EN230-1 Justin Champion C208 –
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
MODULE 5: Introduction to Memory system
Characteristics of Computer Memory
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
CS1104-8Memory1 CS1104: Computer Organisation Lecture 8: Memory
CH05 Internal Memory Computer Memory System Overview Semiconductor Main Memory Cache Memory Pentium II and PowerPC Cache Organizations Advanced DRAM Organization.
Prof. Sin-Min Lee Department of Computer Science
Physical Memory By Gregory Marshall. MEMORY HIERARCHY.
1 Random-Access Memory (RAM) Note: We’re skipping Sec 7.5 Today: First Hour: Static RAM –Section 7.6 of Katz’s Textbook –In-class Activity #1 Second Hour:
CPE432 Chapter 5A.1Dr. W. Abu-Sufah, UJ Chapter 5A: Exploiting the Memory Hierarchy, Part 1 Adapted from Slides by Prof. Mary Jane Irwin, Penn State University.
EECS 318 CAD Computer Aided Design LECTURE 10: Improving Memory Access: Direct and Spatial caches Instructor: Francis G. Wolff Case.
Lecture 19 Today’s topics Types of memory Memory hierarchy.
Computer Architecture And Organization UNIT-II Structured Organization.
+ CS 325: CS Hardware and Software Organization and Architecture Memory Organization.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
2007 Sept. 14SYSC 2001* - Fall SYSC2001-Ch4.ppt1 Chapter 4 Cache Memory 4.1 Memory system 4.2 Cache principles 4.3 Cache design 4.4 Examples.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Memory and Storage. Computer Memory Processor registers – Temporary storage locations within the CPU – Examples Instruction register – holds the instruction.
The Goal: illusion of large, fast, cheap memory Fact: Large memories are slow, fast memories are small How do we create a memory that is large, cheap and.
CSE378 Intro to caches1 Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early.
MEMORY ORGANIZATION - Memory hierarchy - Main memory - Auxiliary memory - Cache memory.
Lecture#15. Cache Function The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Excellence Publication Co. Ltd. Volume Volume 1.
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
Memory Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed.
1  1998 Morgan Kaufmann Publishers Chapter Seven.
Revision Mid 2, Cache Prof. Sin-Min Lee Department of Computer Science.
Jeffrey Ellak CS 147. Topics What is memory hierarchy? What are the different types of memory? What is in charge of accessing memory?
What is it and why do we need it? Chris Ward CS147 10/16/2008.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
COMPUTER SYSTEMS ARCHITECTURE A NETWORKING APPROACH CHAPTER 12 INTRODUCTION THE MEMORY HIERARCHY CS 147 Nathaniel Gilbert 1.
Introduction to computer architecture April 7th. Access to main memory –E.g. 1: individual memory accesses for j=0, j++, j
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
Memory Hierarchy and Cache. A Mystery… Memory Main memory = RAM : Random Access Memory – Read/write – Multiple flavors – DDR SDRAM most common 64 bit.
CACHE _View 9/30/ Memory Hierarchy To take advantage of locality principle, computer memory implemented as a memory hierarchy: multiple levels.
Computer Organization
The Goal: illusion of large, fast, cheap memory
Finite State Machine, Memory Systems
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Ramya Kandasamy CS 147 Section 3
How will execution time grow with SIZE?
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Exam 2 Review Two’s Complement Arithmetic Ripple carry ALU logic and performance Look-ahead techniques, performance and equations Basic multiplication.
Morgan Kaufmann Publishers Memory & Cache
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Cache Memory.
Memory Organization.
EE108B Review Session #6 Daxia Ge Friday February 23rd, 2007
Morgan Kaufmann Publishers Memory Hierarchy: Introduction
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Memory Principles.
Presentation transcript:

Hierarchical Memory Systems Prof. Sin-Min Lee Department of Computer Science

Implementing JK Flip-Flop using only a T Flip-Flop Note how the areas marked off with a blue box behave like a T flip-flop, while the area within the purple box behave like a D flip-flop. From this last chart, we can derive the following chart:

Implementing JK Flip-Flop using only a T Flip-Flop To derive the next chart, we work in reverse, asking, “What is the input into the T (toggle) function that will result in the output shown in the previous chart?” In this case, the first column of Q is 0 and our circled value is a 0; a 0 will give this result. The input that will give us a 1, when Q is 1, is also 0. Refer back to the T flip-flop chart to see that on 0, there is no change; 1 “toggles”.

Implementing JK Flip-Flop using only a T Flip-Flop This is the final Karnaugh map and the associated equation for T.

Implementing T Flip-Flop using only a JK Flip-Flop This time, we are doing the reverse again, asking what values of J and K will give us the corresponding values in the T chart above. 00 or 01 will give 0, so we enter “0X”. X is our “don't care” value; it can be 0 or 1.

Implementing T Flip-Flop using only a JK Flip-Flop Once we derive all the values, we have to split this into two, in order to get an equation that defines J and another than defines K.

Implementing T Flip-Flop using only a JK Flip-Flop Here is the final implementation.

Implementing this FSM using a T Flip-Flop Using the values from the first chart, we can get this second chart. Then, we apply the same reverse method to determine what input values we would need to arrive at the ones listed in this second chart.

Implementing this FSM using a T Flip-Flop T = XQ' + X'Q

Implementing this FSM using a D Flip-Flop This time we use the same FSM and same initial chart, but now derive an equation for D.

Implementing this FSM using a D Flip-Flop Since this is a delay, the corresponding chart is the same.

Implementing this FSM using a D Flip-Flop Finally, here is our graph.

Implementing Flip-Flop

How can we create a flip-flop using another flip-flop?  Say we have a flip-flop BG with the following properties:  Let ’ s try to implement this flip-flop using a T flip-flop BGQ+ 00 Q’Q’ 01Q

Step 1:Create Table The first step is to draw a table with created flip- flop first (in this case BG), Q, Q+, and the creator flip-flop (in this case T) -Look at Q, Q+ to determine value of T BGQQ+T

Step 2:Karnaugh Map  Draw a Karnaugh Map, based on when T is a 1 BGQQ+T BG Q T=B’G’+BGQ+G’Q’

Step 3: Draw Diagram T=B’Q’+ BGQ+G’Q’ BG Q Q’

The Root of the Problem: Economics  Fast memory is possible, but to run at full speed, it needs to be located on the same chip as the CPU Very expensive Limits the size of the memory  Do we choose: A small amount of fast memory? A large amount of slow memory?

Memory Hierarchy Design (2)  It is a tradeoff between size, speed and cost and exploits the principle of locality.  Register Fastest memory element; but small storage; very expensive  Cache Fast and small compared to main memory; acts as a buffer between the CPU and main memory: it contains the most recent used memory locations (address and contents are recorded here)  Main memory is the RAM of the system  Disk storage - HDD

Memory Hierarchy Design (3)  Comparison between different types of memory size: speed: $/Mbyte: B 2 ns RegisterCacheMemory 32KB - 4MB 4 ns $100/MB 128 MB 60 ns $1.50/MB 20 GB 8 ms $0.05/MB larger, slower, cheaper HDD

Memory Hierarchy  Can only do useful work at the top  rule: 90% of time is spent of 10% of program  Take advantage of locality  temporal locality keep recently accessed memory locations in cache  spatial locality keep memory locations nearby accessed memory locations in cache

The connection between the CPU and cache is very fast; the connection between the CPU and memory is slower

The Cache Hit Ratio  How often is a word found in the cache?  Suppose a word is accessed k times in a short interval 1 reference to main memory (k-1) references to the cache  The cache hit ratio h is then

Reasons why we use cache Cache memory is made of STATIC RAM – a transistor based RAM that has very low access times (fast) STATIC RAM is however, very bulky and very expensive Main Memory is made of DYNAMIC RAM – a capacitor based RAM that has very high access times because it has to be constantly refreshed (slow) DYNAMIC RAM is much smaller and cheaper

Performance (Speed)  Access time Time between presenting the address and getting the valid data (memory or other storage)  Memory cycle time Some time may be required for the memory to “recover” before next access cycle time = access + recovery  Transfer rate rate at which data can be moved for random access memory = 1 / cycle time (cycle time) -1

Memory Hierarchy  size ? speed ? cost ?  registers in CPU  internal may include one or more levels of cache  external memory backing store smallest, fastest, most expensive, most frequently accessed medium, quick, price varies largest, slowest, cheapest, least frequently accessed