Skip to content

Commit

Permalink
[difftest] float rf change should be fake?? wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf authored and Avimitin committed Jun 8, 2024
1 parent 9d5ca76 commit 57694b1
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions difftest/t1-simulator/src/difftest/spike/spike_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,9 @@ impl SpikeEvent {
// xx0100 <- csr
let reg_write_size = state.get_reg_write_size();
(0..reg_write_size).for_each(|idx| match idx & 0xf {
0b0000 | 0b0001 => {
0b0000 => {
// scalar rf
let is_fp = idx & 0b1 != 0;
let data = state.get_reg(idx, is_fp);
let data = state.get_reg(idx, false);
if data != self.rd_bits {
trace!(
"SpikeRegChange: idx={idx}, change_from={}, change_to={data}",
Expand All @@ -276,6 +275,18 @@ impl SpikeEvent {
self.is_rd_written = true;
}
}
0b0001 => {
let data = state.get_reg(idx, true);
if data == self.rd_bits {
trace!(
"FloatRFChange: idx={idx}, change_from={}, change_to={data}",
self.rd_bits
);
self.rd_bits = data;
self.is_rd_written = true;
}

}
_ => trace!("UnknownRegChange, idx={idx}, spike detect unknown reg change"),
});

Expand Down

0 comments on commit 57694b1

Please sign in to comment.