Download presentation
Presentation is loading. Please wait.
Published byGervais Hancock Modified over 6 years ago
1
Tutorial Nine Cache CompSci Semester One 2016
2
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field How many bits are there in the tag field How much data can be held in the cache
3
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field How many bits are there in the tag field How much data can be held in the cache
4
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field (3 bits) How many bits are there in the tag field How much data can be held in the cache
5
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field (3 bits) How many bits are there in the tag field How much data can be held in the cache
6
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field (3 bits) How many bits are there in the tag field (13 bits) How much data can be held in the cache
7
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field (3 bits) How many bits are there in the tag field (13 bits) How much data can be held in the cache
8
Exercise 9.1 Answer the following questions for a direct-mapped cache with 8 cache lines, where each line has 1 word, each word is 2 bytes, and the address bus is 16 bits. How many bits are needed for the index field (3 bits) How many bits are there in the tag field (13 bits) How much data can be held in the cache (16 bytes)
9
Cache Trace Memory Access
Slot # Address Item 1 2 3 4 5 6 7 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
10
Cache Trace Access 0x4503 Memory Access
Slot # Address Item 1 2 3 4 5 6 7 Access 0x4503 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
11
Cache Trace Access 0x4503 0100 0101 0000 0011 Memory Access
Slot # Address Item 1 2 3 4 5 6 7 Access 0x4503 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
12
Cache Trace Access 0x4503 0100 0101 0000 0011 Memory Access
Slot # Address Item 1 2 3 4 5 6 7 Access 0x4503 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
13
Cache Trace Access 0x4503 Cache Miss! 0100 0101 0000 0011
Slot # Address Item 1 2 3 4 5 6 7 Access 0x4503 Cache Miss! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
14
Cache Trace Access 0x4503 0100 0101 0000 0011 Memory Access
Slot # Address Item 1 2 3 0x4503 4 5 6 7 Access 0x4503 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
15
Cache Trace Memory Access
Slot # Address Item 1 2 3 0x4503 4 5 6 7 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
16
Cache Trace Access 0x450C Memory Access
Slot # Address Item 1 2 3 0x4503 4 5 6 7 Access 0x450C Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
17
Cache Trace Access 0x450C 0100 0101 0000 1100 Memory Access
Slot # Address Item 1 2 3 0x4503 4 5 6 7 Access 0x450C Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
18
Cache Trace Access 0x450C 0100 0101 0000 1100 Memory Access
Slot # Address Item 1 2 3 0x4503 4 5 6 7 Access 0x450C Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
19
Cache Trace Access 0x450C Cache Miss! 0100 0101 0000 1100
Slot # Address Item 1 2 3 0x4503 4 5 6 7 Access 0x450C Cache Miss! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
20
Cache Trace Access 0x450C 0100 0101 0000 1100 Memory Access
Slot # Address Item 1 2 3 0x4503 4 0x450C 5 6 7 Access 0x450C Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
21
Cache Trace Access 0x4503 Memory Access
Slot # Address Item 1 2 3 0x4503 4 0x450C 5 6 7 Access 0x4503 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
22
Cache Trace Access 0x4503 Cache Hit! Memory Access
Slot # Address Item 1 2 3 0x4503 1, 3 4 0x450C 5 6 7 Access 0x4503 Cache Hit! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
23
Cache Trace Access 0x452B Memory Access
Slot # Address Item 1 2 3 0x4503 1, 3 4 0x450C 5 6 7 Access 0x452B Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
24
Cache Trace Access 0x452B Cache Miss! 0100 0101 0010 1011
Slot # Address Item 1 2 3 0x4503 1, 3 4 0x450C 5 6 7 Access 0x452B Cache Miss! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
25
Cache Trace Access 0x5071 Memory Access
Slot # Address Item 1 2 3 0x452B 4 0x450C 5 6 7 Access 0x5071 Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
26
Cache Trace Access 0x5071 Cache Miss! Memory Access
Slot # Address Item 1 0x5071 5 2 3 0x452B 4 0x450C 6 7 Access 0x5071 Cache Miss! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
27
Cache Trace Access 0x450C Cache Hit! Memory Access
Slot # Address Item 1 0x5071 5 2 3 0x452B 4 0x450C 2, 6 6 7 Access 0x450C Cache Hit! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
28
Cache Trace Access 0x45FE Cache Miss! Memory Access
Slot # Address Item 1 0x5071 5 2 3 0x452B 4 0x450C 2, 6 6 0x45FE 7 Access 0x45FE Cache Miss! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
29
Cache Trace Access 0x450C Cache Hit! Memory Access
Slot # Address Item 1 0x5071 5 2 3 0x452B 4 0x450C 2, 6, 8 6 0x45FE 7 Access 0x450C Cache Hit! Memory Access 0x4503, 0x450C, 0x4503, 0x452B, 0x5071, 0x450C, 0x45FE, 0x450C
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.