L1 Functions

sth::l1_config

Purpose

Configures and modifies an L1 port on a Spirent HLTAPI chassis.

Layer 1 services gives access to the various physical-layer sublayers to configure and test layer 1 implementations on supported interfaces.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::l1_config

    [-mode {config|modify}  M]
    [-port_handle  <port handle>  M]

    L1 port config

    [-link_recovery_enabled {true|false}]
    [-tx_ppm_adjust <-100-100>]

    L1 Port Equalizer Config

    [-ctle_enabled {true|false}]
    [-dfe_enabled {true|false}]

    L1 Port PCS

    [-auto_negotiation_enabled {true|false}]
    [-ignore_link_status {true|false}]
    [-link_training_enabled {true|false}]

    PAM4 AN/LT Transceiver Config

    [-main_tap <-20 to 20>]
    [-post_emphasis <-20 to 20>]
    [-pre_emphasis <-20 to 20>]
    [-rx_mode {optical|loopback|dac}]
    [-tx_coarse_swing <0-6>]
    [-tx_enabled {true|false}]
    [-transceiver_lane_num <lane number>]
    [-transceiver_lane_num_list <lane number>]
    [-main_tap_list <value list>]
    [-post_emphasis_list <value list>]
    [-pre_emphasis_list <value list>]
    [-rx_mode_list <value list>]
    [-tx_coarse_swing_list <value list>]
    [-tx_enabled_list <value list>]

    PCS Lanes Config

    [-pcs_skew_lane_num  <lane number>]
    [-tx_skew_bits  <bit number>]
    [-pcs_skew_lane_num_list  <lane number list>]
    [-tx_skew_bits_list  <bit number list>]

    PRBS Lanes Config

    [-tx_pattern {NONE|PRBS7|PRBS9|PRBS15|PRBS23|PRBS31}]
    [-invert {true|false}]
    [-prbs_lane_num <lane number>]
    [-prbs_lane_num_list <lane number list>]
    [-tx_pattern_list <value list>]
    [-invert_list <value list>]

    Fec Error Injection Config

    [-codeworda_mxity <bool>]

    [-codewordb_mxity <bool>]
    [-startof_codeword_mask <160-bit hex or 320-bit hex>]

    [-endof_parity_mask <160-bit hex>]

    Random Error Injection Config

    [-port_error_injector_rate <string>]
    [-error_injectors_lane_num <lane number>]
    [-lane_error_injectors_enabled {true|false}]
    [-error_injectors_lane_num_list <lane num list>]
    [-error_injectors_enabled_list <value list>]

Arguments

-mode

Specifies the action to perform on the specified test port. The modes are described below:

config - Configures one or more L1 test group arguments on the ports
        specified with the -port_handle argument. You must
        specify the -port_handle argument.

modify - Changes the configuration for the L1 port
        identified by the -port_handle argument. You must
        specify the -port_handle argument.
-port_handle

Specifies the port on which to configure L1 test when mode is set to create. This argument is Mandatory for create and modify modes.

Specifies to enable or disable link recovery. The default is true.

-tx_ppm_adjust

Specifies to adjust the clock frequency by parts per million (PPM) for accuracy. Possible value range is from -100 to 100. The default is 0.

When you need to specify a negative value, you must encompass the value by double quotation marks and braces, such as {“-5”} or “{-5}”. Other formats like “-5”, {-5} or -5 are not acceptable.

-ctle_enabled

Specifies to enable or disable CTLE (continuous time linear equalization). The default is true.

-dfe_enabled

Specifies to enable or disable DFE (decision feedback equalizer). The default is true.

-auto_negotiation_enabled

Specifies to enable auto negotiation. The default is true.

Specifies whether to continue sending traffic when a link fault is detected. The default is false.

Specifies to enable link training. The default is true.

-main_tap

Specifies the undistorted output voltage of the transmit signals. Possible value range is from -20 to 20. The default is 0.

When you need to specify a negative value, you must encompass the value by double quotation marks and braces, such as {“-5”} or “{-5}”. Other formats like “-5”, {-5} or -5 are not acceptable.

-main_tap_list

Specifies the list of main tap values. This argument is applicable when -transceiver_lane_num_list is specified.

-post_emphasis

The trailing edge pre-distortion voltage added to the transmit signals. This value sets the signal strength on the transmitting port. Possible value range is from -20 to 20. The default is 0.

When you need to specify a negative value, you must encompass the value by double quotation marks and braces, such as {“-5”} or “{-5}”. Other formats like “-5”, {-5} or -5 are not acceptable.

-post_emphasis_list

Specifies the list of post emphasis values. This argument is applicable when -transceiver_lane_num_list is specified.

-pre_emphasis

The leading edge pre-distortion voltage added to the transmit signals. This value sets the signal strength on the transmitting port. Possible value range is from -20 to 20. The default is 0.

When you need to specify a negative value, you must encompass the value by double quotation marks and braces, such as {“-5”} or “{-5}”. Other formats like “-5”, {-5} or -5 are not acceptable.

-pre_emphasis_list

Specifies the list of pre emphasis values. This argument is applicable when -transceiver_lane_num_list is specified.

-rx_mode

Select the mode for lane. Possible values are optical, loopback, and dac. The default is loopback.

-rx_mode_list

Specifies the list of rx mode values. This argument is applicable when -transceiver_lane_num_list is specified.

-tx_coarse_swing

Specifies transmitter voltage swing as a percentage of the normal voltage swing. Possible value range is from 0 to 6. The default is 0.

-tx_coarse_swing_list

Specifies the list of transmitter coarse swing values. This argument is applicable when -transceiver_lane_num_list is specified.

-tx_enabled

Select to enable or disable the transmitter for the lane. The default is true.

-tx_enabled_list

Specifies the list of transmitter enabled values. This argument is applicable when -transceiver_lane_num_list is specified.

-transceiver_lane_num

Specifies the transceiver lane number to configure -main_tap, -post_emphasis, -pre_emphasis, -tx_enabled, -tx_coarse_swing, and -rx_mode values.

Example: If the value is set to 1, Lane1 transceiver options will configure.

The default is 0.

-transceiver_lane_num_list

Specifies the transceiver lane number list to configure -main_tap_list, -post_emphasis_list, -pre_emphasis_list, -tx_enabled_list, -tx_coarse_swing_list, and -rx_mode_list values.

Example: If the value is set to “0 1 3”, Lane0,Lane1 and Lane3 transceiver options will configure.

-tx_skew_bits

Specifies the number of bits of delay to add to the signal. The default is 0.

-tx_skew_bits_list

Specifies the list of transmitter skew bits values. This argument is applicable when -pcs_skew_lane_num_list is specified.

-pcs_skew_lane_num

Specifies the PCS lane number to configure -tx_skew_bits value.

Example: If the value is set to 1, lane1 PCS options will configure.

The default is 0.

-pcs_skew_lane_num_list

Specifies the PCS lane number list to configure -tx_skew_bits_list values.

Example: If the value is set to “0 1 3”, Lane0,Lane1, and Lane3 pcs options will configure.

-tx_pattern

Specifies the PRBS pattern to transmit. Possible values are PRBS7,PRBS9,PRBS15,PRBS23,PRBS31, and NONE. The default is NONE.

-invert

Specifies to invert -tx_pattern value. This argument is not applicable if the -tx_pattern argument value is set to NONE. The default is false.

-tx_pattern_list

Specifies the list of PRBS pattern values to transmit. This argument is applicable when -prbs_lane_num_list is specified.

-invert_list

Specifies the list of invert values. This argument is applicable when -prbs_lane_num_list is specified.

-prbs_lane_num

Specifies the PRBS lane number to configure -tx_pattern and -invert values.

Example: If the value is set to 1, lane1 PRBS options will configure.

The default is 0.

-prbs_lane_num_list

Specifies the PRBS lane number list to configure -tx_pattern_list and -invert_list values.

Example: If the value is set to “0 1 3”, lane0, lane1, and lane3 PRBS options will configure.

-codeworda_mxity

Specifies one or more codewords to inject. Maximum 3 codewords can be provided for 200/400gig ports. Example: -codeworda_mxity “true true true” (First, Second and Third checkboxes under FEC Error injection view) The default is true.

-codewordb_mxity

Specifies one or more codewords to inject. Maximum 3 codewords can be provided for 200/400gig ports. Example: -codeworda_mxity “true true true” (First, Second and Third checkboxes under FEC Error injection view) The default is true.

Note

This argument is not supported for 50/100Gig ports.

-startof_codeword_mask

Specifies bits to create the start-of-codeword mask. For 200/400gig ports, specify 160-bit hex value. Example: -startof_codeword_mask 0000000000000000000000010000000000000001 For 50/100gig ports, specify 320-bit hex value. Example: -startof_codeword_mask “00000000000000000000000000010000000000000000000010000000000000000000000000000002”

-endof_parity_mask

Specifies bits to create the start-of-codeword mask. For 200/400gig ports, specify 160-bit hex value. Example: -startof_codeword_mask 0000000000000000000000010000000000000001 This argument is not supported for 50/100gig ports. The default is 0000000000000000000000000000000000000000.

-port_error_injector_rate

Specifies the port error rate, which is allocated across all the lanes. The default is 1.0e-3.

-lane_error_injectors_enabled

Specifies to enable or disable inject errors on the lane. The default is true.

-error_injectors_enabled_list

Specifies the list of error injectors enabled values. This argument is applicable when -error_injectors_lane_num_list is specified.

-error_injectors_lane_num

Specifies the random error injector lane number to configure -lane_error_injectors_enabled value.

Example: If the value is set to 1, lane1 random error injector options will configure.

The default is 0.

-error_injectors_lane_num_list

Specifies the random error injector lane number list to configure -error_injectors_enabled_list values.

Example: If the value is set to “0 1 3”, lane0,lane1 and lane3 random error injector options will configure.

Arguments Unsupported by Save as HLTAPI

None

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handles   A list of lane handles that identify the L1 ports by the
          ``sth::l1_config`` function.

status    Success (1) or failure (0) of the operation.

log       An error message (if the operation failed).

Description

The sth::l1_config function configures and modifies an L1 port options. Use the -port_handle argument to identify the port. (The port handle value is contained in the keyed list returned by the connect function.) Use the -mode argument to specify the action to perform. (See the -mode argument description for information about the actions.)

Examples

#### HLTAPI for Tcl ####

The following example configures all L1 test options for 400gig:

set l1config [sth::l1_config \
                        -port_handle                   "port1" \
                        -mode                          config \
                        -link_recovery_enabled         true \
                        -tx_ppm_adjust                 "{-1}" \
                        -auto_negotiation_enabled      false \
                        -ignore_link_status            false \
                        -link_training_enabled         false \
                        -ctle_enabled                  true \
                        -dfe_enabled                   true \
                        -main_tap                      1 \
                        -post_emphasis                 1 \
                        -pre_emphasis                  1 \
                        -rx_mode                       loopback \
                        -tx_coarse_swing               1 \
                        -tx_enabled                    true \
                        -transceiver_lane_num          0 \
                        -transceiver_lane_num_list     "0 1" \
                        -main_tap_list                 "{-1} {-1}" \
                        -post_emphasis_list            "1 1"\
                        -pre_emphasis_list             "1 1"\
                        -tx_coarse_swing_list          "1 1"\
                        -tx_enabled_list               "true true"\
                        -rx_mode_list                  "dac loopback"\
                        -tx_skew_bits                  1 \
                        -pcs_skew_lane_num             0 \
                        -pcs_skew_lane_num_list        "0 1"\
                        -tx_skew_bits_list             "1 1"\
                        -tx_pattern                    prbs7 \
                        -invert                        false \
                        -prbs_lane_num                 0 \
                        -prbs_lane_num_list            "0 1"\
                        -tx_pattern_list               "prbs7 prbs7"\
                        -invert_list                   "true true"\
                        -codeworda_mxity               "true"\
                        -codewordb_mxity               "true"\
                        -startof_codeword_mask         0000000000000000000000000000000000000000 \
                        -endof_parity_mask             0000000000000000000000000000000000000000 \
                        -port_error_injector_rate      "1.0e-3" \
                        -lane_error_injectors_enabled  true \
                        -error_injectors_lane_num      1 \
                        -error_injectors_lane_num_list "0 1"\
                        -error_injectors_enabled_list  "true true" \

]

Sample output for example shown above:

{handles {port1 {{l1_lane_pcs_handle {l1lanepcsskews1 l1lanepcsskews2
l1lanepcsskews3 l1lanepcsskews4 l1lanepcsskews5 l1lanepcsskews6
l1lanepcsskews7 l1lanepcsskews8 l1lanepcsskews9 l1lanepcsskews10 l1lanepcsskews11
l1lanepcsskews12 l1lanepcsskews13 l1lanepcsskews14 l1lanepcsskews15 l1lanepcsskews16}}
{l1_lane_prbs_handle {l1laneprbspam41 l1laneprbspam42 l1laneprbspam43 l1laneprbspam44
l1laneprbspam45 l1laneprbspam46 l1laneprbspam47 l1laneprbspam48}} {l1_lane_txcvrs_handle
{l1lanetxcvrspam41 l1lanetxcvrspam42 l1lanetxcvrspam43 l1lanetxcvrspam44 l1lanetxcvrspam45
l1lanetxcvrspam46 l1lanetxcvrspam47 l1lanetxcvrspam48}} {l1_lane_error_injectors_handle
{l1laneerrorinjectors1 l1laneerrorinjectors2 l1laneerrorinjectors3 l1laneerrorinjectors4
l1laneerrorinjectors5 l1laneerrorinjectors6 l1laneerrorinjectors7 l1laneerrorinjectors8
l1laneerrorinjectors9 l1laneerrorinjectors10 l1laneerrorinjectors11 l1laneerrorinjectors12
l1laneerrorinjectors13 l1laneerrorinjectors14 l1laneerrorinjectors15
l1laneerrorinjectors16}}}}} {status 1}

The following example modifies L1 port arguments:

sth::l1_config \
                       -port_handle                   "port1" \
                       -mode                          modify \
                       -tx_ppm_adjust                 "1" \
                       -auto_negotiation_enabled      true \
                       -ignore_link_status            true \
                       -link_training_enabled         true \
                       -main_tap                      1 \
                       -post_emphasis                 "{-1}" \
                       -pre_emphasis                  "{-1}" \
                       -rx_mode                       dac \
                       -tx_coarse_swing               4 \
                       -tx_enabled                    true \
                       -transceiver_lane_num          0 \
                       -tx_skew_bits                  1 \
                       -pcs_skew_lane_num             0 \
                       -tx_pattern               none \
                       -invert                   false \
                       -prbs_lane_num                 0 \
                       -codeworda_mxity               "true"\
                       -port_error_injector_rate      "1.0e-3" \
                       -lane_error_injectors_enabled  false \
                       -error_injectors_lane_num      1 ]

Sample output for example shown above:

{handles {port1 {{l1_lane_pcs_handle {l1lanepcsskews1 l1lanepcsskews2
l1lanepcsskews3 l1lanepcsskews4 l1lanepcsskews5 l1lanepcsskews6
l1lanepcsskews7 l1lanepcsskews8 l1lanepcsskews9 l1lanepcsskews10 l1lanepcsskews11
l1lanepcsskews12 l1lanepcsskews13 l1lanepcsskews14 l1lanepcsskews15 l1lanepcsskews16}}
{l1_lane_prbs_handle {l1laneprbspam41 l1laneprbspam42 l1laneprbspam43 l1laneprbspam44
l1laneprbspam45 l1laneprbspam46 l1laneprbspam47 l1laneprbspam48}} {l1_lane_txcvrs_handle
{l1lanetxcvrspam41 l1lanetxcvrspam42 l1lanetxcvrspam43 l1lanetxcvrspam44 l1lanetxcvrspam45
l1lanetxcvrspam46 l1lanetxcvrspam47 l1lanetxcvrspam48}} {l1_lane_error_injectors_handle
{l1laneerrorinjectors1 l1laneerrorinjectors2 l1laneerrorinjectors3 l1laneerrorinjectors4
l1laneerrorinjectors5 l1laneerrorinjectors6 l1laneerrorinjectors7 l1laneerrorinjectors8
l1laneerrorinjectors9 l1laneerrorinjectors10 l1laneerrorinjectors11 l1laneerrorinjectors12
l1laneerrorinjectors13 l1laneerrorinjectors14 l1laneerrorinjectors15
l1laneerrorinjectors16}}}}} {status 1}

#### HLTAPI for Python ####

The following example configures all L1 test options for 400gig:

sth.emulation_l1_config (
              port_handle                   ='port1',
              mode                          = 'config',
              tx_ppm_adjust                 = '1',
              auto_negotiation_enabled      = 'false',
              ignore_link_status            = 'false',
              link_training_enabled         = 'false',
              main_tap                      = '1',
              post_emphasis                 = '{"-1"}',
              pre_emphasis                  = '{"-1"}',
              rx_mode                       = 'dac',
              tx_coarse_swing               = '4',
              tx_enabled                    = 'true',
              transceiver_lane_num          = '0',
              tx_skew_bits                  = '1',
              pcs_skew_lane_num             = '0',
              tx_pattern                    = 'none',
              invert                        = 'false',
              prbs_lane_num                 = '0',
              codeworda_mxity               = 'true',
              startof_codeword_mask         = '0000000000000000000000000000000000000000',
              port_error_injector_rate      = '1.0e-3',
              lane_error_injectors_enabled  = 'false',
              error_injectors_lane_num      = '1');

Sample output for example shown above:

{'handles': {'port1': {'l1_lane_error_injectors_handle_pylist': ['l1laneerrorinjectors1',
'l1laneerrorinjectors2', 'l1laneerrorinjectors3', 'l1laneerrorinjectors4',
'l1laneerrorinjectors5', 'l1laneerrorinjectors6', 'l1laneerrorinjectors7',
'l1laneerrorinjectors8', 'l1laneerrorinjectors9', 'l1laneerrorinjectors10',
'l1laneerrorinjectors11', 'l1laneerrorinjectors12', 'l1laneerrorinjectors13',
'l1laneerrorinjectors14', 'l1laneerrorinjectors15', 'l1laneerrorinjectors16'],
'l1_lane_prbs_handle_pylist': ['l1laneprbspam41', 'l1laneprbspam42', 'l1laneprbspam43',
'l1laneprbspam44', 'l1laneprbspam45', 'l1laneprbspam46', 'l1laneprbspam47', 'l1laneprbspam48'],
'l1_lane_error_injectors_handle': 'l1laneerrorinjectors1 l1laneerrorinjectors2
l1laneerrorinjectors3 l1laneerrorinjectors4 l1laneerrorinjectors5 l1laneerrorinjectors6
l1laneerrorinjectors7 l1laneerrorinjectors8 l1laneerrorinjectors9 l1laneerrorinjectors10
l1laneerrorinjectors11 l1laneerrorinjectors12 l1laneerrorinjectors13 l1laneerrorinjectors14
l1laneerrorinjectors15 l1laneerrorinjectors16', 'l1_lane_pcs_handle': 'l1lanepcsskews1
l1lanepcsskews2 l1lanepcsskews3 l1lanepcsskews4 l1lanepcsskews5 l1lanepcsskews6 l1lanepcsskews7
l1lanepcsskews8 l1lanepcsskews9 l1lanepcsskews10 l1lanepcsskews11 l1lanepcsskews12
l1lanepcsskews13 l1lanepcsskews14 l1lanepcsskews15 l1lanepcsskews16', 'l1_lane_txcvrs_handle'::
'l1lanetxcvrspam41 l1lanetxcvrspam42 l1lanetxcvrspam43 l1lanetxcvrspam44 l1lanetxcvrspam45
l1lanetxcvrspam46 l1lanetxcvrspam47 l1lanetxcvrspam48', 'l1_lane_pcs_handle_pylist'::
['l1lanepcsskews1', 'l1lanepcsskews2', 'l1lanepcsskews3', 'l1lanepcsskews4', 'l1lanepcsskews5',
'l1lanepcsskews6', 'l1lanepcsskews7', 'l1lanepcsskews8', 'l1lanepcsskews9', 'l1lanepcsskews10',
'l1lanepcsskews11', 'l1lanepcsskews12', 'l1lanepcsskews13', 'l1lanepcsskews14', 'l1lanepcsskews15',
'l1lanepcsskews16'], 'l1_lane_prbs_handle': 'l1laneprbspam41 l1laneprbspam42 l1laneprbspam43
l1laneprbspam44 l1laneprbspam45 l1laneprbspam46 l1laneprbspam47 l1laneprbspam48',
'l1_lane_txcvrs_handle_pylist': ['l1lanetxcvrspam41', 'l1lanetxcvrspam42', 'l1lanetxcvrspam43',
'l1lanetxcvrspam44', 'l1lanetxcvrspam45', 'l1lanetxcvrspam46', 'l1lanetxcvrspam47',
'l1lanetxcvrspam48']}}, 'status': '1'}

End of Procedure Header

sth::l1_control

Purpose

Starts, stops L1 tests for the specified port.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::l1_control
   [-action  {fec_inject_error|prbs_inject_error|prbs_clear|prbs_reset_pattern|
              module_reset|pcs_clear|pcs_clear_history|start_pcs_fault_insertion|
              stop_pcs_fault_insertion|restart_an|txcvr_clear|start_txcvr_eye_scan|
              stop_txcvr_eye_scan|get_module_registers}  M]
   [-port_handle <port_handle or port_handle list>  M]
   [-lane_num_list <lane number list>]
   [-link_fault_duration <fault duration in ms>]
   [-link_fault_type {LOCAL|REMOTE}]
   [-link_fault_duration_type {CONTINUOUS|TIMED}]
   [-module_register_page {lower|upper}]
   [-module_register_addr <integer>]
   [-module_register_value <integer>]
   [-module_register_mode {read|write}]

Arguments

-port_handle

Specifies a list of ports on which L1 test will start, stop and injects errors. It is Mandatory that you specify -port_handle.

-action

Specifies the action to be taken on the specified port handle. This argument is Mandatory . Possible values are:

fec_inject_error
Injects a single RS-FEC codeword error using the mask bits configured in the Bit Selection section. It is Mandatory that you specify -port_handle.
prbs_inject_error
Sends a single error on the enabled PRBS lanes. Required -port_handle and -lane_num_list arguments. If -lane_num_list is not specified, PRBS error will send to the default lane number 0.
prbs_clear
Clear the PRBS statistics on the specified port and lanes.
prbs_reset_pattern
Reset the pattern to None for all lanes, which disables PRBS generation for all lanes. It is Mandatory that you specify -port_handle.
module_reset
Reboot the transceiver. It is Mandatory that you specify -port_handle.
pcs_clear
Clear the PCS and FEC error statistics. It is Mandatory that you specify -port_handle.
pcs_clear_history
Clear the PCS and FEC LED indicators. It is Mandatory that you specify -port_handle.
start_pcs_fault_insertion
Start PCS fault insertion. Specify -port_handle, link_fault_duration, link_fault_duration_type, and link_fault_type arguments.
stop_pcs_fault_insertion
Stop PCS fault insertion. It is Mandatory that you specify -port_handle.
restart_an
Restart auto negotiation. It is Mandatory that you specify -port_handle.
txcvr_clear
Clear the transceiver statistics. Required -port_handle and -lane_num_list arguments. If -lane_num_list is not specified, clears transceiver statistics for the default lane number 0.
start_txcvr_eye_scan
Start the periodic eyescan of the selected PAM4 lanes of the port. The eyescan reports the voltage characteristics of the PAM4 signal, with enabled ports overlaid together. Required -port_handle and -lane_num_list arguments. If -lane_num_list is not specified, starts eyescan for the default lane number 0.
stop_txcvr_eye_scan
Stop the periodic eyescan of the selected PAM4 lanes of the port. Required -port_handle and -lane_num_list arguments. If -lane_num_list is not specified, stops eyescan for the default lane number 0.
get_module_registers
Write or read the module register value. Only one value at a time can be configured. Required -port_handle, -module_register_page, -module_register_mode, -module_register_addr and -module_register_value.
-lane_num_list

Specifies the list of lane numbers or lane handles returned from l1_config API. The default is 0.

Specifies the fault duration in case of a timed fault in milliseconds. The default is 0.

Specifies the type of fault to be generated. Possible Values:

CONTINUOUS    Continuous fault. Must use -action stop
              to stop the fault

TIMED         Timed fault. Occurs for a specified durations

The default is CONTINUOUS.

Specifies the fault generation type. Possible Values:

LOCAL     Generate a local fault condition. The DUT
          presents a remote fault condition.

REMOTE    Generate a remote fault condition. The DUT presents
          an idle type.

The default is LOCAL.

-module_register_page

Specifies the page to view. Possible values are lower and upper.

-module_register_value

Specifies the one-byte hex value of the register.

-module_register_addr

Specifies the register address.

-module_register_mode

Specifies whether to read or write the register value. Possible values are read and write.

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status    Success (1) or failure (0) of the operation.
log       An error message (if the operation failed).
port.module_register_handle       Returns register handle when you specify
                                  -action to get_module_registers.

Description

The sth::l1_control function controls the L1 traffic through the specified ports. You can use the function to perform several actions: start/stop PCS fault insertion, start/stop eyescan, restart auto negotiation, get module register value, clear PCS stats etc.

Examples

#### HLTAPI for Tcl ####

To start the PRBS error injection on the specified ports and lanes:

sth::l1_control -port_handle "port1 port2" \
    -action           "prbs_inject_error"\
    -lane_num_list    "0 1 2" \

sth::l1_control -port_handle "port1 port2" \
    -action           "prbs_inject_error"\
    -lane_num_list    "l1laneprbspam41 l1laneprbspam42 l1laneprbspam43" \

Sample Output:

{status 1}

To write/read the module register handle on the specified port:

sth::l1_control \
-port_handle      port1 \
-action           "get_module_registers"\
-module_register_page         lower \
-module_register_mode         write \
-module_register_addr         26 \
-module_register_value        11 \

sth::l1_control \
-port_handle      port1 \
-action           "get_module_registers"\
-module_register_page         lower \
-module_register_mode         read \
-module_register_addr         26 \

Sample Output:

{module_register_handle l1qsfpddmemorylowerpageconfig25} {module_register_value 11} {status 1}

#### HLTAPI for Python ####

To start the FEC inject error:

   ctrl_ret1 = sth.l1_control (
               port_handle              = port1,
               action                   = 'fec_inject_error');

Sample Output::

 {'status': '1'}

#### HLTAPI for Perl ####

To restart auto negotiation on the specified port:

my %ctrl_ret1 = sth::l1_control (
            port_handle         => "port1",
            action              => 'restart_an');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';

End of Procedure Header

sth::l1_results

Purpose

Returns LIVE L1 test results from Spirent TestCenter IQ.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::l1_results
   [-port_handle <port_handle or port_handle list>  M]
   [-lane_num_list <lane number list>]
   [-result_type {l1_fec_sym_err_stats|l1_lane_pcs_stats|l1_port_pcs_stats|
                  l1_port_stats|l1_prbs_pam4_stats|l1_lane_eyescan_stats|
                  l1_lane_txcvrs_stats}  M]
   [-clear_db  {0|1}]

Arguments

-port_handle

Specifies a list of ports on which L1 test will start, stop and injects errors. It is Mandatory that you specify -port_handle.

-result_type

Specifies the type of L1 results. This argument is mandatory. Possible values are:

l1_fec_sym_err_stats
Returns LIVE L1 FEC system errors statistics from Spirent TestCenter IQ.
l1_lane_pcs_stats
Returns LIVE L1 PCS lane statistics from Spirent TestCenter IQ.
l1_port_pcs_stats
Returns LIVE L1 port PCS statistics from Spirent TestCenter IQ.
l1_port_stats
Returns LIVE L1 port statistics from Spirent TestCenter IQ.
l1_prbs_pam4_stats
Returns LIVE L1 PRBS lane statistics from Spirent TestCenter IQ.
l1_lane_eyescan_stats
Returns LIVE L1 eyescan lane statistics from Spirent TestCenter IQ.
l1_lane_txcvrs_stats
Returns LIVE L1 transceiver lane statistics from Spirent TestCenter IQ.
-lane_num_list

Specifies the list of lane numbers or lane handles returned from l1_config API. If lane numbers are specified, the results will be returned for the given lane numbers. Otherwise, returns the results for all lanes.

-clear_db

Specifies to stop and delete the TestCenter IQ database at the end of the test. Possible values are 0 and 1. If the value is set to 1, test will stop and delete the db. If the value is set to 0, test will not stop and delete the db. Default is 1.

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status         Retrieves a value indicating the success (1) or failure
               (0) of the operation.

log            Retrieves a message describing the last error that
               occurred during the operation. If the operation was
               successful - {status 1} - the log value is null

The following keys are returned when you specify -result_type l1_fec_sym_err_stats:

<port_handle>.<rownumber>.l1_fec_sym_err_bin_num
<port_handle>.<rownumber>.num_count

The following keys are returned when you specify -result_type l1_port_stats:

<port_handle>.<rownumber>.link_status
<port_handle>.<rownumber>.rx_ppm_offset
<port_handle>.<rownumber>.fpga_temp
<port_handle>.<rownumber>.module_temp
<port_handle>.<rownumber>.module_volt

The following keys are returned when you specify -result_type l1_lane_pcs_stats:

<port_handle>.<rownumber>.l1_lane_pcs_lane_num
<port_handle>.<rownumber>.virtual_lane_num
<port_handle>.<rownumber>.lock
<port_handle>.<rownumber>.symbol_error
<port_handle>.<rownumber>.sync_header_error
<port_handle>.<rownumber>.pre_fec_lane_ser
<port_handle>.<rownumber>.symbol_errors_total
<port_handle>.<rownumber>.symbol_errors_last_sec
<port_handle>.<rownumber>.symbol_errors_err_sec
<port_handle>.<rownumber>.symbol_errors_per_sec
<port_handle>.<rownumber>.rx_skew_bits
<port_handle>.<rownumber>.delay

The following keys are returned when you specify -result_type l1_prbs_pam4_stats:

<port_handle>.<rownumber>.l1_prbs_pam4_lane_num
<port_handle>.<rownumber>.prbs_detected
<port_handle>.<rownumber>.rx_pattern
<port_handle>.<rownumber>.bitswap
<port_handle>.<rownumber>.bit_errors
<port_handle>.<rownumber>.sync_sec
<port_handle>.<rownumber>.unsync_sec

The following keys are returned when you specify -result_type l1_lane_eyescan_stats:

<port_handle>.<rownumber>.l1_lane_eyescan_lane_num
<port_handle>.<rownumber>.l1_lane_eyescan_voltage
<port_handle>.<rownumber>.num_samples

The following keys are returned when you specify -result_type l1_lane_txcvrs_stats:

<port_handle>.<rownumber>.l1_lane_txcvrs_lane_num
<port_handle>.<rownumber>.signal
<port_handle>.<rownumber>.los_count
<port_handle>.<rownumber>.snr
<port_handle>.<rownumber>.pre_emphasis
<port_handle>.<rownumber>.main_tap
<port_handle>.<rownumber>.post_emphasis
<port_handle>.<rownumber>.tx_coarse_swing

The following keys are returned when you specify -result_type l1_port_pcs_stats:

<port_handle>.<rownumber>.cw_count
<port_handle>.<rownumber>.rx_fifo_error
<port_handle>.<rownumber>.all_lanes_aligned
<port_handle>.<rownumber>.fec_lanes_aligned
<port_handle>.<rownumber>.tx_local_fault
<port_handle>.<rownumber>.rx_local_fault
<port_handle>.<rownumber>.rx_remote_fault
<port_handle>.<rownumber>.rx_high_ser
<port_handle>.<rownumber>.bip_error
<port_handle>.<rownumber>.sync_header_error
<port_handle>.<rownumber>.post_fec_ser
<port_handle>.<rownumber>.pre_fec_ser
<port_handle>.<rownumber>.corrected_cw_total
<port_handle>.<rownumber>.corrected_cw_last_sec
<port_handle>.<rownumber>.corrected_cw_err_sec
<port_handle>.<rownumber>.corrected_cw_per_sec
<port_handle>.<rownumber>.uncorrected_cw_total
<port_handle>.<rownumber>.uncorrected_cw_last_sec
<port_handle>.<rownumber>.uncorrected_cw_err_sec
<port_handle>.<rownumber>.uncorrected_cw_per_sec
<port_handle>.<rownumber>.symbol_errors_total
<port_handle>.<rownumber>.symbol_errors_last_sec
<port_handle>.<rownumber>.symbol_errors_err_sec
<port_handle>.<rownumber>.symbol_errors_per_sec
<port_handle>.<rownumber>.code_violations_total
<port_handle>.<rownumber>.code_violations_last_sec
<port_handle>.<rownumber>.code_violations_err_sec
<port_handle>.<rownumber>.code_violations_per_sec
<port_handle>.<rownumber>.bip_errors_total
<port_handle>.<rownumber>.bip_errors_last_sec
<port_handle>.<rownumber>.bip_errors_err_sec
<port_handle>.<rownumber>.bip_errors_per_sec
<port_handle>.<rownumber>.control_code_errors_total
<port_handle>.<rownumber>.control_code_errors_last_sec
<port_handle>.<rownumber>.control_code_errors_err_sec
<port_handle>.<rownumber>.control_code_errors_per_sec
<port_handle>.<rownumber>.sync_header_errors_total
<port_handle>.<rownumber>.sync_header_errors_last_sec
<port_handle>.<rownumber>.sync_header_errors_err_sec
<port_handle>.<rownumber>.sync_header_errors_per_sec
<port_handle>.<rownumber>.sequence_errors_total
<port_handle>.<rownumber>.sequence_errors_last_sec
<port_handle>.<rownumber>.sequence_errors_err_sec
<port_handle>.<rownumber>.sequence_errors_per_sec

Description

The sth::l1_results function provides information about ports specified for the L1 configuration. JSON package is required to use l1_results function as it internally returns values in JSON format.

This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message. Function return values are converted from JSON format to a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list.

Examples

#### HLTAPI for Tcl ####

To retrieve L1 port statistics from the specified port:

sth::l1_results \
      -port_handle port1 \
      -result_type l1_port_stats \

Sample Output:

{port1 {{l1_port_stats {{0 {{link_status ERROR} {rx_ppm_offset -763}
{fpga_temp 48.98408095703121} {module_temp null} {module_volt null}}}}}}}
{status 1}

To retrieve L1 port statistics from the specified port, also stop and delete the test at the end of execution:

sth::l1_results \
     -port_handle      port1 \
     -lane_num_list    "0 1 2"\
     -result_type      "l1_prbs_pam4_stats"\
     -clear_db         1 \

Sample Output:

{port1 {{l1_prbs_pam4_stats {{0 {{l1_prbs_pam4_lane_num 0} {prbs_detected false}
{rx_pattern PRBS} {bitswap NONE} {bit_errors 0} {sync_sec 0} {unsync_sec 0}}}
{1 {{l1_prbs_pam4_lane_num 1} {prbs_detected false} {rx_pattern NONE}
{bitswap NONE} {bit_errors 0} {sync_sec 0} {unsync_sec 0}}}
{2 {{l1_prbs_pam4_lane_num 2} {prbs_detected false} {rx_pattern NONE}
{bitswap NONE} {bit_errors 0} {sync_sec 0} {unsync_sec 0}}}}}}} {status 1}

#### HLTAPI for Python ####

Sample Input:

results_ret2 = sth.l1_results (
    port_handle              = port1,
    result_type              = 'l1_port_stats');

Sample Output:

{'port1': {'l1_port_stats': {'0': {'rx_ppm_offset': '-754', 'module_volt': 'null',
'fpga_temp': '51.432197656249969', 'module_temp': 'null', 'link_status': 'ERROR'}}}}

End of Procedure Header