Skip to content

Commit

Permalink
feat(difftest): sync FS/VS dirty from DUT to REF.
Browse files Browse the repository at this point in the history
  • Loading branch information
NewPaulWalker committed Dec 13, 2024
1 parent 6888be9 commit 5032472
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions difftest/difftest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ bool DifftestRef::raise_critical_error() {
return state->critical_error;
}

void DifftestRef::dirty_fsvs(uint64_t dirties) {
state->sstatus->dirty(dirties);
}

void DifftestRef::update_mip(void *non_reg_interrupt_pending) {
auto n = (DifftestNonRegInterruptPending *) non_reg_interrupt_pending;
state->mip->backdoor_write_with_mask(MIP_MTIP, n->platform_irp_mtip ? MIP_MTIP : 0);
Expand Down Expand Up @@ -574,6 +578,10 @@ void difftest_raise_intr(uint64_t NO) {
ref->raise_intr(NO);
}

void difftest_dirty_fsvs(uint64_t dirties) {
ref->dirty_fsvs(dirties);
}

bool difftest_raise_critical_error() {
return ref->raise_critical_error();
}
Expand Down
1 change: 1 addition & 0 deletions difftest/difftest.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class DifftestRef {
int store_commit(uint64_t *addr, uint64_t *data, uint8_t *mask);
void raise_intr(uint64_t no);
bool raise_critical_error();
void dirty_fsvs(uint64_t dirties);
void display();
void update_mip(void *non_reg_interrupt_pending);
void update_dynamic_config(void* config) {
Expand Down

0 comments on commit 5032472

Please sign in to comment.