从VC709 fpga板上的差分板载时钟创建单端时钟

时间:2018-05-08 21:28:02

标签: verilog fpga synthesis virtex

我正在尝试使用板载差分时钟来实现我的verilog代码。以下是我的verilog和约束文件的片段。即使代码合成良好,我也无法看到LED的变化。有人能告诉我这里缺少什么吗?

的Verilog:

module leds(
    input DIFF_SYS_P,
    input DIFF_SYS_N,
    output reg [7:0] leds=8'd0,
    output clk
    );

    reg [31:0] count =0;
    wire clk;



    IBUFGDS #(
    .DIFF_TERM("FALSE"),
    .IBUF_LOW_PWR("TRUE"),
    .IOSTANDARD("DEFAULT")
    ) IBUFGDS_inst (
       .O(clk),
        .I(DIFF_SYS_P),
        .IB(DIFF_SYS_N)
        );


    always@(posedge clk) begin 
      if(count ==10) begin
        leds <= 8'b10101010;
        count <=count +1;
       end

       else begin
       count<=count +1; 
     end
  end
endmodule

约束(xdc):

set_property PACKAGE_PIN G18 [get_ports DIFF_SYS_N]
set_property IOSTANDARD DIFF_SSTL15 [get_ports DIFF_SYS_N]
set_property PACKAGE_PIN H19 [get_ports DIFF_SYS_P]
set_property IOSTANDARD DIFF_SSTL15 [get_ports DIFF_SYS_P]
set_property PACKAGE_PIN AM39 [get_ports {leds[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[0]}]
set_property PACKAGE_PIN AN39 [get_ports {leds[1]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[1]}]
set_property PACKAGE_PIN AR37 [get_ports {leds[2]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[2]}]
set_property PACKAGE_PIN AT37 [get_ports {leds[3]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[3]}]
set_property PACKAGE_PIN AR35 [get_ports {leds[4]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[4]}]
set_property PACKAGE_PIN AP41 [get_ports {leds[5]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[5]}]
set_property PACKAGE_PIN AP42 [get_ports {leds[6]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[6]}]
set_property PACKAGE_PIN AU39 [get_ports {leds[7]}]
set_property IOSTANDARD LVCMOS18 [get_ports {leds[7]}]
create_clock -period 5.000 -name DIFF_SYS_P -waveform {0.000 2.500} [get_ports DIFF_SYS_P]**

1 个答案:

答案 0 :(得分:0)

首先,您可能希望使用IBUFG跟进IBUFGDS,以实际将时钟接入全局时钟网络。在那之后,你想要分数超过10,以便看到任何闪烁。我建议数到1亿,重置计数器,切换LED而不是只设置它们。