summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv/riscv_mem.sail2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/riscv_mem.sail b/riscv/riscv_mem.sail
index 67c35bce..375f48b3 100644
--- a/riscv/riscv_mem.sail
+++ b/riscv/riscv_mem.sail
@@ -6,7 +6,7 @@ union MemoryOpResult ('a : Type) = {
}
function is_aligned_addr (addr : xlenbits, width : atom('n)) -> forall 'n. bool =
- unsigned(addr) % width != 0
+ unsigned(addr) % width == 0
function checked_mem_read(t : ReadType, addr : xlenbits, width : atom('n)) -> forall 'n. MemoryOpResult(bits(8 * 'n)) =
match (t, __RISCV_read(addr, width)) {