Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

This adds support for debug modules with an arbitrary address base. #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msfschaffner
Copy link

The current implementation assumes that the debug module base is at 0x00. This makes the current fesvr implementation incompatible with platforms where the debug module is mapped to a different base address that is not zero.

Hence the dtm_t::modify_csr function that read-modify-writes CSRs is adapted. Other access functions are not affected, since:

  1. they either work with abstract commands that are implemented in the debug module RTL,
  2. or they do not access locations within the debug module using code snippets written to the program buffer.

The fix extracts the debug module base by reading the current PC and clearing the lowest 12bits, and hence the offset does not have to be known at compile time. However, it requires one more program buffer register (7 instead of 6).

The current implementation assumes that the debug module base is at 0x00. This makes the current fesvr implementation incompatible with platforms where the debug module is mapped to a different base address that is not zero.

Hence the dtm_t::modify_csr function that read-modify-writes CSRs is adapted. Other access functions are not affected, since:
  1) they either work with abstract commands that are implemented in the debug module RTL,
  2) or they do not access locations within the debug module using code snippets written to the program buffer.

The fix extracts the debug module base by reading the current PC and clearing the lowest 12bits, and hence the offset does not have to be known at compile time. However, it requires one more program buffer register (7 instead of 6).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant