Readme for developers
Point of contact: Frans Schreuder f.schreuder@nikhef.nl
Cloning the repository
This FELIX firmware repository can be cloned on it's own, and contains all the necessary files to generate a bitfile or run a simulation. FELIX is however not complete with firmware alone, and for working with the register map (WupperCodeGen) a part of the software tree is needed. It is therefore recommended to clone the complete FELIX project as follows:
#First clone the toplevel FELIX repository, which is an empty placeholder
#with only some scripts.
git clone ssh://git@gitlab.cern.ch:7999/atlas-tdaq-felix/felix.git
cd felix
#Clone the subrepositories, software, firmware, documents, hardware
./clone_all.sh ssh
#Clone the software subrepositories
cd software
./clone_all.sh ssh
#Now you have a complete FELIX directory tree
N.B: if your branch contains submodules do "git submodule update --init" after cloning
Building firmware
Vivado 2020.1 is recommended for building the firmware.
To create a bitfile from the sources in this repository, two steps are required, but first Vivado and the Xilinx licenses must be available. At Cern, Vivado is installed on the following path:
/afs/cern.ch/work/f/fschreud/public/Xilinx/Vivado/2020.1/
To use Vivado at Cern, one can issue the following commands:
export XILINXD_LICENSE_FILE="2112@licenxilinx"
source /afs/cern.ch/work/f/fschreud/public/Xilinx/Vivado/2020.1/settings64.sh
vivado
Other flavors, e.g. FELIG, also have dedicated tcl scripts.
Creating a project for branches based on phase2/master
In Phase 2 the different flavours are generated from the same project and the same toplevel VHDL file. Therefore the different flavours are built using different do_implementation*.tcl scripts. For all flavours
cd felix/firmware/scripts/FELIX_top
vivado
Then from the Vivado tcl console:
#To create the project, replace FLX712 with FLX709 when building for the VC709 card
source ./FLX712_FELIX_import_vivado.tcl
#To run synthesis, implementation and create a bitstream in felix/firmware/output
source ./do_implementation_BNL712_GBT.tcl #GBT mode
source ./do_implementation_BNL712_FULL.tcl #FULL mode
#There are more flavours in that directory that can be built with similar scripts
Sharing bitfiles
Bitfiles can be shared through the Cernbox user interface. For details, and other useful information about firmware development, please check the felix-developer-manual