portant;">好了,進(jìn)入正是,說說lvds調(diào)試。如下圖,采用軟硬結(jié)合板設(shè)計,左側(cè)為FPGA主板部分,右側(cè)主要是一些接口,包括Camlink、VGA,中間采用柔性電路板相連。
portant;">
portant;">首先,按照連載3的程序調(diào)試lvds接口,使用bank5的差分管腳輸出lvds信號,結(jié)果采集卡采不到圖,這下壞了,開始懷疑引腳分配不正確,一番檢查,問題不在這;
portant;">
portant;">接著覺得走線可能不對,看了看PCB,5對差分信號,對內(nèi)線長差控制在0.254mm內(nèi),對間線長差控制在2mm內(nèi),走線沒有問題;
portant;">再接下來,懷疑Camlink位分配不正確,Camlink在base模式下包含11對差分線(4對數(shù)據(jù),1對時鐘,2對串口,4對相機(jī)控制),Camlink協(xié)議中有詳細(xì)的位分配表,
portant;">

portant;">下表說明了在base模式下,各種圖像模式(24bit RGB、8bit、10bit、14bit、16bit灰度等)下位分配情況。
portant;">
portant;">然后查看287手冊,就可得到位分配信息。
portant;">
portant;">又是一番檢查,位分配完全正確。
portant;"> datain3 <= {spare, 1'b0, 1'b0, 1'b0, 1'b0, tx_data[7:7], tx_data[6:6]};
portant;"> datain2 <= {dval , fval, lval, 1'b0, 1'b0, 1'b0, 1'b0};
portant;"> datain1 <= {1'b0 , 1'b0, tx_data[13:9]};
portant;"> datain0 <= {tx_data[8:8] , tx_data[5:0]};
portant;">經(jīng)過同學(xué)的點撥,發(fā)現(xiàn)了問題,原來在于時鐘的串行化問題,我使用的是lvds_tx核的tx_outclock作為差分時鐘,而287的手冊上7倍時鐘串化對應(yīng)的時鐘信號分別為1,1,0,0,0,1,1,問題已經(jīng)比較明白了,clk差分通道數(shù)據(jù)如下,使用5個channels,如下圖所示。
portant;">cl_clk <= {1'b1,1'b1,1'b0,1'b0,1'b0,1'b1,1'b1};
portant;">
portant;">重新編譯,下載,圖像輸出正常,lvds調(diào)試完成!!
portant;">由于lvds_tx核使用了一個ip核,邏輯中使用一個,qsys中使用一個,這樣總共4個ip核就用了3個,所以相關(guān)使用外用pll,結(jié)果出來的數(shù)據(jù)又不對了,至今沒有解決這個問題,后面有進(jìn)展了再行總結(jié)吧。

