如何使用dcm并添加约束?
时间:10-02
整理:3721RD
点击:
我在顶层设计中使用如下代码使用的dcm:
-- exteranl xtal clock input to get the global clock buffer
ibufg1 : IBUFG port map (I => XTAL_CLK, O => CLK);
-- digital clock manager 1
dcm1 : DCM port map (CLK0 => ClkB, CLK2X => ClkA,
LOCKED => Locked1, CLKFB => mclk, CLKIN => Clk, RST => RESET);
--sdr_clk is routed directly from dcm0 to output buffer
obuf1 : OBUF_F_16 port map (I => ClkA, O => sdr_clk_inst);
sdr_clk <= sdr_clk_inst;
--mclk is extimated to be 100MHz
--vgaclk is extimated to be 50MHz
bufg1 : BUFG port map (O => mclk, I => ClkA);
bufg2 : BUFG port map (O => vgaclk, I => ClkB);
----------------------------------------------------------------
-- Generate the reset_n signal
RESET_n <= '0' when RESET = '1' and Locked1 = '0' else
'1';
而且没有做component declaration,能够通过综合,而且看报告的话说用了一个dcm和两个global clock buffer。但是有一些警告:
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERCLKIN> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERPSCLK> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_CYCLE_JITTER> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_PERIOD_JITTER> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERCLKIN> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERPSCLK> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_CYCLE_JITTER> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_PERIOD_JITTER> of type Time is ignored.
应改怎么消除呢?
我在顶层设计的ucf文件中的dcm部分是这么设定的:
NET "XTAL_CLK" PERIOD = 60MHz HIGH 50 %;
NET "mclk" TNM_NET = "mclk";
TIMESPEC "TS_mclk" = PERIOD "mclk" 110 MHz HIGH 50 %;
NET "vgaclk" TNM_NET = "vgaclk";
TIMESPEC "TS_vgaclk" = PERIOD "vgaclk" 60 MHz HIGH 50 %;
其中xtal_clk是外部晶振输入的时钟,mclk和vgaclk是经过bufg生成的时钟。
想问一下这样设定dcm是否正确?
-- exteranl xtal clock input to get the global clock buffer
ibufg1 : IBUFG port map (I => XTAL_CLK, O => CLK);
-- digital clock manager 1
dcm1 : DCM port map (CLK0 => ClkB, CLK2X => ClkA,
LOCKED => Locked1, CLKFB => mclk, CLKIN => Clk, RST => RESET);
--sdr_clk is routed directly from dcm0 to output buffer
obuf1 : OBUF_F_16 port map (I => ClkA, O => sdr_clk_inst);
sdr_clk <= sdr_clk_inst;
--mclk is extimated to be 100MHz
--vgaclk is extimated to be 50MHz
bufg1 : BUFG port map (O => mclk, I => ClkA);
bufg2 : BUFG port map (O => vgaclk, I => ClkB);
----------------------------------------------------------------
-- Generate the reset_n signal
RESET_n <= '0' when RESET = '1' and Locked1 = '0' else
'1';
而且没有做component declaration,能够通过综合,而且看报告的话说用了一个dcm和两个global clock buffer。但是有一些警告:
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERCLKIN> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERPSCLK> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_CYCLE_JITTER> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_PERIOD_JITTER> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERCLKIN> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <MAXPERPSCLK> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_CYCLE_JITTER> of type Time is ignored.
WARNING:Xst:1537 - d:/hitsxpersonal/xilinxdev/intergralvga/xvga.vhd line 142: Generic <SIM_CLKIN_PERIOD_JITTER> of type Time is ignored.
应改怎么消除呢?
我在顶层设计的ucf文件中的dcm部分是这么设定的:
NET "XTAL_CLK" PERIOD = 60MHz HIGH 50 %;
NET "mclk" TNM_NET = "mclk";
TIMESPEC "TS_mclk" = PERIOD "mclk" 110 MHz HIGH 50 %;
NET "vgaclk" TNM_NET = "vgaclk";
TIMESPEC "TS_vgaclk" = PERIOD "vgaclk" 60 MHz HIGH 50 %;
其中xtal_clk是外部晶振输入的时钟,mclk和vgaclk是经过bufg生成的时钟。
想问一下这样设定dcm是否正确?
[求助]如何使用dcm并添加约束?
up.........
[求助]如何使用dcm并添加约束?
使用DCM最方便的方法是先用Xilinx子带的Architecture Wizard自动产生一个实例化的例子
关注中^^^
然后呢,添加进project中,然后例化。但为什么例化后还是独立的,不是作为顶层文件的一个子文件呢?纠结的。
在弄好自己需要的参数之后,在你需要的文件中调用 v文件就可以了,就像调用一个普通模块一样。
如果找不到v文件,因为有时候它默认生成了vhdl文件,就在左边点击查看hdl代码,就可以生成v文件了。