7. Multi-Cycle Processor Design Flashcards
Give two reasons why multi-cycle processors are better then single-cycle ones.
The average instruction requires less time than the longest instruction.
Functional units can be used in multiple instruction’s execution.
Which additional registers are added to the multi-cycle processor design?
IR (though this has just been named)
MDR
A & B
ALUOut
Which additional control signals are required for the multi-cycle processor design?
IorD
IRWrite
PCWrite
PCWriteCond
What happens in the instruction fetch cycle?
The IR is set to the value of the address held in the PC. In other words, it holds the instruction.
The PC is incremented by 4.
What happens in the instruction decode cycle?
The instruction is split up into its component parts, being stored in A and B.
The branch address target is computed and stored in ALUOut.
In an R-type instruction, what happens in the execute stage?
- The values in A and B are passed into the ALU, and the result is stored in ALUOut.
- The value is passed to the IR, which writes the data to the register required.
In an I-type immediate instruction, what happens in the execute stage?
- The value in A and the sign-extended constant are operated on by the ALU. The result is stored in ALUOut.
- The value is passed to the IR, which writes the data to the register required.
In a branch instruction, what happens in the execute cycle?
The value of A and B are subtracted and compared. If zero, the zero flag is engaged, and the branch is taken.
In a sw instruction, what happens in the execute cycle?
- The value of the offset (sign-extended) and value of A are added by the ALU and result stored in ALUOut.
- The data in B is written to the memory address in ALUOut.
In a lw instruction, what happens in the execute cycle?
- The value of the offset (sign-extended) and value of A are added by the ALU and result stored in ALUOut.
- Read from the memory address in the ALUOut and put the result in the MDR.
- Write the data in the MDR to the required register.
In a jump instruction, what happens in the execute cycle?
The jump address is calculated.