Skip to content

Commit

Permalink
ISACOV: FIX openhwgroup#1582
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub Jalali <[email protected]>
  • Loading branch information
AyoubJalali committed Feb 2, 2023
1 parent 521dbba commit aa4f0ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
15 changes: 2 additions & 13 deletions lib/uvm_agents/uvma_isacov/uvma_isacov_instr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ function void uvma_isacov_instr_c::set_valid_flags();
return;
end

if (itype == CSRI_TYPE) begin
rd_valid = 1;
return;
end

endfunction : set_valid_flags


Expand Down Expand Up @@ -392,7 +387,7 @@ function int uvma_isacov_instr_c::get_field_imm();
if (this.itype == CIW_TYPE) begin
return (dasm_rvc_addi4spn_imm(instr) >> 2); // Shift 2 because [9:2] to [7:0]
end
if (this.itype == CS_TYPE) begin
if (this.itype == CL_TYPE) begin
return (dasm_rvc_lw_imm(instr) >> 2); // Shift 2 because [6:2] to [4:0]
end
if (this.itype == CB_TYPE) begin
Expand Down Expand Up @@ -433,13 +428,7 @@ function int uvma_isacov_instr_c::get_field_rd();
// TODO:ropeders is CA handled properly?
// TODO:ropeders call dpi_dasm from here, instead of elsewhere?

if (itype inside {CA_TYPE, CB_TYPE}) begin
return rd[2:0];
end else if (itype inside {CIW_TYPE, CL_TYPE}) begin
return rs2[2:0];
end else begin
return rd;
end
return (itype inside {CA_TYPE, CL_TYPE, CIW_TYPE, CB_TYPE}) ? rd[2:0] : rd;

endfunction : get_field_rd

Expand Down
4 changes: 2 additions & 2 deletions lib/uvm_agents/uvma_isacov/uvma_isacov_mon.sv
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ function void uvma_isacov_mon_c::write_rvfi_instr(uvma_rvfi_instr_seq_item_c#(IL
if (mon_trn.instr.ext == C_EXT) begin
mon_trn.instr.rs1 = dasm_rvc_rs1(instr);
mon_trn.instr.rs2 = dasm_rvc_rs2(instr);
mon_trn.instr.rd = dasm_rd(instr);
mon_trn.instr.c_rdrs1 = dasm_rd(instr);
mon_trn.instr.rd = dasm_rvc_rd(instr);
mon_trn.instr.c_rdrs1 = dasm_rvc_rd(instr);
mon_trn.instr.c_rs1s = dasm_rvc_rs1s(instr);
mon_trn.instr.c_rs2s = dasm_rvc_rs2s(instr);
end
Expand Down

0 comments on commit aa4f0ca

Please sign in to comment.