Presentation is loading. Please wait.

Presentation is loading. Please wait.

P IPEL INED EXECUT ION(1) Part 4 Dr. Abdel-Rahman Al-Qawasmi.

Similar presentations


Presentation on theme: "P IPEL INED EXECUT ION(1) Part 4 Dr. Abdel-Rahman Al-Qawasmi."— Presentation transcript:

1 P IPEL INED EXECUT ION(1) Part 4 Dr. Abdel-Rahman Al-Qawasmi

2 P IPEL INED EXECUT ION Pipelined execution is a technique that enables microprocessor designers to increase the speed at which a processor operates, thereby decreasing the amount of time that the processor takes to execute a program.

3 list of actions required to execute an arithmetic instruction 1. Fetch the next instruction from the address stored in the program counter, and load that instruction into the instruction register. Increment the program counter. 2. Decode the instruction in the instruction register. 3. Execute the instruction in the instruction register. Because the instruction is not a branch instruction but an arithmetic instruction, send it to the ALU. a. Read the contents of registers A and B. b. Add the contents of A and B. 4. Write the result back to register C. In a modern processor, these four steps are repeated over and over again until the program is finished executing

4 Basic Instruction Flow One useful division that computer architects often employ when talking about CPUs is that of front end versus back end.

5 Four phases of execution

6 Pipelining Explained The lifecycle of an SUV in a pipelined factory

7 Pipelining Explained The revised work flow would look as follows: 1. The Stage 1 crew builds a chassis. 2. Once the chassis is complete, they send it on to the Stage 2 crew. 3. The Stage 2 crew receives the chassis and begins dropping the engine in, while the Stage 1 crew starts on a new chassis. 4. When both Stage 1 and Stage 2 crews are finished, the Stage 2 crew’s work advances to Stage 3, the Stage 1 crew’s work advances to Stage 2, and the Stage 1 crew starts on a new chassis.

8 A Non-Pipelined Processor non-pipelined processors work on one instruction at a time, moving each instruction through all four phases of its lifecycle during the course of one clock cycle. Thus non-pipelined processors are also called single-cycle processors, because all instructions take exactly one clock cycle to execute fully

9 A single-cycle processor

10 A Pipelined Processor Pipelining a processor means breaking down its instruction execution process—what I’ve been calling the instruction’s lifecycle— into a series of discrete pipeline stages that can be completed in sequence by specialized hardware

11 Pipeline stages Stage 1: Fetch the instruction from code storage. Stage 2: Decode the instruction. Stage 3: Execute the instruction. Stage 4: Write the results of the instruction back to the register file. Note that the number of pipeline stages is called the pipeline depth. So the four- stage pipeline has a pipeline depth of four.

12 A four-stage Pipeline

13 Reference INSIDE THE MACHINE (Part 1). 2007 by Jon Stokes


Download ppt "P IPEL INED EXECUT ION(1) Part 4 Dr. Abdel-Rahman Al-Qawasmi."

Similar presentations


Ads by Google