[RTL/Tracer] Fix compressed jump RD write (#416)

This commit is contained in:
udinator 2019-10-23 10:30:11 -07:00 committed by GitHub
parent 8e40f65582
commit 023b7b6856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -463,7 +463,13 @@ module ibex_tracer (
function void decode_cr_insn(input string mnemonic);
if (rvfi_rs2_addr == 5'b0) begin
data_accessed = RS1;
if (rvfi_insn[12] == 1'b1) begin
// C.JALR
data_accessed = RS1 | RD;
end else begin
// C.JR
data_accessed = RS1;
end
decoded_str = $sformatf("%s\tx%0d", mnemonic, rvfi_rs1_addr);
end else begin
data_accessed = RS1 | RS2 | RD; // RS1 == RD
@ -549,6 +555,10 @@ module ibex_tracer (
endfunction
function void decode_cj_insn(input string mnemonic);
if (rvfi_insn[15:13] == 3'b001) begin
// C.JAL
data_accessed = RD;
end
decoded_str = $sformatf("%s\t%0x", mnemonic, rvfi_pc_wdata);
endfunction