Open In App

Multi-Cycle Data path and Control

Overview :

Multi-cycle data path break up instructions into separate steps. It reduces average instruction time. Each step takes a single clock cycle Each functional unit can be used more than once in an instruction, as long as it is used in different clock cycles. It reduces the amount of hardware needed. 



(I) Fetch Instruction :



An instruction stored in the memory is fetched into the control unit of CPU by supplying the memory with the address of the respective given instruction.

IR  <=  [[PC]]   ,    PC  <=  [PC] + 4

(II) Decode (Interpret Instruction) :

The control unit of the processor decodes the instructions in  order to find the sequence of operations required to execute the respective instructions.

Example:   

A  <=  Reg [IR [25:21]];                                             // Register rs in opcode (instruction part)

B  <=  Reg [IR [25:21]];                                              // Register rt in opcode (instruction part)

(III) Execution, Memory Address Computation or Branch Instruction :

Examples :

Memory Reference : ALUout   <=   A + sign-extend ( IR[15:0] )
Branch : if (A == B)   PC  <=  ALUout     // Conditional , it will calculate PC= Register + Branch Address
Jump :  PC  <=  PC [ 31:28 ] . ( IR [25 : 0] << 2 )    //// unconditional

(IV) Memory Access / R-type Instruction Completion Step :

Examples :

Memory Reference:  MDR  <=  Memory [ALUout ];    // LOAD  or  Memory [ALUout ]  <=  B;    // Store from register to memory
Arithmetic Logic Instruction (R-type) :  Reg [ IR[15:11]]  <=  ALUout ;      // register destination in opcode

(V) Memory Read Completion Step (Register Write) :

Examples :

Q1. Find the stages of data path and control (Execution Sequence) for 
ADD R1, R2, R3 ;  
 it means R3 <– R1 + R2

Solution: Given Instruction – ADD R3, R1, R2;

Q2. Find the stages of data path and control (Execution Sequence) for
 MOV 30 (R1), R2;  
 it means  [30 + R1]  <– R2

Solution: Given Instruction – MOV 30 (R1), R2;

Article Tags :