User Tools

Site Tools


Makefiles for SoC Usage

If a well modularized working Makefile system is our base for launching simulation and synthesis, we could really think that some users would go through the trouble of extending/adapting it to their board, as long as there is enough explanation on how to do it.

For now, simulation is working fine without any Makefiles. However, Makefiles can greatly enhance the user experience while creating the bitfile for a target FPGA. In other words, system implementation would become less error-prone with the usage of an automatic system.


  1. Modularized Makefiles
    1. when someone uploads code with a new core to the wiki, they could also upload a makefile module with targets to run simulations or test code for that core. Of course, it's probably wishful thinking to believe that a large number of users would go to that trouble.
    2. I think that way of implementing the makefile system could be a root directory with a general settings file common to all cores and a Makefile that iterates into all subdirectories of the root directory, one per core. But this is only an idea. We should discuss it in detail.
  2. Centralized Makefiles, but board based. Thus, distributed.
    1. The problem with a modular makefile system is that with every layer of modularity, it is harder for a new user to understand the entire makefile and actually trace what the makefile is doing. One options is to have complete makefiles for each board we support, in their own directory, which we can build from a set of modular Makefiles. This way, making changes is centralized, but what is delivered is all in one unit and easy to understand and change for a single board, by the user.

Under utils/contributions/synthesis_makefile:

  1. synthesis of every core into netlists separately, they are joined later during translation. 1)

Implementation based on Matthew's contribution


  1. minsoc_startup has been put to be synthesized out of minsoc (revert this)
    • this does not work as it is because minsoc_startup is not standalone:
      • it contains 3 modules and one hardwired in minsoc_top.v
    • to make it work 2 additional blackbox modules would have to be implemented. This is not so good, better to revert.
  2. create folders with minsoc_define.v files for standard FPGA boards
  3. create a script to input/select a board or input/select specific minsoc_define.v location and device part
    • the script has to create a configuration file or copy/patch the xst/prj files plus add a Makefile to the top directory
  4. Makefile clean needs update for Linux. Remove xmsg and some other directory.
  5. General updates to Makefile, add more dependencies. (even if they are based on minsoc_defines.v?)


  1. done
1) Thanks to Matthew Hicks contribution
pm/makefiles.txt · Last modified: 2011/10/25 14:55 by Raul Fajardo