BITE Client

BITE is the built-in test environment for the Talon DX board. The BITE client is running in the Engineering Console container that runs on the Linux server (either standalone, or in a pod in the Kubernetes cluster). The BITE client communicates with Tango device servers running on the Talon DX board to monitor and control the FPGA firmware that generates the Long Sequence Test Vectors (LSTVs) used to test the correlator signal chain.

BITE Configuration

Input Parameter Files

There are four parameter files which are to be used in configuring the BITE for LSTV generation. Each of these has an accompanying schema file, against which the BITE client (or BDD test) will validate the input parameter files. The parameter files can be found in the ska-mid-cbf-system-tests repository, in the test_parameters directory. They are:

The schemas for these are located in the same relative locations in the ska-mid-cbf-internal-schemas repository, but have “_schema.json” at the end of their names. They are:

The tests.json parameter file contains a series of BITE tests. They are labelled by a Test ID, in the format of “Test 1” “Test 2”, etc., and each of them is defined with a set of test parameters according to their test scope and scan configuration. The “cbf_input_data” property associated with each Test ID links that test to a set of properties defined in the cbf_input_data JSON file above. These sets of CBF Input Data are named in this style: “BITE Data 1”, “BITE Data 2”, etc. Each is defined (in the aforementioned JSON) with an array of receptors; each receptor is defined in turn with a dish id, a bite configuration ID, a Talon board, and the initial timestamp of the BITE data that will be generated.

The bite configuration ID corresponds with an identically-named ID in the “bite_configs.json”. These are named in the style of “BITE 1”, “BITE 2”, etc., and they are each given a brief summary in their “description” property to make up for the nondescript ID. Each bite configuration herein is defined with an array of Gaussian noise sources, an array of tone generators, and other parameters specific to LSTV generation and sample rate.

Each element in the source array must be given a description, Gaussian noise parameters, a polarization coupling rho, and, if desired, the number of coefficients with which this source’s filters will be defined (along with the bit width in which each coefficient is to be represented and stored). Each noise source is divided into the two polarizations, always termed “pol_x” and “pol_y”, and each of these is parameterized with the mean, standard deviation, and seed of the Gaussian noise it will generate. Furthermore, each polarization must be given a filter type, as named in the filters.json file in the list above.

"sources": [
    {
        "description": "Noise input, independent between X and Y pols; unique filter shapes for X and Y pols.",
        "gaussian": {
            "pol_x": {
                "seed": 1234,
                "filter": "filter_ramp_up",
                "noise_std": 32767,
                "noise_mean": 0

            },
            "pol_y": {
                "seed": 9876,
                "filter": "filter_ramp_down",
                "noise_std":32767,
                "noise_mean":0
            }
        },
        "pol_coupling_rho": 0.0,
        "pol_Y_1_sample_delay": false,
        "fir_filter_num_taps": 1024,
        "fir_filter_coeff_bits": 16
    }
],

Each tone in the array of tone generators is similarly given a description, and divided into X and Y polarizations. Each of these components is defined with a frequency and an amplitude scaling factor.

"tone_gens": [
    {
        "description": "Basic 100 MHz tone.",
        "pol_x": {
            "frequency": 100e6,
            "scale": 0.0025
        },
        "pol_y": {
            "frequency": 333.3333333e6,
            "scale": 0.0025
        }
    }
],

Bite Configuration from BDD Tests

Mid CBF AA0.5 Test Strategy Mid CBF Signal Chain Verification

BITE Sequence Diagram

@startuml test
    skinparam backgroundColor #EEEBDC
    skinparam sequence {
    ParticipantBorderColor DodgerBlue
    ParticipantBackgroundColor DeepSkyBlue
    ActorBorderColor DarkGreen
    ActorBackgroundColor Green
    BoxBorderColor LightBlue
    BoxBackgroundColor #F0FFFF
    }
    box "Engineering Console"
    participant "BITE\nClient" as BiteClient
    end box

    box "Talon DX"
    participant "Gaussian\nNoise\nGen rcv X" as NoiseRcvX
    participant "Gaussian\nNoise\nGen rcv Y" as NoiseRcvY
    participant "Gaussian\nNoise\nGen src X" as NoiseSrcX
    participant "Gaussian\nNoise\nGen src Y" as NoiseSrcY
    participant "Polarization\nCoupler 0" as PolCoupler
    participant "FIR Filter\nrcv polX" as FiltRcvX
    participant "FIR Filter\nrcv polY" as FiltRcvY
    participant "FIR Filter\nsrc polX 0" as FiltSrcX
    participant "FIR Filter\nsrc polY 0" as FiltSrcY
    participant "LSTV\nGen" as LSTVGen
    participant "LSTV\nReplay" as LSTVReplay
    participant "SPFRx\nPacketizer" as Packetizer
    end box


    note left
        stop any previous LSTV replay
     end note
    BiteClient -> LSTVReplay ** : run = 0)

    note left
        stop/reset any previous LSTV generation
    end note
    BiteClient -> LSTVGen ** : CMD ip_control(False)

    BiteClient -> NoiseSrcX ** : noise_mean = 0)
    BiteClient -> NoiseSrcX ** : noise_std = 32767)
    BiteClient -> NoiseSrcX ** : seed_ln = 1322)
    BiteClient -> NoiseSrcX ** : seed_cos = 1323)
    BiteClient -> NoiseSrcY ** : noise_mean = 0)
    BiteClient -> NoiseSrcY ** : noise_std = 32767)
    BiteClient -> NoiseSrcY ** : seed_ln = 1323)
    BiteClient -> NoiseSrcY ** : seed_cos = 1324)
    BiteClient -> PolCoupler ** : delay_enable = 0)
    BiteClient -> PolCoupler ** : alpha = 0)
    BiteClient -> PolCoupler ** : beta = 65535)
    BiteClient -> NoiseRcvX ** : noise_mean = 0)
    BiteClient -> NoiseRcvX ** : noise_std = 32767)
    BiteClient -> NoiseRcvX ** : seed_ln = 1322)
    BiteClient -> NoiseRcvX ** : seed_cos = 1323)
    BiteClient -> NoiseRcvY ** : noise_mean = 0)
    BiteClient -> NoiseRcvY ** : noise_std = 32767)
    BiteClient -> NoiseRcvY ** : seed_ln = 1323)
    BiteClient -> NoiseRcvY ** : seed_cos = 1324)
    BiteClient -> FiltRcvX ** : filter_coeff = [0 0 0 ... 0 0 0])
    BiteClient -> FiltRcvY ** : filter_coeff = [0 0 0 ... 0 0 0])
    BiteClient -> FiltSrcX ** : filter_coeff = [0 0 0 ... 0 0 0])
    BiteClient -> FiltSrcY ** : filter_coeff = [0 0 0 ... 0 0 0])
    BiteClient -> LSTVGen ** : CMD tone_select(0)
    BiteClient -> LSTVGen ** : CMD ip_control(False)
    note left
        allocate memory for LSTV, start address, in units of 64 bytes
    end note
    BiteClient -> LSTVGen ** : ddr4_start_addr = 33554432)
    BiteClient -> LSTVGen ** : ddr4_end_addr = 134217727)
    BiteClient -> LSTVGen ** : CMD source_select(1)
    BiteClient -> LSTVGen ** : CMD receiver_select(0)
    BiteClient -> LSTVGen ** : source_mean_polX = [0 0 0 0])
    BiteClient -> LSTVGen ** : source_mean_polY = [0 0 0 0])
    BiteClient -> LSTVGen ** : source_std_polX = [65535     0     0     0])
    BiteClient -> LSTVGen ** : source_std_polY = [65535     0     0     0])
    BiteClient -> LSTVGen ** : receiver_mean_polX = 0)
    BiteClient -> LSTVGen ** : receiver_mean_polY = 0)
    BiteClient -> LSTVGen ** : receiver_std_polX = 65535)
    BiteClient -> LSTVGen ** : receiver_std_polY = 65535)
    BiteClient -> LSTVGen ** : CMD ip_control(True)
    loop
        BiteClient -> LSTVGen ++ : POLL ip_status
    end
    alt #LightGreen Success
    LSTVGen -> BiteClient : ip_status==True
    else #Orange Timeout
        LSTVGen -> BiteClient -- : ip_status==False
    end

    BiteClient -> LSTVGen ** : CMD ip_control(False)
    BiteClient -> Packetizer ** : CMD bringup(123)
    BiteClient -> Packetizer ** : sample_rate_band12 = 3963617280)
    BiteClient -> Packetizer ** : rem_mac = 167141258439494)
    BiteClient -> Packetizer ** : loc_mac = 17739075048806)

    note left
        begin LSTV playback
    end note
    BiteClient -> LSTVReplay ** : run = 0)
    BiteClient -> LSTVReplay ** : sample_rate = 3963617279)
    BiteClient -> LSTVReplay ** : samples_per_cycle = 24319438)
    BiteClient -> LSTVReplay ** : start_utc_time_code = 1661809893)
    BiteClient -> LSTVReplay ** : lstv_start_addr = 33554432)
    BiteClient -> LSTVReplay ** : lstv_end_addr = 134217727)
    BiteClient -> LSTVReplay ** : run = 1)

@enduml