XOA Driver Logo

Table of Content

  • 1. Introduction
  • 2. Getting Started
  • 3. Script Example Library
  • 4. Understanding XOA Driver
  • 5. Test Resource Management
  • 6. Command Grouping
  • 7. Status Messages and Exceptions
  • 8. API Reference
    • 8.1. High-Level Functions
      • 8.1.1. Resource Management
      • 8.1.2. Auto-Negotiation and Link Training
        • HL ANLT Functions
          • anlt_start()
          • anlt_link_recovery()
          • anlt_status()
          • anlt_stop()
          • anlt_log()
          • anlt_strict()
          • anlt_log_control()
        • HL Auto-Negotiation Functions
          • autoneg_status()
        • HL Link Training Functions
          • lt_coeff_inc()
          • lt_coeff_dec()
          • lt_coeff_no_eq()
          • lt_preset()
          • lt_encoding()
          • lt_trained()
          • lt_status()
          • txtap_get()
          • txtap_set()
          • txtap_autotune()
      • 8.1.3. CLI Integration
      • 8.1.4. Simple Header Value Editor
    • 8.2. High-Level API
    • 8.3. Low-Level API
  • 9. Glossary of Terms
XOA Driver
  • 8. API Reference
  • 8.1. High-Level Functions
  • 8.1.2. Auto-Negotiation and Link Training

8.1.2. Auto-Negotiation and Link Training

The following high-level functions are for auto-negotiation and link training.


HL ANLT Functions

async anlt_start(port, should_do_an, should_do_lt, an_allow_loopback, lt_preset0, lt_initial_modulations, should_lt_interactive, lt_algorithm, should_enable_lt_timeout)[source]

Changed in version 2.5.

Start ANLT on a port

Parameters:
  • port (GenericL23Port) – the port object

  • should_do_an (bool) – should the port do autoneg?

  • should_do_lt (bool) – should the port do link training?

  • an_allow_loopback (bool) – should the autoneg allow loopback?

  • lt_preset0 (enums.FreyaOutOfSyncPreset) – out-of-sync tap values (preset 0): existing or standard

  • lt_initial_modulations (Dict[str, enums.LinkTrainEncoding]) – the initial modulations of each serdes

  • should_lt_interactive (bool) – should perform link training manually?

  • lt_algorithm (Dict[str, enums.LinkTrainAlgorithm]) – Link training algorithm to use

  • should_enable_lt_timeout (bool) – should run link training with timeout?

async anlt_link_recovery(port, restart_link_down, restart_lt_failure)[source]

This command manages the auto-restart features.

Parameters:
  • port (GenericL23Port) – the port object

  • restart_link_down (bool) – enable AN+LT auto-restart when a link down condition is detected. A “link down” state signifies the loss of a valid input signal, which can occur due to events such as cable unplugging and re-plugging, TX disable, or link flap on the link partner’s end. The auto-restart process will continue until the link is re-established. Please note that this setting is only effective when AN and/or LT are enabled.

  • restart_lt_failure (bool) – if LT is enabled and experiences a failure on either side, the port will initiate the AN+LT restart process repeatedly until LT succeeds. This functionality is only applicable when LT is enabled.

Returns:

Return type:

None

async anlt_status(port)[source]

Changed in version 2.5.

Get the overview of ANLT status

Parameters:

port (GenericL23Port) – the port object

Returns:

AN/LT status of the port

Return type:

Dict[str, Any]

async anlt_stop(port)[source]

Changed in version 2.5.

Stop AN & LT

Parameters:

port (GenericL23Port) – the port object

async anlt_log(port)[source]

Get the anlt log messages

Parameters:

port (GenericL23Port) – the port object

Returns:

AN/LT protocol log traces of the port

Return type:

str

async anlt_strict(port, enable)[source]

Should ANLT strict mode be enabled

Parameters:
  • port (GenericL23Port) – the port object

  • enable (bool) – should ANLT strict mode be enabled

Returns:

Return type:

None

async anlt_log_control(port, types)[source]

Control what should be logged for ANLT by xenaserver

Parameters:
  • port (GenericL23Port) – the port object

  • types (t.List[enums.AnLtLogControl]) – control what should be logged for ANLT by xenaserver

Returns:

Return type:

None

HL Auto-Negotiation Functions

async autoneg_status(port)[source]

Changed in version 2.5.

Get the auto-negotiation status

Parameters:

port (GenericL23Port) – the port object

Returns:

Return type:

Dict[str, Any]

HL Link Training Functions

async lt_coeff_inc(port, serdes, emphasis)[source]

Ask the remote port to increase coeff of the specified serdes.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

  • emphasis (enums.LinkTrainCoeffs) – the emphasis to increase

Returns:

Return type:

None

async lt_coeff_dec(port, serdes, emphasis)[source]

Ask the remote port to decrease coeff of the specified serdes.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

  • emphasis (enums.LinkTrainCoeffs) – the emphasis to decrease

Returns:

Return type:

None

async lt_coeff_no_eq(port, serdes, emphasis)[source]

Ask the remote port to set the coeff to NO_EQ on the specified serdes.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

  • emphasis (enums.LinkTrainCoeffs) – the emphasis to set to NO_EQ

Returns:

Return type:

None

async lt_preset(port, serdes, preset)[source]

Ask the remote port to use the preset of the specified serdes.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

  • preset (enums.LinkTrainPresets) – preset index to select for the serdes, 0,1,2,3,4,

Returns:

Return type:

None

async lt_encoding(port, serdes, encoding)[source]

Ask the remote port to use the encoding of the specified serdes.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

  • encoding (enums.LinkTrainCoeffs) – link training encoding

Returns:

Return type:

None

async lt_trained(port, serdes)[source]

Tell the remote port that the current serdes is trained.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

Returns:

Return type:

None

async lt_status(port, serdes)[source]

Changed in version 2.5.

Show the link training status.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

Returns:

LT status of the serdes

Return type:

Dict[str, Any]

async txtap_get(port, serdes)[source]

Get the tap value of the local TX tap.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

Returns:

tap values of the serdes

Return type:

Dict[str, int]

async txtap_set(port, serdes, pre3, pre2, pre, main, post1)[source]

Set the tap value of the local TX tap.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

  • pre3 (int) – pre3 value

  • pre2 (int) – pre2 value

  • pre (int) – pre value

  • main (int) – main value

  • post1 (int) – post1 value

Returns:

Return type:

None

async txtap_autotune(port, serdes)[source]

Auto tune the tap value of the local TX tap.

Parameters:
  • port (GenericL23Port) – the port object

  • serdes (int) – the serdes index, starting from 0

Returns:

Return type:

None

Previous Next

© Copyright 2025, Teledyne LeCroy Xena.