Skip to content

Commit 3e39f44

Browse files
committed
suggested work-around
Signed-off-by: joydeep049 <[email protected]>
1 parent 4c39b0d commit 3e39f44

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

model/riscv_insts_base.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ union clause ast = FENCEI : unit
788788
// The rs1, rd and imm fields are marked as reserved to indicate
789789
// that they are not currently used but may be reserved for future extensions.
790790
mapping clause encdec = FENCEI()
791-
<-> map_twelve(TWELVE) @ map_five(FIVE) @ 0b001 @ map_five(FIVE) @ 0b0001111
791+
<-> reserved_bits_12(ZERO) @ reserved_bits_5(ZERO) @ 0b001 @ reserved_bits_5(ZERO) @ 0b0001111
792792

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

model/riscv_types.sail

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,9 @@ union AccessType ('a : Type) = {
134134
Execute : unit
135135
}
136136

137-
enum reserve = {
138-
TWELVE,
139-
FIVE
140-
}
141-
142-
val map_twelve : reserve <-> bits(12)
143-
val map_five : reserve <-> bits(5)
144-
145-
mapping map_twelve = {
146-
TWELVE <-> 0b000000000000
147-
}
148-
149-
mapping map_five = {
150-
FIVE <-> 0b00000
151-
}
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 }
152140

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

0 commit comments

Comments
 (0)