Faster Processors: Superpipelining, Superscaling, Dynamic Scheduling, Study notes of Computer Architecture and Organization

Various pipelining techniques to enhance processor performance. Topics include superpipelining (deep pipelining) with longer pipelines, multiple issue with static and dynamic functional units, and dynamic scheduling to avoid pipeline hazards. The document also covers the mips superscaler architecture and its implementation, as well as code scheduling and loop unrolling techniques to optimize pipelining.

Typology: Study notes

Pre 2010

Uploaded on 08/30/2009

koofers-user-ueo
koofers-user-ueo 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CS472 1
Chapter 6
Pipelining
part last
CS472 2
3 Directions for Faster Processors
Superpipelining (deep pipelining) - longer
pipelines
Multiple issue (static and dynamic) - duplicate
functional units in the pipeline so that multiple
instructions can be launched at each clock cycle.
(CPI < 1)
Dynamic scheduling by the hardware to avoid
pipeline hazards.
The cost is much more complicated pipeline control.
pf3
pf4
pf5

Partial preview of the text

Download Faster Processors: Superpipelining, Superscaling, Dynamic Scheduling and more Study notes Computer Architecture and Organization in PDF only on Docsity!

CS472 1

Chapter 6

Pipelining

part last

CS472 2

3 Directions for Faster Processors

  • Superpipelining (deep pipelining) - longer

pipelines

  • Multiple issue (static and dynamic) - duplicate

functional units in the pipeline so that multiple

instructions can be launched at each clock cycle.

(CPI < 1)

  • Dynamic scheduling by the hardware to avoid

pipeline hazards.

The cost is much more complicated pipeline control.

CS472 3

Superscaler MIPS

  • Assume 2 instructions per clock cycle.
  • One instruction is an integer ALU operation or

branch and the other is a load or store.

  • The hardware dynamically determines whether

conditions are right to issue instructions in

parallel.

CS472 4

Superscaler MIPS

ALU or branch instruction IF ID EX MEM WB Load or store instruction ALU or branch instruction Load or store instruction ALU or branch instruction Load or store instruction ALU or branch instruction Load or store instruction

IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB

CS472 7

Simple Superscaler Code Scheduling

Answer:

ALU or branch Data transfer clk

Loop: lw $t0, 0($s1) 1 addi $s1, $s1, -4 2 addu $t0, $t0, $s2 3 bne $s1, $zero, Loop sw $t0, 0($s1) 4

Note that the addi instruction was scheduled before

the addu to the the lw an extra cycle to eliminate a

data hazard. Still, the CPI is only 0.8 and not 0.5.

CS472 8

Loop Unrolling

ALU or branch Data transfer clk

Loop: addi $s1, $s1, -16 lw $t0, 0($s1) 1 lw $t1, 12($s1) 2 addu $t0, $t0, $s2 lw $t2, 8($s1) 3 addu $t1, $t1, $s2 lw $t3, 4($s1) 4 addu $t2, $t2, $s2 sw $t0, 0($s1) 5 addu $t3, $t3, $s2 sw $t1, 12($s1) 6 sw $t2, 8($s1) 7 bne $s1, $zero, Loop sw $t3, 4($s1) 8

CS472 9

Loop Unrolling Helps Data Hazards

Forget about superscalar for now. Unrolling a loop

helps get rid of data hazards in a simple pipeline.

Loop: lw $t0, 0($s1) # $t0 = array element add $t0, $t0, $s2 # add scalar in $s sw $t0, 0($s1) # store result addi $s1, $s1, -4 # decrement pointer bne $s1, $zero, Loop

Say that this loop executes 1000 times.

CS472 10

Loop Unrolling Helps Data Hazards

Loop: lw $t0, 0($s1) lw $t1, -4($s1) add $t0, $t0, $s add $t1, $t1, $s sw $t0, 0($s1) sw $t1, -4($s1) addi $s1, $s1, - bne $s1, $zero, Loop

How many times should this loop execute?

data hazards are gone