User Tools

Site Tools


Development: Board Configuration

How To

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

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.

Board Support

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.

Creating a Board Configuration

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:

  1. edit the BOARD variable to the name of the directory you created.
  2. edit the DEVICE_PART variable to the name of your FPGA part.
  3. edit CONSTRAINT_FILE variable to the constraint file you have created.
  4. edit FAMILIY_PART to the name of your FPGA family, Altera only.

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.

Adapting 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.

  1. Configure minsoc/backend/my_board/minsoc_defines.v. 2)
    1. Select your FPGA device by uncommenting its manufacturer and commenting all other manufacturers. Select then your FPGA model by uncommenting it. In case your FPGA is neither Altera nor Xilinx, MinSoC's synthesis does not work, use manual synthesis instead.
    2. `define MEMORY_ADR_WIDTH 13 defines the amount of memory you get. The depth is defined by 4⋅2MEMORYADRWIDTH bytes, since its data width is 32 bits, the amount in Bytes is 4 times its depth. 3)
    3. Choose a clock division for your global clock related to your design max speed by changing the definition: “`define CLOCK_DIVISOR 5”. 4)
    4. Define your RESET polarity: uncomment “`define POSITIVE_RESET” for an active high reset or “`define NEGATIVE_RESET” for an active low reset and comment the other.
    5. At the bottom you will find the statement
      `ifdef GENERIC_FPGA

      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
  2. Define user constrains for system pinout. To do so, edit or create minsoc/backend/your_board.ucf file. Here you find some examples of ucf files. More examples are found under minsoc/backend/someboard/someboard.ucf.
    • The constraint file is required to define which FPGA pins are connected to which design ports. You will have to check the user manual for your board. It will tell you which FPGA pins are connected to which board components. Then, change the FPGA pin names inside quotes after <LOC = > for every design port according to the user manual information of your board.

Testing your Board Configuration

Now run the configure script under minsoc/backend/my_board.

cd my_board

Test simulation and synthesis.

  • If the simulation does not work, be sure that you have followed item 1.V. of system adaption.
  • If the design does not fit onto the FPGA, check this link for optimizations.
  • If all went well, your board can be committed to mainstream. Send an email to with subject “board support: my_board” and a compressed file of your my_board directory.

MinSoC's Configuration

System Configuration

All system specific files of MinSoC are found under minsoc/backend. These are:

  • board.h: board information for the enclosed firmwares
  • optional gcc flags when compiling the enclosed firmwares
  • minsoc_bench_defines.v: configuration of testbench
  • minsoc_defines.v: configuration of system
  • orp.ld: memory configuration for the firmware compiled binaries
  • your_board.ucf: synthesis constraints, FPGA pinout

You can tweak configurations by editing these files.

Automatic Configuration

Under each subdirectory of minsoc/backend, there is a configure script which does the following:

  1. copy the system specific files to backend
  2. re-generate project files for simulation and synthesis 5)
  3. copy synthesis project files from minsoc/prj/altera|xilinx to minsoc/syn/buildSupport
  4. patch synthesis project files to include the device part code, xc3sd1800a-4-fg676 for example.
  5. copy xilinx or altera Makefile from minsoc/syn/xilinx|altera to minsoc/syn
  6. patch Makefile to add the name of the constraint file defining the FPGA pinout, spartan3a_dsp_kit.ucf for example.

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.

1) , 5) Please refer to project_definition for further details
2) This link shows recommended values for different devices
3) This is not allowed to be less than 12, 11 is the memory block address width. If you change it from 13, check FAQ: How to adapt the firmware to my implementation?.
4) If your resulting clock is not 25MHz, check FAQ: How to adapt the firmware to my implementation?.
dev/board_configuration.txt · Last modified: 2012/01/16 23:35 by Raul Fajardo