MGT/link configuration and monitoring¶
The mgts
subcommands are listed below. In each case, the list of channels is specified using the -c
or --channels
option, i.e:
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts SUBCOMMAND [-c CHANNEL_LIST] [OTHER OPTIONS]
configure tx
Resets and configures TX MGTs plus associated logic, then reads status registers and reports any erroneous values (unless the status check has been disabled)
The TX polarity can be inverted by adding the
--invert
flag. Note: This should only be done if the board traces or cables connect the positive TX pin of each channel to the negative RX pin, and vice versa.The MGT can be configured to internally loop the transmitted data to the RX logic using the
--loopback
flag. Valid values are:nearPCS
,nearPMA
,farPCS
,farPMA
The PRBS (pseudorandom binary sequence) pattern generator can be enabled using the
--prbs
flag. Valid values are:PRBS7
,PRBS9
,PRBS15
,PRBS23
,PRBS31
The status register check can be skipped by adding the
--no-check
flag (though skipping status checks is not recommended for standard workflows)
For example, to configure TX channels 0 to 3 and 8 to 11 inclusive (standard polarity, internal loopback disabled):
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts configure tx -c 0-3,8-11
Or, to configure the same channels with inverted polarity, and skip the status checks:
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts configure tx -c 0-3,8-11 --invert --no-check
configure rx
Resets and configures RX MGTs plus associated logic, then reads status registers and reports any erroneous values (unless the status check has been disabled)
The RX polarity can be inverted by adding the
--invert
flag. Note: This should only be done if the board traces or cables connect the positive TX pin of each channel to the negative RX pin, and vice versa.By default, the MGTs will be configured in LPM mode. DFE mode can be used by adding the
--enable-dfe
flag.The PRBS (pseudorandom binary sequence) pattern checker can be enabled using the
--prbs
flag. Valid values are:PRBS7
,PRBS9
,PRBS15
,PRBS23
,PRBS31
The eyescan circuitry can be disabled by adding the
--disable-eyescan
flag (this is not recommended for standard workflows)The status register check can be skipped by adding the
--no-check
flag (though skipping status checks is not recommended for standard workflows)
For example, to configure TX channels 0 to 3 and 8 to 11 inclusive (standard polarity, LPM):
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts configure tx -c 0-3,8-11
Or, to configure the same channels in DFE mode:
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts configure tx -c 0-3,8-11 --enable-dfe
status
Reads the MGT status registers, and reports whether there are any erroneous values (printing the values in that case)
By default, both RX and TX status registers are checked. They can be restricted to one direction by adding
rx
ortx
.
For example, to check the RX and TX status registers on channels 0 to 3 and 8 to 11 inclusive:
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts status -c 0-3,8-11
Or, to check only the status of the RX MGTs:
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts status rx -c 0-3,8-11
off
Powers off the MGTs and QPLLs
Although the command is specified at the
--channels
level (like allmgts
subcommands), the power is controlled at the quad level. Powering off one channel will power off all channels in the same quad.By default, both RX and TX MGTs and the QPLL for each quad are powered off.
If restricted to one direction by adding
rx
ortx
, the QPLL will only be powered off if both RX and TX MGTs are off.
For example, to power off the RX and TX MGTs and the QPLLs for channels 0 to 3 and 8 to 11 inclusive:
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts off -c 0-3,8-11
Or, to power off only the RX MGTs (and the QPLLs if the TX MGTs are already off):
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts off rx -c 0-3,8-11
scan
Run bathtub or eye scans.
See the Bathtub and eye scans page for details of the scan
subcommand.
measure-clocks
Measures frequencies of MGT reference clocks, as well as the RX and TX MGT data clocks
empbutler -c CONNECTIONS_FILE.xml do DEVICE_ID mgts measure-clocks -c CHANNEL_LIST
No additional options/flags, beyond the list of channels.
Note
If any given LHC-sync/-async ref clock that’s been declared to the framework isn’t used
in a design (e.g. the LHC-sync ref clock for a set of regions where only BE MGT link
firmware is instantiated), then the framework will not actually connect those pins to
anything at all, and the frequency reported by the measure-clocks
command will be 0.