cpu handout

cpu handout - A core component of the MIPS datapath is the...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
A core component of the MIPS datapath is the hardware that fetches an instruction from memory (and advances the PC by 4 bytes so that it refers to the next instruction). More specifically, the current value of the PC register is used to specify a location in the instruction memory, and the instruction stored at that location is read and passed on to other parts of the datapath. Simultaneously, an adder adds 4 to the current value of the PC (since MIPS instructions are exactly 4 bytes long). Then, since the Branch control line is not set by default, the multiplexor will pass through the new value, old PC + 4 , and this value will be stored into the PC register on the next clock edge. Thus we have read the instruction at the current value of the PC and also updated the PC to refer to the next instruction. (Note: An adder works the same as a full ALU except that it can only perform addition, leading to a simpler circuit. In this case, one of the inputs also is always the constant value 4, a fact that can be used to simplify the circuit even further.)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
R-type instructions take two registers as input and store their output in a third register. An example is add r1,r2,r3 which stores the sum r1 + r2 in register r3. Here the control line “RegDst” is set to 1 so that the destination register in the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

cpu handout - A core component of the MIPS datapath is the...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online