Forum Discussion

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

LVDS Assignment in Quartus

Hi,

I am using Quartus II 7.2 for programming a Stratix III device. I have an 8 channel (12 bit) LVDS input that I wish to deserialize and 2 LVDS clocks. I believe the megafunction for deserialization does not work for 12 bit data. Hence I will do it using a verilog program.

I want to know how I can assign an LVDS input pin to a variable. As we know that each LVDS input has a p and an n pin. Do I need to assign them to a single variable? If so, how?

As you might have guessed I am a beginner in FPGA programming.

Thanks a lot

Jatin Pasrija

13 Replies

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

    I tried this in QII and it seems to work fine after I cut out all mentions of my "n" signals. QII picks up the n signal and creates it on the differential pin pair.

    I am used to using a primitive to instantiate diff IO pairs like that, using IBUF_LVDS or OBUF_LVDS. I would imagine Altera gets lots of requests for the prims. lots of extra typing though....

    Now, if I can just figure out why QII will not allow me to have LVDS outputs, I'll be good to go.

    Thanks for your help Brad,

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

    --- Quote Start ---

    I am used to using a primitive to instantiate diff IO pairs like that, using IBUF_LVDS or OBUF_LVDS. I would imagine Altera gets lots of requests for the prims.

    --- Quote End ---

    As I said in my previous post, the primitives like alt_inbuf_diff were added to give users the option of including top-level ports for both the "p" and "n" legs.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello Jatinp,

    I checked your results in Quartus simulator, cause I have no Stratix III board available. I had a 2x7-Bit deserializer setup, that I used with an AD9259, Cyclone III and derialization in LE. The sample rate is 32 MHz in this case. I changed it to a Stratix III 7-Bit LVDS receiver with this Megafunction parameters:

    common_rx_tx_pll => "OFF",
    deserialization_factor => 7,
    enable_dpa_mode => "OFF",
    implement_in_les => "OFF",
    inclock_data_alignment => "UNUSED",
    inclock_period => 31250,
    inclock_phase_shift => 0,
    input_data_rate => 448,
    intended_device_family => "Stratix III",
    lpm_hint => "CBX_MODULE_PREFIX=RX",
    lpm_type => "altlvds_rx",
    number_of_channels => 4,
    outclock_resource => "AUTO",
    registered_output => "OFF",
    use_external_pll => "OFF",
    rx_align_data_reg => "RISING_EDGE"

    I found, that the input data had to be delayed by 4 bitclocks to get correct word alignment.

    I understand that your results are also from simulation. Have you the opportunity to validate the alignment with Stratix III hardware?

    I have been using hardware SERDES before with Arria GX, but in a design with DPA. So the word alignment was achieved automaticly without thinking about it.

    I suspect, that Stratix III LVDS receiver may require some pulses at the data_align input to achieve the specified alignment of LVDS frame with inclk rising edge. Another option is to use an external PLL and specify an appropriate phaseshift for the LVDS clocks. The inclock_phase_shift in LVDS receiver Megafunction has an adjustment range of a bitclock interval only. But you can see in PLL parameters report, that the Megafunction is using a multiple bit clock phase shift for the internal LVDS slow clock.

    Regards,

    Frank