I'm using LatticeXP2 family FPGA. DVI-D Single link operating at 720p is connected to FPGA. I somehow need to read RGB and XY coordinates of pixels. I know I need TMDS decoder, but I'm not sure how to write that and some sort of clock sync in VHDL/Verilog.
I know there are dedicated chips designed to do that, but I can't afford extra cost to the board.