Some progress. Had to change how the page table walker got it's ready.

This commit is contained in:
Ross Thompson 2021-06-25 15:07:41 -05:00
parent b4a788c341
commit 57a7074800
3 changed files with 13 additions and 3 deletions

View File

@ -32,6 +32,7 @@ module lsu (
input logic clk, reset,
input logic StallM, FlushM, StallW, FlushW,
output logic DataStall,
output logic HPTWReady,
// Memory Stage
// connected to cpu (controls)
@ -197,6 +198,8 @@ module lsu (
// Data stall
//assign DataStall = (NextState == STATE_FETCH) || (NextState == STATE_FETCH_AMO_1) || (NextState == STATE_FETCH_AMO_2);
assign HPTWReady = (CurrState == STATE_READY);
// Ross Thompson April 22, 2021
// for now we need to handle the issue where the data memory interface repeately
@ -221,13 +224,14 @@ module lsu (
NextState = STATE_READY;
DataStall = 1'b0;
end
STATE_FETCH_AMO_1:
STATE_FETCH_AMO_1: begin
DataStall = 1'b1;
if (MemAckW) begin
NextState = STATE_FETCH_AMO_2;
end else begin
NextState = STATE_FETCH_AMO_1;
end
end
STATE_FETCH_AMO_2: begin
DataStall = 1'b1;
if (MemAckW & ~StallW) begin

View File

@ -61,6 +61,7 @@ module lsuArb
input logic SquashSCWfromLSU,
input logic DataMisalignedMfromLSU,
input logic [`XLEN-1:0] ReadDataWFromLSU,
input logic HPTWReadyfromLSU,
input logic DataStall
);
@ -131,7 +132,7 @@ module lsuArb
assign CommittedM = SelPTW ? 1'b0 : CommittedMfromLSU;
assign SquashSCW = SelPTW ? 1'b0 : SquashSCWfromLSU;
assign DataMisalignedM = SelPTW ? 1'b0 : DataMisalignedMfromLSU;
assign HPTWReady = ~ DataStall;
assign HPTWReady = HPTWReadyfromLSU;
assign DCacheStall = DataStall; // *** this is probably going to change.
endmodule

View File

@ -131,6 +131,8 @@ module wallypipelinedhart
logic [`XLEN-1:0] MMUPAdr, MMUReadPTE;
logic MMUStall;
logic MMUTranslate, MMUReady;
logic HPTWReadyfromLSU;
// bus interface to dmem
logic MemReadM, MemWriteM;
@ -219,6 +221,7 @@ module wallypipelinedhart
.SquashSCWfromLSU(SquashSCWfromLSU),
.DataMisalignedMfromLSU(DataMisalignedMfromLSU),
.ReadDataWFromLSU(ReadDataWFromLSU),
.HPTWReadyfromLSU(HPTWReadyfromLSU),
.DataStall(DataStall),
.*);
@ -235,7 +238,9 @@ module wallypipelinedhart
.DataMisalignedM(DataMisalignedMfromLSU),
.DisableTranslation(DisableTranslation),
.DataStall(DataStall), .* ); // data cache unit
.DataStall(DataStall),
.HPTWReady(HPTWReadyfromLSU),
.* ); // data cache unit
ahblite ebu(
//.InstrReadF(1'b0),