FPGAs and Linux

N

Neil Zanella

Guest
Hello,

I would like to know, how hard would it be to program an FPGA so that it
can communicate with a Linux kernel, and/or write a Linux driver for the
corresponding VHDL-programmed FPGA. Has anyone done anything similar?

Thanks,

Neil
 
Neil Zanella wrote:
Hello,

I would like to know, how hard would it be to program an FPGA so that it
can communicate with a Linux kernel, and/or write a Linux driver for the
corresponding VHDL-programmed FPGA. Has anyone done anything similar?
Depends. ;^)

Since the FPGA has to talk to the same hardware, designing the circuitry
in the FPGA is exactly identical - independent of the OS.

Writing a driver is easier than in Windows. In its simplest form you
compile a single 'C' file and load the resulting object file into the
running kernel.

This is a minimal driver:

#define MODULE
#include <linux/module.h>

/* This is run when the driver is inserted into the kernel */
int init_module(void)
{
printk("<1>Hello world.\n");
return 0;
}

/* This is run when the driver is removed from the kernel */
void cleanup_module(void)
{
printk("<1>Godbye world.\n");
}

Here is a good book:

http://www.xml.com/ldd/chapter/book/

Kind regards,

Iwo
 

Welcome to EDABoard.com

Sponsor

Back
Top