Reading a processor pipeline

This article will discuss an important basic knowledge of the processor: "pipeline." Readers familiar with computer architecture must be aware that talking about processor microarchitecture will almost certainly talk about its assembly line. The pipeline structure of the processor is the most basic element of the processor microarchitecture, as if the chassis of the car has a fundamental role for the car, and it carries and determines the details of the processor's other microarchitectures. This article will briefly introduce some of the processor's common pipeline architecture so that you can actually read the processor pipeline.

1 Speaking from the classic five-stage assembly line

The concept of the assembly line comes from the industrial manufacturing field. The automobile assembly method is used as an example to explain the working mode of the assembly line. It is assumed that assembling a car requires four steps:

The first step is stamping: making body shells and chassis components.

The second step of welding: welding the stamped parts to the body.

The third step is coating: cleaning, chemical treatment, grinding, painting and drying of the main components such as the body.

Step 4 Final assembly: Assemble the components (including the engine and outsourcing components) into a vehicle.

The automobile assembly also corresponds to four workers who need stamping, welding, painting and assembly. The simplest method is that after a car has been assembled through the above four steps in turn, the next car will begin to be assembled. The earliest industrial manufacturing was the original method that only one car was assembled at the same time. . It was not long after it was discovered that when a car was assembled during a certain period of time, the other three workers were idle. This was obviously a huge waste of resources, and they thought about a new way to make effective use of resources. When a car is stamped into the welding process, it immediately starts the stamping of the second car, instead of waiting until the first car passes through all four processes, so that in the subsequent production, it can ensure that the four workers are always in Running status will not cause staff to idle. This kind of production method is like an endless stream, so it is called the assembly line.

The most mentioned classic MIPS five-stage assembly line in the computer architecture textbook is shown in Figure 1. The life cycle of an instruction in this pipeline is divided into:

Refers to:

Instruction fetch (InstrucTIonFetch) refers to the process of reading an instruction from memory.

Decoding:

Instruction decoding (InstrucTIon Decode) refers to the process of translating instructions that are fetched from memory. After decoding, the index of the operand register required by the instruction is obtained. This index can be used to read out the operand from the register file (Regfile).

carried out:

After the instruction decodes, the types of calculations that need to be performed are known, and the required operands have already been read from the general register file. Then the instruction execution (InstrucTIonExecute) is performed. Instruction execution refers to the process of real operations on instructions. For example, if the instruction is an addition operation, the operation is added; if it is a subtraction operation, a subtraction operation is performed.

The most common component in the "execute" stage is an Arithmetic Logical Unit (ALU) as a hardware functional unit that implements a specific operation.

Visits:

A memory access instruction is often one of the most important instruction types in an instruction set. Memory access refers to a process in which a memory access instruction reads data from a memory or writes it into a memory.

Write back:

Write-back is the process of writing the result of an instruction's execution back to a general register file. If it is an ordinary operation instruction, the result value comes from the result of calculation in the "execute" stage; if it is a memory read instruction, the result comes from the data read from the memory in the "fetch" stage.

The use of pipelines in industrial manufacturing can increase throughput per unit of time, and the same streamlined design in the processor can also help improve processor performance. Taking the above five-stage assembly line as an example, since the previous instruction completed the “fetching” and entered the “decoding” stage, the next instruction can immediately enter the “fetching” stage, and so on, as shown in Figure 2. If the pipeline is not stalled, it can theoretically achieve the performance of completing one instruction per clock cycle.

Reading a processor pipeline

Figure 1 MIPS five-stage pipeline structure

Reading a processor pipeline

Figure 2 MIPS five-stage pipeline operation diagram

Fiber Optic Cabinet

Fiber Optic Cabinet,Fiber Cabinet,Fiber Distribution Cabinet,Outdoor Fiber Cabinet

Cixi Dani Plastic Products Co.,Ltd , https://www.danifiberoptic.com