slaclab/surf

GTX7 RXCHBONDSLAVE and Clock Correction

Closed this issue · 2 comments

We had some issues with the Gtx7Core module, where clock correction was not occurring and eventually led to elastic buffer under- or overflows. It turns out that the culprit was the following:

RXCHBONDSLAVE => toSl(RX_CHAN_BOND_MASTER_G = false),

I would have thought that the status of this bit would not matter at all when RXCHANBONDEN was also tied low via:

RXCHBONDEN => toSl(RX_CHAN_BOND_EN_G),

But as it turns out, somehow RXCHBONDSLAVE being '1' was suppressing all clock corrections. The fix we implemented was:

RXCHBONDSLAVE => toSl(RX_CHAN_BOND_EN_G = true and RX_CHAN_BOND_MASTER_G = false),

We only have seen this issue in the Gtx7Core, having not tried it in any others yet, but I suspect a similar issue may occur in the GTP and GTH modules. Also, we had RX_CHAN_BOND_MASTER_G set to false, so RXCHBONDMASTER was then set to '0'. Probably a similar change should be added to RXCHBONDMASTER to check whether RX_CHAN_BOND_EN_G is true, but under this condition (RXCHBONDMASTER = '1', but RXCHBONDEN = '0') there doesn't seem to be a conflict with clock correction, at least in simulation.

@PsiStarPsi: I have made a pull request for your recommend fix and assigned Ben as the reviewer for the pull request.
#56

I've merged the fix.
Thanks Kurtis. Much appreciated!