-
Notifications
You must be signed in to change notification settings - Fork 68
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
Conversation
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.
624c587
to
61fb531
Compare
There was a problem hiding this 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.
61fb531
to
9808eaf
Compare
src/test/csrc/difftest/difftest.cpp
Outdated
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) { |
There was a problem hiding this comment.
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?
9808eaf
to
705bdee
Compare
* 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.
There was a problem hiding this 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.