In the end I would sure like to attack the HD/3G-SDI standard, but small steps first.
I am kind of familiar with SDRAM operation. I have never wrote any SDRAM driver in VHDL, but have worked with SDRAM controller equipped microcontrollers in the past, so the principles of the activation/precharging and working with banks is kind of familiar. This HW exercise will certainly be a beneficial extension of my practical knowledge.
Yes of course, the SDRAM would need to be read in bursts or even whole rows, while using the internal RAM blocks in the FPGA as a short buffer stage to smooth out those time where SDRAM can't provide data. But that will be some future project to hack together.
First I need to design the PCB for it, hence need to figure out all required stuff first. What I currently miss and is my huge knowledge gap, is how to recover the receiver clock from the incoming bit stream.
I have found a bunch of relevant appnotes from Xilinx, which shows either external CDR (pretty expensive and obsolete chip) or internal one, while using an external VCO and loop filter.
I guess this is the only reasonable way to get it done, without using unobtainium old ICs or hell expensive overkill ones. What I don't see or understand, is how the phase detector is made inside the FPGA fabric.
Brief google-fu session brought me to "bang-bang" or "Alexander" phase detector, which seems to be suited for recovering clock from a NRZI encoded streams:
However, I see quite an issue in the fact one of the flip flops needs a negative clock edge (almost impossible to do in an FPGA I guess), so not sure how to attack this one.
Neither do I see how the PLL can get synced to place the data sampling in the middle of the incoming data eye, nor how the loop filter shall be designed (what bandwidth? etc..)
Most "cheap" video mixers/switchers usually don't work with genlocked SDI data sources. What is the common solution to the drift problem in these devices?
//EDIT: Or do I really need to recover the clock at all? I only need the recovered data. Here is an interesting reading:
https://www.xilinx.com/support/documentation/application_notes/xapp224.pdf