simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] Re: Simulavr Questions


From: Theodore A. Roth
Subject: [Simulavr-devel] Re: Simulavr Questions
Date: Mon, 23 Feb 2004 15:44:47 -0800 (PST)


On Mon, 23 Feb 2004, Keith Gudger wrote:

> Ted:
>
> I've got the USB devices working with the current CVS files you sent me.
> I'm now trying to "add in" the functionality I had before, such as the
> ADC, SPI, and USB.  I'm starting out with the ADC.  Here are my questions:

Can you send me a patch of what you've got working before you start
adding all the other stuff? I'd like to get the addr/name stubs into
cvs. Then I can work on some of the other vdevs that need updating.

>
> 1.  With regards to passing info to the new function "adc_create", is the
> reg->data the best parameter to use?  (It's a pain that it's actually a
> pointer, but I see why.)  It seems a more appropriate choice than
> reg->related.

reg->related is not for passing data. It is used to tell the current
registers creator that it needs info from the related register. I'm
hoping that this can eliminate the need to look up a device by name
which was a huge performance penalty.

What data do you need to pass in to adc_create() ?

>
> 2.  Any clues why I'm getting this warning when I launch simulavr?
> devsupp.c:332: MESSAGE: attach: IO Reg 'ADCSR' at 0x0027: created
> device.c:83: WARNING: Default AddAddr called [addr=0x28; 'ADMUX']
> devsupp.c:316: MESSAGE: attach: IO Reg 'ADMUX' at 0x0028: ref = 0x0027
>
> In device.c it says:
> This generate a warning that the should let the developer know that the
>     vdev needs to be updated. */
>
> What do I need to do?

Just add an empty adc_add_addr() method. Have a look at how I'm using
AddAddr in the port_add_addr() function in ports.c. That might give you
a clue as to what you can do with it.

>
> 3.  Now the hard one.  All the USB "registers" start at address 0x1fa0.
> Is this going to be a problem when I define them in the .io_reg section?
> I don't know where else I could put them.  I thought I'd seen a check
> somewhere on the upper bounds of the io section, but now I can't find it
> in the code.

I noticed that odd address already and tried to account for it. It
should be safe to put those in .io_reg.

Ted Roth




reply via email to

[Prev in Thread] Current Thread [Next in Thread]