Skip to content

Commit

Permalink
fix riscv build: add enable_pmp to Platform and properly eval privile…
Browse files Browse the repository at this point in the history
…ge in Isa_model conversions
  • Loading branch information
ojno committed Jun 28, 2019
1 parent fe4f286 commit a72c696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src_top/isa_model.ml
Expand Up @@ -287,7 +287,7 @@ module Make (ISADefs: ISADefs) (TransSail: Trans.TransSail) : S = struct
if rv.rv_start <> 0 || rv.rv_dir <> D_decreasing then failwith "invalid vector interp2__regval_to_interp" else
match List.length (rv.rv_bits) with
| 1 -> V_bool (bool_from_bitl (List.hd rv.rv_bits))
| 2 -> Riscv_toFromInterp2.privilegeToInterpValue (Riscv.privLevel_of_bits (Lem.wordFromBitlist (List.map bool_from_bitl rv.rv_bits)))
| 2 -> Riscv_toFromInterp2.privilegeToInterpValue (InstructionSemantics.continue_to_sail2_done "privilege" (Riscv.privLevel_of_bits (Lem.wordFromBitlist (List.map bool_from_bitl rv.rv_bits))))
| 64 -> V_vector (List.map (fun b -> bool_from_bitl b |> interp2__bool_to_bit) rv.rv_bits)
| 65 -> V_record (StringMap.add "Medeleg_chunk_0" (V_vector (List.map (fun b -> bool_from_bitl b |> interp2__bool_to_bit) (Util.drop 1 rv.rv_bits))) StringMap.empty)
| 66 -> V_record (StringMap.add "Sedeleg_chunk_0" (V_vector (List.map (fun b -> bool_from_bitl b |> interp2__bool_to_bit) (Util.drop 2 rv.rv_bits))) StringMap.empty)
Expand Down
2 changes: 2 additions & 0 deletions src_top/platform.ml
Expand Up @@ -59,3 +59,5 @@ let mtval_has_illegal_inst_bits () = false
let enable_writable_misa () = true

let enable_rvc () = true

let enable_pmp () = false

0 comments on commit a72c696

Please sign in to comment.