If your board is supported, you find a subdirectory under minsoc/backend with your board name. Go to that subdirectory and run the configuration script:
cd minsoc/backend/my_board ./configure
Your system is now configured, you can proceed with the synthesis.
If your board is not supported and it embeds an Altera or Xilinx FPGA, create a board support. This way, simulation and synthesis can be done in MinSoC's standard way.
For boards with FPGAs from other manufacturers, the MinSoC's Makefile system for synthesis will not work. Simulation should work normally, as far as you edit the files but leave them in their current location. For synthesis, proceed to manual synthesis.
As long as a board embeds an Altera or Xilinx FPGA, you can create its support to MinSoC in the 3 following steps. Although it is not necessary, I recommend you to read MinSoC's Configuration before proceeding, so you understand what you are doing.
Create a subdirectory of backend with the name of your board, minsoc/backend/my_board for example.
cd minsoc/backend mkdir my_board
Then, copy either the contents of an Altera or Xilinx backend subdirecotories to your subdirectory. For Xilinx, use std, for Altera altera_3c25_board.
cp std/* my_board/
Go to your subdirectory and edit the configuration script.
cd my_board gedit configure
Updating the configuration script:
Save and exit.
Extensions: If you have included other modules by creating project files, add them using the SYN_FILES. 1) If your project has extra system specific files, include them to BOARD_FILES.
Proceed now to adapt the system to your board.
This section guides you in adapting MinSoC to your custom board. In the linked pages of the text, some files are said to be located under various directories. You have to edit the files under minsoc/backend/my_board instead. The only exception is or1200_defines.v, but you can as well ignore the configuration of this file.
Below this, you need to undefine the FPGA family and FPGA manufacturer. This is used during simulation, when GENERIC_FPGA is defined by the test bench. For instance, if you chose a XILINX_FPGA and SPARTAN3E, you would include
`undef XILINX_FPGA `undef SPARTAN3E
Now run the configure script under minsoc/backend/my_board.
cd my_board ./configure
All system specific files of MinSoC are found under minsoc/backend. These are:
You can tweak configurations by editing these files.
Under each subdirectory of minsoc/backend, there is a configure script which does the following:
This way, simulation and synthesis are ready.
If your board is not currently supported in MinSoC, this link explains how to create a board support for it.
In some circunstances, you may want to develop several MinSoC based projects with different modules and, maybe, using different FPGA's vendors.
For this situation you have two options:
The first option means that you will have a lot of redundant directories into your system and for each update in MinSoC you will need to update all your repos. For the second option, you need to make your directory, copy (by hand) your minsoc_defines.v and minsoc_top.v files and write your own Makefile (among other things) for each project. This breaks the usability and facility of the board-based configuration scripts described above.
So, for the case you need to deploy several instances of MinSoc, there is a script called minsoc_prepare.sh into minsoc/utils/setup/ directory.
When you launch this script from your current directory, it ask you for some params like device vendor and part and generates all the necesary files for sinthesis.
Actually, this script only has support for Altera devices (althought it ask for Xilinx ones too). The usage is in this way:
By now, the script is in an early stage and is not yet completed. Althought it can deploy a complete project based on Altera's devices, it has several limitations: