Assume that the program counter is treated as a normal register, and assume that there is a load effective address (LEA) instruction that has exactly the same format as a normal memory reference instruction, but that makes no memory reference. Instead, the effective address computed is stored directly in the destination register.
Assume that this architecture is implemented using bubbles to fill all delay slots, so there is no result forwarding.
LEA c,X R[c] = X LOAD a,Y R[a] = M[Y] LOAD b,Z(c) R[b] = M[Z+R[c]] ADD c,a,b R[c] = R[a] + R[b] STORE c,Z M[Z] = R[c] LEA pc,D R[pc] = DNote in the above that the assembly language notation used is merely typical. Here, we assume a, b, c, pc, X, Y and Z are constants. Of these, X, Y and Z are address constants used in memory reference and related instructions, while a, b and c are the numbers of general purpose registers and pc is the number of the register used as a program counter.
Consider the following small code fragment in the light of this scoreboard implementation:
LEA a,X R[a] = X LEA a,Y R[a] = Y STORE c,Z M[Z] = R[a]Part A Why would the above implementation of the scoreboard fail to correctly synchronize the above fragment!
Part B Propose an alternative scoreboard implementation that correctly synchronizes examples such as the above.
Part C What if there is a condition code register, and all LOAD, STORE and arithmetic operations use the condition codes to report on the value loaded, stored or computed, and that there is a full set of conditional branches that allow the condition codes to be tested.
Explain how the concept a scoreboard can be used to prevent conflicts over the use of condition codes? Does the one-bit-per-register scoreboard discussed in class suffice for this? If not, does the scoreboard implementation you proposed in part B suffice?
repeat SRC = M[PC] PC = PC+1 DST = M[PC] PC = PC+1 TMP = M[SRC] M[DST] = TMP if interrupt requested and IE' nonzero, then exchange( PC, IR ) IE = 0, IE' = 0 else IE' = IE endif foreverThe interrupt-requested condition is true if any device has its interrupt request flipflop set.
Part A: Why is there a copy of the IE bit in IE'? Hint: The answer has something to do with the problem of returning from interrupt.
Part B: Consider the problem of adding a compatable interrupt mechanism to the Pipelined Ultimate RISC. We have discussed versions of the Pipelined Ultimate RISC with delay slots exposed to the programmer, with result forwarding, and with bubbles injected in the pipe to hide delay slots from the programmer. Which of these versions of the pipelined ultimate RISC are compatable with the suggested interrupt architecture, and if there are incompatabilities, explain them!