After replacing a 125 MHz differential oscillator, the FIFO passes data at startup and reports full later in a sustained transfer. Look at occupancy before the fault. If each burst lifts the level and the next gap brings it back to the same baseline, measure peak buffer demand. If the baseline climbs across successive windows of equal duration, measure the sustained difference in accepted transfers. An empty event at reset release or a step in occupancy during loss of lock calls for a capture of the startup or clock event itself.
How long do 500 free words last?
Assume two independent clocks drive the write and read ports of an equal-width FIFO. Each side accepts one word per cycle under continuous traffic, with flow control inactive. A 125 MHz writer running 10 ppm fast is at 125,001,250 Hz. A reader running 10 ppm slow is at 124,998,750 Hz. The difference is 2,500 Hz, so the FIFO gains 2,500 words per second. With 500 free words it reaches full in about 0.2 seconds. If the programmable high-water mark is 150 words above the current level, that warning comes after about 60 ms.
Reverse the offsets and the FIFO loses 2,500 words per second. A 200-word prefill lasts about 80 ms to empty. A low-water mark at 40 words is reached sooner, at about 64 ms. Prefilling further keeps the reader supplied longer, adds startup latency and leaves less space if the drift goes the other way. Use the measured transfer rates and the distance to each threshold for the real board. These examples assume a constant slope up to the boundary.
Count transactions at the boundary where they happen
Count successful transfers in each local clock domain. On a native FIFO interface, use the acceptance conditions for the selected IP and exclude requests rejected because the FIFO was full or empty. On a streaming interface, count the handshake with both valid and ready asserted. In standard read mode, the returned word may follow the accepted read request by several cycles. Use the event that consumes an entry. Count idle characters if they occupy FIFO entries. If the ports have different widths, convert to a shared unit first. One 64-bit write balances two 32-bit reads.
Timestamp the start and end snapshots against a common time base. Keep each multi-bit counter in its own clock domain and use a safe snapshot handshake to read it back. Track alignment uncertainty and counter rollover. Exclude windows that contain a reset or discarded entries when reconciling occupancy with writes minus reads. At 125 MHz, each side has about 1.25 million cycles in 10 ms. The example 20 ppm difference adds only about 25 words in that window. If the snapshots could be off by several dozen words, improve their alignment or collect longer equal windows before flow control engages and see whether the net count scales with duration.
| What the trace shows | What to check |
|---|---|
| Peaks after each burst, with the level returning to the same baseline. | At one word per 125 MHz cycle, a 2 µs read stall while writes continue adds about 250 words. A subsequent 2 µs gap in writes lets a continuously running reader remove about 250. Measure the longest stall and the amount that drains between bursts. |
| A steady climb followed by cycling around the flow-control threshold. | Calculate the slope before throttling begins. Once throttled, accepted reads and writes may balance. Log offered traffic, accepted traffic and the pause signal to find where the rate difference is being absorbed. |
| Occupancy rises much faster than the measured clock offset predicts. | Look for periodic read stalls. With equal clocks and continuous writes, a reader that skips one cycle in every 4,096 falls behind by about 30,518 words per second before throttling. That is a throughput difference of about 244 ppm at one word per cycle. Check downstream pauses, arbitration and protocol overhead. |
| The two occupancy outputs disagree briefly, with no sustained bias in accepted counts. | AMD PG327 describes the data counts as estimates relative to their respective clock domains. They can skip values. Full and Empty can remain asserted until the effect of a transfer on the opposite side has crossed the synchronization logic. If events cluster around reset, capture both clocks and the IP initialization sequence. |
Set a high-water mark that leaves room to stop
In AMD PG327, programmable full provides advance notice. Full and Empty protect operations in their respective clock domains. Suppose the configured FIFO can hold 512 words and the programmable full threshold is 416. That leaves 96 words. Assume the worst-case interval from reaching the threshold to the source stopping new traffic is 500 ns, including flag generation, crossings and the return path for backpressure. At an upper write rate of 125,001,250 words per second, round the arrivals up to 63 words. If another 12 words from the pipeline can reach the FIFO after the source stops and were excluded from those 63, add them once. With eight words allowed for implementation uncertainty and margin, the budget is 83 words. Even with no reads during the response, that leaves 13 words to spare in this example. Apply the same reasoning at low water using the fastest reader and the longest time to pause it. Check the actual usable depth, legal thresholds and where a long packet can pause.
When the producer can pause, verify that backpressure reaches the source and check whether a queue farther upstream continues to grow. If an independent source must keep sending, check which idle symbols the protocol allows the receiver to add or remove, the longest gap between eligible sequences and the adjustment per sequence. AMD PG047 gives a concrete example in its asynchronous LVDS receiver. An RX elastic buffer inserts or removes eligible idles when adapting the incoming data to a local 125 MHz clock. The available correction opportunities determine whether the link can sustain the expected payload without loss. If the architecture permits both sides to lock to a shared reference, verify the divider ratios and transfer schedule. Additional FIFO depth covers a bounded stall and extends the time available before a persistent mismatch reaches a boundary.
Evaluate a replacement against both clock budgets
Trace the clocks that actually drive wr_clk and rd_clk. A 125 MHz oscillator on the board may feed a transceiver reference while a recovered clock from the remote end drives the writer and a local clock drives the reader. Measure both against the same calibrated time base and record temperature, supply, lock state and clock switching. Check the receiver's differential swing, common-mode and termination requirements for electrical compatibility. Compare phase jitter over the receiver's specified integration band. For slow occupancy drift, budget average frequency error and account for stalls that change effective throughput.
For a substitution, record the full ordering code, manufacturer datasheet revision, stability test conditions and aging coverage. Compare the candidate oscillator with the clock at the opposite end and the system's correction capacity. Epson lists ±30 ppm frequency tolerance for the 125 MHz SG3225VAN KEGA (X1G0042410020xx). Section 2 lists first-year aging at 25 °C separately as ±5 ppm. Using only the ±30 ppm term for each of two independent sources at opposite limits gives a 60 ppm difference. Under the one-word-per-cycle assumptions above, that corresponds to 7,500 words per second and consumes 500 words in about 66.7 ms. Confirm how aging enters the guaranteed budget over the intended service life, and avoid counting a contribution twice if it is already covered by the stability spec. Put the allowable relative offset and the maximum interval without correction in the substitution criteria. Recheck occupancy with sustained traffic, the longest expected pauses and the temperature limits. The calculated examples illustrate the method. The linked datasheet gives the actual oscillator specifications.
