Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

How to finish the altpciechdma.c driver?

I've downloaded the altpciechdma.c driver for the Altera Arria GX dev kit.

The char part of it is not yet finished (due to the comments).

And a module is missign "mapper_user_to_sg.h".

Smb has tried to finish this part of the driver by himself?

Or maybe I've missed the "mapper_user_to_sg.h" module?

I need to talk to the driver from userspace.

(Using LInux 2.6.25)

22 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    the driver had enough code to test the connection between the FPGA and the kernel of the system. If I am not wrong, those functions were meant to provide data transfer between kernel space and user space. The functions that were allocated in those files are commented in the general code (not used).

    If your intention is to provide access from user space, then you should search on driver development and check functions such as copy_to_user and copy_from_user. As I did in my case, you have to finish it up.

    I hope it was of any help.

    P.D. I couldn't find it either
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Thank you for reply.

    I find the driver's write operation is use anther way to do the DMA map,and i can't verify if that map way have more efficiency.

    The driver author Leon also replied:

    We found that we could not make user SGDMA work reliably with the IP

    provided by Altera.

    Direct I/O user scatter-gather DMA was introduced in a commercial PCI

    Express IP core for Altera FPGA's:

    http://www.lancero.eu.com/lancero-pcie-sgdma/