Altera_Forum
Honored Contributor
10 years agoTimequest - Constrating Centre-Aligned SDR
No matter how many times I try and read through the various documents on timing constraints, I can never quite fathom how to apply it to my design.
For example, I have the following which I want to constrain: (1) I have a PLL which generates an 80MHz clock. This clock in turn drives two DDIO_OUT blocks, one which will send data and one which sends the clock signal. The DDIO block which sends out the clock signal is set up so on a rising edge it clocks out a 0, and on the falling edge it clocks out a 1 which will phase shift the clock by 180 degrees so that it is centre aligned. I use the following constraint for the clock:
create_generated_clock -name adc_refclk_out -phase 180 -source |muxsel}]
I will also need to add set_output_delay commands for -min and -max if I am not mistaken, but I'm struggling to work out what to set them to. This is what I have at the moment:
set_output_delay -max ?? -clock
set_output_delay -min ?? -clock
(2) The outputs (both clock and data) feed out from LVDS buffers on the FPGA (Stratix V 5SGSMD5K2F40C2L) then through approximately 30cm of cable (actually they are SATA cables simply due to the widespread availability of cheap connectors and cables). After this both signals enter a distribution IC (Texas Instruments CDCLVD1216). The drivers have the following specifications: Tdelay: Min=0, Typ=1.5ns, Max=2.5ns Trise: Min=0.05ns, Max= 0.3ns Max Skew (part to part): Max=0.6ns From the distribution ICs, the signals are fed through another 30cm SATA cable to several FPGAs (including back into the one where the data/clock originated). The signal comes back in to the FPGAs in via LVDS RX pins. ~5ns/m is a fairly decent approximation for propagation delay, so based on that there will be approximately 3ns delay in the cabling, but as all of the cables are the same, I don't think the skew between the clock lines and data lines from the cabling will be too high - maybe +/-200ps (just a guess). The clock comes in and feeds a PLL set to Source-Synchronous mode which adds 0 degrees of delay (it generates other clocks as well, but those aren't important). The data comes in through a DDIO_IN buffer which is clocked by the output of the PLL. For the input, I have got as far as making a virtual clock
create_clock -name {sync_data} -period 12.50
And I have the PLL clock already generated from the 'derive_clock_uncertainty' command. But for simplicity, lets call it "rx_clock" and pretend the following command was used to make it: # The input clock
create_clock -name {adc_refclk} -period 12.500 -waveform {0.000 6.250} { adc_refclk_in }# The VCO clock was autogenerated with (where refclkin comes from adc_refclk):
create_generated_clock -name {....|vcoph} -source {....|refclkin} -divide_by 2 -multiply_by 8 -duty_cycle 50.00 {.....|vcoph }# And then the output clock of interest is:
create_generated_clock -name {rx_clock} -source {....|vco0ph} -divide_by 4 -multiply_by 1 -duty_cycle 50.00 {...|divclk }
So given that information, could someone point me in the right direction. As I say I've read many different documents but have the time they seem to contradict themselves, or the examples don't match my design (it's usually all DDR type stuff, mine is SDR). Most of the stuff in Quartus I've gotten my head around, by constraining interfaces is something I've never quite grasped and as I am the only one of my colleagues that works with FPGAs, they can't offer much assistance. If anything needs clarifying let me know.