CA Classes-116-120
CA Classes-116-120
Let us first consider a load instruction. Its execution begins with the
determination of the effective memory address (EA) from where data is to
be fetched. In straightforward cases, like RISC processors, this can be done
in two steps: fetching the referenced address register(s) and calculating the
effective address. However, for CISC processors address calculation may
be a difficult task, requiring multiple subsequent register fetches and
address calculations, as for instance in the case of indexed, post-
incremented, relative addresses. Once the effective address is available,
the next step is usually, to forward the effective (virtual) address to the MMU
for translation and to access the data cache. Here, and in the subsequent
discussion, we shall not go into details of whether the referenced cache is
physically or virtually addressed, and thus we neglect the corresponding
issues. Furthermore, we assume that the referenced data is available in the
cache and thus it is fetched in one or a few cycles. Usually, fetched data is
made directly available to the requesting unit, such as the FX or FP unit,
through bypassing. Finally, the last subtask to be performed is writing the
accessed data into the specified register.
For a store instruction, the address calculation phase is identical to that
already discussed for loads. However, subsequently both the virtual address
and the data to be stored can be sent out in parallel to the MMU and the
cache, respectively. This concludes the processing of the store instruction.
Figure 5.8 shows the subtasks involved in executing load and store
instructions.
ROB is a circular buffer. It has a head and tail pointers. In ROB, instructions
enter in program order only. Instructions can only be retired if all of their
previous instructions have finished and they had also retired.
Sequential consistency can be maintained by directing instructions to
update the program state by writing their results in proper program order
into the memory or referenced architectural register(s). ROB can
successfully support both interrupt handling and speculative execution.
5.5.4 Instruction Issuing and parallel execution
In this phase execution tuples are created. After its creation it is decided
that which execution tuple can now be issued. When the accessibility of
data and resources are checked during run-time it is then known as
Instruction Issuing. In instruction issuing area many pipelines are
processed.
In figure 5.10 you can see a reorder buffer which follows FIFO order.
In this buffer the entries received and sent in FIFO order. When the input
operands are present then the instruction can be executed. Other instruction
might be located in instruction issue.
Other constraints are associated with the buffers carrying the execution
tuples. In figure 5.11 you can see the Parallel Execution Schedule (PES) of