lkml.org 
[lkml]   [2011]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver
On Wed, Feb 09, 2011 at 04:30:23PM -0000, David Laight wrote:
>
> > This driver allows userspace to access the data processing
> > FPGAs on the OVRO CARMA board. It has two modes of operation:
> >
> > 1) random access
> >
> > This allows users to poke any DATA-FPGA registers by using mmap to map
> > the address region directly into their memory map.
>
> I needed something similar, but used pread() and pwrite()
> to request the transfers.
> While this does require a system call per transfer, it allows
> the driver to use dma (if available) to speed up the request.
> In my case doing single cycle transfers would be too slow.
>

We initially started with a read()/write() interface for individual
register reads and writes, just like you describe. It turned out that
mmap was plenty fast for our use. I made the decision to ditch all of
the extra code needed to setup and execute the DMA for the much simpler
mmap code.

In our case, going all the way through the DMA engine code just to
transfer 4 bytes is overkill. The local bus is already quite fast, and
we can increase the clock speed if needed.

Ira


\
 
 \ /
  Last update: 2011-02-09 18:05    [W:0.070 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site