Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

l(24%) You are given a single-cycle processor design as below: Unit ALUControl P

ID: 3596363 • Letter: L

Question

l(24%) You are given a single-cycle processor design as below: Unit ALUControl PCSrc CLK Zero ALUResult A1 WE RO1 A ROD Instruction A2RD2 Data A3 WD3 Register WnteDataMemory WD PCJump ec2 Sign Extend ee2 (1) (12%) If each of the following control signals is stuck at 0, what instruction(s) supported by the above design would malfunction? (a). If RegWrite is stuck at 0, instruction(s) that would malfunction: (b). If ALUOpi is stuck at 0, instruction(s) that would malfunction: (c). If MemWrite is stuck at 0, instruction(s) that would malfunction: (2), (12%) If each of these signals is stuck at 1, what instruction(s) supported by the above design would malfunction? (a). If RegWrite is stuck at 1, instruction(s) that would malfunction: (b). If ALUOps is stuck at 1, instruction(s) that would malfunction: (c). If MemWrite is stuck at 1, instruction(s) that would malfunction:

Explanation / Answer

1.

(a) If Regwrite is stuck at 0, all R format instructions in addiion to lw would malfunction because these instructions would not be able to write anything into the register file.

(b) If ALUOp1 is stuck at 0, all R-format and beq instructions except add will not work correctly because the ALU will perform add instead of the required ALU operation.

(c) If MemWrite is stuck at 0, sw will not work correctly because it will not be able to write to the data memory.

2.

(a) If RegWrite is stuck at 1, sw and beq should not write results into the register file. Here, the random register with either the store address or random data from the memory data read port would be overwritten by sw(beq).

(b) If ALUOp1 is stuck at 1, the R instructions would work but the lw and sw functions would not work.

(c) If MemWrite is stuck at 1, only sw will work properly and the remaining instructions would be stored into the data memory.