[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openrisc] Re: A few quick questions...



Chris Ziomkowski wrote:
> 
> > No, we don't need any stubs. I've explained this interface in my
> >  previous email.
> >  Yesterday I've created new target for sim, here are some cuts:
> >  (JTAG or1k target interface)
> >  extern void jtag_init PARAMS ((char * args));
> >  extern unsigned int jtag_read_reg PARAMS ((int regno));
> >  extern void jtag_write_reg PARAMS ((int regno, unsigned int data));
> >  extern void jtag_done PARAMS ((void));
> 
> OK, OK...I get what you're trying to do. So, given this, how do
> you interface exceptions into the architecture? On a serial target,
> the serial port is polled until an exception occurs. The last
> exception is then read from the stubs routine. On a local host,
> the operating system delivers a signal directly to the running
> process, which is caught and trapped by gdb. I need to understand
> the big picture of how you are doing this via JTAG.
The or1k sim should have the same exception handling as with JTAG:
when waiting for target we poll it - 100/sec or 1000/sec. The status of
risc should be available in DRR (Debug Reasor Register).
This should be fast enough response, I think.
 
> What happens if say, an unexpected alignment exception is generated
> when we are using JTAG? How does this event get reported back to
> the gdb process?
AE bit in DRR is set, if we have enabled this exception in DSR.
It would be best for you to read or1k arch spec - at least
chapters 5, 6, 7, 9, 10, 11, 13, 18 and 19. You should good
impression on or1k architecture before starting looking at or1k sim.

> Forgetting about breakpoints for the moment, let's assume my
> code has an alignment exception. I want to run it, and have
> the process stop as soon as the alignment exception is hit and
> return control to gdb. Can you take me through a brief execution
> flow of exactly what gdb will do? Start at the point where I
> type "gdb" from the linux command line. What happens? How does
> the download occur? Next, I type "run" at the (gdb) prompt.
> How does the process actually start executing, and what does
> the gdb process do? Now, the alignment exception strikes. What
> occurs? Please be as detailed as you can, so that I can
> understand exactly what you are envisioning. I'm still pretty
> fuzzy on the process of what you are proposing.

> P.S. Will the 2.9.1 binutils on the opencores site work with
> the 5.0 gdb binary you've been modifying, or is there a newer
> version? Can I get the latest binutils and the gdb code you've
> been working with? Thanks.
no it won't work - even worse - version I am using is not backwards
compatible with the one in CVS.
I will put gdb onto cvs shortly, I just want to finish some things,
otherwise I would have too many questions to answer...

Marko