Forum Discussion

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

SDC set_input_delay and set_output_delay constraints

Hello,

I'm new to TimeQuest / SDC commands. In my design I've got an external Ethernet switch device that is sourcing a dedicated clock signal to drive data into an FPGA. The switch device also sources a dedicated clock to read data from the FPGA. I'm trying to apply constrains for both the tx and rx data paths. I've read through the a document referenced here (TimeQuest User Guide by Ryan Scoville) along with other Altera documentation and it's not clear to me how to do this.

Maybe the first question is, can I consider this to be a source synchronous interface? The descriptions I've read on this seem to indicate that a source synchronous interface is when a clock input to the FPGA a) drives logic associated with an external device, and b) the input clock is also driven back out of the FPGA to clock the external device.

In my design, the clock is coming from the external device and the FPGA is not driving the clock back out.

Details of the clocks and setup/hold times are as follows. FPGA input rx and tx clock from switch device is 25 mhz. Switch device specs for its receive data lines a min setup time of 10 ns and min hold time of 0 secs on the rising clock edge. The switch specs for its transmit data lines that the output data will be valid a min of 18 ns and max of 28 ns after the rising clock edge.

Can anyone provide any insight into how I can constrain this?

Thanks in advance

12 Replies

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

    --- Quote Start ---

    You are sure that the delay_min should be 4?

    And not -4??

    --- Quote End ---

    I looked again into this thread and say “No I am not sure now that I have put the figures right but Rbugalho in his very last post corrected me, thanks“

    The original info for FPGA outputs to the Switch is given as

    --- Quote Start ---

    FPGA input rx and tx clock from switch device is 25 mhz. Switch device specs for its receive data lines a min setup time of 10 ns and min hold time of 0 secs on the rising clock edge.

    --- Quote End ---

    If clock and data are both from FPGA and assuming they arrive together then:

    set_output_delay -max +tSU (i.e. 10)

    set_output_delay-min –tH (i.e. -0)

    That model (model 1) is based on TimeQuest docs directly.

    If clock is opposite data then the beloved TimeQuest doesn’t say anything about how to constrain this destination synchronous model (model 2) but surely above equations wouldn’t apply anymore.

    So I posted my initial thoughts but I could be wrong and it will help us discussing this model 2.

    Let me convert model 2 to model 1 equivalent (by imagining board delay difference of data/clock).

    let clock arrive (x) ns from switch and let data travel (y) ns to arrive at Switch together with our virtual clock.

    What this means at FPGA (as imaginary model 1) clock delay is (–x) ns, then it launches data from FPGA, after that clock delays further (x) ns to reach Switch

    So clock delay = -x+x = zero if it was model 1

    Data delay = y ns

    Applying model 1 equations now:

    max = required tSU + data board delay – clock board delay = 10 + y - 0

    min = -reqiured tH + data board delay – clock board delay = -0 + y – 0

    If y = 2 ns then obviously max becomes 12, min becomes +2

    So my new model gave me some difference with max value which Rbugalho corrected. I am always on the learning curve and is not always upwards.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ohh. I am crazy..

    But I agree with Rbugalho.

    Outputmax=14

    Outputmin=4

    If clk is going out from eth chip to fpga with 2ns board trace, and if data is going out from fpga to eth chip with 2 ns board trace..

    Tnx to all!