Forum Discussion

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

How to constrain a source-synchronous desing?

Hi All,

I am having problems setting up my sdc constraints for a source-synchronous interface that i have.

The design is described as follows.

--- The FPGA provide a reference clk(125Mhz) to a SERDES chip.

--- The SERDES chip ouputs a clk(62.5Mhz) and a databus(10-bit) to the FPGA.

--- The 10-bit data should be sampled at both the rising edge and falling edge of the 62.5Mhz clk in the FPGA.

My question is how to constraint set_input_delay in my design.

I upload the SERDES chip datasheet with this post.

Any and all help is very much appreciated

Harris

26 Replies

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

    I don't see where in the example it says set_output_delay is the same thing as the traditional Tco? If it did say that, it's certainly wrong. The output delay is external delay to an external register, clocked by -clock. I don't even think of set_output_delay and set_input_delay as "constraints". They describe a circuit outside the FPGA. Once that circuit is drawn, we can determine the setup/hold relationships between the launch and latch clocks, the delays outside the FPGA, and finally the delays inside the FPGA to determine if it met timing.

    (And I don't like "-reference_pin". It's easy enough to put a generated clock assignment on the output port being referenced, which allows the user to do many things with that generated clock. The -reference_pin can only be used in one manner.)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Harris,

    I edited your sdc as follows, it performs better:

    
    create_clock -period 8 -name clk 
    derive_pll_clocks
    create_generated_clock -name clk_out -source }] 
    set_output_delay -clock clk_out -max 1.2 
    set_output_delay -clock clk_out -min -.2 
    
    Rysc: Thanks for your response.

    The whole system (input device,fpga,output device) must be viewed as one single rtl chain. In general, each launching register is used to fulfil timing of latching register.

    The part of the rtl chain inside input device (except if it is another fpga or similarly configurable) does not have that versatility of fpga so the fpga is used to latch its data correctly.

    The output device may be an advanced DAC that can latch correctly to any input automatically tracking the timing. Or it could be another FPGA. In these cases, no worry. Otherwise the fpga is used to ouput such that the device's fixed latching will work.

    The fpga's tool to do that is by inserting delays between io register and pins to reconfigure its own tSU/tH for inputs and its tCO for outputs. Thus the fpga is a device with user configurable tSU/tH/tCO unlike most ASICs.

    If you look at the diagram in the link, you will see a cloud between io register and the output data pin. This where delay is meant right inside FPGA.

    Motreover, the statement clearly says: latency of data with respect to clk out
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Do you mean, "In the circuit in Figure 2, the latency from the clk_in port to the clk_out port is included by the -reference_pin option"? It's basically saying the Tco to the -reference_pin is used, but the set_output_delay is still describing the delays outside the FPGA, and is not a directly replacement of Tco to the output. Only the -reference_pin option does this. This is another reason I don't like -reference_pin in that it's confusing. Does it include PLL phase-shifts or not? (I really don't know, but a generated clock will).

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

    Either figure has a cloud of delay.

    The statement itself is saying about set_output_delay:An output delay constraint on the data_out port, relative to the generated clock on the clk_out port.

    I am not sure about reference pin issues but I don't see any reason to use it just to help remove one statement.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Harris and Rysc :

    Using Harris mini-project I did some work on TimeQuest with regard to actual implementation of set_output_delay figures and realised that the equations are correct directly for tSU/tH but not for tCO.

    The tCO is computed indirectly from tSU/tH as entered in the equations mentioned in this thread.

    Thus the final example that I posted its link is misleading or out of date or badly worded.

    Regarding skew: I found lowest data skew when I set all ten output registers to fast io
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Rysc and Kaz,

    I'm very grateful to you for your help.

    I think I have got the result that I wanted.

    Thanks.

    Harris