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简单的指令流水线