diff --git a/difftest/dpi_t1rocketemu/src/interconnect.rs b/difftest/dpi_t1rocketemu/src/interconnect.rs index 363e5e7bb..206d805dc 100644 --- a/difftest/dpi_t1rocketemu/src/interconnect.rs +++ b/difftest/dpi_t1rocketemu/src/interconnect.rs @@ -180,7 +180,7 @@ impl AddressSpace { for (idx, dev) in self.devices.iter().enumerate() { let (base, size) = dev.base_and_size; if base <= addr && addr - base < size { - return if addr - base + len < size { + return if addr - base + len <= size { Some(idx) } else { None