Optimise timing/scheduling by always returning the head of the RAS stack.
This means that two returns decoded in the same cycle are likely to result in a misprediction. The trouble here was that the Decode loop wouldn't build with slight changes due to a scheduling conflict through the RAS due to the dependence of the next ras.first method on the earlier ras.pop method. This was indeed an unpleasant combinational path between concurrently decoding instructions. This change allows all RAS predictions to be independent (by assuming no pushes or pops occur earlier in the bundle than a return).
This commit is contained in:
@@ -95,7 +95,9 @@ module mkRas(ReturnAddrStack) provisos(NumAlias#(TExp#(TLog#(RasEntries)), RasEn
|
||||
Vector#(SupSize, RAS) rasIfc;
|
||||
for(Integer i = 0; i < valueof(SupSize); i = i+1) begin
|
||||
rasIfc[i] = (interface RAS;
|
||||
method CapMem first = stack[head[i]][0];
|
||||
// first should use head[i], but this is better for timing.
|
||||
// head[0] misbehaves with two pops in the same cycle.
|
||||
method CapMem first = stack[head[0]][0];
|
||||
method ActionValue#(RasIndex) pop(Bool doPop);
|
||||
RasIndex h = head[i];
|
||||
if (doPop) begin
|
||||
|
||||
Reference in New Issue
Block a user