summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/vector_dec.sail9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/vector_dec.sail b/lib/vector_dec.sail
index 7c9c4546..f0551f28 100644
--- a/lib/vector_dec.sail
+++ b/lib/vector_dec.sail
@@ -101,4 +101,13 @@ val set_slice_bits = "set_slice" : forall 'n 'm.
val replicate_bits = "replicate_bits" : forall 'n 'm. (bits('n), atom('m)) -> bits('n * 'm)
+val unsigned = {
+ ocaml: "uint",
+ lem: "uint",
+ interpreter: "uint",
+ c: "sail_uint"
+} : forall 'n. bits('n) -> range(0, 2 ^ 'n - 1)
+
+val signed = "sint" : forall 'n. bits('n) -> range(- (2 ^ ('n - 1)), 2 ^ ('n - 1) - 1)
+
$endif