forked from Github_Repos/cvw
Added WFI support to IFU to keep it in the pipeline
This commit is contained in:
parent
c3bca40e05
commit
0932d4df46
@ -115,6 +115,8 @@ module ifu (
|
||||
(* mark_debug = "true" *) logic [31:0] PostSpillInstrRawF;
|
||||
// branch predictor signal
|
||||
logic [`XLEN-1:0] PCNext1F, PCNext2F, PCNext0F;
|
||||
logic [31:0] InstrNextF;
|
||||
logic wfiD;
|
||||
|
||||
assign PCFExt = {2'b00, PCFSpill};
|
||||
|
||||
@ -134,6 +136,13 @@ module ifu (
|
||||
assign {SelNextSpillF, CompressedF} = 0;
|
||||
end
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// WFI
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
assign wfiD = (InstrD[6:0] == 7'b111011 && InstrD[31:20] == 12'b000100000101); // WFI in decode stage
|
||||
assign InstrNextF = wfiD ? InstrD : PostSpillInstrRawF; // on WFI, keep replaying WFI
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Memory management
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -239,7 +248,7 @@ module ifu (
|
||||
assign IFUStallF = IFUCacheBusStallF | SelNextSpillF;
|
||||
assign CPUBusy = StallF & ~SelNextSpillF;
|
||||
|
||||
flopenl #(32) AlignedInstrRawDFlop(clk, reset, ~StallD, FlushD ? nop : PostSpillInstrRawF, nop, InstrRawD);
|
||||
flopenl #(32) AlignedInstrRawDFlop(clk, reset, ~StallD, FlushD ? nop : InstrNextF /*PostSpillInstrRawF*/, nop, InstrRawD);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// PCNextF logic
|
||||
|
Loading…
Reference in New Issue
Block a user