mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Change CurrPtr to Ptr in RAS.
This commit is contained in:
parent
1763de52ea
commit
583d87afc7
@ -42,7 +42,7 @@ module RASPredictor #(parameter int StackSize = 16 )(
|
|||||||
logic CounterEn;
|
logic CounterEn;
|
||||||
localparam Depth = $clog2(StackSize);
|
localparam Depth = $clog2(StackSize);
|
||||||
|
|
||||||
logic [Depth-1:0] NextPtr, CurrPtr, PtrP1, PtrM1;
|
logic [Depth-1:0] NextPtr, Ptr, PtrP1, PtrM1;
|
||||||
logic [StackSize-1:0] [`XLEN-1:0] memory;
|
logic [StackSize-1:0] [`XLEN-1:0] memory;
|
||||||
integer index;
|
integer index;
|
||||||
|
|
||||||
@ -73,10 +73,10 @@ module RASPredictor #(parameter int StackSize = 16 )(
|
|||||||
assign DecrementPtr = (PopF | DecRepairD) & ~IncrRepairD;
|
assign DecrementPtr = (PopF | DecRepairD) & ~IncrRepairD;
|
||||||
mux2 #(Depth) PtrMux(PtrP1, PtrM1, DecrementPtr, NextPtr);
|
mux2 #(Depth) PtrMux(PtrP1, PtrM1, DecrementPtr, NextPtr);
|
||||||
|
|
||||||
assign PtrM1 = CurrPtr - 1'b1;
|
assign PtrM1 = Ptr - 1'b1;
|
||||||
assign PtrP1 = CurrPtr + 1'b1;
|
assign PtrP1 = Ptr + 1'b1;
|
||||||
|
|
||||||
flopenr #(Depth) PTR(clk, reset, CounterEn, NextPtr, CurrPtr);
|
flopenr #(Depth) PTR(clk, reset, CounterEn, NextPtr, Ptr);
|
||||||
|
|
||||||
// RAS must be reset.
|
// RAS must be reset.
|
||||||
always_ff @ (posedge clk) begin
|
always_ff @ (posedge clk) begin
|
||||||
@ -88,7 +88,7 @@ module RASPredictor #(parameter int StackSize = 16 )(
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
assign RASPCF = memory[CurrPtr];
|
assign RASPCF = memory[Ptr];
|
||||||
|
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
Loading…
Reference in New Issue
Block a user