1
0
mirror of https://github.com/openhwgroup/cvw synced 2025-02-11 06:05:49 +00:00

Comments about division hazards

This commit is contained in:
David Harris 2022-11-13 04:17:37 -08:00
parent 9b20bf341e
commit 0502b8ea4d
2 changed files with 2 additions and 1 deletions
pipelined/src
fpu/fdivsqrt
hazard

View File

@ -118,6 +118,7 @@ module fdivsqrtfsm(
end end
end end
// *** start logic is presently in fctl. Make it look more like integer division start logic
assign DivDone = (state == DONE) | (WZero & (state == BUSY)); assign DivDone = (state == DONE) | (WZero & (state == BUSY));
assign DivBusy = (state == BUSY & ~DivDone); assign DivBusy = (state == BUSY & ~DivDone);

View File

@ -70,7 +70,7 @@ module hazard(
// WFI terminates if any enabled interrupt is pending, even if global interrupts are disabled. It could also terminate with TW trap // 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)); // | FDivBusyE; // assign StallMCause = (wfiM & (~TrapM & ~IntPendingM)); // | FDivBusyE;
assign StallMCause = ((wfiM) & (~TrapM & ~IntPendingM)); //*** Ross: should FDivBusyE trigger StallECause rather than StallMCause similar to DivBusyE? assign StallMCause = ((wfiM) & (~TrapM & ~IntPendingM)); //*** Ross: should FDivBusyE trigger StallECause rather than StallMCause similar to DivBusyE?
assign StallWCause = LSUStallM | IFUStallF | (FDivBusyE & ~TrapM & ~IntPendingM); assign StallWCause = LSUStallM | IFUStallF | (FDivBusyE & ~TrapM & ~IntPendingM); // *** FDivBusyE should look like DivBusyE in execute stage
assign #1 StallF = StallFCause | StallD; assign #1 StallF = StallFCause | StallD;
assign #1 StallD = StallDCause | StallE; assign #1 StallD = StallDCause | StallE;