Skip to content

Commit

Permalink
ipod4g: Log originating core for memory requests
Browse files Browse the repository at this point in the history
Helps understanding whether some memory requests originate from CPU or
COP.
  • Loading branch information
jeanthom committed May 26, 2024
1 parent 4b0ece4 commit e311366
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions clicky-core/src/devices/platform/pp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,13 @@ pub mod common {
Cpu,
Cop,
}

impl std::fmt::Display for CpuId {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
CpuId::Cpu => write!(f, "CPU"),
CpuId::Cop => write!(f, "COP"),
}
}
}
}
2 changes: 1 addition & 1 deletion clicky-core/src/sys/ipod4g/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl Ipod4g {
MemExceptionCtx {
pc: cpu.reg_get(cpu.mode(), reg::PC),
access,
in_device: format!("{}", devices.probe(access.offset)),
in_device: format!("{}, {}", cpuid, devices.probe(access.offset)),
},
)?;
}
Expand Down

0 comments on commit e311366

Please sign in to comment.