fecError
fecError - insert FEC errors
SYNOPSIS
fecError sub-command options
DESCRIPTION
Forward Error Correction (FEC) is a method of communicating data that corrects errors in transmission on the receiving end. Prior to transmission, the data is put through a predetermined algorithm that adds extra bits specifically for error correction to any character or code block. If the transmission is received in error, the correction bits are used to check and repair the data. This feature is only available for certain port types; this may be tested through the use of the port isValidFeature... portFeatureFec command. FEC insertion must be enabled through the use of the opticalDigitalWrapper command.
The fecError command allows you to inject FEC errors into transmitted data. Three distinct modes are controlled by the injectionMode option:
- Single: a single instance of an error is inserted.
- Rate: errors are inserted at one of a set of pre-determined rates as controlled by the errorRate option.
- Burst: continuous bursts of errors is inserted as determined by the subrow, burstSize, offset, errorBits and numberOfRowsToSkip options.
Single errors are inserted with the injectError sub-command and the start and stop commands are used to start and stop rate and burst error insertion.
STANDARD OPTIONS
burstSize
The number of consecutive bytes (up to 15) after the 1st corrupted byte in each 255-byte sub-row to also be corrupted. Thus if Burst Size = 15, then 16 bytes are corrupted in each selected sub-row. Default Burst Size = 0, meaning only 1 byte is corrupted. Values between 8 and 15 results in uncorrectable errors. (default = 0)
errorBits
The OR'ing of a set of bits to be errored. The default value of 0x01 shows error the low order bit. The value of 0x81 errors both the high order and low order bits. (default = 1)
errorRate
One of a set of pre-defined error rates.
Option |
Value |
Usage |
---|---|---|
fecRate_0996_e02_correctable |
0 |
(default) 0.996 x 10-2 correctable |
fecRate_1001_e03_correctable |
1 |
1.001 x 10-3 correctable |
fecRate_1001_e04_correctable |
2 |
1.001 x 10-4 correctable |
fecRate_1001_e05_correctable |
3 |
1.001 x 10-5 correctable |
fecRate_1000_e06_correctable |
4 |
1.000 x 10-6 correctable |
fecRate_1000_e07_correctable |
5 |
1.000 x 10-7 correctable |
fecRate_1000_e08_correctable |
6 |
1.000 x 10-8 correctable |
fecRate_1000_e09_correctable |
7 |
1.000 x 10-9 correctable |
fecRate_1000_e10_correctable |
8 |
1.001 x 10-10 correctable |
fecRate_1000_e11_correctable |
9 |
1.000 x 10-11 correctable |
fecRate_1000_e12_correctable |
10 |
1.0010x 10-12 correctable |
fecRate_0960_e02_uncorrectable |
11 |
0.960 x 10-2 uncorrectable |
fecRate_1000_e03_uncorrectable |
12 |
1.000 x 10-3 uncorrectable |
fecRate_1000_e04_uncorrectable |
13 |
1.000 x 10-4 uncorrectable |
fecRate_1000_e05_uncorrectable |
14 |
1.000 x 10-5 uncorrectable |
fecRate_1000_e06_uncorrectable |
15 |
1.000 x 10-6 uncorrectable |
fecRate_1000_e07_uncorrectable |
16 |
1.000 x 10-7 uncorrectable |
fecRate_1000_e08_uncorrectable |
17 |
1.000 x 10-8 uncorrectable |
fecRate_1000_e09_uncorrectable |
18 |
1.000 x 10-9 uncorrectable |
fecRate_1000_e10_uncorrectable |
19 |
1.001 x 10-10 uncorrectable |
injectionMode
The mode of error injection.
Option |
Value |
Usage |
---|---|---|
fecSingleErrorInjection |
0 |
(default) Indicates that a single error is inserted. The error is an argument to the insertError sub-command. This option must be set to this value when insertError is used. |
fecErrorRateInjection |
1 |
Continuously inserts errors at one of a set of pre-determined rate indicated in the errorRate option. |
fecBurstErrorInjection |
2 |
Inserts continuous bursts of errors as indicted by the subrow, burstSize, offset, errorBits and numberOfRowsToSkip options. |
numberOfRowsToSkip
The number of rows to skip between error insertion burst. (default = 0)
offset
The offset within the subrow to start injecting errors. Byte 0 is the OH byte. (default = 1)
subrow
An OR'ing of bit to indicate which sub-row(s) to corrupt out of the 16 interleaved sub-rows. Each bit position represents one sub-row. Thus if subrow = 0xFFFF, then all sub-rows have errors on them. The low-order bit represents the first sub-row. (default = 0)
COMMANDS
The fecError command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
fecError cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the fecError command.
fecError config option value
Modify the configuration options of the fecError. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for fecError.
fecError get chasID cardID portID
Gets the current configuration of the fecError for the indicated port. Call this command before calling fecError cget option value to get the value of the configuration option. Specific errors are:
- No connection to a chassis
- Unsupported feature
fecError injectError fecErrorType chasID cardID portID
Inject a single instance of the error indicated by fecError into the indicated port's stream. The valid options for fecError are:
Option |
Value |
Usage |
---|---|---|
fecOnesError |
0 |
(default) Causes 0 bits to be changed to 1 bits. |
fecZerosError |
1 |
Causes 1 bits to be changed to 0 bits. |
fecBalancedError |
2 |
With an equal probability, a ones or zeros errors is inserted. |
fecUncorrectableError |
3 |
Causes uncorrectable errors to be inserted. |
Specific errors are:
- No connection to a chassis
- Unsupported feature
- The port is being used by another user
- The value of injectionMode is not fecSingleErrorInjection
fecError set chasID cardID portID
Sets the configuration of the fecError in IxHAL for the port indicated by reading the configuration option values set by the fecError config option value command. Specific errors are:
- No connection to a chassis
- Unsupported feature
- The port is being used by another user
- The configured parameters are not valid for this port
fecError setDefault
Sets to IxTclHal default values for all configuration options.
fecError start chasID cardID portID
Starts the FEC error insertion process if injectionMode is fecErrorRateInjection or fecBurstErrorInjection. The stop sub-command must be used to stop error insertion. Specific errors are:
- No connection to a chassis
- Invalid port
- The port is being used by another user
- Unsupported feature
- The value of injectionMode is not fecErrorRateInjection or fecBurstErrorInjection.
fecError stop chasID cardID portID
Stops the FEC error insertion process if injectionMode is fecErrorRateInjection or fecBurstErrorInjection. Specific errors are:
- No connection to a chassis
- Invalid port
- The port is being used by another user
- Unsupported feature
- The value of injectionMode is not fecErrorRateInjection or fecBurstErrorInjection.
EXAMPLES
package req IxTclHal
set host localhost
set username test
# Check if we're running on UNIX - connect to the TCL Server
# which must be running on the chassis
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
# Now connect to the chassis
if [ixConnectToChassis $host] {
ixPuts $::ixErrorInfo
return 1
}
# Get the chassis ID to use in port lists
set chassis [ixGetChassisID $host]
set card 69
set port 1
# Useful port lists
set portList [list [list $chassis $card $port]]
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
# Take ownership of the ports we'll use
if [ixTakeOwnership $portList] {
ixPuts $::ixErrorInfo
return 1
}
port setFactoryDefaults $chassis $card $port
# Make sure to enable the use of FEC
opticalDigitalWrapper config -enableFec true
opticalDigitalWrapper config -payloadType optDigWrapperPayloadType03
if [opticalDigitalWrapper set $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
# Inject a single balanced error
fecError setDefault
fecError config -injectionMode fecSingleErrorInjection
if [fecError set $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
ixWriteConfigToHardware portList
if [fecError injectError fecBalancedError $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
# Setup a continuous error rate
fecError setDefault
fecError config -injectionMode fecErrorRateInjection
fecError config -errorRate fecRate_1000_e06_correctable
if [fecError set $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
ixWriteConfigToHardware portList
if [fecError start $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
after 1000
if [fecError stop $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
# Setup a burst rate
fecError setDefault
fecError config -injectionMode fecBurstErrorInjection
fecError config -subrow 0x0020
fecError config -burstSize 4
fecError config -offset 1
fecError config -errorBits 3
fecError config -numberOfRowsToSkip 2
if [fecError set $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
ixWriteConfigToHardware portList
if [fecError start $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
after 1000
if [fecError stop $chassis $card $port] {
ixPuts $::ixErrorInfo
return 1
}
# Let go of the ports that we reserved
ixClearOwnership $portList
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}