diff options
Diffstat (limited to 'model/riscv_platform.sail')
-rw-r--r-- | model/riscv_platform.sail | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/model/riscv_platform.sail b/model/riscv_platform.sail index 9184f02..52511a9 100644 --- a/model/riscv_platform.sail +++ b/model/riscv_platform.sail @@ -337,12 +337,19 @@ function htif_tick() = { } /* Top-level MMIO dispatch */ - +$ifndef RVFI_DII function within_mmio_readable forall 'n, 0 < 'n <= max_mem_access . (addr : xlenbits, width : atom('n)) -> bool = within_clint(addr, width) | (within_htif_readable(addr, width) & 1 <= 'n) +$else +function within_mmio_readable forall 'n, 0 < 'n <= max_mem_access . (addr : xlenbits, width : atom('n)) -> bool = false +$endif +$ifndef RVFI_DII function within_mmio_writable forall 'n, 0 < 'n <= max_mem_access . (addr : xlenbits, width : atom('n)) -> bool = within_clint(addr, width) | (within_htif_writable(addr, width) & 'n <= 8) +$else +function within_mmio_writable forall 'n, 0 < 'n <= max_mem_access . (addr : xlenbits, width : atom('n)) -> bool = false +$endif function mmio_read forall 'n, 0 < 'n <= max_mem_access . (addr : xlenbits, width : atom('n)) -> MemoryOpResult(bits(8 * 'n)) = if within_clint(addr, width) |