SPEAD Raw ADC Test

Purpose

This test verifies the SPEAD header fields of the raw ADC data coming from the LMC module in the firmware. The SPEAD packets are captured using the DAQ receiver. This test uses the SPEAD header metadata passed by the DAQ for verifcation. Given below is the SPEAD header specification which is verified in this test.

../../_images/raw_adc_spead_header.png

Raw ADC data can be requested in two configurations, synchronised and non-synchronised. For synchronised mode, each TPM sends 16 SPEAD packets (8 per FPGA), where each packet contains data from 8 antennas (antennas 0-7 for FPGA 0 and 8-15 for FPGA 1). Since the data is synchronised, the timestamp fields in the SPEAD headers are equal between the packets. For non-synchronised mode each TPM sends 128 packets (8 per antenna); the packets do not contain data from multiple antennas unlike the synchronised mode. Therefore, the timestamp field increments when the FPGAs’ output goes from one antenna to the next (every 16 packets per TPM).

NOTE: This test operates on all TPMs in a station individually (when single_tpm_id=-1). For data acquisition to function correctly, the network interfaces on the TPM must be working, as well as the link to the LMC destination. The LMC destination must be configured to route traffic to the server running the tests. For all tests the simplest option is for the CSP and LMC destinations to be the same network interface, routing all traffic to the server running the tests.

Methodology

  1. Establish connection to the station and specified TPM(s).

  2. Configure and initialise the DAQ receiver with the required UDP port and network interface.

  3. Start the DAQ in Raw ADC data mode.

  4. Set expected values to the SPEAD header fields.

  5. Request synchronised raw ADC data for a specific TPM.

  6. Wait for the DAQ to receive data.

  7. Extract the spead header fields from the data callback.

  8. Verify SPEAD header fields by comparing with the expected values.

  9. Update the expected values as necessary for non-synchronised mode.

  10. Request non-synchronised Raw ADC data from the TPM.

  11. Repeat steps 6-8 for verifying non-synchronised data.

  12. Repeat steps 4-11 for other TPMs in the station (if single_tpm_id=-1).

  13. Stop the DAQ and clean up temporary directory.