aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_sys_exceptions.sail
diff options
context:
space:
mode:
Diffstat (limited to 'model/riscv_sys_exceptions.sail')
-rw-r--r--model/riscv_sys_exceptions.sail5
1 files changed, 5 insertions, 0 deletions
diff --git a/model/riscv_sys_exceptions.sail b/model/riscv_sys_exceptions.sail
index 94d869e..fa693e8 100644
--- a/model/riscv_sys_exceptions.sail
+++ b/model/riscv_sys_exceptions.sail
@@ -2,6 +2,11 @@
type ext_exception = unit
+/* Is XRET from given mode permitted by extension? */
+function ext_check_xret_priv (p : Privilege) : Privilege -> bool = true
+/* Called if above check fails */
+function ext_fail_xret_priv () : unit -> unit = ()
+
function handle_trap_extension(p : Privilege, pc : xlenbits, u : option(unit)) -> unit = ()
/* used for traps and ECALL */