In this exercise, we examine in detail how an instruction is executed in a singl
ID: 3695976 • Letter: I
Question
In this exercise, we examine in detail how an instruction is executed in a single-?cycle
datapath. Problems in this exercise refer to a clock cycle in which the processor fetches the
following instruction word from address 128:
(i) 0001 0100 0110 0010 0000 0000 0001 0100
(ii) 0000 0000 1000 0010 0000 1000 0010 1010
For each instruction, answer the following questions.
(a) What is this instruction in assembly language notation? To figure this out, see
pages A51-?A80 of your textbook. What are the outputs of the sign-?extend and the
jump “Shift left 2” unit (near the top of the figure) for this instruction word?
(b) What are the values of the ALU control unit’s inputs for this instruction? You will need the
table at the bottom of page 301 of your textbook.
(c) What is the new PC address after this instruction is executed?
Explanation / Answer
Ans;
a) The instruction performs the load operation. The first 6 bits 100011 (35) represents a load instruction.
· Then new PC address after the instruction is executed is PC + 4
· The path followed by the instruction is PC --> Add (PC + 4) --> branch Mux --> jump Mux --> PC
(b) The instruction performs the branch operation. The first 6 bits 000100 (4) represents a branch instruction. Then new PC address varies depending on the values of the rs and rt fields. That means,
· If $1 and $3 are equal,the new PC value is PC + 4 + 4 x 12
· If is $1 and $3 are not equal, the new PC value will be PC + 4
· The path followed by the instruction is PC --> Add (PC + 4) --> branch Mux, or
· PC --> Add (PC + 4) --> Add (adds offset) --> branch Mux --> jump Mux --> PC
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.