Add bool for writing to destination reg to RVFI output #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In sail, when an instruction writes to a register, the register number will also be written to the
rvfi_rd_addr
field (if it has been built for RVFI output). When an instruction has no destination register, thervfi_rd_addr
remains zero. The CClear instruction in the CHERI is an exception to the regular RISC-V instruction format. It can write to up to eight registers. However, CClear has no destination register, but rather a two-bit immediate determining which quarter of the register file this instruction will write to.Currently, the sail implementation for CClear writes the highest register number to
rvfi_rd_addr
. This PR changes this behaviour and never writes a destination register to the field, which results in the field containing zeros. I think this is the correct behaviour for the model as thervfi_rd_addr
field cannot correctly represent the destination register behaviour of CClear.