hw7_sol - CDA 3101 Assignment 7 Due in class on Friday Nov...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CDA 3101 Assignment 7 Due in class on Friday, Nov. 19 1. (12 points) Describe the effect of stuck-at-0 fault (regardless of what it should be, the signal is always 0) would have for signals shown below, in the single-cycle datapath provided as part of Q2. Which instruction, if any, will not work correctly? Explain why. Consider each of the following faults separately: a. RegWrite = 0 b. ALUop0 = 0 c. ALUop1 = 0 d. Branch = 0 e. MemRead = 0 f. MemWrite = 0 a. RegWrite = 0: All R-format instructions, in addition to lw , will not work because these instructions will not be able to write their results to the register file. b. ALUop0 = 0: beq instruction will not work because the ALU will perform addition instead of subtraction (see Figure 5.12), so the branch outcome may be wrong. c. ALUop1 = 0: All R-format instructions except add will not work correctly because the ALU will perform add instead of the required ALU operation. d. Branch = 0: beq will not execute correctly. The branch instruction will always be not taken even when it should be taken. e. MemRead = 0: lw will not execute correctly because it will not be able to read data from memory. f. MemWrite = 0: sw will not work correctly because it will not be able to write to the data memory. 2. (16 points) Imagine I want to support the bge $t0, $t1, label , which compares $t0 and $t1 and branches only if $t0 >= $t1 (without breaking the rest of the instructions like add, sub, and, or, beq, lw, sw etc.). The instruction uses I-format representation (6 bits opcode, 5 bit rs, 5 bit rt, 16 bits label). Assume that the ALU generates another output „sign‟ which is 1 when the ALU output is negative. ( Hint: $t0 >= $t1 if $t0 -
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2012 for the course CDA 3101 taught by Professor Small during the Summer '08 term at University of Florida.

Page1 / 5

hw7_sol - CDA 3101 Assignment 7 Due in class on Friday Nov...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online