Skip to content

Commit 6fa0840

Browse files
jriyyyajoydeep049
authored andcommitted
feat: added reserved fields
1 parent 5c3aad8 commit 6fa0840

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

model/riscv_insts_base.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ $[name "fence (instruction)"]
783783
union clause ast = FENCEI : unit
784784

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

788788
/* fence.i is a nop for the memory model */
789789
function clause execute FENCEI() = { /* __barrier(Barrier_RISCV_i); */ RETIRE_SUCCESS }

model/riscv_types.sail

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ union AccessType ('a : Type) = {
134134
Execute : unit
135135
}
136136

137+
enum reserved_bits_enum = { ZERO }
138+
mapping reserved_bits_5 : reserved_bits_enum <-> bits(5) = { ZERO <-> 0b00000 }
139+
mapping reserved_bits_12 : reserved_bits_enum <-> bits(12) = { ZERO <-> 0b000000000000 }
140+
137141
enum word_width = {BYTE, HALF, WORD, DOUBLE}
138142

139143
/* architectural interrupt definitions */

0 commit comments

Comments
 (0)