aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_vmem_types.sail
blob: da1e053d6e9e9a4da990042636ae80a0f1c8c706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*=======================================================================================*/
/*  This Sail RISC-V architecture model, comprising all files and                        */
/*  directories except where otherwise noted is subject the BSD                          */
/*  two-clause license in the LICENSE file.                                              */
/*                                                                                       */
/*  SPDX-License-Identifier: BSD-2-Clause                                                */
/*=======================================================================================*/

// Extensions for memory Accesstype.

type ext_access_type = unit

let Data  : ext_access_type = ()

let default_write_acc : ext_access_type = Data

val accessType_to_str : AccessType(ext_access_type) -> string
function accessType_to_str (a) =
  match (a) {
    Read(_)            => "R",
    Write(_)           => "W",
    ReadWrite(_, _)    => "RW",
    Execute()          => "X"
  }

overload to_str = {accessType_to_str}