next up previous contents
Next: Instruction execution Up: RSIM_EVENT and the Out-of-order Previous: Branch prediction

Instruction issue

Source files: src/Processor/pipestages.cc, src/Processor/exec.cc

Header files: incl/Processor/units.h

This stage actually sends instructions to their functional units. The SendToFU function is called whenever an instruction has no outstanding true dependencies. This function reads the values of the various source registers from the register file and holds those values with the instance data structure. This mechanism is not meant to imitate actual processor behavior, but rather to provide a straightforward simulator abstraction. At the end of this function, the issue function is called if there is a functional unit available; otherwise, this instance is placed on a queue for the specified functional unit.

The issue function places the specified instance pm the ReadyQueue data structure and occupies the appropriate functional unit (for memory operations, this function is used for address generation).

The function IssueQueues processes instructions inserted in the ReadyQueues by issue. This function then inserts the appropriate functional unit onto the FreeingUnits data structure, specifying that that unit will be free a number of cycles later, according to the repeat delay of the instruction. This function places the instance itself on the Running structure of the processor, which is used to revive the instruction for completion after its functional unit latency has passed.

The IssueQueues function also calls IssueMem in the memory unit, which checks to see if any new memory accesses can be issued.

This stage assumes no limit on register file ports. In real processors, port contention may cause additional stalls that are not considered here.



Vijay Sadananda Pai
Thu Aug 7 14:18:56 CDT 1997