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
        }
    }
],

Executing the Configure Script

The BITE can be configured to generate Test Data for a given test via the midcbf_bite.py script, which instantiates a BITE client for each desired Talon. Assuming all required Talons are available, and all the device servers required for BITE are running on them, BITE configuration can be initiated by running the midcbf_bite.py script with the –talon-bite-config argument and one of the two arguments for specifying the configuration data. Either specify the ID of the BDD Test for which the BITE is to be configured; or specify the name of the desired set of CBF Input Data. These amount to the same thing, as each test is defined with a corresponding set of input data. Either:

python3 midcbf_bite.py --talon-bite-config --test <Test ID>

or:

python3 midcbf_bite.py --talon-bite-config --input_data <CBF Input Data>
  • <Test ID> specifies a desired system test from tests.json. Provide only the number in the test ID, i.e. --test 1 for “Test 1”, --test 2 for “Test 2”. The CBF input data associated with that test ID will be used in configuring the BITE client(s) to generate data for that test.

  • <CBF Input Data> specifies a set of CBF input data from cbf_input_data.json This will configure BITE for all the receptors defined in that set of input data, according to the Dish ID, BITE configuration ID, Talon board, and initial timestamp offset defined for each.

The Talon BITE configuration can be manually initiated from the EC-BITE docker container, assuming that all device servers are already running on all Talon boards required by the CBF Input Data. However, if doing so, the BITE client will expect to find all four of the required parameter files and all four schema files in their proper place, in the docker container. That is, the parameter files must be located in the EC-BITE container at <namespace>/engineering-console-bite:/app/test_parameters, and the schemas at :/app/schemas. These files will have been manually copied to that location, or they will have been copied when the signal chain verification test has last been run. If the user is trying to configure BITE manually from the EC-BITE container, they must ensure that the files are in their proper place, or the BITE configuration will error out.

If all is well, the --talon_bite_config argument will instantiate a BITE client for each specified board, which will initialize Tango device proxies for each device server, assuming that each device server required for BITE is listed in device_server_list.json. Each BITE client reads values from the parameter files and writes them to the Tango device proxies which it has initialized in the previous step; in doing so, the values are written to the device servers (and, thus, to the IP blocks required by BITE) to configure them properly. Values are also written to the device servers which will control them in their generation of BITE data. The BITE Sequence Diagram provides more information on which values are written where, and in what sequence, in the BITE configuration.

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