谢谢钻研的鱼!
感觉你说的是正解。我的工程有2层,dcm是底层,顶层模块如下:
module sample32mega(CLKIN_IN,
rst,
CLKFX_OUT,
CLKIN_IBUFG_OUT,
CLK0_OUT,
LOCKED_OUT);
input CLKIN_IN;
output rst;
output CLKFX_OUT;
output CLKIN_IBUFG_OUT;
output CLK0_OUT;
output LOCKED_OUT;
reg rst = 1'b1;
reg cnt = 3'd0;
always@(posedge CLKIN_IN)
if(cnt != 3'd5) cnt <= cnt + 3'd1;
else begin cnt <= 3'd0;
rst <= 1'b0; end
my_dcm dcm1(
.CLKIN_IN(CLKIN_IN),
.RST_IN(rst),
.CLKFX_OUT(CLKFX_OUT),
.CLKIN_IBUFG_OUT(),
.CLK0_OUT(),
.LOCKED_OUT(LOCKED_OUT)
);
endmodule
按你说的,怎么改好?
谢谢!
|