8086簡單的指令流水線
Any computer or machine works according to some instructions. These instructions are responsible for all the work that the machine does. But how does a machine work to understand and execute that instruction?
任何計算機或機器都按照某些說明工作。 這些說明負責機器的所有工作。 但是,機器如何工作才能理解并執行該指令?
In the 8086 microprocessors, the instructions are executed in 4 steps which are listed as follows:
在8086微處理器中, 指令按4個步驟執行,列出如下:
Fetch the instruction
獲取指令
Decode the instruction
解碼指令
Fetch the operands
提取操作數
Execution of the instruction
指令的執行
Any instruction that is provided to the 8086 microprocessor is executed by following the above-mentioned steps. For each instruction, all these steps are performed, i.e. if there are 3 instructions to be executed, then all these steps will be performed 3 times each.
通過遵循上述步驟,可以執行提供給8086微處理器的任何指令。 對于每個指令,將執行所有這些步驟,即,如果要執行3條指令,則所有這些步驟將分別執行3次。
Suppose, these instructions are executed sequentially, and it takes the 1-time unit for each step to run. So, it would take 12-time units (3 X 4) to execute these instructions.
假設這些指令是按順序執行的,并且每步運行需要1單位時間。 因此,執行這些指令將需要12倍的時間(3 X 4)。
It seems less as the number of instructions is less, but a processor has o deal with a very large number of instructions, and so it should process fast to be efficient. In the 8086 microprocessor, this problem was solved by the method of pipelining.
指令數量越少,似乎就越少,但是處理器可以處理大量指令,因此它應該快速處理以提高效率。 在8086微處理器中,此問題通過流水線方法解決。
As we know that there are two separate units in 8086 microprocessors:
我們知道8086微處理器中有兩個獨立的單元:
The BIU (Bus Interface Unit)
BIU(總線接口單元)
The EU (Execution unit)
歐盟(執行單位)
Both these units work mutually exclusive to each other. Due to this, the parallel processing of instructions can be implied in the 8086 microprocessor, because these units are responsible for alternate steps of instruction execution. That is,
這兩個單元相互排斥。 因此,可以在8086微處理器中隱含指令的并行處理,因為這些單元負責指令執行的替代步驟。 那是,
Fetch instruction: Done by BIU
提取指令:由BIU完成
Decode Instruction: Done by EU
解碼說明:歐盟完成
Fetch Operands: Done by BIU
獲取操作數:由BIU完成
Execution: Done by EU
執行:由歐盟完成
So, while the instruction completes its first step and goes to the second step that is handled by the EU, the BIU is idle, and in that time, the next instruction is sent to BIU. By doing so, the parallel processing of instructions is implemented, and this concept is known as pipelining.
因此,當指令完成其第一步并轉到由EU處理的第二步時,BIU處于空閑狀態,此時,下一條指令被發送到BIU。 通過這樣做,實現了指令的并行處理,并且該概念被稱為流水線。

So, it can be observed that the instructions which were taking 12-time units for execution while being processed in a sequential way are now taking only 6 clock cycles through pipelining.
因此,可以觀察到以流水線方式執行的指令在以順序方式進行處理時占用了12個時間單元,而現在僅需要6個時鐘周期。
翻譯自: https://www.includehelp.com/embedded-system/steps-to-execute-an-instruction-and-concept-of-pipelining-in-8086-microprocessors.aspx
8086簡單的指令流水線