西电Xilinx创新俱乐部的博客
 
2008-08-31 23:11:40 | plb_tft_cntlr_ref_v1_00_d bug分析及修正
 

         在做linux移植时使用plb_tft_cntlr_ref_v1_00_d,这个官方的IP来作为VGA的输出。在使用中遇到问题,每次下载完程序后画面不正常,下半个屏幕跑到上面去了,位置随机。经过4天的调试,终于发现了问题,呵呵。

         要给maillist上的朋友回复,所以用英文来写:)

    The reset signal is result in this bug . When you reset the ip,the v_sync is not reset . Module v_sync's "vsync_rst" is generated by module h_sync .Module h_sync 's reset signal is "tft_rst".The "tft_rst" code like this

FD  FD_TFT_RST1 (.Q(tft_rst1), .C(tft_clk), .D(SYS_plbReset));
FDS FD_TFT_RST2 (.Q(tft_rst2), .C(tft_clk), .S(tft_rst1), .D(1'b0));
FDS FD_TFT_RST3 (.Q(tft_rst3), .C(tft_clk), .S(tft_rst1), .D(tft_rst2));
FDS FD_TFT_RST4 (.Q(tft_rst4), .C(tft_clk), .S(tft_rst1), .D(tft_rst3));
FDS FD_TFT_RST (.Q(tft_rst),  .C(tft_clk), .S(tft_rst1), .D(tft_rst4));

     The  "SYS_plbReset" is usr's reset , the author want use 4 FDS to delay  4 times tft_clk's periods. But "tft_clk" is generate by DCM , DCM's rst also connected to "SYS_plbReset". When SYS_plbReset is 1 , no "tft_clk"  generated . So the error occured, the "tft_rst1" is 0 forever.

  To correct this problem replace code like this

  FD  FD_TFT_RST1 (.Q(tft_rst1), .C(plb_clk), .D(SYS_plbReset));       
  FDS FD_TFT_RST2 (.Q(tft_rst2), .C(plb_clk), .S(tft_rst1), .D(1'b0));       
  FDS FD_TFT_RST3 (.Q(tft_rst3), .C(plb_clk), .S(tft_rst1), .D(tft_rst2));      
  FDS FD_TFT_RST4 (.Q(tft_rst4), .C(plb_clk), .S(tft_rst1), .D(tft_rst3));      
  FDS FD_TFT_RST5 (.Q(tft_rst5),  .C(plb_clk), .S(tft_rst1), .D(tft_rst4));
  FDS FD_TFT_RST6 (.Q(tft_rst6), .C(plb_clk), .S(tft_rst1), .D(tft_rst5));
  FDS FD_TFT_RST7 (.Q(tft_rst7), .C(plb_clk), .S(tft_rst1), .D(tft_rst6));       
  FDS FD_TFT_RST8 (.Q(tft_rst8), .C(plb_clk), .S(tft_rst1), .D(tft_rst7));      
  FDS FD_TFT_RST9 (.Q(tft_rst9), .C(plb_clk), .S(tft_rst1), .D(tft_rst8));      
  FDS FD_TFT_RST10 (.Q(tft_rst10),  .C(plb_clk), .S(tft_rst1), .D(tft_rst9));
  FDS FD_TFT_RST11 (.Q(tft_rst11),  .C(plb_clk), .S(tft_rst1), .D(tft_rst10)); 
  FDS FD_TFT_RST12 (.Q(tft_rst12), .C(plb_clk), .S(tft_rst1), .D(tft_rst11));       
  FDS FD_TFT_RST13 (.Q(tft_rst13), .C(plb_clk), .S(tft_rst1), .D(tft_rst12));      
  FDS FD_TFT_RST14 (.Q(tft_rst14), .C(plb_clk), .S(tft_rst1), .D(tft_rst13));      
  FDS FD_TFT_RST15 (.Q(tft_rst15),  .C(plb_clk), .S(tft_rst1), .D(tft_rst14));
  FDS FD_TFT_RST16 (.Q(tft_rst16),  .C(plb_clk), .S(tft_rst1), .D(tft_rst15));
  FDS FD_TFT_RST (.Q(tft_rst),  .C(plb_clk), .S(tft_rst1), .D(tft_rst16)); 

Use plb_clk to clocked the SYS_plbReset, and delay 16 times of "SYS_plbReset" 's period.

For hold the "tft_rst" long enough to be clocked by "tft_clk" signal.

 

It works well now:)

    Regards

                                                                               西电Xilinx创新俱乐部

                                                                                     snakkewang

评论 (8) | 阅读(741)  | 
以下网友评论只代表其个人观点,不代表本网站的观点或立场

数据加载中......
*
  (在使用IE浏览器下,如果系统长时间没有响应,您可以刷新页面,然后按ctrl+v将评论内容复制回来!)