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

Advance dmstatus.resumeack by one cycle #2412

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Conversation

ernie-sifive
Copy link
Contributor

Related issue:

Type of change: bug report

Impact: no functional change

Development Phase: implementation

Release Notes

When a debugger writes to resumereq, the request passes through an AsyncQueue to dmInner. If a fast debugger writes to resumereq and then reads from dmstatus all in the same dmInner clock cycle, the resumereq has not yet been reflected in the dmstatus read value. This PR advances resumeack by one cycle to ensure the proper value is read even in this case.

dmInner stores the resume status in a flag called resumeReqRegs. This is set from dmOuter when a resume is requested. The Debug Spec says that the dmstatus any/allresumeack bits are cleared immediately after resumereq. To ensure this, the read value of resumereq is advanced by one cycle by including the combinatorial resumereq signal in the read value rather than just the registered resumeReqRegs.

Still, there is a requirement that the AsyncQueue delay through innerCtrl is not any longer than the AsyncQueue delay through the dmiXing TL crossing.

@ernie-sifive ernie-sifive merged commit 7a8b367 into master Apr 13, 2020
@ernie-sifive ernie-sifive deleted the debug-resumeack-race branch April 14, 2020 12:56
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