Skip to content

Commit

Permalink
[rocketemu] fix wrong size
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf authored and sequencer committed Jul 24, 2024
1 parent 8fa45cb commit 77210bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rocketemu/driver/src/sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ impl Simulator {
}

pub fn axi_read_instruction(&mut self, addr: u32, arsize: u64) -> AxiReadPayload {
let size = 1 << arsize;
assert!(size <= 4);
let size = 1 << arsize; // size in bytes
let data = self.read_mem(addr, size, 4);
let data_hex = hex::encode(&data);
info!(
Expand All @@ -298,7 +297,7 @@ impl Simulator {
}

pub(crate) fn axi_read_load_store(&mut self, addr: u32, arsize: u64) -> AxiReadPayload {
let size = 1 << arsize;
let size = 1 << arsize; // size in bytes
let data = self.read_mem(addr, size, self.dlen / 8);
let data_hex = hex::encode(&data);
info!(
Expand Down

0 comments on commit 77210bf

Please sign in to comment.