aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_types.sail
diff options
context:
space:
mode:
authorBill McSpadden <bill@riscv.org>2024-05-16 09:32:09 -0500
committerGitHub <noreply@github.com>2024-05-16 09:32:09 -0500
commit8ab3ca84cd7f97969f074e09a1617fd9b8d1e387 (patch)
treebb1579296208edd25ab3cda895f8851f2c75d95a /model/riscv_types.sail
parent6605792e014d67292c4adc936d789cdea511b3ed (diff)
parentbe1e04c00ab6b301c517039a89254b6485d315d4 (diff)
downloadsail-riscv-8ab3ca84cd7f97969f074e09a1617fd9b8d1e387.zip
sail-riscv-8ab3ca84cd7f97969f074e09a1617fd9b8d1e387.tar.gz
sail-riscv-8ab3ca84cd7f97969f074e09a1617fd9b8d1e387.tar.bz2
Merge branch 'master' into master
Diffstat (limited to 'model/riscv_types.sail')
-rw-r--r--model/riscv_types.sail21
1 files changed, 8 insertions, 13 deletions
diff --git a/model/riscv_types.sail b/model/riscv_types.sail
index e9a5a19..2b1c132 100644
--- a/model/riscv_types.sail
+++ b/model/riscv_types.sail
@@ -389,6 +389,12 @@ mapping size_bytes : word_width <-> {1, 2, 4, 8} = {
DOUBLE <-> 8,
}
+struct mul_op = {
+ high : bool,
+ signed_rs1 : bool,
+ signed_rs2 : bool
+}
+
/*!
* Raise an internal error reporting that width w is invalid for access kind, k,
* and current xlen. The file name and line number should be passed in as the
@@ -399,17 +405,6 @@ mapping size_bytes : word_width <-> {1, 2, 4, 8} = {
*/
val report_invalid_width : forall ('a : Type). (string, int, word_width, string) -> 'a
function report_invalid_width(f , l, w, k) -> 'a = {
- /*
- * Ideally we would call internal_error here but this triggers a Sail bug,
- * https://github.com/rems-project/sail/issues/203 in versions < 0.15.1, so
- * we work around this by manually inlining.
- * TODO when we are happy to require Sail >= 0.15.1 uncomment the following
- * and remove the rest of the function.
- */
- // internal_error(f, l, "Invalid width, " ^ size_mnemonic(w) ^ ", for " ^ k ^
- // " with xlen=" ^ dec_str(sizeof(xlen)));
- assert (false, f ^ ":" ^ dec_str(l) ^ ": " ^ "Invalid width, "
- ^ size_mnemonic(w) ^ ", for " ^ k ^ " with xlen="
- ^ dec_str(sizeof(xlen)));
- throw Error_internal_error()
+ internal_error(f, l, "Invalid width, " ^ size_mnemonic(w) ^ ", for " ^ k ^
+ " with xlen=" ^ dec_str(sizeof(xlen)))
}