Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dbltrp): critical-error is not treated as diff error #492

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

lewislzh
Copy link
Contributor

@lewislzh lewislzh commented Nov 4, 2024

  • When both RTL and NEMU report a critical-error, the hardware behavior is considered correct. Upon detecting a critical-error, it should indicate a "good trap."
  • If they do not report simultaneously, it results in a diff error and triggers an abort.

Copy link
Member

@poemonsense poemonsense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should declare it as int ref_raise_critical_error() and use the return value to check whether it is a legal one.

src/test/csrc/difftest/refproxy.h Outdated Show resolved Hide resolved
src/test/csrc/difftest/difftest.h Outdated Show resolved Hide resolved
Info("Core %d dump: critical_error raise \n", this->id);
raise_trap(STATE_ABORT);
bool ref_critical_error = proxy->raise_critical_error();
if (dut->critical_error.valid && dut->critical_error.criticalError) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be like:

if (dut->critical_error.valid && dut->critical_error.criticalError) {
  bool ref_critical_error = proxy->raise_critical_error();
  if (ref_critical_error) ...
  ...
}

Only when DUT raises the critical error, we check whether REF raises it?

* When both RTL and NEMU report a critical-error, the hardware behavior is considered correct.
  Upon detecting a critical-error, it should indicate a "good trap."
* If they do not report simultaneously, it results in a diff error and triggers an abort.
Copy link
Member

@poemonsense poemonsense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me.

@poemonsense poemonsense merged commit 4233651 into master Nov 5, 2024
5 checks passed
@poemonsense poemonsense deleted the fix-critical-error branch November 5, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants