Sign in

username:

password:



Not a member?

Search Comp.Arch.FPGA



Search tips

fpga by Keywords

Altera | ASIC | CPLD | Cyclone | DCM | DDR | DSP | Ethernet | ISE | JTAG | Linux | LVDS | Microblaze | ML310 | Modelsim | NIOS | OPB | PCI | Quartus | RocketIO | SDRAM | Spartan | Spartan3 | SRAM | Stratix | Verilog | VHDL | Virtex | Virtex-4 | Virtex-II | Xilinx | XST

Ads

See Also

DSPEmbedded SystemsElectronics

Comp.Arch.FPGA | Linux and FPGA compatibility

There are 10 messages in this thread.

You are currently looking at messages 0 to 10.

Linux and FPGA compatibility - Michelle - 2003-11-05 12:41:00

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
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.



Re: Linux and FPGA compatibility - Glen Herrmannsfeldt - 2003-11-05 19:05:00

"Michelle" <s...@hotmail.com> wrote in message
news:2...@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


______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: Linux and FPGA compatibility - Alan Nishioka - 2003-11-05 19:25:00

s...@hotmail.com (Michelle) wrote in
message news:<2...@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
a...@accom.com
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: Linux and FPGA compatibility - john jakson - 2003-11-06 02:51:00

s...@hotmail.com (Michelle) wrote in
message news:<2...@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

Re: Linux and FPGA compatibility - Michelle - 2003-11-11 10:39:00

"Glen Herrmannsfeldt"
<g...@ugcs.caltech.edu> wrote in message
news:<jfgqb.87097$ao4.265693@attbi_s51>...
> "Michelle" <s...@hotmail.com> wrote in message
> news:2...@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.

Re: Linux and FPGA compatibility - Michelle - 2003-11-11 10:40:00

a...@accom.com (Alan Nishioka) wrote in message
news:<a...@posting.google.com>...
> s...@hotmail.com (Michelle) wrote in message
news:<2...@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
> a...@accom.com

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

Re: Linux and FPGA compatibility - Michelle - 2003-11-11 10:41:00

j...@yahoo.com (john jakson) wrote in
message news:<a...@posting.google.com>...
> s...@hotmail.com (Michelle) wrote in message
news:<2...@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.
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: Linux and FPGA compatibility - Michelle - 2003-11-11 14:02:00

s...@hotmail.com (Michelle) wrote in
message news:<2...@posting.google.com>...
> j...@yahoo.com (john jakson) wrote in message
news:<a...@posting.google.com>...
> > s...@hotmail.com (Michelle) wrote in message
news:<2...@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!

Re: Linux and FPGA compatibility - 2003-11-11 14:21:00

Followup to: 
<2...@posting.google.com>
By author:    s...@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



-- 
<h...@transmeta.com> at work, <h...@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

Re: Linux and FPGA compatibility - 2003-11-11 16:26:00

s...@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?
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.