Re: FPGA programming driver architecture



On Thu, 8 Jan 2009 20:14:36 -0200
"Thiago Galesi" <thiagogalesi@xxxxxxxxx> wrote:

Hi,
I have written some code to program a FPGA in Linux, for two
different types of boards: one uses a serial interface (SPI) and
the second a parallel interface. I have been able to sucessfully
program both boards. I'm now trying to clean my code and make it
more generic, as well as better in line with the Linux driver
model.

Considering the several FPGA models available and ways to program it,
I guess the important thing to consider is what can be made generic.
(that is what will become fpgaload)

I have a pretty good idea of what goes into the core and
what goes into the specific interface modules (spi, parallel, etc).

Also, there may be cases where after FPGA is programmed it "becomes a
device" (PCI or whatever)

This is exactly the case for my board, but it doesn´t change anything
to the programming side of things, apart for the fact that the FPGA
must be configured before using any in-FPGA PCI bus for example.

- fpgaload-core which contains all the code that can be shared
between the drivers like requesting firmware, providing sysfs
attributes,
- fpgaload-spi would handle the low-level SPI connection
- fpgaload-par would handle the low-level parallel connection

I think this maybe split into three layers (maybe)

1 - low level connection: paralell / spi / i2c / whatever
2 - vendor: xylinx, altera, etc
3 - generic stuff

Take a look at the MTD and SPI drivers and how they split things

I think that for the moment, I will focus on implementing the core
module and the parallel/SPI interfaces only. Later we may want to add
more fonctionality (vendors, JTAG, etc).

But for now, my main problem is that I need to have some insight on how
I actually implement the different modules:

Bus driver?
class driver?
platform driver?

Can anybody give some advice on that?

Thank-you, Hugo.

---------------
Hugo Villeneuve
www.hugovil.com
---------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [spi-devel-general] Accelerometer, Gyros and ADCs etc within the kernel.
    ... say the HW SPI is pushed down to some lower level driver. ... interface via sysfs and something similar to the input subsystems ... a larger ring buffer in the kernel if necessary. ...
    (Linux-Kernel)
  • Re: FPGA programming driver architecture
    ... I have written some code to program a FPGA in Linux, ... the second a parallel interface. ... currently it is a platform driver. ... The fpgaload driver is a char ...
    (Linux-Kernel)
  • Re: Stuck creating sysfs hooks for a driver..
    ... You must stay away from writing a driver for the board itself. ... 1* A driver for the SPI interface of your board (basically a parallel ... port SPI bridge). ... This driver doesn't care about what chip is ...
    (Linux-Kernel)
  • Re: FPGA programming driver architecture
    ... I have written some code to program a FPGA in Linux, ... the second a parallel interface. ... Considering the several FPGA models available and ways to program it, ... even have SPI etc front-ends. ...
    (Linux-Kernel)
  • SPI driver development questions
    ... I have to develop an SPI device driver to make a PowerPC ... I'm using 2.6.16 kernel with support for the spi subsystem enabled. ... What I'd like to do is to be able to program my FPGA from user space ... Do I have to write a SPI Master Controller Driver for the 5200 first ...
    (Linux-Kernel)