Resampler/Delay Tracker

Generates first-order delay models (FODMs) from high-order delay models (HODMs) and applies them to the input data, and resamples the data to a common output sample rate. The Tango Device Server software is responsible for generating, correcting, and sending down FODMs to the FW driver, and the models are then applied to the input stream in FW. SW maintains a polling thread on the status command of the FW driver, in which the driver returns information about available buffer space, such that new FODMs can be supplied as needed. This device includes Python wrappers for the FODM generation C++ library, which handles both generating FODMs from HODMs and calculating the final values to supply to the FW driver’s load_fodm() method.

Low-Level Device Interface

Commands

Command

Input Type

Input Description

Output Type

Output Description

Command Description

Configure()

DevString

JSON configuration; see below.

n/a

Configures parameters for the RDT, including sample rates, fill thresholds, etc.

Deconfigure()

DevString

JSON configuration; see below.

n/a

TODO: determine if needed/different from recover.

Start()

n/a

n/a

Starts generating FO delay models from HO models, and starts the RDT IP once there are enough generated to fill the FW buffer.

Stop()

n/a

n/a

Stops generating FO models and stops the RDT IP.

Reset()

n/a

n/a

Resets all configured parameters to their default states and stops the RDT IP (if started).

GetStatus()

DevBoolean

Whether to clear counters in firmware.

DevString

Status JSON; see below.

Gets the status of the RDT, including error flags and circular buffer space.

LoadHODMs()

DevVarDoubleArray

The array of HODMs to load. Each HODM is an array of doubles.

n/a

Loads one or more high-order delay models into the device server’s HO model queue. Could also potentially use a publish/subscribe mechanism for this.

JSON Field Definitions

Configure() Input JSON Parameters

Parameter

Type

Allowed Range

Description

input_sample_rate

integer

>= 0

The sample rate of the incoming signal.

output_sample_rate

integer

>= 0

The desired sample rate of the outgoing signal.

fo_validity_interval

number

> 0

The duration, in seconds, for which each FODM should be valid, i.e., this should represent the difference between each FODM’s start_ts and stop_ts. Default is 0.01 (10ms).

fo_fill_threshold

integer

>= 0

The “needs filling” threshold of elements in the FW circular buffer, below which the DS will start generating and loading more FODMs into the FW. Default is 3000 (30 seconds of 10ms FODMs).

fo_low_threshold

integer

>= 0

The “low” threshold of elements in the FW circular buffer, below which the DS will move to a DEGRADED HealthState. Default is 500 (5 seconds of 10ms FODMs).

first_input_timestamp_start_offset

number

>= 0

The time offset, in seconds, which is added to the current timestamp of the IP to determine the minimum allowed start timestamp, rounded up to the next PPS, for FODMs to be provided to the FW driver (which then loads them into the circular buffer). All FODMs generated with start timestamps before this calculated minimum will be discarded.

num_lsq_points

integer

>= 1

The number of points to use in the Least Squares (LSQ) linear fitting algorithm for converting HODMs to FODMs. Default is 100.

freq_down_shift

number

The frequency downshift applied to the input signal in the VCC-OSPPFB IP block.

freq_align_shift

number

A fine frequency shift to additionally apply to the output signal. This covers any residual wideband frequency shift and alignment of channels between frequency slices.

freq_wb_shift

number

The net wideband (WB) frequency shift which was applied in the Frequency Shifter before the VCC-OSPPFB.

freq_scfo_shift

number

The frequency shift required due to SCFO sampling.

GetStatus() Output JSON Fields

Field

Type

Possible Range

Description

current_time

number

The current input timestamp of the RDT IP block.

running

boolean

true iff the RDT IP is currently running.

error_code

integer

0 to 232-1

An error code reported by the firmware during runtime.

fodm_space_available

integer

0 to 232-1

The number of spare spaces available in FW to write FODMs.

Sequence Diagrams

Device Initialization

Device Operation