Content deleted Content added
m Bot: Migrating 1 langlinks, now provided by Wikidata on d:q17163118 |
Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 13:
The instructions reside in memory that takes one cycle to read. This memory can be dedicated to SRAM, or an Instruction [[Cache (computing)|Cache]]. The term "latency" is used in computer science often and means the time from when an operation starts until it completes. Thus, instruction fetch has a latency of one [[clock cycle]] (if using single-cycle SRAM or if the instruction was in the cache). Thus, during the [[Instruction fetch|Instruction Fetch]] stage, a 32-bit instruction is fetched from the instruction memory.
The [[
===Instruction decode===
Line 29:
The Execute stage is where the actual computation occurs. Typically this stage consists of an ALU, and also a bit shifter. It may also include a multiple cycle multiplier and divider.
The ALU is responsible for performing
The bit shifter is responsible for shift and rotations.
Line 150:
The most common kind of software-visible exception on one of the classic RISC machines is a [[Translation lookaside buffer#TLB-miss handling|''TLB miss'']].
Exceptions are different from branches and jumps, because those other control flow changes are resolved in the decode stage. Exceptions are resolved in the writeback stage. When an exception is detected, the following instructions (earlier in the pipeline) are marked as invalid, and as they flow to the end of the pipe their results are discarded.
To make it easy (and fast) for the software to fix the problem and restart the program, the CPU must take a precise exception. A precise exception means that all instructions up to the excepting instruction have been executed, and the excepting instruction and everything afterwards have not been executed.
|