Skip to content

Commit

Permalink
add fmtencdec for AUIPC
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkOpenly committed Aug 29, 2024
1 parent 04b9199 commit a8a77d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model/riscv_insts_base.sail
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function clause opcode2format 0b0110111 = { U_Format }
function clause opcode2format 0b0010111 = { U_Format }
mapping clause fmtencdec = UTYPE(imm, rd, op) if opcode2format(0b0110111) == U_Format
<-> UFormat(struct { imm = imm, rd = rd, opcode = encdec_uop(op) }) if opcode2format(0b0110111) == U_Format
mapping clause fmtencdec = UTYPE(imm, rd, op) if opcode2format(0b0010111) == U_Format
<-> UFormat(struct { imm = imm, rd = rd, opcode = encdec_uop(op) }) if opcode2format(0b0010111) == U_Format

function clause execute UTYPE(imm, rd, op) = {
let off : xlenbits = sign_extend(imm @ 0x000);
Expand Down

0 comments on commit a8a77d7

Please sign in to comment.