aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_fetch_rvfi.sail
diff options
context:
space:
mode:
authorAlexander Richardson <alexrichardson@google.com>2023-03-14 12:26:10 +0000
committerGitHub <noreply@github.com>2023-03-14 07:26:10 -0500
commit78521ce0811e48e87f387cfa6a705088dabfaf86 (patch)
tree2c5711507f46b69359ca9b34f515af7b96306668 /model/riscv_fetch_rvfi.sail
parent6df1e784cf80e909cf7d8ec77f139805c2730e08 (diff)
downloadsail-riscv-78521ce0811e48e87f387cfa6a705088dabfaf86.zip
sail-riscv-78521ce0811e48e87f387cfa6a705088dabfaf86.tar.gz
sail-riscv-78521ce0811e48e87f387cfa6a705088dabfaf86.tar.bz2
Use not() instead of ~() for boolean negation (#210)
This may be more readable and also matches the sail-cheri-riscv model. For now this keeps ~ overloaded to accept bool, but in the future we may want to consider removing it (which is what I did to find all uses modified in this patch)
Diffstat (limited to 'model/riscv_fetch_rvfi.sail')
-rw-r--r--model/riscv_fetch_rvfi.sail2
1 files changed, 1 insertions, 1 deletions
diff --git a/model/riscv_fetch_rvfi.sail b/model/riscv_fetch_rvfi.sail
index ca3cca3..5c7ba3b 100644
--- a/model/riscv_fetch_rvfi.sail
+++ b/model/riscv_fetch_rvfi.sail
@@ -77,7 +77,7 @@ function fetch() -> FetchResult = {
Ext_FetchAddr_Error(e) => F_Ext_Error(e),
Ext_FetchAddr_OK(use_pc) => {
/* then check PC alignment */
- if (use_pc[0] != bitzero | (use_pc[1] != bitzero & (~ (haveRVC()))))
+ if (use_pc[0] != bitzero | (use_pc[1] != bitzero & not(haveRVC())))
then F_Error(E_Fetch_Addr_Align(), PC)
else match translateAddr(use_pc, Execute()) {
TR_Failure(e, _) => F_Error(e, PC),