Lab2: Cache Memories. Dimitar Nikolov

Similar documents
Sequential Logic. Introduction to Computer Yung-Yu Chuang

Microprocessor Design

ESE534: Computer Organization. Today. Image Processing. Retiming Demand. Preclass 2. Preclass 2. Retiming Demand. Day 21: April 14, 2014 Retiming

AN EFFECTIVE CACHE FOR THE ANYWHERE PIXEL ROUTER

CP316 Screencast mini-project

Chapter 3: Sequential Logic

Chapter 7 Memory and Programmable Logic

Lab 3c Fun with your LED cube. ENGR 40M Chuan-Zheng Lee Stanford University 19 May 2017

CPSC 121: Models of Computation. Module 1: Propositional Logic

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

Lossless Compression Algorithms for Direct- Write Lithography Systems

Chapter 3 Instruction-Level Parallelism and its Exploitation (Part 1)

Video Output and Graphics Acceleration

Implementation of an MPEG Codec on the Tilera TM 64 Processor

Tutorial Outline. Typical Memory Hierarchy

Combinational vs Sequential

Investigation of Look-Up Table Based FPGAs Using Various IDCT Architectures

Sequential Logic Design CS 64: Computer Organization and Design Logic Lecture #14

VGA Controller. Leif Andersen, Daniel Blakemore, Jon Parker University of Utah December 19, VGA Controller Components

COE328 Course Outline. Fall 2007

Tomasulo Algorithm. Developed at IBM and first implemented in IBM s 360/91

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Lecture 16: Instruction Level Parallelism -- Dynamic Scheduling (OOO) via Tomasulo s Approach

Enhancing Performance in Multiple Execution Unit Architecture using Tomasulo Algorithm

Understanding FICON Channel Path Metrics

Instruction Level Parallelism Part III

CSE140L: Components and Design Techniques for Digital Systems Lab. CPU design and PLDs. Tajana Simunic Rosing. Source: Vahid, Katz

Profiling techniques for parallel applications

Out-of-Order Execution

Instruction Level Parallelism Part III

SPR-11P Portable Transport Stream Recorder and Player

Logisim: A graphical system for logic circuit design and simulation

Day 21: Retiming Requirements. ESE534: Computer Organization. Relative Sizes. Today. State. State Size

LabView Exercises: Part II

8088 Corruption. Motion Video on a 1981 IBM PC with CGA

J. Maillard, J. Silva. Laboratoire de Physique Corpusculaire, College de France. Paris, France

L14: Quiz Information and Final Project Kickoff. L14: Spring 2004 Introductory Digital Systems Laboratory

Hardware Design I Chap. 5 Memory elements

ESE (ESE534): Computer Organization. Last Time. Today. Last Time. Align Data / Balance Paths. Retiming in the Large

IJMIE Volume 2, Issue 3 ISSN:

Logic Design ( Part 3) Sequential Logic (Chapter 3)

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

CacheCompress A Novel Approach for Test Data Compression with cache for IP cores

COMPUTER ENGINEERING PROGRAM

North Shore Community College

Explorer Edition FUZZY LOGIC DEVELOPMENT TOOL FOR ST6

AE16 DIGITAL AUDIO WORKSTATIONS

On the HPDP from architecture to a device. Final Presentation Days ESTEC, May 9 th 2017

Towards Trusted Devices in FPGA by Modeling Radiation Induced Errors

Seamless Workload Adaptive Broadcast

A video signal processor for motioncompensated field-rate upconversion in consumer television

Training Document for Comprehensive Automation Solutions Totally Integrated Automation (T I A)

Register Transfer Level (RTL) Design Cont.

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

Lecture 10: Programmable Logic

Reducing DDR Latency for Embedded Image Steganography

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

FPGA Implementation of DA Algritm for Fir Filter

Lecture 7: Sequential Networks

Joint Optimization of Source-Channel Video Coding Using the H.264/AVC encoder and FEC Codes. Digital Signal and Image Processing Lab

Lab 2: Hardware/Software Co-design with the Wimp51

Dynamic IR Scene Projector Based Upon the Digital Micromirror Device

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

Contents. xv xxi xxiii xxiv. 1 Introduction 1 References 4


Difference with latch: output changes on (not after) falling clock edge

UNIVERSITY OF MASSACHUSSETS LOWELL Department of Electrical & Computer Engineering Course Syllabus for Logic Design Fall 2013

Lab Assignment 2 Simulation and Image Processing

INSPECTION EQUIPMENT FOR SUPPLIED CASES WITH EMPTY BOTTLES

Experiment # 12. Traffic Light Controller

FPGA Design. Part I - Hardware Components. Thomas Lenzi

Introductions o Instructor introduction o Attendee introductions Why are you here? What do you hope to learn? Do you have any special needs?

Worldwide LCD TV Core Chip and Industry Development

6.3 Sequential Circuits (plus a few Combinational)

Design Principles and Practices. Cassini Nazir, Clinical Assistant Professor Office hours Wednesdays, 3-5:30 p.m. in ATEC 1.

CPS311 Lecture: Sequential Circuits

Lab Assignment 5 I. THE 4-BIT CPU AND CONTROL

Using Mac OS X for Real-Time Image Processing

RECOMMENDATION ITU-R BT.1201 * Extremely high resolution imagery

CS 61C: Great Ideas in Computer Architecture

EECS150 - Digital Design Lecture 12 - Video Interfacing. Recap and Outline

Slide Set 6. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Yong Cao, Debprakash Patnaik, Sean Ponce, Jeremy Archuleta, Patrick Butler, Wu-chun Feng, and Naren Ramakrishnan

DSA-1. The Prism Sound DSA-1 is a hand-held AES/EBU Signal Analyzer and Generator.

CS184a: Computer Architecture (Structures and Organization) Last Time

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Administrative issues. Sequential logic

ILDA Image Data Transfer Format

Outline. 1 Reiteration. 2 Dynamic scheduling - Tomasulo. 3 Superscalar, VLIW. 4 Speculation. 5 ILP limitations. 6 What we have done so far.

Profiling techniques for parallel applications

CAD for VLSI Design - I Lecture 38. V. Kamakoti and Shankar Balachandran

CDA 4253 FPGA System Design FPGA Architectures. Hao Zheng Dept of Comp Sci & Eng U of South Florida

Computer Architecture Spring 2016

MONTGOMERY COUNTY COMMUNITY COLLEGE MUS 140 Introduction to Digital Music Technology 3-3-0

Hue, Value and Intensity

Digital Integrated Circuits EECS 312. People. Exams. Purpose of Course and Course Objectives I. Grading philosophy. Grading and written feedback

Optical Technologies Micro Motion Absolute, Technology Overview & Programming

Lecture 0: Organization

Music Segmentation Using Markov Chain Methods

Digilent Nexys-3 Cellular RAM Controller Reference Design Overview

Transcription:

Lab2: Cache Memories Dimitar Nikolov

Goal Understand how cache memories work Learn how different cache-mappings impact CPU time Leran how different cache-sizes impact CPU time Lund University / Electrical and Information Technology / 1

Tools Tools used for this exercise: MipsIt.exe Used for program editing Mips.exe Used for simulation Lund University / Electrical and Information Technology / 2

Online test The online test is scheduled on Monday 11th November Access the test from the course web-page Example of an online test is provided Lund University / Electrical and Information Technology / 3

Overview Background Simulation Lund University / Electrical and Information Technology / 4

Programmers vs. CPU Programmers view: Very large continuous memory space CPU view: Registers Cache Memory Main Memory Hard drive Lund University / Electrical and Information Technology / 5

Locality of references Programs access a small proportion of their address space at any time Temporal locality Items accessed recently are likely to be accessed again soon e.g., instructions in a loop, induction variables Spatial locality Items near those accessed recently are likely to be accessed soon E.g., sequential instruction access, array data Lund University / Electrical and Information Technology / 6

Locality of references Memory hierarchy Store everything on disk Copy recently accessed (and nearby) items from disk to smaller DRAM memory Main memory Copy more recently accessed (and nearby) items from DRAM to smaller SRAM memory Cache memory attached to CPU Lund University / Electrical and Information Technology / 7

Memory Hierarchy Lund University / Electrical and Information Technology / 8

Memory Hierarchy Lund University / Electrical and Information Technology / 9

Memory access CPU fetches data and instructions from memory CPU issues a memory address to fetch the information The information (data or instruction) may be present in: Cache memory (low size) Main memory (medium size) Secondary memory (hard drive) (Laaarge size) Where to search??? How to search the information based on a given address??? Lund University / Electrical and Information Technology / 10

Cache memory vs. Main memory Cache memory Main Memory Cache line Memory block... Lund University / Electrical and Information Technology / 11

Cache memory vs. Main memory Cache memory Main Memory Cache line Memory block... Size of a cahce line in Bytes Few cache lines Address: Depends on mapping = Size of a memory block in Bytes Many memory blocks Address: Memory block + byte Lund University / Electrical and Information Technology / 12

Cache mapping Where in the cache memory a memory address resides Direct mapping A memory block maps into one cache line Fully associative mapping A memory block maps into ANY cache line Set-associative mapping (N-way associative) A memory block maps into N cache lines Lund University / Electrical and Information Technology / 13

Direct-mapped cache Compare the TAG with TAG of the cache line Address: TAG Cache Line Byte Memory block Cache memory TAG Main memory... Lund University / Electrical and Information Technology / 14

Fully associative cache TAG Cache Main... Compare TAG for each cache line Address: TAG Byte Lund University / Electrical and Information Technology / 15

Set Associative cache Address: TAG Set Byte TAG Compare TAG only for cache lines that belong to the same SET Cache Main... Number of cache lines in each set Lund University / Electrical and Information Technology / 16

Overview Background Simulation Lund University / Electrical and Information Technology / 17

Create New Project Lund University / Electrical and Information Technology / 18

Add a code source file Lund University / Electrical and Information Technology / 19

Compile & Build Lund University / Electrical and Information Technology / 20

Open MIPS Lund University / Electrical and Information Technology / 21

Upload the program Lund University / Electrical and Information Technology / 22

Configure the cache Lund University / Electrical and Information Technology / 23

Configure the I-cache (Instruction Cache) Size of the cache in words Size of the cache line in words associativity Replacement algorithm Lund University / Electrical and Information Technology / 24

Configure the D-cache (Data cache) Size of the cache in words Size of the cache line in words Associativity Replacement algorithm Write policy Lund University / Electrical and Information Technology / 25

Instruction cache (I-cache) Lund University / Electrical and Information Technology / 26

Data cache (D-cache) Lund University / Electrical and Information Technology / 27

Cache statistics Hit rate changes over time Lund University / Electrical and Information Technology / 28

Lund University / Electrical and Information Technology / 29