The LSU is properly using FlushW rather than TrapM.

This commit is contained in:
Ross Thompson 2022-12-22 21:43:25 -06:00
parent 3b791b768a
commit 03021765a6
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ module hazard(
// WFI terminates if any enabled interrupt is pending, even if global interrupts are disabled. It could also terminate with TW trap
assign StallMCause = ((wfiM) & (~TrapM & ~IntPendingM));
//assign StallWCause = (IFUStallF | LSUStallM) & ~TrapM;
assign StallWCause = (IFUStallF & ~(FlushDCause)) | (LSUStallM & ~TrapM);
assign StallWCause = (IFUStallF & ~FlushDCause) | (LSUStallM & ~FlushWCause);
// Stall each stage for cause or if the next stage is stalled
assign #1 StallF = StallFCause | StallD;

View File

@ -247,7 +247,7 @@ module wallypipelinedcore (
lsu lsu(
.clk, .reset, .StallM, .FlushM, .StallW,
.FlushW(TrapM),
.FlushW,
// CPU interface
.MemRWM, .Funct3M, .Funct7M(InstrM[31:25]),
.AtomicM,