CS2100 Computer Organization

Slides:



Advertisements
Similar presentations
Lecture 19: Cache Basics Today’s topics: Out-of-order execution
Advertisements

Pipeline Summary Try to put everything together for pipelines Before going onto caches. Peer Instruction Lecture Materials for Computer Architecture by.
Pipeline Exceptions & ControlCSCE430/830 Pipelining in MIPS MIPS architecture was designed to be pipelined –Simple instruction format (makes IF, ID easy)
Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
Cache Here we focus on cache improvements to support at least 1 instruction fetch and at least 1 data access per cycle – With a superscalar, we might need.
Fall EE 333 Lillevik480f05-a3 University of Portland School of Engineering EE 333 Final Exam December 15, 2005 Instructions 1.Print your name, student.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
ELEN 468 Advanced Logic Design
CMPT 334 Computer Organization
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 23 - Course.
Review CPSC 321 Andreas Klappenecker Announcements Tuesday, November 30, midterm exam.
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
CSCE 212 Quiz 9 – 3/30/11 1.What is the clock cycle time based on for single-cycle and for pipelining? 2.What two actions can be done to resolve data hazards?
Lec 8: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
Quantum Computing II CPSC 321 Andreas Klappenecker.
Review for Midterm 2 CPSC 321 Computer Architecture Andreas Klappenecker.
CSCE 212 Quiz 9a – 4/1/11 For the following questions, assume the clock cycle times given above and the following set of instructions: lw $5, -16($5) sw.
Memory: PerformanceCSCE430/830 Memory Hierarchy: Performance CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U. Maine)
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 12 Overview and Concluding Remarks.
L/O/G/O Cache Memory Chapter 3 (b) CS.216 Computer Architecture and Organization.
5/13/99 Ashish Sabharwal1 Pipelining and Hazards n Hazards occur because –Don’t have enough resources (ALU’s, memory,…) Structural Hazard –Need a value.
Lecture 17 Final Review Prof. Mike Schulte Computer Architecture ECE 201.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
Introduction to Computer Organization Pipelining.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
1 Pipelining CDA 3101 Discussion Section Question 1 – 6.1 Suppose that time for an ALU operation can be shortened by 25% in the following figure.
EECS 370 Discussion 1 Calvin and Hobbes by Bill Watterson.
Simulator Outline of MIPS Simulator project  Write a simulator for the MIPS five-stage pipeline that does the following: Implements a subset of.
Computer Orgnization Rabie A. Ramadan Lecture 9. Cache Mapping Schemes.
1 Lecture 20: OOO, Memory Hierarchy Today’s topics:  Out-of-order execution  Cache basics.
1 Memory Systems Caching Lecture 24 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Interstage Buffers 1 Computer Organization II © McQuain Pipeline Timing Issues Consider executing: add $t2, $t1, $t0 sub $t3, $t1, $t0 or.
COSC3330 Computer Architecture
Pipeline Timing Issues
Computer Organization CS224
CSCI206 - Computer Organization & Programming
ELEN 468 Advanced Logic Design
Basic Pipeline Datapath
Test 2 review Lectures 5-10.
Single Clock Datapath With Control
Lecture 6 Memory Hierarchy
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
EECC550 Exam Review 4 out of 6 questions
Test 2 review Lectures 5-10.
The University of Adelaide, School of Computer Science
CS 5513 Computer Architecture Pipelining Examples
Computer Architecture Lecture 3
Pipelining review.
Current Design.
Pipelining in more detail
CSCI206 - Computer Organization & Programming
Computer Architecture
Systems Architecture II
CSCI206 - Computer Organization & Programming
Data Hazards Data Hazard
The Processor Lecture 3.6: Control Hazards
Lecture 20: OOO, Memory Hierarchy
Lecture 20: OOO, Memory Hierarchy
Pipelining: Basic Concepts
CS 286 Computer Architecture & Organization
Appendix C Practice Problem Set 1
Pipelining Chapter 6.
CS 3853 Computer Architecture Pipelining Examples
Consider the following code segment for a loop: int a = 3, b = 4;
Problem ??: (?? marks) Consider executing the following code on the MIPS pipelined datapath: add $t5, $t6, $t8 add $t9, $t5, $t4 lw $t3, 100($t9) sub $t2,
Presentation transcript:

CS2100 Computer Organization Cache Exercises

Direct Mapped Cache We have a 64 byte direct-mapped cache with 4 word blocks. Questions: Sketch layout for 32-bit address. Calculate TOTAL amount of SRAM needed to implement this cache, assuming write- back policy. Calculate the hit rate for the following memory (byte) addresses: 0, 32, 33, 64, 8, 80, 18, 128, 15,1 Assuming that main memory has an access time of 60ns and cache has an access time of 5ns, calculate the average memory access time for our accesses above.

Set Associative Cache We have a 128-byte 2-way set associative cache with 4 word blocks, using FIFO replacement policy. Questions: Sketch layout for 32-bit address. Calculate TOTAL amount of SRAM needed to implement this cache, assuming write-back policy. Calculate the hit rate for the following memory (byte) addresses: 0, 32, 33, 64, 8, 80, 18, 128, 15,1 Assuming that main memory has an access time of 60ns and cache has an access time of 5ns, calculate the average memory access time for our accesses above.

Full Associative Cache We have a 128 byte fully-associate cache with 4 word blocks and LRU replacement policy. Questions: Sketch layout for 32-bit address. Calculate TOTAL amount of SRAM needed to implement this cache, assuming write-back policy. Calculate the hit rate for the following memory (byte) addresses: 0, 32, 33, 64, 8, 80, 18, 128, 15,1 Assuming that main memory has an access time of 60ns and cache has an access time of 5ns, calculate the average memory access time for our accesses above.

Exercise #2: Without Forwarding How many cycles will it take to execute the following code on a 5-stage pipeline without forwarding? sub $2, $1, $3 and $12, $2, $5 or $13, $6, $2 add $14, $2, $2 sw $15, 100($2) CS2100 Pipelining

Exercise #2: Without Forwarding 1 2 3 4 5 6 7 8 9 10 11 sub and or add sw CS2100 Pipelining

Exercise #3: Without Forwarding How many cycles will it take to execute the following code on a 5-stage pipeline without forwarding? lw $2, 20($3) and $12, $2, $5 or $13, $6, $2 add $14, $2, $2 sw $15, 100($2) CS2100 Pipelining

Exercise #3: Without Forwarding 1 2 3 4 5 6 7 8 9 10 11 lw and or add sw CS2100 Pipelining

Exercise #4: With Forwarding How many cycles will it take to execute the following code on a 5-stage pipeline with forwarding? sub $2, $1, $3 and $12, $2, $5 or $13, $6, $2 add $14, $2, $2 sw $15, 100($2) CS2100 Pipelining

Exercise #4: With Forwarding 1 2 3 4 5 6 7 8 9 10 11 sub and or add sw CS2100  Pipelining

Exercise #5: With Forwarding How many cycles will it take to execute the following code on a 5-stage pipeline with forwarding? lw $2, 20($3) and $12, $2, $5 or $13, $6, $2 add $14, $2, $2 sw $15, 100($2) CS2100 Pipelining

Exercise #5: With Forwarding 1 2 3 4 5 6 7 8 9 10 11 lw and or add sw CS2100  Pipelining

Exercise #7: Branch Prediction How many cycles will it take to execute the following code on a 5-stage pipeline with forwarding and branch prediction? Total instructions = 1 + 102 + 1 = 22 Ideal pipeline = 4 + 221 = 26 cycles addi $s0, $zero, 10 Loop: addi $s0, $s0, -1 bne $s0, $zero, Loop sub $t0, $t1, $t2 CS2100 Pipelining

Exercise #7: Branch Prediction 1 2 3 4 5 6 7 8 9 10 11 IF ID ALU MEM WB addi bne addi* CS2100  Pipelining