on-chip cache analysis a parameterized cache implementation for a system-on-chip risc cpu

28
On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Upload: dorthy-sharon-ward

Post on 18-Dec-2015

236 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

On-Chip Cache Analysis

A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Page 2: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Presentation Outline

Informal Introduction Underpin Design – xr16 Cache Design Issue Implementation Details Results & Conclusion Future Work Questions

Page 3: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Informal Introduction

Field Programmable Gate Array (FPGAs) Verilog HDL System-on-Chip (SoC) Reduced Instruction Set Computer (RISC) Caches Project Theme

Page 4: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Underpin Design – xr16

Classical pipelined RISC Big-Endian, Von-Numen Architecture Sixteen 16-bit registers Forty Two Instructions (16-bit) Result Forwarding, Branch Annulments,

Interlocked instructions

Page 5: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Underpin Design – xr16 (cont’d)

Internal and external Buses (CPU clocked) Pipelined Memory Interface Single-cycle read, 3-cycle write DMA and Interrupt Handling Support Ported Compiler and Assembler

Page 6: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Underpin Design – xr16 (cont’d)

Block Diagram

Page 7: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Underpin Design – xr16 (cont’d)

Datapath

Page 8: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Underpin Design – xr16 (cont’d)

Memory Preferences

Page 9: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Underpin Design – xr16 (cont’d)

RAM Interface

Page 10: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Cache Design Issues

Cache Size * Line Size Fetch Algorithm Placement Policy * Replacement Policy * Split vs. Unified Cache

Page 11: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Cache Design Issues (cont’d)

Write Back Strategy * Write Allocate Policy * Blocking vs. Non-Blocking Pipelined Transactions Virtually addressed Caches Multilevel Caches

Page 12: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Cache Design Issues (cont’d)Cache Size 32 – 256K Data Bits

Placement Policy

Direct Mapped, Set Associative,

Fully Associative

Replacement Policy

FIFO, Random*

Write Back Strategy

Write Back, Write Through

Write Allocate Policy

Write Allocate, Write No Allocate

Page 13: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details

Configurable Parameters

Cache Size Placement Strategy Write Back Policy Write Allocate Policy Replacement Policy

Page 14: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

Page 15: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

Page 16: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

1. Miss Read Replacement NOT Required

Let the memory operation complete and place

fetched data from memory in cache.

Page 17: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

2. Miss Read Replacement RequiredInitiate a write memory operation and write back

the set to be replaced. Initiate read operation for

desired data.

Page 18: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

3. Miss Write No AllocateLet the memory operation complete and do nothing else.

Page 19: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

4. Miss Write Yes Allocate WriteThroughLet the memory operation complete and place the new

data in cache.

Page 20: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

5. Miss Write Yes Allocate WriteBack

Replacement NOT RequiredCancel memory operation and only update the cache,

mark the data dirty.

Page 21: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

6. Miss Write Yes Allocate WriteBack

Replacement RequiredInstead of writing the data that caused the write miss,

write back the set that is to be replaced and update the

cache with data that caused the miss.

Page 22: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

7. Hit ReadCancel memory operation and provide data for either

instruction fetch or data load instruction.

Page 23: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

8. Hit Write WriteThroughLet the memory operation complete and update the cache

when memory operation completes.

Page 24: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

9. Hit Write WriteBackCancel the memory operation and update the cache.

Page 25: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Implementation Details (cont’d)

1. Read Hit

2. Write Hit

3. Read Miss (rep)

4. Read Miss (no rep)

5. Write Miss (rep)

6. Write Miss (no rep)

1, 4 32 5,6

Page 26: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Results & Conclusion

Proof of Concept Rigid Design Parameters R&D Options Architecture Innovation

Page 27: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Future Work

LRU Implementation Victim Cache Buffer Split Caches Level 2 Cache Pipeline Enrichment Multiprocessor Support

Page 28: On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU

Questions