|
|
|
|
|
|
|
Figure 7.38
Dataflow. Each reservation station consists of registers
to hold S1 and S2 values (if available), or tags to identify
where the values come from. |
|
|
|
|
|
|
|
|
the operation. Any unit (or register) that depends on that result has a copy of the functional unit tag and ingates the result that is broadcast on the bus. For the preceding example, |
|
|
|
 |
|
|
|
|
DIV.F R3, R1, R2
MPY.F R5, R3, R4
ADD.F R4, R6, R7. |
|
|
|
|
|
|
|
|
The DIV.F is initially issued to the divide unit with values from R1 and R2. (Assuming they are available, they are fetched from the common bus.) A divide unit tag is issued to R3, indicating that it does not currently contain a valid value. On the next cycle, the MPY.F is issued to the multiply unit, together with the value from R4 and a TAG [DIV] from R3. When the divide unit completes, it broadcasts its result; this is in-gated into the multiply unit reservation station, since it is holding a "divide unit" tag. In the meantime, the add unit has been issued values from R6 and R7 and commences addition. R4 gets the tag from the adder; no ordering dependency occurs, since the multiplier already has the old value of R4. |
|
|
|
|
|
|
|
|
In the dataflow approach, the results to a targeted register may never actually go to that register; in fact, the computation based on the load of a particular register may be continually forwarded to various functional units, so that before the value is stored, a new value based upon a new computational sequence (a new load instruction) is able to use the targeted register. This approach partially avoids the use of a central register set, thereby avoiding the register ordering and output dependencies. |
|
|
|
|
|
|
|
|
Whether the ordering and output dependencies are a serious problem or not is the subject of some debate [272]. With a larger register set, an optimizing compiler can distribute the usage of the registers across the set and avoid the register-resource dependencies. Of course, all schemes are left with the essential (type 1) dependency. Large register sets may have their own disadvantages, however, especially if save and restore traffic due to interrupts becomes a significant consideration. |
|
|
|
|
|