From ecc71c20a45c96bb206cb6185c8b25319ddaaecb Mon Sep 17 00:00:00 2001 From: Prashanth Mundkur Date: Thu, 26 Apr 2018 10:25:30 -0700 Subject: Fix bug introduced in alignment check. --- riscv_mem.sail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'riscv_mem.sail') 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)) { -- cgit v1.1