ACOE2011 Cache memory Homework – Q1 A computer has a 32 bit address and a 64 bit data bus with address resolution to the byte level. The computer is using.

Slides:



Advertisements
Similar presentations
Cache Memory Exercises. Questions I Given: –memory is little-endian and byte addressable; memory size; –number of cache blocks, size of cache block –An.
Advertisements

CS455/CpE 442 Intro. To Computer Architecure
Microprocessors. Microprocessor Buses Address Bus Address Bus One way street over which microprocessor sends an address code to memory or other external.
Homework 2 Review Cornell CS Calling Conventions int gcd(int x, int y) { int t, a = x, b = y; while(b != 0) { t = b; b = mod(a, b); a = t; } return.
CS61C L31 Caches II (1) Garcia, Fall 2006 © UCB GPUs >> CPUs?  Many are using graphics processing units on graphics cards for high-performance computing.
How caches take advantage of Temporal locality
Characteristics of Computer Memory
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
Caches The principle that states that if data is used, its neighbor will likely be used soon.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
Lecture 41: Review Session #3 Reminders –Office hours during final week TA as usual (Tuesday & Thursday 12:50pm-2:50pm) Hassan: Wednesday 1pm to 4pm or.
Direct Map Cache Tracing Exercise. Exercise #1: Setup Information CS2100 Cache I 2 Memory 4GB Memory Address 310N-1N Block Number Offset 1 Block = 8 bytes.
CDA 3103 Computer Organization Review Instructor: Hao Zheng Dept. Comp. Sci & Eng. USF.
CSCE 212 Quiz 11 – 4/13/11 Given a direct-mapped cache with 8 one-word blocks and the following 32-bit memory address references: 1 2, ,
Characteristics of Computer Memory
Cache Memories Effectiveness of cache is based on a property of computer programs called locality of reference Most of programs time is spent in loops.
COEN 180 Main Memory Cache Architectures. Basics Speed difference between cache and memory is small. Therefore:  Cache algorithms need to be implemented.
Cache memory October 16, 2007 By: Tatsiana Gomova.
Caches – basic idea Small, fast memory Stores frequently-accessed blocks of memory. When it fills up, discard some blocks and replace them with others.
CACHE MEMORY Cache memory, also called CPU memory, is random access memory (RAM) that a computer microprocessor can access more quickly than it can access.
Cache Physical Implementation Panayiotis Charalambous Xi Research Group Panayiotis Charalambous Xi Research Group.
1 CMPE 421 Advanced Computer Architecture Accessing a Cache PART1.
B. Ramamurthy.  12 stage pipeline  At peak speed, the processor can request both an instruction and a data word on every clock.  We cannot afford pipeline.
1 CENG 450 Computer Systems and Architecture Cache Review Amirali Baniasadi
CSE378 Intro to caches1 Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
ECE 456 Computer Architecture Lecture #16 – Exam#2 Review Instructor: Dr. Honggang Wang Fall 2013.
Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture.
Chapter 8: System Memory Dr Mohamed Menacer Taibah University
Exam 2 Review Two’s Complement Arithmetic Ripple carry ALU logic and performance Look-ahead techniques, performance and equations Basic multiplication.
Additional Slides By Professor Mary Jane Irwin Pennsylvania State University Group 1.
Lecture 20 Last lecture: Today’s lecture: Types of memory
Cache Operation.
Cache Small amount of fast memory Sits between normal main memory and CPU May be located on CPU chip or module.
CSE 351 Caches. Section Feedback Before we begin, we’d like to get some feedback about section If you could answer the following questions on the provided.
Memory Hierarchy and Cache Design (3). Reducing Cache Miss Penalty 1. Giving priority to read misses over writes 2. Sub-block placement for reduced miss.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Cache Memory.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
CSCI2510 Tutorial 5 Introduction to Cache Zong Wen
CSCI206 - Computer Organization & Programming
Memory: Page Table Structure
Tutorial Nine Cache CompSci Semester One 2016.
CS2100 Computer Organization
Direct Cache Structure
FLIPPED CLASSROOM ACTIVITY CONSTRUCTOR – USING EXISTING CONTENT
Consider a Direct Mapped Cache with 4 word blocks
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
ECE 445 – Computer Organization
Exploiting Memory Hierarchy Chapter 7
Algebra 1 Notes Lesson 4-1: The Coordinate Plane
CSCI206 - Computer Organization & Programming
FIGURE 12-1 Memory Hierarchy
Interconnect with Cache Coherency Manager
Lecture 22: Cache Hierarchies, Memory
Help! How does cache work?
Direct Mapping.
Module IV Memory Organization.
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Cache Memory.
Chapter 6 Memory Linda Null, Julia Lobur.
CS455/CpE 442 Intro. To Computer Architecure
CS-447– Computer Architecture Lecture 20 Cache Memories
Basic Cache Operation Prof. Eric Rotenberg
Solving Equations 3x+7 –7 13 –7 =.
Lecture 13: Cache Basics Topics: terminology, cache organization (Sections )
Overview Problem Solution CPU vs Memory performance imbalance
Presentation transcript:

ACOE2011 Cache memory Homework – Q1 A computer has a 32 bit address and a 64 bit data bus with address resolution to the byte level. The computer is using a direct mapped cache with 4K cache lines. The size of each cache line is 64 bytes. a)What is the size of the cache? b)How many bits are there in the line, the index and the tag fields? c)What is the size of the tag memory? d)How many memory cycles are required to fill up a cache line? Data Solution Tag 64 bytes per line TagIndexLine 32-bit address bus 4K Cache lines

ACOE2012 Cache memory Homework – Q1 a)What is the size of the cache? Cache size = 4K lines X 64 bytes/line = 4K X 64 = 256Kbytes b)How many bits are there in the line, the index and the tag fields? Line bits: 2 L = 64 = 2 6  Number of line bits = 6 Index bits: 2 N = 4K = 2 2 X 2 10 = 2 12  Number of index bits = 12 Number of tag bits = Size of address bus - Number of line bits - Number of index bits = 32 – 6 – 12 = 14 bits c)What is the size of the tag memory? Size of tag memory = Number of cache lines X Number of tag bits = 4K x 14 bits d)How many memory cycles are required to fill up a cache line? Number of memory cycles = Size of cache line / Size of data bus (in bytes) = 64 / (64/8) = 64 / 8 = 8 cycles

ACOE2013 Cache memory Homework – Q2 A computer has a 32-bit address bus with a direct mapped cache, using 4 line bits, 16 tag bits and 12 index bits. a)Specify i.The cache block size ii.The size of the cache iii.The size of the tag memory b)Specify whether the following address pairs can be placed in the cache simultaneously. i. 3AC6F456 and 26A35456 ii. 3F08C304 and 3F08C371 iii. 5E3C7680 and 8F3C768A iv and C Data Solution Tag 4 bits TagIndexLine 32-bit address bus 12 bits

ACOE2014 Cache memory Homework – Q2 a.i) Number of blocks = 2 (number of index bits) = 2 12 = 2 2 x 2 10 = 4K Size of the cache = Number of blocks x Block size = 4K x 16 = 64Kbytes a.ii)Block size = 2 (number of line bits) = 2 4 = 16 bytes a.iii) Size of the tag memory = Number of blocks x Number of tag bits = 4K x 16 bits b) Specify whether the following address pairs can be placed in the cache simultaneously. Address Answer Yes/No Justification TagIndexLine i 3AC6F456 YesDifferent index 26A35456 ii 3F08C304 YesDifferent index 3F08C371 iii 5E3C7680 NoSame index and different tag 8F3C768A iv YesSame index and same tag, i.e same cache block C