Top Banner
Xuan ‘Silvia’ Zhang Washington University in St. Louis http:// classes.engineering.wustl.edu /ese566/ Lecture 15 Process and Memory Integration
31

Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Oct 12, 2019

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Xuan ‘Silvia’ Zhang Washington University in St. Louis

http://classes.engineering.wustl.edu/ese566/

Lecture 15 Process and Memory Integration

Page 2: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Analyze Memory Performance

2

Page 3: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Transactions and Steps, Now for Memory

•  Executing a memory access involves a sequence of steps –  check tag: check one or more tags in cache –  select victim: select victim line from cache using

replacement policy –  evict victim: evict victim line from cache and write

victim to memory –  refill: refill requested line by reading line from memory –  write mem: write requested word to memory –  access data: read or write requested word in cache

3

Page 4: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Memory Microarchitecture Overview

4

Page 5: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

High-level Idea for FSM Cache

5

Page 6: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

FSM Cache Datapath

6

Page 7: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

High-level Idea for Pipelined Cache

7

Page 8: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Pipeline Cache Datapath

8

Page 9: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Cache Microarchitecture Optimizations

9

Page 10: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Hit Latency: Small & Simple Caches

10

Page 11: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Rate: Large Block Size

11

Page 12: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Rate: Large Cache Size or High Associativity

12

Page 13: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Rate: Hardware Prefetching

13

Page 14: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Rate: Compiler Optimization

14

Page 15: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Loop Interchange and Fusion

15

Page 16: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Matrix Multiply with Naïve Code

16

Page 17: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Matrix Multiply with Cache Tiling

17

Page 18: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Penalty: Multi-level Caches

18

Page 19: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Penalty: Multi-level Caches

19

Page 20: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Reduce Miss Penalty: Prioritize Reads

20

Page 21: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Cache Optimizations Impact on AMAL

21

Page 22: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Processor and L1 Cache Interface: Zero-cycle Hit Latency with Tightly Coupled Interface

22

Page 23: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Processor and L1 Cache Interface: Two-cycle Hit Latency with Val/Rdy Interface

23

Page 24: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Processor and L1 Cache Interface: Parallel Read, Pipelined Write Hit Path

24

Page 25: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Questions?

Comments?

Discussion?

25

Page 26: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Acknowledgement

Cornell University, ECE 4750

26

Page 27: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Quiz: Adding a New Auto-Incrementing Load Instruction

27

Page 28: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Quiz: Estimating Cycle Time

28

Page 29: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Quiz: Adding a New Auto-Incrementing Load Instruction

29

Page 30: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Class Project Introduction

•  Convolutional neural network (CNN) –  an advanced artificial neural network algorithm –  highly successful in image recognition applications

•  Design a CNN hardware accelerator –  latency and throughput –  power and area

30

Page 31: Lecture 15 Process and Memory Integration · – evict victim: evict victim line from cache and write victim to memory – refill: refill requested line by reading line from memory

Project Timeline

•  3/22: Brief introduction; start forming teams •  3/27: Release description; team finalized •  Week 11-12: Review related research papers •  4/10: Submit initial project proposal/plan with

block diagrams and interfaces •  Week 13-14: No lecture. Project team meetings •  4/24 and 4/26: Project presentation •  5/8: Final project report

31