21
Pipelining Principles Prof. Sirer CS 316 Cornell University

Pipelining Principles

Embed Size (px)

DESCRIPTION

Prof. Sirer CS 316 Cornell University. Pipelining Principles. Meet the Cast. Alice. Meet the Cast. Alice Bob. Meet the Cast. Alice Bob They don’t like each other!. The Laundry. Four sequential tasks. Laundry Room Design #1. A large room with a one entry-door and one exit-door. - PowerPoint PPT Presentation

Citation preview

Page 1: Pipelining Principles

Pipelining Principles

Prof. Sirer

CS 316

Cornell University

Page 2: Pipelining Principles

Meet the Cast

Alice

Page 3: Pipelining Principles

Meet the Cast

Alice

Bob

Page 4: Pipelining Principles

Meet the Cast

Alice

Bob

They don’t like each other!

Page 5: Pipelining Principles

The Laundry

Four sequential tasks

Page 6: Pipelining Principles

Laundry Room Design #1

A large room with a one entry-door and one exit-door

Page 7: Pipelining Principles

Laundry Room Design #1

First Alice owns the room

Page 8: Pipelining Principles

Laundry Room Design #1

First Alice owns the room

Bob can enter as soon as she is done

No possibility for Alice and Bob to fight

Page 9: Pipelining Principles

Laundry Room Design #1

Elapsed Time for Alice: 4Elapsed Time for Bob: 4Elapsed Time for both: 8A better laundry room can improve utilization and speed up task completion

Time

Page 10: Pipelining Principles

Laundry Room Design #2

Elapsed Time for Alice: 4Elapsed Time for Bob: 4Elapsed Time for both: 5!!!

Time

Page 11: Pipelining Principles

Laundry Room Design #2

The room is partitioned into stagesOne person owns a stage at a time, the room can hold up to four people simultaneously

Page 12: Pipelining Principles

Laundry Room Design #2

Alice

Page 13: Pipelining Principles

Laundry Room Design #2

Bob Alice

Page 14: Pipelining Principles

Laundry Room Design #2

Bob AliceCharlie

Page 15: Pipelining Principles

Laundry Room Design #2

Bob AliceCharlieDave

Page 16: Pipelining Principles

ImplicationsPrinciple: Latencies can be masked by running isolated operations in parallel

Need mechanisms for isolation

Need mechanisms for handling dependencies between tasks

Let’s apply this principle to processor design…

Page 17: Pipelining Principles

MIPS Processor

Functional decomposition of our processor

Page 18: Pipelining Principles

A MIPS Pipeline

Pipeline stages for a MIPS processor

Page 19: Pipelining Principles

Pipeline Isolation

Latches between pipeline stages hold the values for the stage to operate on

Latches and register file are triggered on opposite edges of the clock

Page 20: Pipelining Principles

Pipeline Logic

Additional latches required to store the instruction for each pipeline stage

Copy the instruction forward, generate local control signals separately in each pipeline stage

Page 21: Pipelining Principles

Pipelining for Other CircuitsPipelining can be applied to any combinational logic circuit

What’s the circuit latency at 2ns. per gate?What’s the throughput?What is the stage breakdown? Where would you place latches?What’s the throughput after pipelining?Pipelining vs. superpipelining