Skip to content

Commit

Permalink
resolve error in load data match
Browse files Browse the repository at this point in the history
  • Loading branch information
YazanHussnain-10x committed Oct 10, 2024
1 parent 4f37887 commit dfba06a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion model/riscv_insts_aext.sail
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ function clause execute(LOADRES(aq, rl, rs1, width, rd)) = {
TR_Address(addr, _) =>
match mem_read(Read(Data), addr, width_bytes, aq, aq & rl, true) {
MemValue(result) => {
let load_after_match : bool = instrDataMatch(cur_privilege, zero_extend(vaddr), zero_extend(X(rd)), matchSize_of_wordWidth(width), LOAD_MATCH_AFTER);
load_reservation(addr);
X(rd) = sign_extend(result);
let load_after_match : bool = instrDataMatch(cur_privilege, zero_extend(vaddr), zero_extend(X(rd)), matchSize_of_wordWidth(width), LOAD_MATCH_AFTER);
RETIRE_SUCCESS
},
MemException(e) => { handle_mem_exception(vaddr, e); RETIRE_FAIL }
Expand Down
2 changes: 1 addition & 1 deletion model/riscv_insts_base.sail
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ function clause execute(LOAD(imm, rs1, rd, is_unsigned, width, aq, rl)) = {

match mem_read(Read(Data), paddr, width_bytes, aq, rl, false) {
MemValue(result) => {
let load_after_match : bool = instrDataMatch(cur_privilege, zero_extend(vaddr), zero_extend(X(rd)), matchSize_of_wordWidth(width), LOAD_MATCH_AFTER);
X(rd) = extend_value(is_unsigned, result);
let load_after_match : bool = instrDataMatch(cur_privilege, zero_extend(vaddr), zero_extend(X(rd)), matchSize_of_wordWidth(width), LOAD_MATCH_AFTER);
RETIRE_SUCCESS
},
MemException(e) => { handle_mem_exception(vaddr, e); RETIRE_FAIL },
Expand Down

0 comments on commit dfba06a

Please sign in to comment.