Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:multiasm:cs:chapter_3_8 [2026/01/10 20:14] pczekalskien:multiasm:cs:chapter_3_8 [2026/04/01 14:00] (current) – [Instruction Execution Process] ktokarz
Line 1: Line 1:
 ===== Instruction Execution Process ====== ===== Instruction Execution Process ======
-As we already mentioned, instructions are executed by the processor in a few steps. The literature describes three, four, or five stages of instruction execution. +As we already mentioned, instructions are executed by the processor in a few steps. The literature describes three((https://www.geeksforgeeks.org/computer-organization-architecture/different-instruction-cycles/)), four((https://www.lenovo.com/us/en/glossary/machine-cycle/)), or five((https://www.codecademy.com/article/the-instruction-cycle)) stages of instruction execution. Everything depends on the level of detail one considers. The three-stage description says that there are fetch, decode and execute steps. The four-stage model says that there are fetch, decode, data read and execute steps, or fetch, decode, execute and store steps. The five-stage version adds both data read and write the result back, and sometimes reverses the order of data read and execution.
-<todo @ktokarz>Add literature reference?</todo> +
- Everything depends on the level of detail one considers. The three-stage description says that there are fetch, decode and execute steps. The four-stage model says that there are fetch, decode, data read and execute steps. The five-stage version adds another final step to write the result back, and sometimes reverses the order of data read and execution.+
  
 It is worth remembering that even a simple fetch step can be divided into a set of smaller actions which must be performed by the processor. The real execution of instructions depends on the processor's architecture, implementation and complexity. Considering the five-stage model, we can describe the general stages of instruction execution: It is worth remembering that even a simple fetch step can be divided into a set of smaller actions which must be performed by the processor. The real execution of instructions depends on the processor's architecture, implementation and complexity. Considering the five-stage model, we can describe the general stages of instruction execution:
Line 23: Line 21:
   - Writing back the result:   - Writing back the result:
     * The processor writes the result of calculations into the register or memory.     * The processor writes the result of calculations into the register or memory.
 +
 +The 5-stage instruction execution is illustrated in figure {{ref>instr5stage}}
 +<figure instr5stage>
 +{{ :en:multiasm:cs:instruction_5_stages.png?700 |The five-stage instruction execution process}}
 +<caption>The five stage instruction execution process</caption>
 +</figure>
  
 ===== Instruction encoding ===== ===== Instruction encoding =====
en/multiasm/cs/chapter_3_8.1768068890.txt.gz · Last modified: by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0