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

Initialize link register with a code address in TEST_JAL_OP. #599

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Jan 19, 2025

Description

This PR initializes the link register in TEST_JAL_OP to a code address. Without this line, RV32I_Zicsr-only cores that don't understand compressed instructions fail to match SAIL in the misalign-jal-01.S test by a single bit. Initializing the link register makes such cores match SAIL (absent other bugs in such cores :)...).

Related Issues

#445

Ratified/Unratified Extensions

  • Ratified
  • Unratified

List Extensions

RV32I_Zicsr, without C extension.

Reference Model Used

  • SAIL
  • Spike
  • Other - < SPECIFY HERE >

Mandatory Checklist:

  • All tests are compliant with the test-format spec present in this repo ?
  • Ran the new tests on RISCOF with SAIL/Spike as reference model successfully ?
  • Ran the new tests on RISCOF in coverage mode
    The provided command in the docs doesn't appear to work; I don't know where to get CGFs. Also, this is a bug fix, not a new test.
  • Link to Google-Drive folder containing the new coverage reports (See this for more info): Not applicable? See above.

Optional Checklist:

  • Were the tests hand-written/modified ?
  • Have you run these on any hard DUT model ? Please specify name and provide link if possible in the description
  • If you have modified arch_test.h Please provide a detailed description of the changes in the Description section above.

Copy link
Collaborator

@allenjbaum allenjbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a bug where test computes a delta of two addresses, one of which is supposed to be the link register, but because the JAL traps, no link is written.
models with different load addresses will fail to match. This fixes initializes the link to a valid address,

@allenjbaum allenjbaum merged commit a5a20fe into riscv-non-isa:dev Jan 20, 2025
2 checks passed
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