Linux and FPGA compatibility

Hi,

I'm a newbie to FPGA and Linux world. I have a general question concerning both.

I have a workstation with Linux installed. A Virtex II Pro FPGA Module is plugged in the backplane of the workstation. I'm wondering if I need to write a device driver for the FPGA module in order for the Linux box to recognize the card?

I want a software program running on the Linux machine to be able to poll a few registers on the FPGA module, bascially through memory map. Is this possible without a device driver?

Thanks in advance for all the help.

Michelle

Reply to
Michelle
Loading thread data ...

Was the board designed to work with Linux?

Some years ago I worked with a variety of boards on Sun workstations. Sun provided device drivers that would map memory as an I/O device so that any device could be accessed that way. A little less convenient than a dedicated device driver, but it did work. I don't know that Linux provides that, though.

-- glen

Reply to
Glen Herrmannsfeldt

No. By backplane do you mean PCI?

You might want to try:

formatting link
"User Mode Drivers"

Which talks about writing directly to PCI memory space. This is not a particularly nice/good/proper thing to do, but it is quick and dirty and good for starters.

Alan Nishioka snipped-for-privacy@accom.com

Reply to
Alan Nishioka

The better FPGA board makers should include a ready to go PCI device driver. For Windows this would have been something like Numega IIRC, but for Linux I am less sure, most of my old links are long gone (thanks to MS ...).

Who is the board vendor?, check their site for driver support.

John

johnjaksonATusaDOTcom

Reply to
john jakson

Yeah I'm been looking all over the web and forums, can't seem to find anything useful.

Reply to
Michelle

Yes backplane as in the PCI bus of the Linux workstation. I will check out the article you suggested, thanks!

Reply to
Michelle

Xilinx is the vendor.

Reply to
Michelle

By the way, I have a related question....

I believe the "/proc/bus/pci/devices" file in Linux lists all the devices on the PCI bus. I'm wondering if anyone knows how this file is updated or maintained? How is this file updated with the devices.? Is it updated every time the system is turned on or does the system admin update with the appropriate information?

Thanks!

Reply to
Michelle

Followup to: By author: snipped-for-privacy@hotmail.com (Michelle) In newsgroup: comp.arch.fpga

Anything in /proc is automatically updated by the kernel.

-hpa

--
 at work,  in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
Reply to
H. Peter Anvin

This is maintained by the pci driver. It's not a real file, but data wich is collected by the driver when try to read from this "file" (there is a hook function you specify in a struct which you register throu a call to proc_register). Try to look for pci_proc_attach_device in the Linux source tree:

find /usr/src/linux/ -name '*.[ch]' | xargs grep pci_proc_attach_device

Writing a Linux device driver is not extremely difficult since there's a lot of documentation out there as well as source code for all (well most) of the current device drivers in use.

You can also use the "lspci" command to list all PCI devices. You can also specify a bus:slot.function number as well as verbose output and a hex dump of the PCI config space, like: "lspci -s 2:2.0 -v -x"

Petter

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Reply to
Petter Gustad

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.