The Datapath - PowerPoint PPT Presentation

About This Presentation
Title:

The Datapath

Description:

... Science Logo Contest $1000 for best logo. Administrative ... Create a single datapath for. lw, sw. beq (j later) add, sub, and, or, slt. Our line of attack ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 24
Provided by: scie226
Category:
Tags: create | datapath | logo

less

Transcript and Presenter's Notes

Title: The Datapath


1
The Datapath
  • Andreas Klappenecker
  • CPSC321 Computer Architecture

2
Administrative Issues
  • WebCT news, chat, grades
  • https//webct.tamu.edu
  • Quantum Computing Seminar
  • Chance to make 356
  • Fair Scholarship in Telecommunications
  • 1000 for five qualified students in Computer
    Science or Comp. Eng. (CPSC)
  • Computer Science Logo Contest
  • 1000 for best logo

3
Administrative Issues
  • Talk by David Patterson
  • Friday, October 10, 410pm, HRBB 124
  • Project 0 due October 10
  • Exam, October 17
  • Invited Admissions for UGrads

4
Goal of this lecture
  • Create a single datapath for
  • lw, sw
  • beq (j later)
  • add, sub, and, or, slt
  • Our line of attack
  • We recall datapaths of these operations
  • and compose their datapaths

5
Instruction Word Formats
  • Register format
  • Immediate format
  • Jump format

op-code rs rt
rd shamt funct
6 5 5 5 5
6
op-code rs rt
immediate value
6 5 5 16
op-code 26 bit current
segment address
6 26
6
Requirements of the Instruction Set
  • Memory
  • Register file
  • PC
  • Sign extender
  • ALU
  • Add 4 to increase PC

7
Hardware components
8
Instruction Fetch PC update
9
R-Format Instructions
  • Register format

op-code rs rt
rd shamt funct
6 5 5 5 5
6
10
Datapath for a load and store
  1. register access
  2. memory access calculation
  3. read or write from memory
  4. in the case of a load, write into register file

11
Marrying two Datapaths
12
Datapaths for Instruction Fetch, Memory and
R-type Instructions
A
L
U

o
p
e
r
a
t
i
o
n
A
L
U

o
p
e
r
a
t
i
o
n
3
3
M
e
m
W
r
i
t
e
M
e
m
W
r
i
t
e
M
e
m
t
o
R
e
g
M
e
m
t
o
R
e
g
A
L
U
S
r
c
A
L
U
S
r
c
Z
e
r
o
Z
e
r
o
A
L
U

o
p
e
r
a
t
i
o
n
3
A
L
U
A
L
U
A
L
U
A
L
U
r
e
s
u
l
t
A
d
d
r
e
s
s
r
e
s
u
l
t
A
d
d
r
e
s
s
M
e
m
W
r
i
t
e
M
e
m
t
o
R
e
g
A
L
U
S
r
c
Z
e
r
o
A
L
U
A
L
U
r
e
s
u
l
t
A
d
d
r
e
s
s
R
e
g
W
r
i
t
e
R
e
g
W
r
i
t
e
M
e
m
R
e
a
d
M
e
m
R
e
a
d
x
t
e
n
d
x
t
e
n
d
R
e
g
W
r
i
t
e
M
e
m
R
e
a
d
x
t
e
n
d
Note the added multiplexor switching between
register 2 and sign-extended immediate value
13
Datapath for a Branch
Use ALU to evaluate the branch condition, another
adder for branch target PC 4 (sign extended
16 bits)gtgt2
14
Marrying Branches with Rest
Output of Sign extend goes where? Output of PC
adder goes where?
15
Datapath for MIPS instructions
Seven control signals
16
ALU Control
  • For load and store instructions
  • Use ALU to compute memory address by addition
    (add immediate value)
  • For R-type instructions
  • Perform addition, subtraction, and, or, slt
  • value depends on 6bit function field
  • For beq
  • perform subtraction

17
ALU Control Logic (Recall ALU)
Depending on instruction, the ALU has to perform
one of the five operations
ALU cntrl Function
000 and
001 or
010 add
110 subtract
111 slt
18
ALU Control
  • Must describe hardware to compute 3-bit ALU
    control input
  • ALU control bits depend on ALUOp control bits
  • and different functions codes for R-type
    instructions

19
ALU Control
20
Datapath for MIPS instructions
Note the seven control signals!
21
Generating Control Signals
  • Opcode field of instruction
  • yields control signals
  • and ALUOp signals

22
Control

23
Summary
Write a Comment
User Comments (0)
About PowerShow.com