= Solution
Fetch the <MIPS instruction> at the <program counter>, and compute $pc+4$. The opcode selects an <MIPS R-type instruction>; register-file read addresses $rs$ and $rt$ select the two operands. The function field selects ALU addition. The result returns through write-back multiplexer input zero to destination $rd$, and the next <program counter> is $pc+4$.
Using the diagram's actual selector encodings, the <control signals> are
$$
\begin{array}{c|ccccccccc}
&\mathrm{RegDst}&\mathrm{Branch}&\mathrm{Jump}&\mathrm{MemWrite}&\mathrm{MemToReg}&\mathrm{ALUOp}&\mathrm{MemRead}&\mathrm{ALUSrc}&\mathrm{RegWrite}\\\hline
\mathrm{add}&1&00&0&0&0&10&0&0&1
\end{array}.
$$
Here $\mathrm{ALUOp}=10$ means decode the function field; $00$ means add and $01$ means subtract. The source's $\mathrm{Branch}=(Br_1,Br_0)$ is a two-bit control: the branch-taken output is $Br_1\land(Br_0\mathbin{\oplus}\mathrm{Zero})$. With $Br_1=0$, $Br_0$ is immaterial; zero is a convenient concrete setting. No data-memory access occurs.
Back to article page