Book updates.

This commit is contained in:
Ross Thompson 2023-03-14 13:09:50 -05:00
parent a27051b8a8
commit 407b3c488d

View File

@ -43,7 +43,7 @@ module hazard (
); );
logic StallFCause, StallDCause, StallECause, StallMCause, StallWCause; logic StallFCause, StallDCause, StallECause, StallMCause, StallWCause;
logic FirstUnstalledD, FirstUnstalledE, FirstUnstalledM, FirstUnstalledW; logic LatestUnstalledD, LatestUnstalledE, LatestUnstalledM, LatestUnstalledW;
logic FlushDCause, FlushECause, FlushMCause, FlushWCause; logic FlushDCause, FlushECause, FlushMCause, FlushWCause;
// stalls and flushes // stalls and flushes
@ -95,14 +95,14 @@ module hazard (
assign #1 StallW = StallWCause; assign #1 StallW = StallWCause;
// detect the first stage that is not stalled // detect the first stage that is not stalled
assign FirstUnstalledD = ~StallD & StallF; assign LatestUnstalledD = ~StallD & StallF;
assign FirstUnstalledE = ~StallE & StallD; assign LatestUnstalledE = ~StallE & StallD;
assign FirstUnstalledM = ~StallM & StallE; assign LatestUnstalledM = ~StallM & StallE;
assign FirstUnstalledW = ~StallW & StallM; assign LatestUnstalledW = ~StallW & StallM;
// Each stage flushes if the previous stage is the last one stalled (for cause) or the system has reason to flush // Each stage flushes if the previous stage is the last one stalled (for cause) or the system has reason to flush
assign #1 FlushD = FirstUnstalledD | FlushDCause; assign #1 FlushD = LatestUnstalledD | FlushDCause;
assign #1 FlushE = FirstUnstalledE | FlushECause; assign #1 FlushE = LatestUnstalledE | FlushECause;
assign #1 FlushM = FirstUnstalledM | FlushMCause; assign #1 FlushM = LatestUnstalledM | FlushMCause;
assign #1 FlushW = FirstUnstalledW | FlushWCause; assign #1 FlushW = LatestUnstalledW | FlushWCause;
endmodule endmodule