layer1_adv module

The layer1_adv module offers high-level functions for advanced Layer 1 configurations and operations.

get_tx_freq_curr(port)

Get the current Tx frequency in Hz of the specified port.

get_rx_freq_curr(port)

Get the current Rx frequency in Hz of the specified port.

get_rx_freq_min(port)

Get the minimum Rx frequency in Hz since last query.

get_rx_freq_max(port)

Get the maximum Rx frequency in Hz since last query.

get_rx_freq_all(port)

Get the current, minimum, and maximum Rx frequencies in Hz of the specified port.

get_cdr_lol_since_last(port, serdes_indices)

Get the current and latched CDR LOL status of the specified Serdes.

get_rx_lane_skew(port, lane_indices)

Get Rx relative skew measured in bits of the specified PCS lanes.

get_hi_ber(port)

Get the current and latched HI-BER status of the specified port.

get_hi_ser(port)

Get the current and latched HI-SER status of the specified port.

get_deg_ser(port)

Get the current and latched Degraded SER status of the specified port.

set_deg_ser_thresholds(port, ...)

Configure signaling Degraded SER thresholds of the port.

get_deg_ser_thresholds(port)

Get signaling Degraded SER thresholds of the port.

get_cw_err_since_last(port)

Get the number of erroneous 64b/66b codewords since the previous query per port.

get_itb_since_last(port)

Get the number of invalid 256b/257b transcode blocks since the previous query per port.

get_total_loa_since_last(port)

Get the number of cumulated Loss of Alignment (LOA) events since the previous query per port.

get_link_sync_loss_since_last(port)

Get the number of cumulated link sync loss events since the previous query per port.

get_local_fault_since_last(port)

Get the number of cumulated local fault conditions since the previous query per port.

get_remote_fault_since_last(port)

Get the number of cumulated remote fault conditions since the previous query per port.

Module Contents

The Advanced Layer 1 functions

async get_tx_freq_curr(port)[source]

Get the current Tx frequency in Hz of the specified port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

The current Tx frequency in Hz.

Return type:

int

async get_rx_freq_curr(port)[source]

Get the current Rx frequency in Hz of the specified port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

The current Rx frequency in Hz.

Return type:

int

async get_rx_freq_min(port)[source]

Get the minimum Rx frequency in Hz since last query.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

The minimum Rx frequency in Hz since last query.

Return type:

int

async get_rx_freq_max(port)[source]

Get the maximum Rx frequency in Hz since last query.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

The maximum Rx frequency in Hz since last query.

Return type:

int

async get_rx_freq_all(port)[source]

Get the current, minimum, and maximum Rx frequencies in Hz of the specified port.

The minimum and maximum values are since last query.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

The current, minimum, and maximum Rx frequencies in Hz of the specified port.

Return type:

Tuple[int, int, int]

async get_cdr_lol_since_last(port, serdes_indices)[source]

Get the current and latched CDR LOL status of the specified Serdes.

Parameters:
  • port (Z800FreyaPort) – The port instance.

  • serdes_indices (List[int]) – The indices of the Serdes.

Returns:

A list of tuples containing current and latched CDR LOL status for each Serdes.

Return type:

List[Tuple[bool, bool]]

async get_rx_lane_skew(port, lane_indices)[source]

Get Rx relative skew measured in bits of the specified PCS lanes.

Parameters:
  • port (Z800FreyaPort) – The port instance.

  • lane_indices (List[int]) – The indices of the PCS lanes.

Returns:

Relative skew of the specified PCS lanes measured in bits

Return type:

List[int]

async get_hi_ber(port)[source]

Get the current and latched HI-BER status of the specified port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

A tuple containing current and latched HI-BER status.

Return type:

Tuple[bool, bool]

async get_hi_ser(port)[source]

Get the current and latched HI-SER status of the specified port.

HI-SER is signalled if 5560 RS-FEC symbol errors are detected in contiguous block of 8192 non-overlapping RS-FEC codewords.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

A tuple containing current and latched HI-SER status.

Return type:

Tuple[bool, bool]

async get_deg_ser(port)[source]

Get the current and latched Degraded SER status of the specified port.

The thresholds for signaling Degraded SER is programmable using set_deg_ser_thresholds().

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

A tuple containing current and latched Degraded SER status.

Return type:

Tuple[bool, bool]

async set_deg_ser_thresholds(port, activate_threshold, deactivate_threshold, interval)[source]

Configure signaling Degraded SER thresholds of the port.

If more than activate_threshold number of RS-FEC symbol errors are detected in a contiguous block of interval RS-FEC codewords, Degraded SER is signalled on the port.

If less than deactivate_threshold number of RS-FEC symbol errors are detected in a contiguous block of interval RS-FEC codewords, Degraded SER is no longer signalled on the port.

interval must be an even number and a multiple of the number of PCS flows:

  • 100G: 2 (one flow, but must be even)

  • 200G/400G: 2 (two flows)

  • 800G/1.6T: 4 (four flows)

An uncorrectable codeword is counted as 16 erroneous RS-FEC symbols.

Parameters:
  • port (Z800FreyaPort) – The port instance.

  • activate_threshold (int) – The activate threshold.

  • deactivate_threshold (int) – The deactivate threshold.

  • interval (int) – The interval.

async get_deg_ser_thresholds(port)[source]

Get signaling Degraded SER thresholds of the port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

A tuple containing activate threshold, deactivate threshold, and interval.

Return type:

Tuple[int, int, int]

async get_cw_err_since_last(port)[source]

Get the number of erroneous 64b/66b codewords since the previous query per port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

Number of erroneous 64b/66b codewords since the previous query per port.

Return type:

int

async get_itb_since_last(port)[source]

Get the number of invalid 256b/257b transcode blocks since the previous query per port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

Number of invalid 256b/257b transcode blocks since the previous query per port.

Return type:

int

Get the number of cumulated link sync loss events since the previous query per port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

Number of cumulated link sync loss events since the previous query per port.

Return type:

int

async get_local_fault_since_last(port)[source]

Get the number of cumulated local fault conditions since the previous query per port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

Number of cumulated local fault conditions since the previous query per port.

Return type:

int

async get_remote_fault_since_last(port)[source]

Get the number of cumulated remote fault conditions since the previous query per port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

Number of cumulated remote fault conditions since the previous query per port.

Return type:

int

async get_total_loa_since_last(port)[source]

Get the number of cumulated Loss of Alignment (LOA) events since the previous query per port.

Parameters:

port (Z800FreyaPort) – The port instance.

Returns:

Number of cumulated Loss of Alignment (LOA) events since the previous query per port.

Return type:

int