TpmFpgaFirmware

Overview

This plugin is responsible for managing the TPM FPGA…

Python Class & Methods Index

Hardware functions for the TPM FPGA Firmware.

class ska_low_sps_tpm_api.plugins.tpm.tpm_fpga_firmware.TpmFpgaFirmware(board, **kwargs)[source]

TpmFpgaFirmware plugin

__init__(board, **kwargs)[source]

Initialize a new TpmFpgaFirmware instance.

Parameters:
  • board (Any) – Pointer to board instance

  • kwargs (Any) – named arguments

Raises:

PluginError – Device argument must be specified

check_data_router_discarded_packets()[source]

Returns value of data router nof discarded packets registers.

Return type:

list

check_data_router_status()[source]

Returns value of data router error register.

Return type:

int

check_ddr_initialisation()[source]

Check whether DDR has initialised.

Return type:

bool

check_ddr_user_reset_counter(show_result=True)[source]

Return value of DDR user reset counter - increments each falling edge of the DDR generated user logic reset.

Return type:

int

check_ddr_voltage()[source]

Check if DDR voltage regulator is enabled, if not enable it. TPM 1.2 only

Return type:

None

check_pps_status()[source]

Check PPS is detected and PPS period is as expected. Firmware counts number of cycles between PPS edges and sets an error flag if the value does not match the pps_exp_tc register.

Return type:

bool

clean_up()[source]

Perform cleanup.

Return type:

bool

Returns:

Success

clear_data_router_status()[source]

Reset value of data router errors.

Return type:

None

clear_ddr_user_reset_counter()[source]

Reset value of DDR reset counter

Return type:

None

clear_lmc_data_request()[source]

Stop transmission of all LMC data.

Return type:

None

clear_pps_status()[source]

Clear PPS errors

Return type:

None

configure_40g_core_flyover_test()[source]

Configure 40G cable polarity for SAMTEC board-to-board cable ARC6-08-07.0-LU-LD-2R-1, it can be activated using qsfp_detection = “flyover_test”

download_beamforming_weights(weights, antenna)[source]

Apply beamforming weights.

Parameters:
  • weights (list[float]) – Weights array

  • antenna (int) – Antenna ID

Return type:

None

initialise()[source]

Initialise TpmFpgaFirmware.

Return type:

bool

Returns:

success status

initialise_ddr()[source]

Initialise DDR.

Return type:

None

initialise_firmware()[source]

Initialise firmware components.

Raises:

BoardError – cannot configure JESD core

Return type:

None

load_plugin()[source]

Load required plugin.

Return type:

None

read_polyfilter_name()[source]

Returns the polyfilter name used in the firmware

Returns:

string filter name

Return type:

str

send_beam_data()[source]

Send beam data from the TPM.

Return type:

None

send_channelised_data(number_of_samples=128, first_channel=0, last_channel=511)[source]

Send channelized data from the TPM.

Parameters:
  • number_of_samples (int) – contiguous time samples sent per channel

  • first_channel (int) – First channel transmitted

  • last_channel (int) – Last channel transmitted + 1 (python range convention)

Return type:

None

send_channelised_data_continuous(channel_id, number_of_samples=128)[source]

Continuously send channelised data from a single channel.

Parameters:
  • channel_id (int) – Channel ID

  • number_of_samples (int) – contiguous time samples sent per channel

Return type:

None

send_channelised_data_narrowband(band_frequency, round_bits, number_of_samples=128)[source]

Continuously send channelised data from a single channel in narrowband mode.

Parameters:
  • band_frequency (int) – central frequency (in Hz) of narrowband

  • round_bits (int) – number of bits rounded after filter

  • number_of_samples (int) – samples per lmc packet

Return type:

None

send_raw_data()[source]

Send raw data from the TPM.

Return type:

None

send_raw_data_synchronised()[source]

Send raw data from the TPM.

Return type:

None

start_ddr_initialisation()[source]

Start DDR initialisation.

Return type:

None

status_check()[source]

Perform status check.

Return type:

Any

Returns:

Status

stop_channelised_data()[source]

Stop sending channelised data.

Return type:

None

stop_channelised_data_continuous()[source]

Stop transmission of continuous channel data.

Return type:

None

stop_channelised_data_narrowband()[source]

Stop transmission of narrowband channel data.

Return type:

None

stop_integrated_beam_data()[source]

Stop receiving integrated beam data from the board.

Return type:

None

stop_integrated_channel_data()[source]

Stop receiving integrated beam data from the board.

Return type:

None

stop_integrated_data()[source]

Stop transmission of integrated data.

Return type:

None

swap_polarisations(antennas)[source]

Swap polarisations for specified antennas. Achieved by reordering polarisations within the JESD data stream.

This is currently used to compensate for the mechanical assembly of the preADU which has the effect of changing the XY polarisation order for half of the fibres to YX. The result should be that this remapoping and the mechanical remapping cancel out. See https://jira.skatelescope.org/browse/SPRTS-75 for more details.

Parameters:

antennas (list(int)) – Antennas to swap polarisations for

Raises:
  • TypeError – if specified antenna(s) are not integers

  • ValueError – if specified antenna(s) are not in the range 0 to 7