Skip to content

Commit

Permalink
feat: added reserved fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jriyyya authored and joydeep049 committed Aug 17, 2024
1 parent 5c3aad8 commit 6fa0840
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion model/riscv_insts_base.sail
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ $[name "fence (instruction)"]
union clause ast = FENCEI : unit

mapping clause encdec = FENCEI()
<-> 0b000000000000 @ 0b00000 @ 0b001 @ 0b00000 @ 0b0001111
<-> reserved_bits_12(ZERO) @ reserved_bits_5(ZERO) @ 0b001 @ reserved_bits_5(ZERO) @ 0b0001111

/* fence.i is a nop for the memory model */
function clause execute FENCEI() = { /* __barrier(Barrier_RISCV_i); */ RETIRE_SUCCESS }
Expand Down
4 changes: 4 additions & 0 deletions model/riscv_types.sail
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ union AccessType ('a : Type) = {
Execute : unit
}

enum reserved_bits_enum = { ZERO }
mapping reserved_bits_5 : reserved_bits_enum <-> bits(5) = { ZERO <-> 0b00000 }
mapping reserved_bits_12 : reserved_bits_enum <-> bits(12) = { ZERO <-> 0b000000000000 }

enum word_width = {BYTE, HALF, WORD, DOUBLE}

/* architectural interrupt definitions */
Expand Down

0 comments on commit 6fa0840

Please sign in to comment.