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

Clarify new illegal handler code for HWLOOPs #2286

Closed
MikeOpenHWGroup opened this issue Nov 8, 2023 · 5 comments
Closed

Clarify new illegal handler code for HWLOOPs #2286

MikeOpenHWGroup opened this issue Nov 8, 2023 · 5 comments
Assignees
Labels
cv32e40p improvement Issues to highlight long-term improvements in core-v-verif

Comments

@MikeOpenHWGroup
Copy link
Member

In pull-request #2280, the corev-dv function cv32e40p_asm_program_gen::gen_illegal_instr_handler(int hart) was substantially updated to add illegal handler code for HWLOOPs:

  • If the illegal exception happened within a hwloop.
  • If yes , check if the illegal was the last instruction of an hwloop with at least 1 more iteration left.
  • If yes, then set MEPC to first instruction of hwloop instead of just incrementing by 4.
    Else MEPC is just incremented by 4.

The code is fine, but difficult for a human to follow (because it is SystemVerilog code that emits RISC-V assembler) so it would be good to add a comment header to the function to include the above information.

@MikeOpenHWGroup MikeOpenHWGroup added improvement Issues to highlight long-term improvements in core-v-verif cv32e40p labels Nov 8, 2023
@MikeOpenHWGroup
Copy link
Member Author

Hi @dd-vaibhavjain, is there a chance you can get to this Issue before the end of this calendar year?

@dd-vaibhavjain
Copy link

The relavant comments for hwloop handling were added for all the handlers in corev_dv for cv32e40p.
This will be part of the next PR.

@MikeOpenHWGroup
Copy link
Member Author

Hi @dd-vaibhavjain, has the "next PR" been submitted?

@XavierAubert
Copy link

Hi Mike !
PR #2357 has just been submitted, and it contains the commit 44647b9 to address this issue

@MikeOpenHWGroup
Copy link
Member Author

Thanks @XavierAubert. PR #2357 has been merged, so I will close this Issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cv32e40p improvement Issues to highlight long-term improvements in core-v-verif
Projects
None yet
Development

No branches or pull requests

4 participants