Datapath and Control - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Datapath and Control

Description:

CDA 3101 Discussion Section10 Datapath and Control * * Questions 5.3 Describe the effect that a single stuck-at-1 fault (the signal is always 1) would have for the ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 11
Provided by: ciseUflE89
Learn more at: https://www.cise.ufl.edu
Category:

less

Transcript and Presenter's Notes

Title: Datapath and Control


1
Datapath and Control
CDA 3101 Discussion Section10
2
Questions
  • 5.3 Describe the effect that a single stuck-at-1
    fault (the signal is always 1) would have for the
    signals shown below, in the single-cycle datapath
    in Figure 5.17 on page 307. Which instructions,
    if any will not work correctly? Explain why.
  • RegWrite
  • ALUOp0
  • ALUOp1
  • Branch
  • MemRead
  • MemWrite

3
ALU Control
Figure 5.12 How the ALU control bits are set
depends on the ALUOp control bits and the
different function codes for the R-type
instruction.
Figure 5.18 The setting of the control lines is
completely determined by the opcode fields of the
instruction.
4
(No Transcript)
5
(No Transcript)
6
Question 5.3
0
  • RegWrite1
  • sw and beq should not write results to
    the register file. sw(beq) will overwrite a
    random register with either the store address
    (branch target) or random data from the memory
    data read port.
  • ALUOp01
  • When ALUOp0 is stuck at 1. beq will work fine.
    lw and sw will not work fine because a
    subtraction will be done instead of addition.
    Some R-Type instructions will work, others will
    not. (The previous slide is the logic for the
    ALU Control unit. Operation bit3 is always 0, not
    shown in the circuit). Only the R-Type
    instructions which need Operation 2 bit as 1 will
    work, others wont.
  • ALUOp11
  • When ALUOp1 is stuck at 1. The R-Type
    instructions will work fine. Lw and sw will not
    work if the bits 0-5 of the instruction
    representation is anything other than the
    function code for add. beq will not work unless
    the bits 0-5 of the instruction representation is
    the function code for subtract.

7
Question 5.3
  • Branch1
  • Instructions other than branches (beq) will not
    work correctly if the ALU Zero signal is raised.
    An R-format instruction that produces zero output
    will branch to a random address determined by its
    least significant 16 bits.
  • MemRead1
  • All instructions but sw will work correctly.
    (Data memory is always read, but memory data is
    never written to the register file except in the
    case of lw.) sw will not work because both
    MemRead and MemWrite should not be set to 1 at
    the same time.
  • MemWrite1
  • Only sw will work correctly. The rest of
    instructions will store their results in the data
    memory, while they should not.

8
Questions
  • 5.8 Add the instruction jr to the single-cycle
    datapath described in this chapter. Add any
    necessary datapaths and control signals to the
    single-cycle datapath of Figure 5.17 on page 307
    and show the necessary additions to Figure 5.18
    on page 308.
  • Jump Register jr rs
  • PCRrs
  • R-type, Op/Fun code 0/0x08

9
Question 5.8
X
0 M U X 1
JumpReg
Instruction5-0
10
Control Signals (Figure 5.18)
Instruction R lw sw beq Jr
RegDst X
ALUSrc X
MemtoReg X
RegWrite S A M E 0
MemRead 0
MemWrite 0
Branch 0
ALUop10 x x
JumpReg 0 0 0 0 1
Write a Comment
User Comments (0)
About PowerShow.com