rxLaneDiag

rxLaneDiag - configures the Rx port diagnostics

SYNOPSIS

rxLaneDiag sub-command options

DESCRIPTION

The rxLaneDiag command is used to control the acquisition and retrieval of the analytics of the T400 Rx eye histogram feature (also referred to as RX Diagnostics). The three main diagnostics available are PMD statistics, ADC histograms, and Slicer histograms. Note that some of the diagnostics may be licensed.

STANDARD OPTIONS
laneMask

The hexadecimal mask of the lanes being queried (1’b1 enables the lane, 1’b0 disables the lane). In 400GE mode, the mask for all the 8 lanes would be 0xFF, in 200GE 0x0F, and so on.

lane

The electrical lane number being accessed. Lane starts counting at 1.

count

The number of acquisitions to be performed.

COMMANDS

The rxLaneDiag command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.

rxLaneDiag resetPmdStats chassis card port laneMask

Clears the RX PMD Stat results for the lanes in laneMask in the given port; stops reads.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag resetAdcHistograms chassis card port laneMask

Clears the ADC histogram results for the lanes in laneMask in the given port; stops ADC acquisition.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag resetSlicerHistograms chassis card port laneMask

Clears the slicer histogram results for the lanes in laneMask in the given port; stops slicer acquisition.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag clearPmdStats chassis card port laneMask

Clears the RX PMD Stat results for the lanes in laneMask in the given port; keeps reads running if they were already running.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag clearAdcHistograms chassis card port laneMask

Clears the ADC histogram results for the lanes in laneMask in the given port; keeps ADC acquisitions running if they were already running.

rxLaneDiag clearSlicerHistograms chassis card port laneMask

Clears the slicer histogram results for the lanes in laneMask in the given port; keeps slicer acquisitions running if they were already running.

rxLaneDiag stopPmdStats chassis card port laneMask

Stops RX PMD Stat reads for the lanes in laneMask in the given port.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag stopAdcHistograms chassis card port laneMask

Stops ADC acquisition for the lanes in laneMask in the given port.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag stopSlicerHistograms chassis card port laneMask

Stops slicer acquisition for the lanes in laneMask in the given port.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag acquireAdcHistograms chassis card port laneMask count

Requests that count acquisitions be performed at the ADC for the lanes in laneMask in the given port.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag acquireSlicerHistograms chassis card port laneMask count

Requests that count acquisitions be performed at the slicer for the lanes in laneMask in the given port.

This does not change the results that would be returned by the rxLaneDiag return* commands.

rxLaneDiag getPmdStats chassis card port

Loads the RX PMD status for all lanes in the given port, to be returned by calls to rxLaneDiag returnPmdStat.

rxLaneDiag getHistograms chassis card port

Loads the RX ADC and slicer histogram results for all lanes in the given port, to be returned by calls to rxLaneDiag return*.

rxLaneDiag returnPmdStat lane

Returns the RX PMD status information for the given lane, as retrieved by the last call to rxLaneDiag getPmdStats.

The return value is a list, {pmdStatus vga ctle snr ffo}, which is empty to indicate a lack of results.

Value

Usage

pmdStatus

A string telling the current status

vga

The Variable Gain Amplifier (VGA) value, or -2147483648 if not known.

ctle

The Continuous Time Linear Equalizer (CTLE) value, or -2147483648 if not known.

snr

The Signal to Noise Ratio (SNR) value (in dB), or NAN if not known.

ffo

The Fractional Frequency Offset (FFO) value (in Parts Per Million, PPM), or NAN if not known.

rxLaneDiag returnAdcHistogramResult lane

Returns the RX ADC histogram result for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

The return value is a list: {uniqueId count remainingCount values}, which is empty to indicate a lack of results.

Value

Usage

uniqueId

A unique ID (scoped to the lane) for these results.

count

The number of histogram acquisitions that are contained in this data.

remainingCount

The number of histogram acquisitions that are still to be acquired.

values

Zero or more Y values in the acquired ADC histogram.

rxLaneDiag returnAdcHistogram lane

Returns the RX ADC histogram Y values for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns an empty list if not present.

rxLaneDiag returnAdcHistogramString lane height

Returns a height-length list of strings, one string per line, which displays in ASCII the ADC histogram plot for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns an empty list if not present.

rxLaneDiag returnAdcMinMeanMaxStdDev lane

Returns a list containing the minimum, mean, maximum, and standard deviation statistics of the ADC histogram result for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

The return value is a list: {min mean max stdDev }, which is empty to indicate a lack of results. Each value is in units of the full scale of the ADC; that is, from 0 to 1.

Value

Usage

min

The minimum code seen.

mean

The mean of the codes seen.

max

The maximum code seen.

stdDev

The standard deviation of the codes seen.

rxLaneDiag returnSlicerHistogramResult lane

Returns the RX slicer histogram result for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

The return value is a list: {uniqueId count remainingCount values}, which is empty to indicate a lack of results.

Value

Usage

uniqueId

A unique ID (scoped to the lane) for these results.

count

The number of histogram acquisitions that are contained in this data.

remainingCount

The number of histogram acquisitions that are still to be acquired.

values

Zero or more Y values in the acquired slicer histogram.

rxLaneDiag returnSlicerHistogram lane

Returns the RX slicer histogram Y values for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns an empty list if not present.

rxLaneDiag returnSlicerHistogramString lane height

Returns a height-length list of strings, one string per line, which displays in ASCII the slicer histogram plot for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnLevelMeans lane

Returns the means of the eye levels in the slicer histogram result, in units of ratio of full scale, e.g. {0.2 0.4 0.6 0.8}, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnRlm lane

Returns the projected Linearity Measurement (Rlm) for the given lane in the slicer histogram result, as retrieved by the last call to rxLaneDiag getHistogramResult. lane starts counting at 1. Returns NAN if not present or not valid.

rxLaneDiag returnLevelStdDevs lane

Returns the standard deviations for the level histograms in the slicer histogram result, in units of ratio of full scale, e.g. {0.03 0.025 0.02 0.028}, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnEyeHeightsForStdDev lane numStdDev

Returns the eye heights for a given number of standard deviations (numStdDev) for the level histograms in the slicer histogram result, in units of ratio of full scale, e.g. {0.095 0.10 0.098}, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnMeasuredBathtub lane

Returns the measured bathtub plot, measured with Symbol Error Rate (SER) as the Y axis, for the given lane in the slicer histogram result, as retrieved by the last call to rxLaneDiag getHistogramResult. The X axis is the slicer threshold, uniformly spaced across the full scale.

Returns an empty list if not present.

rxLaneDiag returnMeasuredBathtubString lane height

Returns a height-length list of strings, one string per line, which displays in ASCII the measured bathtub plot for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnProjectedBathtub lane

Returns the projected bathtub plot, measured with Symbol Error Rate (SER) as the Y axis, for the given lane in the slicer histogram result, as retrieved by the last call to rxLaneDiag getHistogramResult. The X axis is the slicer threshold, uniformly spaced across the full scale.

Returns an empty list if not present.

rxLaneDiag returnProjectedBathtubForX lane xValues

Returns the projected bathtub plot, measured with Symbol Error Rate (SER) as the Y axis, for the given lane in the slicer histogram result, as retrieved by the last call to rxLaneDiag getHistogramResult. The X axis is the slicer threshold, supplied by the xValues list with values from 0.0 to 1.0; the result will contain the projections for each X value.

Returns an empty list if not present.

rxLaneDiag returnProjectedBathtubString lane height

Returns a height-length list of strings, one string per line, which displays in ASCII the projected bathtub plot for the given lane, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnEyeHeightsForBER lane ber

Returns the projected eye heights for a given Bit Error Ratio (ber) for the level histograms in the slicer histogram result, in units of ratio of full scale, e.g. {0.003 0.004 0.0035}, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnProjectedSERs lane

Returns the projected Symbol Error Rates (SERs) for the eyes in the given lane in the slicer histogram result, e.g. {2.28E-6 1.67E-6 3.18E-6}, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnProjectedBER lane

Returns the projected Bit Error Rate (BER) for the eyes in the given lane in the slicer histogram result, as retrieved by the last call to rxLaneDiag getHistogramResult.

Returns empty results if not present.

rxLaneDiag returnVEC lane

Returns the projected Vertical Eye Closure (VEC), in decibels, for the given lane in the slicer histogram result, as retrieved by the last call to rxLaneDiag getHistogramResult.
Returns NAN if not present or not valid.

EXAMPLE
Copy
# Sample script for Rx Histogram feature
package require IxTclHal
set hostName 10.36.74.228
set userName user
set port1 [list 1 1 1]
set portList [list $port1]
scan $port1 "%d %d %d" chasId cardId portId

# Connect to TCL Server if running from Unix
if {[isUNIX] && [ixConnectToTclServer $hostName]} {
  errorMsg "Could not connect to Tcl Server $hostName"
  return $::TCL_ERROR
}
# Now connect to chassis
if {[ixConnectToChassis $hostName]} {
  errorMsg "Could not connect to chassis $hostName"
  return $::TCL_ERROR
}
# Login and take port ownership
ixLogin $userName
if {[ixTakeOwnership $portList]} {
  errorMsg "Could not take ownership of $portList"
  return $::TCL_ERROR
}

# Check to see if the basic Rx Diagnostic feature is valid
if {![port isValidFeature $chasId $cardId $portId \
  portFeatureRxLaneDiag]} {
  errorMsg "portFeatureRxLaneDiag is NOT a valid feature for $port1"
  return $::TCL_ERROR
}

# PMD Statistics
# -Step 1: clear acquisitions on all lanes
set laneMask 0xFF
set minLane 1
set maxLane 8
puts "\nClearing PMD acquisitions"
rxLaneDiag resetPmdStats $chasId $cardId $portId $laneMask
after 500
# -Step 2: start acquisitions, wait, then fetch results
set acq 1
set waitTime [expr $acq * 2]
rxLaneDiag readPmdStats $chasId $cardId $portId $laneMask $acq
puts "Running $acq PMD acquisitions for $waitTime s..."
update idletasks
after [expr {$waitTime * 1000}]
rxLaneDiag getPmdStats $chasId $cardId $portId
# -Step 3: display PMD stats
for {set lane $minLane} {$lane <= $maxLane} {incr lane} {
  set pmdStats [rxLaneDiag returnPmdStat $lane]
  if {$pmdStats eq ""} {
    puts "PMD stats for port $portId, lane $lane: no data"
  } else {
    puts "PMD stats for port $portId, lane $lane:\
      [format \
        "Status=%-6s VGA=%-2d CTLE=%-2d SNR=%-4.1f db FFO=%4.1f PPM"\
        [lindex $pmdStats 2] \
        [expr [lindex $pmdStats 3]] \
            [expr [lindex $pmdStats 4]] \
            [expr [lindex $pmdStats 5]] \
            [expr [lindex $pmdStats 6]] \
      ]"
  }
}

# ADC Histogram
# -Step 1: clear acquisitions on all lanes
set laneMask 0xFF
puts "\nClearing ADC acquisitions"
rxLaneDiag resetAdcHistograms $chasId $cardId $portId $laneMask
after 500
# -Step 2: start acquisitions, wait, then fetch results
set acq 5
set waitTime [expr $acq * 3]
rxLaneDiag acquireAdcHistograms $chasId $cardId $portId $laneMask $acq
puts "Running $acq ADC acquisitions for $waitTime s..."
update idletasks
after [expr {$waitTime * 1000}]
rxLaneDiag getHistograms $chasId $cardId $portId
# -Step 3: display ADC stats and histogram of a single lane
set lane 1
set height 20
set histogramInfo   [rxLaneDiag returnAdcHistogramResult $lane]
set minMeanMaxStDev [rxLaneDiag returnAdcMinMeanMaxStdDev $lane]
set histogramStr [rxLaneDiag returnAdcHistogramString $lane $height]
if {$histogramStr eq ""} {
  puts "ADC Histogram Lane $lane: no data"
} else {
  puts "ADC Histogram Lane $lane:\
    [format \
      "Acquisitions:%-3d Remaining:%-3d - \
      Min:%4.1f%s  Mean:%4.1f%s  Max:%4.1f%s  StdDev:%5.2f%s"\
      [lindex $histogramInfo 1] [lindex $histogramInfo 2]\
      [expr [lindex $minMeanMaxStDev 0] * 100] " %FS"\
      [expr [lindex $minMeanMaxStDev 1] * 100] " %FS"\
      [expr [lindex $minMeanMaxStDev 2] * 100] " %FS"\
      [expr [lindex $minMeanMaxStDev 3] * 100] " %FS"
    ]"
    puts ""
    puts [join $histogramStr "\n"]
}

# Check to see if the full Rx Diagnostic feature is valid
if {![port isValidFeature $chasId $cardId $portId \
  portFeatureRxLaneFullDiag]} {
  errorMsg "portFeatureRxLaneFullDiag NOT a valid feature for $port1"
  return $::TCL_ERROR
}

# Slicer Histogram
# -Step 1: clear acquisitions on all lanes
set lMask 0xFF
puts "\nClearing Slicer acquisitions"
rxLaneDiag resetSlicerHistograms $chasId $cardId $portId $lMask
after 500
# -Step 2: start acquisitions, wait, then fetch results
set acq 5
set waitTime [expr $acq * 3]
rxLaneDiag acquireSlicerHistograms $chasId $cardId $portId $lMask $acq
puts "Running $acq Slicer acquisitions for $waitTime s..."
update idletasks
after [expr {$waitTime * 1000}]
rxLaneDiag getHistograms $chasId $cardId $portId
# -Step 3: display Slicer stats and histogram+bathtub of a single lane
set lane 1
set height 20
set histogramInfo [rxLaneDiag returnSlicerHistogramResult $lane]
set rlm [rxLaneDiag returnRlm $lane]
set vec [rxLaneDiag returnVEC $lane]
set ber [rxLaneDiag returnProjectedBER $lane]
set rxEyeHeights6StdDev [rxLaneDiag returnEyeHeightsForStdDev $lane 6]
set rxEyeHeightsToBER [rxLaneDiag returnEyeHeightsForBER $lane 1.0E-8]
set rxEyeSERs [rxLaneDiag returnProjectedSERs $lane]
set rxLevelMeans   [rxLaneDiag returnLevelMeans $lane]
set rxLevelStdDevs [rxLaneDiag returnLevelStdDevs $lane]
set histogrStr [rxLaneDiag returnSlicerHistogramString $lane $height]
set measBathStr [rxLaneDiag returnMeasuredBathtubString $lane $height]
set proBathStr [rxLaneDiag returnProjectedBathtubString $lane $height]
if {$histogrStr eq ""} {
  puts "Slicer Histogram Lane $lane: no data"
} else {
  puts "Slicer Histogram Lane $lane:"
  puts [format "Acquisitions : %d" [lindex $histogramInfo 1]]
  puts [format "Remaining    : %d" [lindex $histogramInfo 2]]
  puts [format "Projected Rlm: %5.3f" $rlm]
  puts [format "Projected VEC: %.2f dB" $vec]
  puts [format "Projected BER: %.3g\n" $ber]
  foreach {eye index} [list Upper 2 Middle 1 Lower 0] {
    puts "$eye Eye:"
    puts [format "-Height @ 6sigma: %5.2f %%FS" \
      [expr [lindex $rxEyeHeights6StdDev $index] * 100]]
    puts [format "-Height@BER10^-8: %5.2f %%FS" \
      [expr [lindex $rxEyeHeightsToBER $index] * 100]]
    puts [format "-Projected SER  : %.3g" [lindex $rxEyeSERs $index]]
  }
  puts ""
  foreach level [list 3 2 1 0] {
    puts "Level $level:"
    puts [format "-Mean   : %.1f %%FS" \
      [expr [lindex $rxLevelMeans $level] * 100]]
    puts [format "-Std Dev: %.2f %%FS" \
      [expr [lindex $rxLevelStdDevs $level] * 100]]
  }
  puts "\nSlicer Histogram:"
  puts [join $histogrStr "\n"]
  puts "\nMeasured Bathtub:"
  puts [join $measBathStr "\n"]
  puts "\nProjected Bathtub:"
  puts [join $proBathStr "\n"]
}
ixClearOwnership