This repository contains the steps needed to generate the PULPINO bitstream for a ChipWhisperer 305 (CW305) board with a Artix 7. Specifically, these instructions target the Arty A7-100T board variant, although they may also work with the Arty A7-35T board. Steps are outlined below.
The following steps explain how to set up the PULPINO core for a CW305. This assumes basic familiarity the Linux terminal and Vivado. There are 3 sections. First, there are some requirements which should be met before going to the next steps. Then, there are steps to follow in the Linux terminal. Lastly, there are the steps to follow in Vivado.
- A Linux PC
- Xilinx Vivado 2019.1. This specific version can be found in the
Vivado Archive
. This may work on other versions of Vivado, but it has not been tested. - Board Files compatible with the CW305
- PyEnv
build-essential
for GCC, GIT, etc.- Any text editor
- Clone this repository somewhere.
- In the terminal, run
pyenv init
and follow the outlined steps. - Afterwards, run
pyenv install 2.7.18
andpyenv shell 2.7.18
- Install the
yaml
module withpip install pyyaml
- Clone with
git clone https://github.com/pulp-platform/pulpino.git
- Go into the just cloned folder with
cd pulpino
. - Copy over the
build_env.sh
from this repository into the working directory. - Adjust the
XILINX_PATH
in thebuild_env.sh
to reflect your Xilinx Vivado 2019.1 installation path. This folder will contain aVivado
and anSDK
subfolder. It is usually/opt/Xilinx
or/tools/Xilinx
. - Source the
build_env.sh
withsource build_env.sh
. - Verify that you have the proper python version, by running
python --version
. This should be2.7.18
. If it is not, rerunpyenv shell 2.7.18
. - Run
./update-ips.sh
- Open
fpga/ips/xilinx_fp_fma/tcl/run.tcl
. cd fpga
andmake all
. This will take quite some time and fail but that is expected.
- Open
fpga/pulpino/pulpino.xpr
in Vivado 2019.1. - Go to
Tools -> Settings -> General -> Project Device
. Click the...
. Go to theParts
tab. - Select
xc7a100tftg256-2
. If it does not show up, verify you have installed the board files. If you have the Arty A7-35T variant, you can usexc7a35tftg256-2
, but this is untested. - Click
Apply
and exit menu - This gives a warning. Click okay and accept
synth_2
. - Right click on the
Design Sources
in theSources
tab and clickAdd Sources...
.- Select
Add or create design sources
and click next. - Click
Add files
, navigate to this repository, and select theclocks.v
,cw305_defines.v
,cw305_top.v
,cw305_reg_pulpino
andcw305_usb_reg_fe.v
files from themodules
folder in this repository. - Select
Copy sources into project
and clickFinish
.
- Select
- Now, right click on the
Design Sources
in theSources
tab and clickAdd Sources...
again.- Select
Add or create constraints
this time and click next. - Select the
cw305_main.xdc
from the `modules folder in this repository. - Select
Copy sources into project
and clickFinish
.
- Select
- In the
Sources
tab underDesign Sources
, navigate tocw305_top
, right click and selectSet as top
. - In the
Sources
tab underConstraints
, navigate tocw305_main
, right click and selectSet as Target Constraint File
. - Open the
./rtl/bootcode.sv
and replace the content of themem
array with the content ofbootcode_program
. - Run Synthesis.
- Run Implementation.
- Generate the Bitstream.
If you want to make changes to the Netlist now, you can make your changes in Vivado and run the Synthesis, Implementation, Bitstream steps again. None of the earlier steps need to be reproduced.
make[1]: vivado: No such file or directory
make[1]: *** [Makefile:4: all] Error 127
make[1]: Leaving directory '/home/johndoe/Documents/test-pulpino/fpga/ips/xilinx_clock_manager'
make: *** [Makefile:13: ips/xilinx_clock_manager/ip/xilinx_clock_manager.dcp] Error 2
To fix this, ensure that both the Vivado/bin
and SDK/bin
are in your path.
This can be done by adjusting the build_env.sh
file to contain the proper
XILINX_PATH
and then sourcing the build_env.sh
file from this repository
with source ./build_env.sh
.
These steps were formed by the joined work of:
- Yiheng CAO (@cyhopensource)
- Roua BOULIFA (@roua987)
- Gijs BURGHOORN (@coastalwhite)