Our ultimate goal: building the datapath - PowerPoint PPT Presentation

About This Presentation
Title:

Our ultimate goal: building the datapath

Description:

What about subtraction (a b) ? Need to support the set-on-less ... 1 10 sub. 1 11 slt. Note: zero is a 1 when the result is zero! ALU operation: 000 = and ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 7
Provided by: zdravko6
Learn more at: https://www.cs.ccsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Our ultimate goal: building the datapath


1
Our ultimate goal building the datapath

2
Arithmetic Logic Unit (ALU)
ALU operation 000 and001 or010 add110
subtract111 slt
3
What about subtraction (a b) ?
  • Two's complement approach just negate b and
    add.
  • How do we negate?
  • The solution

4
Tailoring the ALU to the MIPS datapath
  • Need to support the set-on-less-than instruction
  • slt rd, rs, rt
  • slt is an arithmetic instruction
  • produces a 1 if rs lt rt and 0 otherwise
  • use subtraction (a-b) lt 0 implies a lt b
  • Need to support test for equality (beq t5, t6,
    label)
  • use subtraction (a-b) 0 implies a b

5
Supporting slt
6
Test for equality and complete ALU
ALU operation 000 and001 or010 add110
subtract111 slt
Control linesBnegate Operation
Insturction0 00 and0 01
or0 10 add1 10 sub1
11 slt
  • Note zero is a 1 when the result is zero!
Write a Comment
User Comments (0)
About PowerShow.com