Linux and FPGA compatibility

M

Michelle

Guest
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
 
"Michelle" <sleepymish@hotmail.com> wrote in message
news:2b3db7ca.0311050941.3dc9ee2c@posting.google.com...
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?
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
 
sleepymish@hotmail.com (Michelle) wrote in message news:<2b3db7ca.0311050941.3dc9ee2c@posting.google.com>...
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?
No. By backplane do you mean PCI?

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?
You might want to try:
http://www.linuxjournal.com/article.php?sid=5442
"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
alann@accom.com
 
sleepymish@hotmail.com (Michelle) wrote in message news:<2b3db7ca.0311050941.3dc9ee2c@posting.google.com>...
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

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
 
"Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message news:<jfgqb.87097$ao4.265693@attbi_s51>...
"Michelle" <sleepymish@hotmail.com> wrote in message
news:2b3db7ca.0311050941.3dc9ee2c@posting.google.com...
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?

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
Yeah I'm been looking all over the web and forums, can't seem to find
anything useful.
 
alann@accom.com (Alan Nishioka) wrote in message news:<a2db9b48.0311051625.39437e89@posting.google.com>...
sleepymish@hotmail.com (Michelle) wrote in message news:<2b3db7ca.0311050941.3dc9ee2c@posting.google.com>...
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?

No. By backplane do you mean PCI?

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?

You might want to try:
http://www.linuxjournal.com/article.php?sid=5442
"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
alann@accom.com
Yes backplane as in the PCI bus of the Linux workstation. I will check
out the article you suggested, thanks!
 
johnjakson@yahoo.com (john jakson) wrote in message news:<adb3971c.0311052351.1f2db0a7@posting.google.com>...
sleepymish@hotmail.com (Michelle) wrote in message news:<2b3db7ca.0311050941.3dc9ee2c@posting.google.com>...
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


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
Xilinx is the vendor.
 
sleepymish@hotmail.com (Michelle) wrote in message news:<2b3db7ca.0311110741.10ae36dc@posting.google.com>...
johnjakson@yahoo.com (john jakson) wrote in message news:<adb3971c.0311052351.1f2db0a7@posting.google.com>...
sleepymish@hotmail.com (Michelle) wrote in message news:<2b3db7ca.0311050941.3dc9ee2c@posting.google.com>...
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


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

Xilinx is the vendor.
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!
 
Followup to: <2b3db7ca.0311111102.31c51e50@posting.google.com>
By author: sleepymish@hotmail.com (Michelle)
In newsgroup: comp.arch.fpga
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?
Anything in /proc is automatically updated by the kernel.

-hpa



--
<hpa@transmeta.com> at work, <hpa@zytor.com> 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
 
sleepymish@hotmail.com (Michelle) writes:

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?
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?
 

Welcome to EDABoard.com

Sponsor

Back
Top