summaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorPrashanth Mundkur2018-04-26 10:25:30 -0700
committerPrashanth Mundkur2018-04-26 10:25:30 -0700
commit1fabc6c20acc57844e088cea5a074d8703411fde (patch)
tree5129ba22e7bcae0e937746d0eae84930c486988e /riscv
parentea9c4452b2eb8aa255af911ef3cc1088fb80b1f8 (diff)
Fix bug introduced in alignment check.
Diffstat (limited to 'riscv')
-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)) {