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

BLTS doesn't raise trap correctly #17

Open
darbaria opened this issue May 24, 2021 · 1 comment
Open

BLTS doesn't raise trap correctly #17

darbaria opened this issue May 24, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@darbaria
Copy link
Owner

The RISC-V ISA mandates that if the target address is not 4-byte aligned then the exception must be raised. The check on byte alignment is on the target address, not the target offset. The RTL is raising the trap if the target offset is not 4-byte aligned. Hence, the trap check for BLTS Instructions fails.

For this assertion, we are checking that the axiomise_trap signal currently mapped to CORE.rvfi_trap is raised correctly but it doesn't.

For reference, the spec we have used is the 2019 version of the base ISA. The exact specification lines are recorded here for easy reference.

"The conditional branch instructions will generate an instruction-address-misaligned exception if the target address is not aligned to a four-byte boundary and the branch condition evaluates to true. If the branch condition evaluates to false, the instruction-address-misaligned exception will not be raised."

@darbaria darbaria added the bug Something isn't working label May 24, 2021
@darbaria
Copy link
Owner Author

BLTS_TRAP.vcd.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants