xilinx FPGA普通IO作PLL时钟输入
标签:
股票 |
分类: verilog |
在xilinx ZC7020的片子上做的实验;
[结论]
普通IO不能直接作PLL的时钟输入,专用时钟管脚可以;
普通IO可以通过BUFG再连到PLL的时钟输入上,但要修改PLL的设置 input clk的选项中要选择"No Buffer";
具体内部布局分配可以通过 Xilinx的FPGA Editor来查看,
ZYNQ的时钟管理也和之前的片子略有不同,之后在另一篇介绍,相关文档
[Demo1]
1 // demo1 two bufg connect 2 3 module iobuf( 4 5 input clk, 6 7 input rst, 8 9 output led 10 11 ); 12 13 wire clkin_w; 14 15 BUFG BUFG_inst ( 16 17 .O(clkin_w), // Clock buffer output 18 19 .I(clk) // Clock buffer input 20 21 ); 22 23 pll0 u_pll0( 24 25 .CLK_IN1(clkin_w), // IN 26 27 .CLK_OUT1(clkout), // OUT 28 29 .RESET(rst)); // IN 30 31 assign led = clkout; 32 33 endmodule
锁相环PLL默认输入前端有个BUFG单元,而两个BUFG不能相连,所以会报这样的错:
ERROR:NgdBuild:770 - IBUFG 'u_pll0/clkin1_buf' and BUFG 'BUFG_inst' on net
ERROR:NgdBuild:924 - input pad net 'clkin_w' is driving non-buffer primitives:
1 // demo2 regular io directly connect to PLL 2 3 module iobuf( 4 5 input clk, 6 7 input rst, 8 9 output led 10 11 ); 15 wire clkin_w; 16 17 28 29 pll0 u_pll0( 30 31 .CLK_IN1(clk), // IN 32 33 .CLK_OUT1(clkout), // OUT 34 35 .RESET(rst)); // IN 36 37 assign led = clkout; 38 39 endmodule
普通IO不能直接做锁相环的输入,所以会报这样的错:
ERROR:Place:1397 -
ERROR:Pack:1654 - The timing-driven placement phase encountered an error.
如果有ucf中加上这句约束:
NET clk
依旧会报错,在ZYNQ7000系列,这样还是通不过,如下:
ERROR:PhysDesignRules:2256 - Unsupported MMCME2_ADV configuration. The signal
ERROR:Pack:1642 - Errors in physical DRC.
使用普通的IO,再连接bufg来连到时钟线上,
仍会报这样的错误,因为还是两bufg相连了:
ERROR:NgdBuild:770 - IBUFG 'u_pll0/clkin1_buf' and BUFG 'BUFG_inst' on net
ERROR:NgdBuild:924 - input pad net 'clkin_w' is driving non-buffer primitives:
// 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
PLL的设置如下图,
http://img0.tuicool.com/EVVrMr.jpgFPGA普通IO作PLL时钟输入" />
这样普通IO就可以当作PLL的时钟输入了,顺利产生bit;
时钟还是最好用全局时钟IO,画图时一定要注意:)
zc702里没有global clock的概念了,但有了很多专用时钟脚,用起来一样;

加载中…