aboutsummaryrefslogtreecommitdiff
path: root/riscv_mem.sail
diff options
context:
space:
mode:
authorPrashanth Mundkur <prashanth.mundkur@gmail.com>2018-04-26 10:25:30 -0700
committerPrashanth Mundkur <prashanth.mundkur@gmail.com>2018-04-26 10:25:30 -0700
commitecc71c20a45c96bb206cb6185c8b25319ddaaecb (patch)
tree917f59e387f95a26b05288e1bc9b1248406f67bd /riscv_mem.sail
parentf5a5aa54c3f676c3cb3f8fc50fc4ab2754832d38 (diff)
downloadsail-riscv-ecc71c20a45c96bb206cb6185c8b25319ddaaecb.zip
sail-riscv-ecc71c20a45c96bb206cb6185c8b25319ddaaecb.tar.gz
sail-riscv-ecc71c20a45c96bb206cb6185c8b25319ddaaecb.tar.bz2
Fix bug introduced in alignment check.
Diffstat (limited to 'riscv_mem.sail')
-rw-r--r--riscv_mem.sail2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv_mem.sail b/riscv_mem.sail
index 67c35bc..375f48b 100644
--- a/riscv_mem.sail
+++ b/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)) {