When SUBCLASS=1, the receiver waits for
JESD_ALIGNED=1 before measuring lane arrival times (LANE_ARR) or releasing the
elastic buffer. This is not prescribed by the JESD204C standard, but is appropriate
for these reasons:
- Waiting makes sure that the
reference counter (LMFC/LEMC) used for lane arrival measurements is properly
aligned by SYSREF before measuring the lane arrival times. This is important
because lane arrival times are only measured once and the user cannot re-measure
them unless SYS_EN is cycled (thus resetting the reference counter).
- Waiting avoids a situation where the link starts up briefly with an arbitrary
LMFC/LEMC phase (and arbitrary latency) and then goes back down once SYSREF
pulses are processed (this can occur if the SYSREF period is very long).
Additionally, in 8b/10b mode (and SUBCLASS=1), the receiver waits for JESD_ALIGNED=1
before de-asserting SYNC.
The JESD_ALIGNED signal is generated according to these rules:
- JESD_ALIGNED is 0 when SYS_EN is initially set.
- JESD_ALIGNED is cleared if a SYSREF pulse causes a realignment of any clock that
supports the LMFC/LEMC.
- JESD_ALIGNED is cleared if a SYSREF pulse causes any adjustment of the
LMFC/LEMC.
- JESD_ALIGNED is set if the LMFC/LEMC counter processes two SYSREF alignment
events (sysref_align_jctrl pulses) and the second event did not require the
LMFC/LEMC phase to be adjusted.
- The LMFC/LEMC counter may
not receive any SYSREF events until all supporting clocks are aligned.
Therefore,up to 15 valid SYSREF pulses may be required (while
SYSREF_ALIGN_EN=1) to set JESD_ALIGNED.
- Requiring two SYSREF alignment events to reach the LMFC/LEMC counter
makes sure that the link won’t come up unless the SYSREF period is valid
(avoids false link startups).
- Any time JESD_ALIGNED is cleared, the counter that counts two SYSREF events (for
item #4) is also reset.
- Note that SYSREF_ALIGN_EN must be set for SYSREF alignment events to reach the
LMFC/LEMC counter. If JESD_ALIGNED is already set, and then SYSREF_ALIGN_EN is
cleared, and then misaligned SYSREF pulses occur, the JESD_ALIGNED register is
unaffected (remains set). This is the intended behavior. To monitor for
misaligned SYSREF pulses while SYSREF_ALIGN_EN=0, use the CLK_ALIGNED or
SYSREF_ALM registers.