Skip to content

Commit

Permalink
ref: update cached mmu state after regcpy (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
poemonsense authored Sep 6, 2023
1 parent 8329752 commit 518a917
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/isa/riscv64/difftest/ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ void isa_difftest_regcpy(void *dut, bool direction) {
if (direction == DIFFTEST_TO_REF) {
memcpy(&cpu, dut, DIFFTEST_REG_SIZE);
csr_writeback();
// need to clear the cached mmu states as well
extern void update_mmu_state();
update_mmu_state();
} else {
csr_prepare();
memcpy(dut, &cpu, DIFFTEST_REG_SIZE);
Expand Down

0 comments on commit 518a917

Please sign in to comment.