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

Squash replay: optimized by NEMU store log #288

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Squash replay: optimized by NEMU store log #288

merged 2 commits into from
Feb 28, 2024

Conversation

klin02
Copy link
Member

@klin02 klin02 commented Feb 12, 2024

Previous we use naive memcpy for NEMU memory snapshot. Now we complete more efficient memory snapshot and recovery with NEMU store log.

Call ref_store_log_reset and set_store_log, then we can record origin data of every pmem_write for this execution. When REF and DUT comparation trigger error, call ref_store_log_restore, then memory will recover in reverse order.

ENABLE_STORE_LOG macro added to config.

@klin02 klin02 marked this pull request as draft February 12, 2024 13:13
@klin02
Copy link
Member Author

klin02 commented Feb 12, 2024

This change should be supported by NEMU PR OpenXiangShan/NEMU#265.
ready-to-run in NutShell/XiangShan should be also updated before this Change.

@klin02 klin02 force-pushed the replay-store-log branch 2 times, most recently from 0841871 to 71bc711 Compare February 22, 2024 16:26
@klin02
Copy link
Member Author

klin02 commented Feb 28, 2024

When bump to XiangShan with this commit, we should bump ready-to-run at the same time.

@klin02 klin02 marked this pull request as ready for review February 28, 2024 07:11
@klin02 klin02 requested a review from poemonsense February 28, 2024 07:14
Previous we use naive memcpy for NEMU memory snapshot. Now we complete
more efficient memory snapshot and recovery with NEMU store log.

Call ref_store_log_reset and set_store_log, then we can record
origin data of every pmem_write for this execution. When REF and DUT
comparation trigger error, call ref_store_log_restore, then memory will
recover in reverse order.

ENABLE_STORE_LOG macro added to config.
Now we has 3 Memory, DUT REF Golden. When Squash replay, DUT will
transmit unsquashed DiffState which are already generated and stored,
and we will reset REF and Golden Memory to process these states.

Overall, DUT memory doesn't need to restore. REF and Golden Memory will
be restored by store_log.
@klin02 klin02 merged commit 2f13b99 into master Feb 28, 2024
5 checks passed
@klin02 klin02 deleted the replay-store-log branch February 28, 2024 09:02
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