PL1_LINKTRAIN_CMD
code: 389
Attention
Only for the following modules:
Freya-800G-4S-1P
Freya-800G-4S-1P-OSFP
# set
<module-index>/<port-index> PL1_LINKTRAIN_CMD [<serdes>] <cmd> <arg>
# get
<module-index>/<port-index> PL1_LINKTRAIN_CMD [<serdes>] ?
Description
Link training RPC. Issue link training commands on a given serdes and poll for status.
The parameters returned by the get method is <cmd> <arg> <result> <flag>
Actions
set, get
Parameters
cmd
: byte, the Link Training command code.
CMD_NOP = 0
, No operation. Used for ping testing
CMD_INC = 1
, Increment the coeff provided in ARG
CMD_DEC = 2
, Decrement the coeff provided in ARG
CMD_PRESET = 3
, Set the preset provided in ARG
CMD_ENCODING = 4
, Set encoding provided in ARG
CMD_LOCAL_TRAINED = 255
, Signal training completed
arg
: byte, the arguments for the corresponding LT command.For
<cmd>
beingCMD_INC
andCMD_DEC
:PRE1 = 0
, Pre1 coeff c(-1)MAIN = 1
, Pre1 coeff c(0)POST = 2
, Pre1 coeff c(1)PRE2 = 3
, Pre1 coeff c(-2)PRE3 = 4
, Pre1 coeff c(-3)
For
<cmd>
beingCMD_PRESET
:PRESET_1 = 0
, preset 1PRESET_2 = 1
, preset 2PRESET_3 = 2
, preset 3PRESET_4 = 3
, preset 4PRESET_5 = 4
, preset 5
For
<cmd>
beingCMD_ENCODING
:PAM2 = 0
, NRZPAM4 = 1
, PAM4PAM4_WITH_PRECODING = 2
, PAM4 with precoding
result
: byte, the LT command result.
UNKNOWN = 0x00 | 0
, Unknown result
SUCCESS = 0x00 | 1
, Command successfully completed
TIMEOUT = 0x00 | 2
, Command timeout
FAILED = 0x00 | 3
, Command failed
COEFF_STS_NOT_UPDATED = 0x80 | 0
, Coefficient did not update
COEFF_STS_UPDATED = 0x80 | 1
, Coefficient updated
COEFF_STS_AT_LIMIT = 0x80 | 2
, Coefficient at limit
COEFF_STS_NOT_SUPPORTED = 0x80 | 3
, Coefficient not supported
COEFF_STS_EQ_LIMIT = 0x80 | 4
, EQ limit reached
COEFF_STS_C_AND_EQ_LIMIT = 0x80 | 6
, Coefficient and EQ limit reached
flag
: byte, the LT command flag bitmask.
NEW = 1
, New command
IN_PROGRESS = 2
, Command in progress
DONE = 4
, Command done
LOCK = 8
, Link locked
LOCK_LOST = 16
, Link lock lost
OVERRUN = 32
, Overrun detected
Example
# set
input: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_INC PRE1
output: <OK>
# get
input: 0/0 PL1_LINKTRAIN_CMD [0x00] ?
output: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_INC PRE1 COEFF_STS_UPDATED DONE
---
# set
input: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_DEC MAIN
output: <OK>
# get
input: 0/0 PL1_LINKTRAIN_CMD [0x00] ?
output: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_DEC MAIN COEFF_STS_UPDATED DONE
---
# set
input: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_PRESET PRESET_2
output: <OK>
# get
input: 0/0 PL1_LINKTRAIN_CMD [0x00] ?
output: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_PRESET PRESET_2 SUCCESS DONE
---
# set
input: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_ENCODING PAM4_WITH_PRECODING
output: <OK>
# get
input: 0/0 PL1_LINKTRAIN_CMD [0x00] ?
output: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_ENCODING PAM4_WITH_PRECODING SUCCESS DONE
---
# set
input: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_LOCAL_TRAINED 0
output: <OK>
# get
input: 0/0 PL1_LINKTRAIN_CMD [0x00] ?
output: 0/0 PL1_LINKTRAIN_CMD [0x00] CMD_LOCAL_TRAINED 0 SUCCESS DONE