Results 1 to 5 of 5

Thread: Generated clock

  1. #1
    Join Date
    Jul 2017
    Posts
    8
    Rep Power
    1

    Default Timing analysis constrain generated clock

    Hello,

    i will create a generated clock and need your help.

    I have a counter (1 to 2500), which increments every rising edge of clk. Then i set enable to "1" for one clock cycle and set it again to "0" till i count again to 2500.
    My system frequency is clk = 50MHz.

    Counter module:

    input parameter : clk
    output parameter : enable

    How should my generated clock look like? Do i have to consider the duty cycle?

    Is this right?
    create_generated_clock -name {enable} -source [get_ports clk] -divide_by {5000} [get_pins {counter|clk}]


    Greetings
    Last edited by Musti87; July 9th, 2018 at 04:14 AM.

  2. #2
    Join Date
    May 2013
    Posts
    897
    Rep Power
    1

    Default Re: Generated clock

    This is an SDC question, not VHDL.

    Are you saying that this "enable" signal you are creating drives clock inputs elsewhere in the design? If not, you don't even need this constraint. Or are you saying that enable is being fed out of the FPGA device?

    50MHz/5000=10KHz. That doesn't match the description of your design. Why not divide by 2500?

  3. #3
    Join Date
    Jul 2017
    Posts
    8
    Rep Power
    1

    Default Re: Generated clock

    So, i uploaded a picture i think the question will be more clear.

    U6 has a counter and triggers U3 and U4 every 50us. The outputs of U3 and U4 should reach U6 in 10 clockcycles. And i want to do a timing analysis. I read, that i need a generated clock and also insert multicycle paths. But dont know how to do it correct.
    Attached Images Attached Images

  4. #4
    Join Date
    May 2013
    Posts
    897
    Rep Power
    1

    Default Re: Generated clock

    OK, this is pretty tricky. Is there a clock input to U4 or is just combinational logic? If it's just combinational, you should add a clock to it to guarantee your timing requirements. Or you should be feeding that enable signal into the clock input, not the enable input of U4.

    You don't need a generated clock constraint (unless you do change the enable to feed the clock input of U4), but like you said, you do need multicycle between U3/U4 and U6 if you are saying that it will always take up to 10 clock cycles for data to get to U6.

    For U3 to U6, you need something like this:

    set_multicycle_path -from {get_pins <output of U3>} -to {get_pins <input of U6>} -setup 10
    set_multicycle_path -from {get_pins <output of U3>} -to {get_pins <input of U6>} -hold 9

    This is "opening the window," extending the setup analysis to 10 cycles and adjusting the hold analysis to compensate.

  5. #5
    Join Date
    Jul 2017
    Posts
    8
    Rep Power
    1

    Default Re: Generated clock

    there is no clock input in U4. It stores the ADC samples (sampling frequency 1MHz). Whenever i have a rising edge of enable (generated by U6), the outputs of U3 and U4 should be updated.
    So, when i use the enable as clock i need a generated clock constraint, right? Now, my enable signal is "0" till 2049 and "1" by 2500. How can i define it in my SDC file? Is it a proper way?

    To your suggestion with adding a clock:
    Just adding a clock to U4 and update the output whenever enable is set to "1"?

Similar Threads

  1. [PLL IP] missing generated clock
    By dmitryl_amarel in forum FPGA, Hardcopy, and CPLD Discussion
    Replies: 1
    Last Post: March 2nd, 2017, 11:53 PM
  2. Is the clock buffer needed for every clock generated by PLL?
    By Nagakiran in forum General Altera Discussion
    Replies: 5
    Last Post: November 24th, 2015, 06:00 PM
  3. Constrain a generated clock
    By philh in forum General Altera Discussion
    Replies: 4
    Last Post: October 26th, 2014, 12:56 AM
  4. How to define clock generated by the other clock?
    By David_Cai in forum Quartus II and EDA Tools Discussion
    Replies: 21
    Last Post: May 14th, 2014, 10:51 PM
  5. Internally generated clock (VHDL)
    By SGBailey in forum General Altera Discussion
    Replies: 1
    Last Post: September 9th, 2010, 07:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •