xilinx 两个DCM 使用的问题,求解...
当我在使用两个dcm的时候,不管是通过串联起来(好像是不支持了),还是并联,都会报错。因为不可以一个时钟驱动两个buf,也就是驱动不了两个dcm。
后来把生成的DCM的verilog文件,就是文件夹下面扩展名是.v 的文件,删掉里面的CLK_IN的IBUFG,在DCM的外面接上一个IBUFG,然后分别驱动两个DCM。
然后,综合,翻译,映射通过了,但是布局布线报错啦,现象如下,本人新手,多多指教哈,谢谢
Place:1012 - A clock IOB / DCM component pair have been found that are not placed at an optimal clock IOB / DCM site pair. The clock component <FPGA/DCM100/DCM_SP_INST> is placed at site <DCM_X2Y0>. The clock IO/DCM site can be paired if they are placed/locked in the same quadrant. The IO component <clk> is placed at site <PAD54>. This will not allow the use of the fast path between the IO and the Clock buffer. 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 listed below. These examples can be used directly in the .ucf file to override this clock rule.
< NET "clk" CLOCK_DEDICATED_ROUTE = FALSE; >
< PIN "FPGA/DCM100/DCM_SP_INST.CLKIN" CLOCK_DEDICATED_ROUTE = FALSE; >
串联应该没什么问题,之前用过,把你的代码贴出来看下
在UCF里把
< NET "clk" CLOCK_DEDICATED_ROUTE = FALSE; >
< PIN "FPGA/DCM100/DCM_SP_INST.CLKIN" CLOCK_DEDICATED_ROUTE = FALSE; >
这两句加上就好了。
串联的话,担心上一级DCM对下一级的DCM有影响,
代码如下
`timescale 100ps / 1ps
//////////////////////////////////////////////////////////////////////////////////
module mydcm(input clk,
output wire sd_clk,
output wire dotclk,
output wire locked
);
wire CLKIN_IN,read1_clk,fmctr_clk;
assign sd_clk=fmctr_clk;
assign dotclk=read1_clk;
IBUFG CLK_IN_BUF(.I(clk), .O(CLKIN_IN));
DCM50 DCM50(.CLKIN_IN(CLKIN_IN),
.RST_IN(1'b1),
.CLKFX_OUT(read1_clk),
.CLKIN_IBUFG_OUT(),
.CLK0_OUT(),
.LOCKED_OUT(),
.STATUS_OUT());
DCM100 DCM100(.CLKIN_IN(CLKIN_IN),
.RST_IN(1'b1),
.CLKFX_OUT(fmctr_clk),
.CLKIN_IBUFG_OUT(),
.CLK0_OUT(),
.LOCKED_OUT(locked),
.STATUS_OUT());
endmodule
在UCF里加入上面两句的话,clk和clkin走的不是全局时钟线
DCM是可以两个串联的,也可以一个接PLL,然后再接DCM,或者先DCM,再PLL都行。
在DCM设置里,时钟信号来源可以选择是外部PIN进来的,这时要经过IBUFG之类的,也可以选择成内部BUFG输出来的信号,分别用两种方式例化即可。
我有点奇怪的是,一个DCM可以输出多个CLK_OUT啊,这两频率可以不一样,为啥非得要使用两个呢?我记得一个DCM输出得是本频,倍频或半频,另外一个可以是*M/D之类的,
可以改用PLL,这样两个或多个时钟输出都可以各自使用*M/D这类的参数,更省事。
请问一下,是不是从外部pin输入的信号加入IBUFG的话,在生成DCM的时候,input端就不能再加buf呢?
在UCF里加
NET "clk" CLOCK_DEDICATED_ROUTE = TRUE;
