[Open SoC Debug] CDM: Next Steps

Philipp Wagner philipp.wagner at tum.de
Mon May 28 13:54:37 CEST 2018


Shivam provided an updated PR on the CDM spec and I've merged it with
minor changes. You can find the resulting document here:
The spec has still some rough edges, but it should be sufficient for now
in that it distills our common understanding of how this module should
work. If you find anything left out please open an issue so we can track it.

The next step is of course moving towards an implementation.

- On the hardware side most building blocks are there to build up the
  CDM module. The only missing part is the access to OSD registers which
  are not 16 bit wide. I've opened
  https://github.com/opensocdebug/osd-hw/issues/40 for this, and Max is
  currently looking into it. (Fixing this on our side is most likely
  more time-efficient since we can use the cocotb-based tests, which
  only run on VCS currently.)

- The discussion we previously had showed that most unknowns so far are
  within the software side and the gdbserver implementation. (Opposed to
  what I've been suggesting before) I'm proposing you Shivam start with
  that. You can find the code together with documentation and tests at
  https://github.com/opensocdebug/osd-sw. You need to create the
  following pieces:

  1. A "CDM client" class. This class essentially wraps the special
     functionality of the CDM into more descriptive function names. You
     can find an example here:

  2. Create a osd_gdbserver class which makes use of the MAM and CDM
     modules (i.e. cl_mam and cl_cdm classes) to provide the interface
     to GDB. You can find an example of such a class here:

     This part will also require you to read on and implement the
     gdbserver protocol and to add functionality listen on a TCP port
     for incoming connections from GDB.

  3. Add a new standalone tool for the OSD gdbserver, which makes use of
     the osd_gdbserver class you created in step 2. You can find an
     example of such a tool here:


To make sure you can start small and add incrementally to the
implementation please also create unit tests. You can find the existing
unit tests here:

Before you start coding please open issues in the osd-sw repository
where you describe the problem. Open one issue per actionable goal, i.e.
the three points I've mentioned above would be three issues.


More information about the OpenSoCDebug mailing list