anlt module
Important
The APIs in this module are applicable only to Z800 Freya test modules.
Auto-Negotiation and Link Training (ANLT) provides functions to help you fine-tune the protocol to its optimal state, test interoperability between different vendors, and protocol compliance for different implementations.
|
This command manages the auto-restart features. |
|
Get the anlt log messages |
|
Start ANLT on a port |
|
Get the overview of ANLT status |
|
Stop AN & LT |
|
Get the auto-negotiation status |
|
Ask the remote port to increase coeff of the specified serdes. |
|
Ask the remote port to decrease coeff of the specified serdes. |
|
Ask the remote port to use the encoding of the specified serdes. |
|
Ask the remote port to use the preset of the specified serdes. |
|
Show the link training status. |
|
Tell the remote port that the current serdes is trained. |
|
Get the tap value of the local TX tap. |
|
Set the tap value of the local TX tap. |
|
Auto tune the tap value of the local TX tap. |
|
Get LT initial modulation config |
|
Get LT initial modulation config |
|
Should ANLT strict mode be enabled |
|
Control what should be logged for ANLT by xenaserver |
|
Get ANLT log control config |
Module Contents
The anlt high-level function module.
- async anlt_link_recovery(port, restart_link_down, restart_lt_failure)[source]
This command manages the auto-restart features.
- Parameters:
port (
Z800FreyaPort) – the port objectrestart_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_log(port)[source]
Get the anlt log messages
- Parameters:
port (
Z800FreyaPort) – the port object- Returns:
AN/LT protocol log traces of the port
- Return type:
- 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]
Start ANLT on a port
- Parameters:
port (
Z800FreyaPort) – the port objectshould_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 lt_coeff_inc(port, serdes, emphasis)[source]
Ask the remote port to increase coeff of the specified serdes.
- Parameters:
port (
Z800FreyaPort) – the port objectserdes (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 (
Z800FreyaPort) – the port objectserdes (int) – the serdes index, starting from 0
emphasis (enums.LinkTrainCoeffs) – the emphasis to decrease
- 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 (
Z800FreyaPort) – the port objectserdes (int) – the serdes index, starting from 0
encoding (enums.LinkTrainCoeffs) – link training encoding
- 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 (
Z800FreyaPort) – the port objectserdes (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_trained(port, serdes)[source]
Tell the remote port that the current serdes is trained.
- Parameters:
port (
Z800FreyaPort) – the port objectserdes (int) – the serdes index, starting from 0
- Returns:
- Return type:
None
- async txtap_set(port, serdes, pre3, pre2, pre, main, post)[source]
Set the tap value of the local TX tap.
- async txtap_autotune(port, serdes)[source]
Auto tune the tap value of the local TX tap.
- Parameters:
port (
Z800FreyaPort) – the port objectserdes (int) – the serdes index, starting from 0
- Returns:
- Return type:
None
- async anlt_strict(port, enable)[source]
Should ANLT strict mode be enabled
- Parameters:
port (
Z800FreyaPort) – the port objectenable (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 (
Z800FreyaPort) – the port objecttypes (List[enums.AnLtLogControl]) – control what should be logged for ANLT by xenaserver
- Returns:
- Return type:
None