DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Download a copy of the FELIX firmware here.
Note, to get the 10 link build with the TPG firmware download the file starting with flx712-dune-ipbus-pod-10hf
To program the FELIX card, you can use Vivado if you have not setup a dunedaq envirnomnent (see below), otherwise, you can use the low level tool fflashprog
to flash the correct partition on the card. Each method uses a different file type, both of which are provided in the download.
To program with Vivado, you need to ensure you have X-11 forwarding or a VNC if you are connecting to the machine remotely, a copy of the .bit file of the firmware and can run as sudo
or root
on the machine you are working on. Run vivado:
and a GUI should appear, under Tasks select the option "Open Hardware Manager", then "tools" -> "open new target". This will open a window where you can connect to hardware locally or via a remote server. Assuming this is the machine with the FELIX card installed connect to local server and in the next window look for a hardware device (bottom table) with the device name including xkcu115
. Click next then finish. You should see the device appear on the hardware tab on the left. Now click "tools" -> "program device" -> "xkcu115" and then specify the bitstream (.bit) file and click program. I the programming worked then you should see no errors in the tcl console (some warnings may appear but can be ingored), and now you can close vivado and reboot the machine with the FELIX card:
fflashprog
:To program with fflashprog
ensure you have a copy of the .mcs file of the firmware, already have a working dunedaq environment or a copy of the low level tools and can run as sudo
or root
on the machine you are working on. Then run the commands:
to program the FELIX card (card number denoted by -c
). Then to check if the firmware is programmed with the correct firmware:
Finally, the machine needs to be fully power cycled for the firmware image to corectly load.
Note, the -f command indicates which partition to program, if programming on partition 3 doesn't work, run flx-info
to get the correct partition number or program the card using vivado.
To install drivers for the FELIX card follow the instructions to setup local drivers:
https://github.com/DUNE-DAQ/flxlibs/wiki/Local-driver
Ensure the FELIX is programmed, the first check is to enable and get the status of the drivers:
if you see the following output after starting the drivers:
then it has successfully worked, if you see errors, then reboot the machine and try again.
Note you can ignore error messeges about regmap verision mismatches
First ensure you have setup a dunedaq enivronmet, following these instructions: https://dune-daq-sw.readthedocs.io/en/latest/packages/daq-buildtools/#running-a-release-from-cvmfs
Now to get access to the integration test scripts and create test configurations, clone the flxlibs repository:
Clone dtp-pattens in your working directory, a repository containing fake data patterns to test with the FELIX:
Integration test scripts are located in flxlibs/scripts/integration-tests
run the bash script:
which will test the capability to reset the state of the FELIX, monitor optical links and configuring the card e.g. enabling elinks.
run the bash script:
which will configure the card to play data from the internal emulator on the ADC links. this will run the fdaq command for each SLR. If the test is successful you should see a non-zero data rate received by the FELIX.
to test receiving data over optical links you need to first run the following command:
then in a second terminal you must enable the front end device to play data (include zcu102 instructions here?). If the test is successful you should see a non-zero data rate once the front end device is configured.
First run on a SLR 0 and 1 separately:
This will run fdaq
, then configure the firmware TPG with hfButler.py
and then spy on the link processors. if successful you should see the link processor state change over time for ~60s. After 60s the page will stop updating and you can safely kill the process (ctrl-C). Note you will also get an output file which logs the output of fdaq
, as well as a binary file with the dumped TP's processed by the card.
Now run with both SLR's simultaneously:
This will run fdaq
for each SLR for 60s and as before a log file plus binary file of dumped tp's are produced.
Run the bash script
this will configure the card to play data from the internal emulator, run fdaq
then configure the hitfinding tpg in gbt mode i.e. process data from elinks. The outputs of fdaq are stored in log files. if successful you should see the data rate increase twice, once when the adc data is received and then again when the tpg is configured.
First run the bash script
then configure the front end to produce data. now in another terminal run the bash script:
which will configure the hitfinding tpg to process data from the elinks. this will produce an output file for each fdaq
run and if you want to monitor the link processors of the tpg then run set_gbt.sh
with these arguements instead:
First ensure you are able to ssh into the machine you are working in, as nanorc will run the various DAQ modules as localhosts.
A custom command to raw record data is provided: flxlibs/scripts/integration-tests/record-cmd.json
, which should be copied in the work area.
to generate a 10 ADC link configuration run the following command:
where -e
enables generation of fake timestamps when using fake data patterns and -E
enables the internal emulator. Then run the following:
once in the daq_application run the commands:
and you should see dataflow on the datalinkhandlers. the key is to look for non-zero values in the following flags in the output file info_333.json
:
and the following should be zero if there is no errors
Note that during the start of dataflow some errors can occur, but this is due to data being readout between the start and end of a chunk.
To record the raw ADC to file you need to run the expert command which runs the json file record-cmd.json
.
To stop the test run the following:
if the application terminates correctly nanorc will print an exit code 255.
run the following command:
which prevents the internal emulator from running. Then run the following:
once in the daq_application run the commands:
and here you should see no dataflow on any link handlers. Now configure the front end device to send data along the optical fibers and you should see the link handler information update similar to the previous test.
To record the raw ADC to file:
To stop the test run the following:
run the following command:
run the daq_app as before:
and then enable the wibulator in another terminal:
and you can spy on the link processors by adding either watch-0
or watch-1
as an argument. If successful you should see dataflow on the two link handlers.
To record the raw ADC to file:
To stop the test run the following:
run the following command:
run the daq_app as before:
now enable the hitfinding TPG in GBT mode:
and you should see dataflow on link handlers 5 and 11. Note the TP links which have a smaller data rate than the adc links.
To record the raw ADC to file:
To stop the test run the following:
run the following command:
run the daq_app as before:
Next configure the front end to send data. Once done the adc links should have non zero data rates.
Now enable the hitfinding TPG in GBT mode:
and you should see dataflow on link handlers 5 and 11.
To record the raw ADC to file:
To stop the test run the following:
nanorc
Create the following nanorc configuration:
to raw record data in nanorc you must create a file record-cmd.json
with the following contents:
Now, depending on the tpye of data to readout you can follow the above steps to configure the FELIX a certain way. Here we will show how to readout data from the internal emulator.
In a new terminal (with the dunedaq environment setup), configure the card:
In another terminal run nanorc:
Which will boot the localhosts, initilise and configure the card, start dataflow, wait 60s stop and terminate the program. During the wait period (a small loading bar will appear), configure the firmware tpg to process data from the elinks:
and once this is done you can record data for 1s using this command:
note if you are unsure of your local host url it will appear during the boot process of nanorc e.g. http://np04-srv-30:3336/
if you are unable to run the above commands in time then extend the wait period, and if you want to record for more than 1s you can modify record-cmd.json but be warned, the data rate is very high. if successful, you will see output files for each link with a rather with file sizes of ~1GB.