BeamfFD

Overview

This plugin is responsible for managing the TPM FPGA firmware tile beamformer; producing calibrated 16-antenna beams for the configured course frequency channels. This includes:

  • Region selection

  • Calibration

  • Antenna summation

  • Beam pointing

  • Beam tracking

Python Class & Methods Index

class ska_low_sps_tpm_api.plugins.beamf_fd.BeamfFD(board, logger=None, **kwargs)[source]

Frequency Domain Beamformer plugin

__init__(board, logger=None, **kwargs)[source]

BeamformerFD initialiser.

Parameters:

board – Pointer to board instance

check_errors()[source]
clear_errors()[source]
compute_calibration_coefs()[source]

Compute the calibration coefficients and load them in the hardware. To be used after load_cal_curve(), load_antenna_tapering() and load_beam_angle

Obsolete, does not support subarrays, kept for backward compatibility

current_frame()[source]

Return current frame processed by the tile beamformer

Returns:

current frame number, in units of 256 ADC frames (276,48 us)

get_delay(beam_index)[source]

This method retrives the approximate input delay and delay rate specified for all 8 antennas for a given beam. beam_index specifies which beam is being specified (current range 0-7) from 0-47 (in the future)

Parameters:

beam_index (int) – hardware station beam to program. Range 0-7 (0-47 in future firmware)

Returns:

A list of the input delay and delay rate all 8 antennas for a given beam index

Return type:

list(list(float, float) * 8)

get_regions()[source]
Get frequency regions and rebuild internal software tables.

Regions are defined in a 2-d array, for a maximum of 16 (48) regions. Actual limit defined in hardware by the size of the region_off table. Each element in the array defines a region, with the form [start_ch, nof_ch, beam_index]

  • start_ch: region starting channel (currently must be a

    multiple of 2, LS bit discarded)

  • nof_ch: size of the region: must be multiple of 8 chans

  • beam_index: beam used for this region, range [0:8)

The routine computes the arrays beam_index, region_off, region_sel, and the total number of channels nof_chans, and programs it in the HW

Returns:

Bidimensional array of regions

Return type:

list(list(int))

initialise_beamf()[source]

Initialise Frequency Domain Beamformer

load_cal_curve(antenna, beam, cal_coefficients)[source]

Calibration curve is specified for 512 frequency channels over the whole (0-400) MHz range. Calibration for unused frequency regions may assume any value (e.g. 0). Default (at initialization) is 1.0 for diagonal terms and 0.0 for cross diagonal terms.

Obsolete, does not support subarrays, kept for backward compatibility

load_calibration(antenna, calibration_coefs)[source]

Loads calibration coefficients. calibration_coefs is a bidimensional complex array of the form calibration_coefs[channel, polarization], with each element representing a normalized coefficient, with (1.0, 0.0) the normal, expected response for an ideal antenna. Channel is the index specifying the channels at the beamformer output, i.e. considering only those channels actually processed and beam assignments. The polarization index ranges from 0 to 3.

  • 0: X polarization direct element

  • 1: X->Y polarization cross element

  • 2: Y->X polarization cross element

  • 3: Y polarization direct element

The calibration coefficients may include any rotation matrix (e.g. the parallactic angle), but do not include the geometric delay.

Parameters:
  • antenna – Antenna number. Integer in range 0:8

  • calibration_coefs – Calibration coefficients. array [384, 4]

load_calibration_for_channels(first_channel, calibration_coefs)[source]

Loads calibration coefficients for a group of channels, all antennas. calibration_coefs is a tridimensional complex array of the form calibration_coefs[channel, antenna, polarization], with each element representing a normalized coefficient, with (1.0, 0.0) the normal, expected response for an ideal antenna. Channel is the index specifying the channels at the beamformer output, i.e. considering only those channels actually processed and beam assignments, and starts at start_channel. E.g. if start_channel = 10 and 12 channels are specified, the calibration is specified for logical channels 10-21. Usually calibration is specified for a block of 8N channels starting at a multiple of 8 channels. Other channels are not affected. The polarization index ranges from 0 to 3.

  • 0: X polarization direct element

  • 1: X->Y polarization cross element

  • 2: Y->X polarization cross element

  • 3: Y polarization direct element

The calibration coefficients may include any rotation matrix (e.g. the parallactic angle), but do not include the geometric delay.

Parameters:
  • first_channel – first channel in block. Integer in range 0:384

  • calibration_coefs – Calibration coefficients. array [nchans, 8, 4]

load_delay(load_time=0, beam_mask=281474976710655)[source]

Transfers the delay to the delay computing hardware at the prescribed frame number (load_time) If load_time = 0 transfers the delay immediately.

Parameters:
  • load_time – Prescribed load time (frame number). 0 = immediate

  • beam_mask – beams to be activated. Default: all. unsupported in this FW

read_all_calibration(read_bank)[source]

Read all calibration coefficients.

Read all complex calibration coefficients, for 384 channels, 8 antennas, 4 polarizations.

Parameters:

read_bank – Calibration Table bank. 0 = Staged Calibration Coefficients 1 = Live Calibration Coefficients

Returns:

3D array of complex, indexed by [channel, antenna, polarization]

read_calibration(antenna, read_bank)[source]

Reads calibration coefficients, one antenna at a time. calibration_coefs is a bidimensional complex array of the form calibration_coefs[channel, polarization], with each element representing a normalized coefficient, with (1.0, 0.0) the normal, expected response for an ideal antenna. Channel is the index specifying the channels at the beamformer output, i.e. considering only those channels actually processed and beam assignments. The polarization index ranges from 0 to 3.

  • 0: X polarization direct element

  • 1: X->Y polarization cross element

  • 2: Y->X polarization cross element

  • 3: Y polarization direct element

The calibration coefficients may include any rotation matrix (e.g. the parallactic angle), but do not include the geometric delay.

Parameters:
  • antenna – Antenna number. Integer in range 0:8

  • read_bank – Calibration Table bank. 0 = Staged Calibration Coefficients 1 = Live Calibration Coefficients

Returns:

Calibration coefficients. array [384, 4]

Return type:

list(list(complex))

set_delay(delay_array, beam_index)[source]

The method specifies the delay in seconds and the delay rate in seconds/seconds. The delay_array specifies the delay and delay rate for each antenna. beam_index specifies which beam is described (current range 0-7) from 0-47 (in the future). Delay is updated inside the delay engine at the time specified by method load_delay

Parameters:
  • delay_array – bidimensional array [8,2]. Each row contains 2 elements, as delay (in s) and delay rate (in s/s). One delay is specified for both polarization in each antenna

  • beam_index – hardware station beam to program. Range 0-47

set_regions(region_array)[source]

Set frequency regions.

Regions are defined in a 2-d array, for a maximum of 16 (48) regions. Actual limit defined in hardware by the size of the region_off table. Each element in the array defines a region, with the form [start_ch, nof_ch, beam_index].

  • start_ch: region starting channel (currently must be a multiple of

    2, LS bit discarded)

  • nof_ch: size of the region: must be multiple of 8 chans

  • beam_index: beam used for this region, range [0:8)

Total number of channels must be <= 384 The routine computes the arrays beam_index, region_off, region_sel, and the total number of channels nof_chans, and programs it in the HW

Parameters:

region_array – Bidimensional array of regions

switch_calibration_bank(time=0, force=False)[source]

Switch the calibration bank. To be performed after all calibration qantities have been updated on both FPGAS

Parameters:
  • time – Time to perform bank switch (frame number). Default 0 = current time + 64 frames

  • force – Force immediate switch

Returns:

bank used after bank switch (0 or 1)