Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed two TODO's related to wb_valid. #842

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rtl/cv32e40x_wb_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ module cv32e40x_wb_stage import cv32e40x_pkg::*;
// cannot be used to increment the minstret CSR (as that should not increment for e.g. ecall, ebreak, etc.)
// - Will be 1 for both phases of a split misaligned load/store that completes without MPU errors.
// If an MPU error occurs, wb_valid will be 1 due to lsu_exception (for any phase where the error occurs)
// - Will be 0 for CLIC pointer fetches todo: Do we need wb_valid=1 for faulted pointer fetches for RVFI?
// - Will be 1 for CLIC pointer fetches. RVFI will only set rvfi_valid for CLIC pointers that caused an exception.
assign wb_valid = ((!ex_wb_pipe_i.lsu_en && !xif_waiting) || // Non-LSU instructions have valid result in WB, also for exceptions, unless we are waiting for a coprocessor
( ex_wb_pipe_i.lsu_en && lsu_valid ) // LSU instructions have valid result based on data_rvalid_i or the flopped version in case of watchpoint triggers.
// todo: ideally a similar line is added here that delays signaling wb_valid until a WFI really retires.
// This should be checked for bad timing paths. Currently RVFI contains a wb_valid_adjusted signal/hack to achieve the same
// WFI/WFE are halted in WB until the core wakes up, this pulls instr_valid low and ensures wb_valid==0 until we
// actually retire the WFI/WFE.
) && instr_valid;

// Letting all suboperations signal wb_valid
Expand Down