What is the recommend minimum and maximum size for the LMFC?
The LMFC buffer is used to delay the data from the time it is received until the next LMFC.
The RX core has about 100 bytes of delay.
The buffer required could be as low as 28 bytes as long as the TX delay is zero and even less than 28 bytes if the TX delay is greater than zero.
However, if the TX delay is larger than 28, then you will need to buffer almost a full LMFC to delay the data until the second LMFC boundary.
This equation gives you an approximate idea of the buffer in use:
Tx_delay + Rx_delay + buffer = N*LMFC.
Some simple examples:
N = 2 because the delay has caused the receiver to have to wait until the second LMFC boundary.
We recommend using a buffer equal to the LMFC size to ensure that all cases can be handled.
In v5.0 of the core, there is a limitation in the core to support from 20 to 1024.
This is impractical as most converters use small values and so it has been extended down to 20 for the v5.0 release.
The JESD204 spec states that the multiframe size must be greater than the end to end latency which is about 100-150 bytes depending on the converter used.
The LMFC is limited by the system latency and is not a hard limitation of the IP.
In JESD204B, the LMFC must be greater than the end to end latency for deterministic latency to work.
In practice, smaller LMFCs can be used as long as it is ensured that the received boundary always falls in the same LMFC period.
This can be done by ensuring that the latency variation is less than one LMFC and by skewing the SYSREF at Tx relative to Rx (note that this is outside of the JESD204 standard).
If you are seeing N change per reset then you could have one or two issues: