Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

setup and hold time with set_input_delay

Hello,

I have some problem understanding the set_input_delay min and max

constraint.

Assume that you have an interface that is connected to an FPGA.

This interface has a clock (Clk) and a databus (DB).

The datavalid window is centered around the rising edge of Clk. Assume

a setup time of 1ns and a hold time of 2 ns. The clk period is 10 ns.

How should I constrain this with the set_input_delay command?

thanks for helping me,

25 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Rysc, thank you kindly for your posts and clearing up IO constraints. The Quartus Documentation is extremely shotty. Thanks again.

  • windy_city's avatar
    windy_city
    Icon for New Contributor rankNew Contributor

    I could not locate your old documents. I have trouble with understand sset_input_delay constraint.

    A) it is difference between data arrival and clock arrival time. 

    assume data and clock are coming from same external source. clock period is 10ns. set_input_delay is 3. external clock signal has trace delay of 4ns.

    out of the 10ns, data used up 3ns, but clock also has a delay and reaches the internal flop late by 4ns, does it not mean that data now has 11ns to meet setup time of that internal flop?

    how is it even possible that difference between their arrivals is 3ns but clock trace takes 4ns?

    if clock trace takes 3ns, will data have 10ns internally to travel to the flop's input?

    I will subtract setup time of the internal flop. I am trying to keep numbers simple. 

    B) if two chips are talking to each other then isnt set_input_deay of one chip same as set_output_delay of another chip. ? then why do I need both. 

    it will be big help if you can help me solve these. I asked AI and I was able to convince it to give me the answer I wanted.

    • KennyT_altera's avatar
      KennyT_altera
      Icon for Super Contributor rankSuper Contributor

      Since there are no further queries, we shall close the case. 

  • sstrell's avatar
    sstrell
    Icon for Super Contributor rankSuper Contributor

    It would be a really good idea to start a new thread instead of resurrecting one that is 17 years old!

    For A, you are describing a source synchronous interface ("data and clock are coming from same external source") so trace delay should match between clock and data, which usually cancels them out when calculating the value for set_input_delay.  So either this statement is not correct (it's not a source synchronous design) or it is SS and very poorly routed on the board.  Can you clarify the setup and where you are getting your numbers, including Tco of the external upstream device or any provide Tsu and Th requirements?

    For B, are you talking about two FPGAs sending and receiving data?  And again, is this meant to be SS or just synchronous with a common external clock source?

  • KennyT_altera's avatar
    KennyT_altera
    Icon for Super Contributor rankSuper Contributor

    sstrell is correct that the first thing is to distinguish source synchronous vs system synchronous.

    For set_input_delay, the key point is that it describes the external data arrival window at the FPGA input pin, relative to the reference clock edge. It is not “remaining internal time after subtracting board clock delay.”

    For a true source-synchronous interface, common clock/data PCB delay usually cancels, so what matters is mostly:

    • upstream device Tco(min/max)
    • clock/data board skew
    • jitter/uncertainty

    A common model is:

    • set_input_delay -max = Tco_max + data_trace - clock_trace
    • set_input_delay -min = Tco_min + data_trace - clock_trace 
    • refer to https://docs.altera.com/v/u/docs/653688/an-433-constraining-and-analyzing-source-synchronous-interfaces

    So if data and clock traces are matched, the trace delay does not magically give the FPGA extra internal time.

    Also, set_output_delay on the transmitting chip and set_input_delay on the receiving chip are related, but they are not redundant. One constrains the transmitter against receiver requirements; the other constrains the receiver against transmitter behavior.