Check the already decoded destination to decide to populate the register write data field in RVFI.

This commit is contained in:
jon
2020-04-02 17:10:52 +01:00
parent b656f46859
commit 2c6ad40f93

View File

@@ -181,12 +181,12 @@ function Maybe#(RVFI_DII_Execution#(DataSz,DataSz)) genRVFI(ToReorderBuffer rot,
ByteEn wmask = replicate(False);
Bit#(5) rd = 0;
if (!isValid(rot.trap)) begin
case (rot.iType)
Amo, Alu, Ld, Lr, Sc, J, Jr, Auipc, Csr: begin // Defaults for register-to-register operations.
if (rot.dst matches tagged Valid .regWrite) begin
if (regWrite matches tagged Gpr .regNum) begin
data = rot.traceBundle.regWriteData;
rd = rot.orig_inst[11:7];
end
endcase
end
case (rot.ppc_vaddr_csrData) matches
tagged VAddr .vaddr: begin
addr = getAddr(vaddr);