From 99636710b29fefb90ce8bec1294195654fe44783 Mon Sep 17 00:00:00 2001 From: Shupei Fan Date: Wed, 18 Dec 2024 14:13:15 +0000 Subject: [PATCH] [difftest] fix a bug in memory map route --- difftest/dpi_t1rocketemu/src/interconnect.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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