-
Notifications
You must be signed in to change notification settings - Fork 4
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
nemu is not deterministic #8
Comments
Recently I encountered a serious problem with NEMU. Running workloads twice on the same NEMU results in different instruction counts, which causes some workloads finish before the last checkpoint start.
This is VERY SEVERE. If the instruction count is not deterministic, the interval provided by SimPoint is INVALID. |
There will be a further PR in NEMU by @cebarobot. OpenXiangShan/NEMU#698 can not actually resolve this problem but causing stuck. |
Currently, it seems that I'm working on this now. I'm trying to link the timer with the instruction count, and also solve the CSR instret/cycle/time problem. |
According to the code, previously when CONFIG_DETERMINISTIC is set, mtime seems to link with rdtime (or any time read). Whenever rdtime is executed, mtime increases by a certain amount. This causes the kernel to be stuck in a misaligned access speed test, which executes benchmark code while waiting for interrupt. I've tried linking interrupt intervals with the instruction count. It did solve the stuck issue. However, there is still a risk of breaking software with too many or too few interrupts. I recommend calculating the instruction count interval using mtimecmp related information. |
The generated checkpoints using nemu are.not.deterministic.
In other words, if generate checkpoints twice, the md5sum of first and second generated checkpoints are different.
The text was updated successfully, but these errors were encountered: