前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Vivado那些事】Xilinx FPGA普通IO能不能直接接入PLL作为时钟输入

【Vivado那些事】Xilinx FPGA普通IO能不能直接接入PLL作为时钟输入

作者头像
碎碎思
发布2021-02-01 10:41:09
2.2K0
发布2021-02-01 10:41:09
举报
文章被收录于专栏:OpenFPGA

[结论]

普通IO不能直接作PLL的时钟输入,专用时钟管脚可以;

普通IO可以通过BUFG再连到PLL的时钟输入上,但要修改PLL的设置 input clk的选项中要选择"No Buffer";

具体内部布局分配可以通过 Xilinx的FPGA Editor来查看,

ZYNQ的时钟管理也和之前的片子略有不同,相关文档 <ug472_7Series_Clocking.pdf>

链接:https://pan.baidu.com/s/1E2uZbeIGh8R8FaDUQ6XVFg

提取码:open

[Demo1]

代码语言:javascript
复制
// demo1 two bufg connect


module iobuf(


 input clk,


 input     rst,


 output   led


 );


 wire clkin_w;


 BUFG BUFG_inst (


      .O(clkin_w),           // Clock buffer output


      .I(clk)                   // Clock buffer input


   );


 pll0 u_pll0(


    .CLK_IN1(clkin_w),      // IN


    .CLK_OUT1(clkout),  // OUT


    .RESET(rst));       // IN


assign led = clkout;


endmodule
代码语言:javascript
复制

锁相环PLL默认输入前端有个BUFG单元,而两个BUFG不能相连,所以会报这样的错:

ERROR:NgdBuild:770 - IBUFG 'u_pll0/clkin1_buf' and BUFG 'BUFG_inst' on net

'clkin_w' are lined up in series. Buffers of the same direction cannot be

placed in series.

ERROR:NgdBuild:924 - input pad net 'clkin_w' is driving non-buffer primitives:

[Demo2]

代码语言:javascript
复制
代码语言:javascript
复制
// demo2 regular io directly connect to PLL

module iobuf(


    input clk,


 input     rst,


 output   led


 );
 wire clkin_w;


 /*


 BUFG BUFG_inst (


      .O(clkin_w),           // Clock buffer output


      .I(clk)                   // Clock buffer input


   );


*/


 pll0 u_pll0(


    .CLK_IN1(clk),      // IN


    .CLK_OUT1(clkout),  // OUT


    .RESET(rst));       // IN


assign led = clkout;


endmodule

普通IO不能直接做锁相环的输入,所以会报这样的错:

ERROR:Place:1397 - A clock IOB / MMCM clock component pair have been found that

are not placed at an optimal clock IOB / MMCM site pair. The clock IOB

component <clk> is placed at site <A18>. The corresponding MMCM component

<u_pll0/mmcm_adv_inst> is placed at site <MMCME2_ADV_X0Y0>. The clock IO can

use the fast path between the IOB and the MMCM if the IOB is placed on a

Clock Capable IOB site that has dedicated fast path to MMCM sites within the

same clock region. You may want to analyze why this problem exists and

correct it. If this sub optimal condition is acceptable for this design, you

may use the CLOCK_DEDICATED_ROUTE constraint in the .ucf file to demote this

message to a WARNING and allow your design to continue. However, the use of

this override is highly discouraged as it may lead to very poor timing

results. It is recommended that this error condition be corrected in the

design. A list of all the COMP.PINs used in this clock placement rule is

ERROR:Pack:1654 - The timing-driven placement phase encountered an error.

如果有ucf中加上这句约束:

代码语言:javascript
复制
NET clk          CLOCK_DEDICATED_ROUTE = FALSE;

依旧会报错,在ZYNQ7000系列,这样还是通不过,如下:

ERROR:PhysDesignRules:2256 - Unsupported MMCME2_ADV configuration. The signal

u_pll0/clkin1 on the CLKIN1 pin of MMCME2_ADV comp u_pll0/mmcm_adv_inst with

COMPENSATION mode ZHOLD must be driven by a clock capable IOB.

ERROR:Pack:1642 - Errors in physical DRC.

使用普通的IO,再连接bufg来连到时钟线上,

仍会报这样的错误,因为还是两bufg相连了:

ERROR:NgdBuild:770 - IBUFG 'u_pll0/clkin1_buf' and BUFG 'BUFG_inst' on net

'clkin_w' are lined up in series. Buffers of the same direction cannot be

placed in series.

ERROR:NgdBuild:924 - input pad net 'clkin_w' is driving non-buffer primitives:

[Demo3]

代码语言:javascript
复制
代码语言:javascript
复制
// dem3 regular io with BUFG then connect to PLL which with"No Buffer" setting

 module iobuf(

 input clk,

 input     rst,

 output   led

 );

 wire clkin_w;

 BUFG BUFG_inst (

      .O(clkin_w),           // Clock buffer output

      .I(clk)                   // Clock buffer input

   );

 pll0 u_pll0(

    .CLK_IN1(clkin_w),      // IN

    .CLK_OUT1(clkout),  // OUT

    .RESET(rst));       // IN

assign led = clkout;

endmodule
代码语言:javascript
复制

PLL的设置如下图,

这样普通IO就可以当作PLL的时钟输入了,顺利产生bit;

时钟还是最好用全局时钟IO,画图时一定要注意

ZYNQ7020里没有global clock的概念了,但有了很多专用时钟脚,用起来一样;

文章转自:https://suisuisi.blog.csdn.net/article/details/112854131

版权归原作者所有

看完本文有收获?请转发分享给更多人

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2021-01-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 OpenFPGA 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档