SPEAD Station Beam Test
Purpose
This test aims to verify that the contents of the SPEAD Station Beam headers are as expected. The test takes number of beams and beam number of channels as test input. The SPEAD headers are captured using the DAQ and verified against expected values using a predetermined configuration. The test is repeated the specified number of iterations, specifically steps 2 to 7. Default iteration count is 4 iterations.
The station beam SPEAD header is shown below
Methodology
Test preparation.
Region Configuration. Region depends on the test number of beams and beam number of channels.
Starting Beamformer. Starts scans depending on the test number of beams.
Configuration and starting of DAQ.
Metadata received, stopping beamformer and DAQ.
Starting packet counter test. Packet counter is checked if incrementing by 1 for each packet
Starting Scan ID test. Received metadata fields for each scan is compared against expected values.
Beamformer region and SPEAD format is reverted to its initial value before the test began.
In depth methodology explanation
- Test preparation
The test connects to the station and saves initial values so it can revert things after the test has finished
Beamformer information (region and is_running state) and SPEAD format are saved
The test uses the
define_spead_headermethod to change the Station ID to an arbitrarily selected value (9)define_spead_header is also used to set the SPEAD format to the ska_spead_header format
- Packet counter test
Packets in the same frame will have the same packet counter across all frequency channels
Packet counter will need to be filtered by frequency channel first
In the test, all packet counters from the frequency logical channel 0 were saved for testing
- Due to DAQ limitations, the packets might arrive in the middle of the predetermined 1048 DAQ metadata buffer
To fix this, the whole DAQ metadata array is shifted back to compensate
- Scan ID test
A scan is started for each beam that is configured
Packets are sorted depending on their scan IDs
- For each scan ID, the received metadata is compared against expected metadata
In this test, the metadata to be checked are: Frequency ID, Beam ID, Station ID, Substation ID, and Subarray ID
Known test limitations
- Having a large amount of frequency channels makes the DAQ unable to keep up
The test will reject any DAQ captures that are not the expected number of packets
If the DAQ cannot provide the expected number of packets, the test will time out eventually
In this case, please reduce the number of channels. As of now, the full bandwidth is extremely unstable
- Sometimes there are packets that have the wrong value which might be due to a firmware bug
There seems to be some packets that have the expected values except for only 1 field, usually the frequency ID
This can happen more frequently with increasing number of scans
Usually retrying the test will solve this issue