[Open SoC Debug] CDM-OR1K implementation

Stafford Horne shorne at gmail.com
Sun May 20 16:25:59 CEST 2018

On Sun, May 20, 2018 at 05:11:55PM +0530, SHIVAM AGGARWAL wrote:
> >
> > The debug unit (CDM) and the du_* signals are used for:
> >   1. Read/Write registers (this includes debug unit registers which gives
> >     sofware controlling the CDM access to setup breakpoints/watchpoitns.)
> >   2. Stalling/Starting the CPU (i.e. ctrl-C in gdb or continue)
> >   3. Signalling to the debugger that a cpu has stalled.
> > (breakpoint/watchpoint)
> >
> Yes. That's pretty much what I covered in the specification.

Did you post an update?  It didnt seem to contain any of this when I was looking
yesterday.  I just saw part of 1. (debug registers, the important part is the
general purpose restiers) and 3.


> I went through all the resources again. As per my understanding, CDM works
> by storing breakpoint addresses in the debug registers.

I don't think you need to think about it this way.  CDM just provides access
to the CPU registers.  The debugger software decides what to write to which
registers (i.e. this target driver in gdb/openocd).

> If a  PC ever
> matches a value in breakpoint registers, CPU raises an exception and
> reports it to GDB. This is basically a hardware breakpoint.
> As you mentioned above, by writing an l.trap instruction into memory we can
> implement software breakpoint. For this part, we need access to memory.
> (MAM)
> Things to do now:
> 1. To expand memory map to access a the other registers.
> 2. To see how the existing system interface can be used to read/write
> memory.
> 3. To support software breakpoints, we need access to memory. This can be
> achieved either by using MAM or extending CDM module.

It should be MAM (for 2 and 3). Unless anyone objects.

To support any debugging we need read/write access to memory.

> Do you have a blog to report your gsoc status?  Perhaps you can summarize
> > this
> > there?
> >
> I do have a blog: https://gsoc2018timvideos.wordpress.com/
> I post daily snippets on the blogs and will also post weekly status updates
> every Monday.
> I have also posted a week wise schedule for CDM-OR1K.
> https://gsoc2018timvideos.wordpress.com/2018/05/18/week-wise-schedule-for-cdm-or1k/
> Please check and provide your valuable feedback.



More information about the OpenSoCDebug mailing list