Skip to content

NewProjectInsertion

Ryan Johnson edited this page Aug 13, 2020 · 2 revisions

Inserting a New Project into fpga-tool-perf

These are the basic steps to inserting an existing project into fpga-tool-perf:

Step 1.

Add a folder within fpga-tool-perf/src under the name of the project. For example, for a project named counter:

cd ~/fpga-tool-perf/src
mkdir counter
cd counter

Add the source (verilog) and data/memory files to this directory.

Create a constr subdirectory, and within it, add the project's .pcf (for symbiflow) and .xdc (for vivado) files under the name of the board it uses.

mkdir constr
touch constr/basys3.pcf
touch constr/basys3.xdc

If you don't have both the .pcf and .xdc files, You can look at the other projects for examples of how the .xdc code and .pcf code correspond.

Step 2.

Within the project directory, create a .json file under the name of the project. Copy the contents of another project's .json file and modify it to match your project's specs. It will look like something like this:

{
    "srcs": [
        "src/counter/counter.v"
        ],
    "top": "top",
    "name": "counter",
    "clocks": {
        "clk": 10.0
    },
    "toolchains": {
        "vpr": {
            "basys3": ["basys3.pcf"]
        },
        "vpr-fasm2bels": {
            "basys3": ["basys3.pcf"]
        },
        "vivado": {
            "basys3": ["basys3.xdc"]
        },
        "vivado-yosys": {
            "basys3": ["basys3.xdc"]
        }
    },
    "vendors": ["xilinx"]
}

Step 3.

Test the newly added project with vpr and vivado. For example:

python3 fpgaperf.py --project counter --toolchain vpr --board basys3
python3 fpgaperf.py --project counter --toolchain vivado --board basys3

There may be errors if your .xdc or .pcf files have the wrong syntax. Debug, modify, and run until it works, and you have successfully added a new project to fpga-tool-perf.


Initially created by Ryan Johnson, August 2020.

Clone this wiki locally