Hi trk_golf,
> setting the most significant bit of the address would force the data to ignore
> cache and go out to memory space, therefore hitting the PIO registers.
> Is this not the case?
Correct.
> In other words, all the peripherals off the Avalon bus utilize and address with
> its most significant bit set.
Cache bypass is internal to the CPU (and its data cache) ... I don't believe the
"avalon bus" cares.
> However, I had problems using the outl and inl functions.
<<snip>>
> I guess the code was written, so that these inline macros are only valid from
> kernel space.
Correct. The (standard) linux macros expect a physical address, not a virtual
address -- and user-space addresses are always virtual. But this is all moot
(at least for now) since Nios-II doesn't have an MMU.
> It seems like there should be a simple way to directly control the pio devices
> within a user-space program under uClinux.
> Does anybody have a proven method?
The "correct" way for an application to access memory mapped devices under
linux is to use mmap, provided the device driver supports it.
The quick 'n dirty way is to just cut 'n paste the macros into your own header.
Provided an MMU doesn't suddenly appear in your design, either method
will give you access ... although the macros do have that "natural feel", no? ;-)
Regards,
--Scott