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

single cycle-data path question notes for the question: (5) (5 marks) Actually i

ID: 646548 • Letter: S

Question

single cycle-data path question

notes for the question:

(5) (5 marks) Actually ills possible to incorporate the shift operations into the single- cycle data path we have discussed in class. Instruction lui can be considered as a shift operation. This way, we can introduce shift operations into the data path. (a) Explain what components we should add the data path to convert instruction lui to a shift operation. such as the component(s) we need to add in. any constant(s) we need to add it. etc. You don?t need to draw the diagram. (b) Explain what extra control signals we need to add in, in order to add instructions sil, srl. sra. sllv, sralv, and srav. You don?t need to draw the diagram.

Explanation / Answer

lui shifts the immediate value to left and stores zeros in the lower bit.

lui $a, 1100110011000011

It will shift the given string to 16 bits left and fill zeroes to get 1100110011000011 0000000000000000

SLL: It will shift the given value to left by amount given in instruction and store the value in third register.

sll $a, $b, h

It will shift the value in 'b' by 'h' bits and will store in 'a'.

In all the instructions srl, sra, sllv, srlv and srav the same format is used. The register name, number of bits to be shifted and the register where it will be stored.