EE557 Assignment 5

EE557 Assignment 5 - EE 557 Assignment no. 5 30

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 1, 0, 1, 0, 1, 0, 1, 0 1, 0, 1, 0, 1, 0 30 clocks 30 clocks EE 557 Assignment no. 5 Q1 a. Loop: R4,0(R3) (1, hit) (32, miss) ADDI R3, R3, stridex4 (1) ADD R1, R1, R4 (1) BNE R3, R5, LOOP (1 + 2 flushes) On a miss 64 bytes of data comes in the cache Say if we take a stride of 1. So the block accesses will be as follows: 0(Miss) (0-63bytes come in cache) 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 64(Miss) … So there will be 1 miss followed by 15 hits If the stride is 5, so the block accesses will be as follows 0(Miss) (0-63bytes come in cache) , 20, 40, 60, 80(Miss) (64-127 bytes come in cache), 100,120 140(Miss)( 128-191 bytes will come in cache ), 160,180 200(Miss) ( 192-255 bytes comes in cache ) 220, 240 260 (Miss)( 256-319 bytes comes in cache ) 280,300 320(Miss)( 320-383 bytes come in cache ) 340,360,380 pattern repeats So it is like 1Miss, 4 hits, 1miss 3 hits, 1 miss 3 hits, 1miss 3 hits 1 miss, 3 hits Therefore, the number of misses and hits can be captures as a LCM of the stride and block size as follows Number of Misses = {LCM (64, stridex4) /64} Number of Hits = {LCM (64, stridex4)/stridex4}
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The average loop execution time will be as follows (Number of misses * 31 + Number of Hits * 6)/ total number of accesses
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/15/2010 for the course EE 441 taught by Professor Neely during the Spring '08 term at USC.

Page1 / 16

EE557 Assignment 5 - EE 557 Assignment no. 5 30

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online