Aug 13

在FPGA内手动做Delay 不指定

RickySu , 17:25 , 技术经验 , 评论(0) , 引用(0) , 阅读(387) , Via 本站原创 | |
1. 确定要delay的信号是时钟信号还是数据信号。
如果是free running的时钟信号,频率在DCM操作范围之内,要记得使用DCM做Phase Shift。

2. 如果是V5,可以用ODELAY

3. 如果有一个快速的时钟,而要做一个大于一个时钟的delay,那么可以用shift register。SRL16可以将一个LUT当16个Shift register使。

4. 如果以上条件都不满足,就只好用LUT搭延时链了。
如果不要求动态改变延时长度,那么就多次使用这样的LUT:
引用
  LUT4 delay( .I0(1'b1), .I1(1'b1), .I2(1'b1), .I3(clk_in), .O(delay1) );                                    
  defparam    delay.INIT = 16'hff00;              
  // synthesis attribute INIT of delay is "ff00";    

引用
  LUT4_u0 : LUT4
  generic map (
     INIT => X"ff00")
  port map (
     O => delay_out,   -- LUT general output
     I0 => '0', -- LUT input
     I1 => '0', -- LUT input
     I2 => '0', -- LUT input
     I3 => delay_in  -- LUT input
  );


如果要求能动态改变延时长度,可以用这个代码
Tags: ,
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]