aboutsummaryrefslogtreecommitdiff
path: root/src/shareable_cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shareable_cache.rs')
-rw-r--r--src/shareable_cache.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shareable_cache.rs b/src/shareable_cache.rs
index a4c993b..f6c76f6 100644
--- a/src/shareable_cache.rs
+++ b/src/shareable_cache.rs
@@ -54,6 +54,8 @@ macro_rules! check_traps {
let mut num_traps_hit = 0;
let iter = old_bytes.iter()
+ // Skip {offset} bytes
+ .skip(($address.0 & 0x3) as usize)
.take(new_bytes.len())
.enumerate();
for (offset, old) in iter {
@@ -72,6 +74,7 @@ macro_rules! check_traps {
}
if num_traps_hit > 0 {
+ println!("Checking for traps: {:?} vs {:?}", old_bytes, new_bytes);
info!("[memory] core {}: {} write trap(s) hit at address {:x},\
stalling for 1_000_000 cycles each",
$core_id, num_traps_hit, $address);