//Microprocessor Instruction Cycle

Microprocessor Instruction Cycle

The microprocessor (also known as Central Processing Unit (CPU)) can be defined simply as a calculation machine. It executes predefined operations called instructions. The steps the CPU performs in order to execute an instruction is called an instruction cycle (also known as fetch-execute cycle or fetch-decode-execute cycle). Understanding the instruction cycle is a great starting point for getting familiar with the overall functionality of the CPU.  The instruction cycle can be viewed as an abstract model of the CPU. Most of the hardware units part of the CPU are there to accommodate the instruction cycle.

The instruction cycle can generally be divided into three distinct phases:

  • Fetch
  • Decode
  • Execute

Fig. 1 Instruction Cycle

The Fetch Phase

This is the first phase of the instruction cycle. The program counter’s value is used for addressing (accessing) a specific cell from the program memory. This memory cell contains the instruction that have to be executed by the CPU at the end of the instruction cycle. The retrieval from program memory and the placement of this instruction into the instruction register (IR) is referred to as fetching. At the end of the current fetch phase the program counter’s value is increased to point to the next memory address.

Fig. 2 Fetch Process

The Decode Phase

In this phase the control unit of the CPU performs few actions based on the value of the instruction register (the fetched value):

  • Decode the instruction  – the opcode of the instruction defines what type of instruction it is (e.g data processing, memory access etc.).
  • Fetch the operands – based on the opcode and additional information contained in the instruction format, the control unit determines what type of operands are needed and where they should be fetched from.

The Execute Phase

The execution is the last phase of the instruction cycle. Here the actual operation specified by the fetched instruction is performed. If it is a data processing instruction then the operands are passed through the ALU and/or other data manipulation units if available for processing. At the end of the execute phase, the result of the executed instruction is stored in either the data memory or a CPU register (depending on the architecture and the instruction).

By |2018-12-02T12:52:50+00:00December 2nd, 2018|Categories: Explained Simply|Tags: , |0 Comments

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use cookies on this site to improve our service, perform analytics and remember website preference. By using the site, you consent to these cookies. I consent to cookies