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

fix external debug-halt vs. exception concurrency #882

Merged
merged 3 commits into from Apr 23, 2024
Merged

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Apr 23, 2024

Fixing #879.

The CPU can now be halted right after reset before the first instruction is executed. However, the on-chip debugger does not provide the "halt on reset" functionality yet (but that can be emulated by the debugger).

@stnolting stnolting added bug Something isn't working risc-v compliance Modification to comply with official RISC-V specs. HW hardware-related labels Apr 23, 2024
@stnolting stnolting self-assigned this Apr 23, 2024
@stnolting stnolting changed the title fix exteranl debug-halt vs. exception concurrency fix external debug-halt vs. exception concurrency Apr 23, 2024
Copy link
Collaborator

@mikaelsky mikaelsky left a comment

Choose a reason for hiding this comment

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

Looks good to me. Will see if I can patch up my 1.9.3 core version with this change to do a real-time debug on an FPGA.

@stnolting
Copy link
Owner Author

I've tested this by replacing the IMEM by a constant x"00000000" (illegal instruction) and I was able to halt the core at any time (even right after reset 🎉).

So, hopefully, this fixed the "bug".

Thanks again for your help! 👍

@stnolting stnolting marked this pull request as ready for review April 23, 2024 19:41
@stnolting stnolting merged commit 5d45438 into main Apr 23, 2024
10 checks passed
@stnolting stnolting deleted the halt_vs_exception branch April 23, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HW hardware-related risc-v compliance Modification to comply with official RISC-V specs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JTAG halt request gets missed if it occures during an illegal instruction
2 participants