15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

operand fields (V1/V2)<br />

indicate whether the related operand field holds a valid source operand value<br />

(Op1/Op2)<br />

or a rename register identifier ( Rs1′ / Rs2′ ).<br />

(ii) Dispatching is not at all rename specific. Assuming in-order dispatching, the processor inspects<br />

the valid bits of the source operands (V1 and V2) of the oldest instruction kept in the RS. If both valid<br />

bits of this instruction are set and the EU is also free, the instruction is forwarded to the EU for execution.<br />

(iii) After the EU has finished the execution of an instruction, both the RS and the RRF need to be<br />

updated with the generated result. To update the RS, the generated results and their identifiers (Rd′) are<br />

broadcasted to all the source register entries held in the RS. Through an associative search, all source register<br />

identifiers ( Rs1′ , Rs2′ ) are located, which are waiting for the new result. The processor substitutes matching<br />

identifiers with the result value and sets the associated valid bits (V1 or V2) to indicate availability. We<br />

note that this task is performed basically in the same way with and without renaming. There is, however,<br />

a slight difference, with renaming the search key is the renamed destination register identifier (Rd′) rather<br />

than the original destination register identifier (Rd) that is used without renaming. The second task is<br />

to update the rename register file. This is done simply by writing the new result value into the RRF using<br />

the identifier accompanying the result produced (Rd′) and setting the associated valid bit (V) to signal<br />

availability.<br />

(iv) While an instruction completes, the processor permanently updates the ARF, and thus the program state,<br />

with the content of the associated rename register. This is done by writing the result of the completed<br />

instruction from the associated rename register to the addressed destination register. At this stage of the<br />

instruction execution the established renaming becomes obsolete. Therefore, the related entry in the mapping<br />

table needs to be deleted and the rename register involved can be reclaimed for further use. This is so<br />

since (1) after completion, the result of the instruction, that is, the content of the rename register, has already<br />

been written into the addressed destination register, and (2) after finishing the instruction, the generated<br />

result has already been transferred to all instructions waiting for this operand in the RS.<br />

During renaming, rename registers take on a sequence of states, as indicated in Fig. 6.3.<br />

During initialization the processor sets all rename registers into the “available” state. When the processor<br />

allocates a rename register to an issued instruction, the state of the allocated register will be changed<br />

to “allocated, not valid” and its valid bit will be reset. When this instruction becomes finished, the newly<br />

produced result is written into the associated rename register, and its state is set to “allocated, valid.”<br />

Finally, while the instruction completes, the result held temporarily in the rename register is written into<br />

the specified architectural register. Thus, the allocated rename register can be reclaimed. Its state is then<br />

changed to “available.” Nevertheless, it can happen that an exception or faulty speculative execution gives<br />

rise to flush not yet completed instructions. In this case, a recovery procedure is needed, and the state of<br />

FIGURE 6.3 State transition diagram of the rename registers, assuming the use of a rename register file (RRF).<br />

© 2002 by CRC Press LLC<br />

Initialized<br />

Reclaim, if instruction<br />

is completed<br />

Available<br />

Allocate, if instruction<br />

is issued<br />

Allocated,<br />

valid<br />

Reclaim,<br />

if instruction<br />

is canceled<br />

Allocated,<br />

not valid<br />

Update, if instruction<br />

is finished

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!