Question: Consider the following RISC (Reduced Instruction Set Computer) program, (first column gives the address of the memory location). 1 SUB R7, R7, R2 2 BNZ
Consider the following RISC (Reduced Instruction Set Computer) program, (first column gives the address of the memory location). 1 SUB R7, R7, R2 2 BNZ R7.0001 3 AND R8, R7, R4 OR R4, R8, R2 (0) Draw the execution diagram for the program with the contents of R7 nonzero after subtraction. [2 marks] Indicate any data or control hazards that are presented. [2 marks] (1) Rewrite the RISC program using NOPs ( No Operation) to avoid any data and control hazard. [4 marks) (iv) Using Figure Q3(a) and Figure Q3(b), explain how these two circuits will identify and avoid the data hazard in the above program, [8 marks] Consider the following RISC (Reduced Instruction Set Computer) program, (first column gives the address of the memory location). 1 SUB R7, R7, R2 2 BNZ R7.0001 3 AND R8, R7, R4 OR R4, R8, R2 (0) Draw the execution diagram for the program with the contents of R7 nonzero after subtraction. [2 marks] Indicate any data or control hazards that are presented. [2 marks] (1) Rewrite the RISC program using NOPs ( No Operation) to avoid any data and control hazard. [4 marks) (iv) Using Figure Q3(a) and Figure Q3(b), explain how these two circuits will identify and avoid the data hazard in the above program, [8 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
