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

a) Give the functional form of the instruction based on the register names. b) G

ID: 3822407 • Letter: A

Question

a) Give the functional form of the instruction based on the register names.

b) Give the functional form based on the instruction fields.

c) Draw the changes on the datapath diagram.

d) Give the values of the control signals.

Repeat the question above for the 'add to zero' instruction (addz. Below is the syntax and the encoding. The instruction below computes (tl+t2) and stores the result in register to and also in the memory at address zero. The "addz' instruction always uses address zero in the memory. addz sto, sti, St2 tl unique rt rd shamt funct opcode rS

Explanation / Answer

Answer

a. the functional form of the instruction based on the register names is of 6 bits (possibly 10100)

b. the functional form based on the instruction field is also of 6 bits (also possibly 10100)

d. For the ALU control signals, ALUSrc is what controls the multiplexer between the registersand ALU. Since a addz instruction is using three registers, two for source and 1 for destination, we need to select the Read data register from the register file. Also we are writing the result in a specific address, i.e. 0, so we are also having the signal for Write data. Therefore, the ALUSrc is 0 for Read and 1 for Write.