25 pipelining محاضرة
25 pipelining محاضرة
Computer Architecture
Prepared by:
Pipelining
Pipelining organizes the execution of the multiple instructions simultaneously.
Pipelining improves the throughput of the system. In pipelining the instruction is
divided into the subtasks. Each subtask performs the dedicated task.
1
Computer Architecture
Ans.)
The instruction queue is 6-bytes in length, operates on FIFO (first-in first out)
basis. It receives the instruction codes from memory. BIU fetches the
instructions for the instructions queue from memory.
2
Computer Architecture
Observe that when the Instruction fetch operation of the first instruction is
completed in the next clock cycle the instruction fetch of second instruction gets
started. This way the hardware never sits idle it is always busy in performing
some or other operation. But, no two instructions can execute their same
stage at the same clock cycle.
3
Computer Architecture
Types of Pipelining:
1. Arithmetic Pipelining
2. Instruction Pipelining
Here, the number of instruction are pipelined and the execution of current
instruction is overlapped by the execution of the subsequent instruction. It is
also called instruction look ahead.
3. Processor Pipelining
Here, the processors are pipelined to process the same data stream. The data
stream is processed by the first processor and the result is stored in the memory
block. The result in the memory block is accessed by the second processor. The
second processor reprocesses the result obtained by the first processor and the
passes the refined result to the third processor and so on.
4
Computer Architecture
The static pipeline performs a fixed-function each time. The static pipeline is
unifunctional. The static pipeline executes the same type of instructions
continuously. Frequent change in the type of instruction may vary the
performance of the pipelining.
Scalar pipelining processes the instructions with scalar operands. The vector
pipeline processes the instruction with vector operands.
Advantages
5
Computer Architecture
Disadvantages
Pipelining divides the instruction in 5 stages instruction fetch, instruction
decode, operand fetch, instruction execution and operand store.
The pipeline allows the execution of multiple instructions concurrently with the
limitation that no two instructions would be executed at the same stage in
the same clock cycle.
All the stages must process at equal speed else the slowest stage would become
the bottleneck.
Whenever a pipeline has to stall for any reason it is a pipeline hazard.
Pipeline Latency
Pipeline latency is defined as the number of clock cycles between an interrupt
signal being asserted and the execution of the first instruction at the exception
vector. It can vary widely, depending on the type of memory the processor is
executing from and the impact of other host ports in your hardware.
Theoretically, this time could be infinite if an ill-behaved host port blocks the
processor from accessing memory, freezing the processor.
يتم تعريف استجابة انسيابية االوامر على أنه عدد دورات الساعة بين إشارة المقاطعة التي يتم تأكيدها
اعتمادًا على نوع الذاكرة التي، يمكن أن يختلف بشكل كبير.وتنفيذ التعليمات األولى في متجه االستثناء
يمكن أن تكون هذه المرة، من الناحية النظرية.ينفذها المعالج وتأثير منافذ المضيف األخرى في جهازك
مما يؤدي إلى تجميد، النهائية إذا قام منفذ مضيف سيئ السلوك بمنع المعالج من الوصول إلى الذاكرة
.المعالج