diff --git a/model/riscv_insts_base.sail b/model/riscv_insts_base.sail index d175d1cb7..b7bf85625 100644 --- a/model/riscv_insts_base.sail +++ b/model/riscv_insts_base.sail @@ -767,7 +767,7 @@ union clause ast = FENCEI : unit // The rs1, rd and imm fields are marked as reserved to indicate // that they are not currently used but may be reserved for future extensions. mapping clause encdec = FENCEI() - <-> map_twelve(TWELVE) @ map_five(FIVE) @ 0b001 @ map_five(FIVE) @ 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 } diff --git a/model/riscv_types.sail b/model/riscv_types.sail index 73038d757..6152f780d 100644 --- a/model/riscv_types.sail +++ b/model/riscv_types.sail @@ -134,21 +134,9 @@ union AccessType ('a : Type) = { Execute : unit } -enum reserve = { - TWELVE, - FIVE -} - -val map_twelve : reserve <-> bits(12) -val map_five : reserve <-> bits(5) - -mapping map_twelve = { - TWELVE <-> 0b000000000000 -} - -mapping map_five = { - FIVE <-> 0b00000 -} +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}