--- Quote Start ---
the design has to work for every kind of board you can think of. So that means one design has a cyclone 3 and needs the spi, another design has a spartan 6 and needs to use ram, another design has a virtex 6 and needs to use the flash.
--- Quote End ---
You're dreaming, sorry :)
--- Quote Start ---
I am more and more getting the idea, it cannot all be generated automatically or with a lot of my help.
--- Quote End ---
It can all be re-generated automatically using build scripts, however, you have to setup the infrastructure.
Here are your problems;
1. Mixing vendors
Altera, Xilinx, Lattice, Actel, etc. all have different IP blocks that implement the same function, eg., high-speed transceiver, that cannot be instantiated using generic VHDL/Verilog and inference.
Possible solution: You can create wrapper components and select the implementation either using a VENDOR generic, or you can use VHDL configurations.
2. Controlling the tools.
I've tested Altera (Quartus), Xilinx (ISE), and Lattice (Diamond) tools. They can all be scripted using Tcl.
3. Multiple boards, multiple I/O interfaces.
You have to create board-specific designs. Those board specific designs can however contain a re-usable general-purpose block.
For example, lets say you have a board with a GPIO header, and on-board I2C and SPI devices.
Since the I2C and SPI devices can never change, since they're physically soldered to the board, you can create I2C and SPI controllers in a block of registers in a Qsys system (or the other vendor equivalents), include a board ID register, a timestamp register, and a design register.
In the nominal design you can have a GPIO header control registers block.
So long as that register block always exists in the same location, software can identify which implementation is being accessed.
When a user customizes the design, they can delete the GPIO component, and replace it with their component.
4. Code organization
You need to think about how to arrange your code so that its easy to maintain. Here's what I have:
hdl/lib generic code, with Modelsim testbenches
hdl/examples example designs, eg., Qsys systems, may contain generated code, eg., Qsys may need to be run before you can simulate
hdl/boards board-specific folders
For example, here's a couple of designs in several board folders
hdl/boards/de0_nano/cyclone4/share/ source and scripts for the DE0-nano
hdl/boards/de0_nano/cyclone4/basic/ source and scripts for the DE0-nano 'basic' top-level design
hdl/boards/bemicro_sdk/cyclone4/share/ source and scripts for the BeMicro-SDK
hdl/boards/bemicro_sdk/cyclone4/basic/ source and scripts for the BeMicro-SDK 'basic' top-level design
hdl/boards/bemicro/cyclone3/share/ source and scripts for the BeMicro
hdl/boards/bemicro/cyclone3/basic/ source and scripts for the BeMicro 'basic' top-level design
hdl/boards/s4gxdk/stratix4/share/ source and scripts for the Stratix IV GX Development kit
hdl/boards/s4gxdk/stratix4/basic/ source and scripts for the Stratix IV GX Development kit 'basic' top-level design
The folder hierarchy is <board>/<device>/<design>, where device is an FPGA or CPLD on that particular board. Typically a board has several devices, eg., a MAX II system controller and a main FPGA.
Supporting multiple vendors complicates your component management; you have to decide whether you are going to support Altera Avalon, Xilinx OPB, Lattice Wishbone, ARM AXI, etc. Users will expect to be able to use vendor integration tools like Qsys, so you will have to create an Avalon interface to your SPI and I2C controllers, and then create an AXI interface for the AXI users, and a Wishbone interface for the Lattice users ... etc.
Just some ideas for you to ponder.
Cheers,
Dave