A register file contains register values, some of which can be marked as coming from reservation stations.
This will represent both the integer and floating point registers. We will assume that the integer registers are 32 bits
and the floating point registers are 64 bits.
- The integer registers is an array of 32 32-bit values, R0-R31,
each of which is either an integer or a reservation station ID.
Each register has a reservation station ID flag, which when true indicates that the value is a reservation station ID.
- R0 is always 0 and never holds an ID.
- The floating point registers is an array of 16 values, F0, F2, F4, ... F30,
each of which is either a floating point number or a reservation station ID.
Each register has a reservation station ID flag, which when true indicates that the value is a reservation station ID.
Initialization
For this demo we will assume that the register file is initialized as follows:
- Rn contains 8*n + 32, except that R0 contains 0.
- Fn contains n + .25
- All of the reservation station ID flags are false.
Operations:
- Load integer: Given an index, return the corresponding value from the integer registers,
either an integer value or a reservation station ID.
The reservation station ID flag is also returned.
- Load floating: Given an index, return the corresponding value form the floating point registers,
either a floating point value or reservation station ID.
The reservation station ID flag is also returned.
- Reserve integer: given an index and a reservation station ID,
store the reservation station ID in the appropriate integer register and set the reservation station ID flag.
If the index is 0, ignore the operation.
- Reserve floating point: given an index and a reservation station ID,
store the reservation station ID in the appropriate floating point register and set the reservation station ID flag.
Continually:
Monitor the CDB for reservation station IDs and store the corresponding value in the appropriate place in the register file.