Creating a single ended clock from differential on board clocks on VC709 fpga board

2.9k Views Asked by At

I am trying to use on- board differential clocks for my verilog code. Below are the snippets of my verilog and constraint files. Even though the code synthesizes well, I am not able to see the LED change on board. Can somebody tell me what I am missing here?

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

Constraints (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

There are 1 best solutions below

0
alex.forencich On

First, you may want to follow up your IBUFGDS with an IBUFG to actually get the clock onto the global clock network. After that, you're going to want to divide by a LOT more than 10 in order to see any flashing. I would suggest counting to 100 million, resetting the counter, and toggling the LEDs instead of just setting them.