1 PCIe RX Lane Margining
The PCIe Manager implements lane margining at the receiver extended capability according to the PCI Express Base Specification Revision 5.0. The extended capability provides the appropriate Status and Control registers for four lanes. The Control registers can be used to read the lane margining parameters, configure the lane margining behavior, or issue a Margin Step command. The Status registers are used to read the results of the latest command.
The PCIe Manager will check each lane before starting a capture to make sure the lane has been calibrated. If calibration is needed, the manager will run the specified calibration code before starting the capture. The calibration code will only be run once per lane until the lane margining code is reset.
The Margin Step capture can be run in Fixed Sample Count mode or in Timer/Continuous mode. In Fixed Sample Count mode, the SerDes stops the capture after 32000 samples (default setting), but the capture can be extended indefinitely by switching to Timer/Continuous mode. When it is done, the PCIe Manager reads the error count and reports it when the host reads the appropriate status register in the capability. In Timer/Continuous capture mode, the PCIe Manager initiates the capture and the SerDes continues to collect samples until told to stop. The PCIe Manager will stop the capture if the current error count exceeds the error count limit. Otherwise, the host can stop the capture by issuing a Goto Normal command or a new Margin Step command. The host should read the error count and sample count (if needed) before issuing these commands since these commands reset the counters. In both modes, the sample count will be the actual number of samples collected.
If no lane margin commands are received for 30 seconds, the PCIe Manager will quiesce the lane margining feature by stopping any captures still in progress and turning off the lane margining timers. This will invalidate the calibration data. The lane margining code will not be active until a new lane margining command is received.
