Cleaned up comments in controller

This commit is contained in:
David Harris 2022-06-02 15:48:33 +00:00
parent c7ec9282fe
commit faa15b1f8d
2 changed files with 1 additions and 2 deletions

View File

@ -82,7 +82,7 @@ module hazard(
assign FirstUnstalledW = ~StallW & StallM;
// Each stage flushes if the previous stage is the last one stalled (for cause) or the system has reason to flush
assign Fence = InvalidateICacheM; // | sfencevmaM; // fences flush Fetch stage ***why
assign Fence = InvalidateICacheM; // | sfencevmaM; // Fences should flush the pipeline and restart *** sfence not working
assign PrivilegedFlush = TrapM | RetM | Fence; // privileged stage change and fences flush pipeline
assign FlushF = BPPredWrongE | Fence;
assign FlushD = FirstUnstalledD | PrivilegedFlush | BPPredWrongE;

View File

@ -174,7 +174,6 @@ module controller(
assign {RegWriteD, ImmSrcD, ALUSrcAD, ALUSrcBD, MemRWD,
ResultSrcD, BranchD, ALUOpD, JumpD, ALUResultSrcD, W64D, CSRReadD,
PrivilegedD, FenceD, MDUD, AtomicD, unused} = IllegalIEUInstrFaultD ? `CTRLW'b0 : ControlsD;
// *** move Privileged, CSRwrite?? Or move controller out of IEU into datapath and handle all instructions
assign CSRZeroSrcD = InstrD[14] ? (InstrD[19:15] == 0) : (Rs1D == 0); // Is a CSR instruction using zero as the source?
assign CSRWriteD = CSRReadD & !(CSRZeroSrcD & InstrD[13]); // Don't write if setting or clearing zeros