[Open SoC Debug] CDM: Next Steps

SHIVAM AGGARWAL shivam16195 at iiitd.ac.in
Wed Jun 13 07:19:12 CEST 2018


Hi,

On Wed, Jun 13, 2018 at 2:43 AM, Stafford Horne <shorne at gmail.com> wrote:

> Hi Shivam,
>
> As it was noted in Philip's mail it was suggested to work on the "CDM
> Client" class.  This will help define the software side API of the CDM
> hardware that the gdb-osd server will interact with.  In order to do
> that you may also want to think about what API (functions) would be
> required by the gdb server.  You can look at some example
> implementations of those.
>
> I would also suggest having a non gdb, more simple, debug interface.
> The gdb debug interface is quite complicated and makes a lot of
> abstractions via GDB.  Having a simple interface could make it easy to
> independently verify your "CDM client" class.  Is there something
> similar already for the MAM interface?
>

We have completed the implementation of CDM client class.

Please take a look at the merged code:
https://github.com/opensocdebug/osd-sw/blob/master/src/libosd/cl_cdm.c

Associated tests:
https://github.com/opensocdebug/osd-sw/blob/master/tests/unit/check_cl_cdm.c

A brief description of the API documentation:
http://opensocdebug.readthedocs.io/projects/osd-sw/en/latest/02_developer/api/libosd/cl_cdm.html

Apart from the event part of CDM, CDM client class provides two important
API(functions)- cl_cdm_cpureg_read() and cl_cdm_cpureg_write()
functions for easy interface with OSD-GDB server bridge. The two functions
provide read/write register accesses by first updating the CORE_REG_UPPER
register with the MSB of the SPR register (only if required), followed by
an address translation from SPR register to CDM specific register and
finally, a concluding read/write register request.


> For software a good reference implementation for a gdb server is the
> one from qemu:
>
>   - qemu - https://git.qemu.org/?p=qemu.git;a=blob;f=gdbstub.c
>
> There is also a openocd gdb server implementation:
>
>   - http://repo.or.cz/openocd.git/blob/HEAD:/src/server/gdb_server.c
>
> Bother are self contained and not huge.
>

Thanks for the referred implementation. I went through the implementation
of openocd gdb server very briefly.

>
>
>
> -Stafford
> On Wed, Jun 13, 2018 at 1:27 AM SHIVAM AGGARWAL <shivam16195 at iiitd.ac.in>
> wrote:
> >
> > Oh sorry. It was probably a misunderstanding on my part.
> > I will continue with the OSD-GDB server bridge. I have already opened an
> issue: https://github.com/opensocdebug/osd-sw/issues/19
> > I am reading about RSP protocol and looking at the source code of
> openOCD for reference: http://repo.or.cz/openocd.git/tree/HEAD:/src
> >
> > Thanks a lot for your guidance and support.
> > Shivam Aggarwal
> >
> > On Tue, Jun 12, 2018 at 9:35 PM, Philipp Wagner <philipp.wagner at tum.de>
> wrote:
> >>
> >> On 06/12/2018 05:55 PM, SHIVAM AGGARWAL wrote:
> >>>
> >>> Okay. I will complete the hardware implementation and get back to you
> soon. Also, I got access to Synopsys VCS through my institute's lab
> resources. I am currently learning how to use the tool.
> >>> So, please guide me about the testing part as well.
> >>
> >>
> >> Let's not do too many things at once. You started with the software
> part, and I'm proposing to continue down this path and finish it first
> before moving on to the next thing.
> >>
> >>
> >> Philipp
> >> _______________________________________________
> >> OpenSoCDebug mailing list
> >> OpenSoCDebug at lists.librecores.org
> >> https://lists.librecores.org/listinfo/opensocdebug
> >
> >
> > _______________________________________________
> > OpenSoCDebug mailing list
> > OpenSoCDebug at lists.librecores.org
> > https://lists.librecores.org/listinfo/opensocdebug
>

Thanks
Shivam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.librecores.org/pipermail/opensocdebug/attachments/20180613/a876637e/attachment-0001.html>


More information about the OpenSoCDebug mailing list