Closed kmeinhar closed 4 years ago
DMI is intentionally left unspecified so that people have a lot of flexibility in how to structure their system, and can even reuse their main system bus as DMI if that makes sense. But you raise a good point that in a fairly common case of one DM with one hart directly attached to it, most interface choices between them are arbitrary. It could be helpful for a common implementation in that interface.
I still don't want to add this to the prescriptive part of the specification, since in the end the debugger doesn't care how this happens. But it makes a lot of sense to add a suggested interface to the appendix, to be read in conjunction with the sections that sketch out the possible hardware implementations. If you're interested in writing that up, I'd be happy to work with you to get it in shape to be included.
I am not familiar with your workflow so please correct me if I have done something wrong.
I have created a work in progress pull request #524
This one creates a new section in Appendix B. There a table is given with suggested signals for the DMI.
Hi, @kmeinhar, I'd like to chat more with you about this commit. Would you kindly accept my invitation to connect on LinkedIn so we can discuss this contribution more? Thanks!
I am student that did a research project on open-source implementations of the debugging specification.
What I noticed was that a lacking specification of an interface to the Debug Module resulted in multiple different interfaces that are similar but not compatible with each other.
The Problem:
The specification reads:
And:
The only mention of signals to and from the Debug Module are in the description of JTAG-DTM. There register
dmi
specifies the three fields:address
,data
andop
.The inspected open-source implementations took those three fields as an inspiration for an interface to the Debug Module. This lead to the following interfaces:
Benefits of a specified DMI port:
Suggested Improvement:
DMI-Request signals:
abits
-1:0]DMI-Respond signals:
The survey I have done: SurveyRiscVDebugging.pdf