Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 1 Beispiel Cache-Architektur.

Ähnliche Präsentationen


Präsentation zum Thema: "Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 1 Beispiel Cache-Architektur."—  Präsentation transkript:

1 Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 1 Beispiel Cache-Architektur

2 Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 2 Number entries in cache ≙ number cache lines = Cache size / block size 32 * 1024 Byte / 4 Byte = 2 5 * 2 10 / 2 2 = 2 13 cache lines → 13 Bits are necessary for cache line address Given  Cache Size: 32 KByte block size: 4 Byte Organization form: direct mapping DatenTag 0x0000... 0x1FFF...

3 Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 3 Speicher Size: 1 MByte ≙ 2 20 Byte  Access to memory under address 0x103450b 0001 0000 0011 0100 0101 → 0x00000 Memory... 0x10345 0xFFFFF... 0x12 0x42 0x18 0x50

4 Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 4 0x00D1 Which cache line, which tag? 4 = 2 2 Byte size of block 2 13 cache lines 0x00010 0b 0001 0000 0011 0100 0101 TagCache line 0b 0001 0000 0011 0100 0101 Byte-Nr 0x00000 Memory... 0x10345 0xFFFFF... DatenTag 0x0000... 0x1FFF... 0x10344 0x10347 0x10346... 0x00D1 00011011 0x00010 0x12 0x42 0x18 0x50 0x12 0x42 0x18 0x50 {

5 Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 5 Number of entries in cache ≙ number of cache lines = cache size / block size / degree of associativity (32 * 1024 Byte / 4 Byte) / 2 = 2 5 * 2 10 / 2 3 = 2 12 cache sets → 12 Bits are necessary for cache line address Given  Cache Size: 32 KByte block size: 4 Byte Organization form: now 2-way associative DatenTag 0x000... 0xFFF... 0x001...

6 Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 6 0x0D1 Which cache line, which tag? 4 = 2 2 Byte block size 2 12 cache lines 0x000100 0b 0001 0000 0011 0100 0101 TagCache-Menge 0b 0001 0000 0011 0100 0101 Byte-Nr 0x00000 Memory... 0x10345 0xFFFFF... DatenTag 0x000... 0xFFF... 0x10344 0x10347 0x10346... 0x0D1 00011011 0x000100 0x12 0x42 0x18 0x50 0x12 0x42 0x50 { 0x120x420x180x50 0x120x420x180x50 0x000100 Can be stored in both lines


Herunterladen ppt "Lehrstuhl für Informatik 3 - D. Fey Vorlesung GRa - SS 2015 4.5.-18.5.2015, Folie 1 Beispiel Cache-Architektur."

Ähnliche Präsentationen


Google-Anzeigen