Skip to content

Integration tests

ShyamB97 edited this page Feb 3, 2022 · 23 revisions

Initial setup

Drivers:

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:

sudo <location of local drivers>/drivers_flx start
sudo <location of local drivers>/drivers_flx status

if you see the following output after starting the drivers:

Starting cmem driver 
major number for cmem_rcc is 238

Starting io_rcc driver 
major number for io_rcc is 237

2 flx PCIe endpoints found
Starting flx driver 
major number for flx is 236
creating node /dev/flx0
creating node /dev/flx1

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

DUNEDAQ software:

First ensure you have setup a dunedaq-v2.8.2 enivronmet, following these instructions: https://github.com/DUNE-DAQ/minidaqapp/wiki/Instructions-for-setting-up-a-v2.8.2-development-environment

Clone dtp-pattens in your working directory, a repository containing fake data patterns to test with the FELIX:

git clone ssh://[email protected]:7999/dune-daq/readout/dtp-patterns.git

Running tests

Note all scripts will test the low level tools from the software suite

Test low levels tools and readout ADC data with fdaq:

Now you should be able to run the test script which will do the following:

  • low level tools flx-reset, flx-init and flx-info
  • enable elinks and set superchunk factor of a single link using flx-config
  • load the internal emulator with a fake data pattern FixedHits_A

To readout data from FELIX playing pattern file FixedHits_A from the internal emulator:

./run_test_fdaq.sh

If the test ran successfully then you should see an output binary file containing ADC data readout by the FELIX.

Readout ADC+TP data with fdaq:

First you must create a minidaq configuration capable of reading out raw data from a real FELIX card. It is ususally best to do this in a new directory as a lot of output files can be produced and replaced without warning

To create the configuration run the command

python -m minidaqapp.nanorc.mdapp_multiru_gen -f -e -n 1 --enable-raw-recording mdapp

which will create minidaq configuration files in the directory mdapp, for one link.

To enable raw recording during readout you need the file record_cmd.json in your directory.

To readout raw ADC data with the dunedaq software run the following test script:

./tests/run_test_readout_ADC.sh <minidaq config directory> <run number>

e.g.

./tests/run_test_readout_ADC.sh mdapp 001

you should see output files produced (one per link), trigger records in .hdf5 file format, info files and log files per application module.

Need to upload test scripts and record_cmd.json

Need to include instructions for testing hitfinding with low level tools