pipelining - aftabhussain.github.io · pipelining adapted from rajeev subramanium’s spring ‘16...

26
Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which was incorrect in the video, i.e., the version shown in class. 4 Feb 2019 Aftab Hussain University of California, Irvine 250P Computer Systems Architecture, Winter 2019

Upload: donga

Post on 31-Jul-2019

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Pipelining

Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah)

A correction has been done in slide No.8, which was incorrect in the video, i.e., the version shown in class.

4 Feb 2019

Aftab HussainUniversity of California, Irvine

250P Computer Systems Architecture, Winter 2019

Page 2: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

A data processing technique

Page 3: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

where the data processing elementsare connected in a series

Page 4: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

and some of those elements are executed in parallel using time slicing.

https://en.wikipedia.org/wiki/Pipeline_(computing)

Page 5: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

Page 6: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

Page 7: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

Parallelism = 1Can at most work on 1 car at 1 time

Throughput = 1 car / 24 h

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

Page 8: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

1 2 3 4 5 6

Time slots (these would correspond to each cycle - they are not the stages into which the pipeline for a single job is divided)

Page 9: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

Improve utilization of resourcesby allocating different groups of resources to work in each stage.

1 2 3 4 5 6

Page 10: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

Parallelism = 3Can at most work on 3 car at 1 time

Throughput = 1 car / 8 h24 h

8 h

Page 11: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

x 3

Page 12: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Instructions

Page 13: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

F D EF D E

F D E

F D E

Page 14: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

F D EF D E

F D E

F D E

Each instruction is executed by different circuits (for F, D, E)

The circuits execute the instructions in every clock cycle.

Page 15: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

F D EF D E

F D E

F D E

Each instruction is executed by different circuits (for F, D, E)

The circuits execute the instructions in every clock cycle.

1 ns

Page 16: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Let’s see how instruction execution happensin unpipelined mode

Page 17: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

F DINSTRF DINSTR

F DINSTR

F DINSTR

Page 18: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

F DINSTRF DINSTR

F DE

F DINSTR

Clock cycle time needs to increase!

Page 19: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

24 h

Build a car

Build a car

Build a car

http://www.cs.utah.edu/~rajeev/cs6810/pres/12-6810-03.pdf

F DINSTRF DINSTR

F DINSTR

F DINSTR

3 ns

Page 20: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Overhead in pipelining - latches

Page 21: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Overhead in pipelining - latches

Need for latches - [White-Board]

Page 22: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

At every rising clock edge, a latch + samples whatever value is on its I/P

+ stores it in its output+ retains it until the next rising clock edge

Page 23: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Pipelining Equations

Page 24: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which
Page 26: Pipelining - aftabhussain.github.io · Pipelining Adapted from Rajeev Subramanium’s Spring ‘16 CS6810 course (University of Utah) A correction has been done in slide No.8, which

Thank you