|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
FPGA 是xilinx kintex 7 ,
从参考时钟153.6MHz, 用计数器分频出16Hz 出来, 最后管脚量的时钟有10ms抖动(附图是示波器打上persistent view)
单独测参考时钟153.6Mhz 很稳定
不明白code哪里有问题 请高手指教
reg [22:0] clk_sync_out_count;
reg clk_sync_out_r;
parameter CLK_DIV_N1=23'd4799999;
//16Hz output has jitter
always @(posedge refclki or posedge reset)
begin
if (reset == 1'b1)
begin
clk_sync_out_count <= 23'd0;
clk_sync_out_r <= 1'b0;
end
else
begin
if (clk_sync_out_count == CLK_DIV_N1)
begin
clk_sync_out_r<=~clk_sync_out_r;
clk_sync_out_count <= 23'd0;
end
else
clk_sync_out_count<=clk_sync_out_count+1;
end
end //end alway
OBUF #(
.DRIVE(12),
.IOSTANDARD("DEFAULT"),
.SLEW("SLOW")
) OBUF_inst (
.O(clk_sync_out),
.I(clk_sync_out_r)
); |
|