Forum Discussion

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

ALT2GXB loopback problem

Hi,

I'm using an Arria EP1AGX60CF484C6 with an ALT2GXB core configured in XAUI mode (4 lanes). I'm trying to do a loopback to test it out. The loopback is in the core, so what I've done is connect the rx_dataout (64-bit) to the tx_datain (64-bit) and connect the rx_ctrldetect (8 bits) to the tx_ctrlenable(8 bits). The gxb_powerdown is permantely tied to a logic 0. The resets have been staggered so that the rx_analog is released first followed by the rx_digital followed by the tx_digital sections. The input clock is 156.25MHz. I'm using a HP Pro Curve Switch 6400cl to try to ger a link between the FPGA and the switch.

I know that the Tx PLL is locking as this goes to an LED. I know that the Rx PLL is locking and it's switching over to lock on to the incoming data (rx_freqlocked is also output to an LED). I'm also watching the debug_rx_phase_comp_fifo_error[3:0] and debug_tx_phase_comp_fifo_error[3:0] - only bit 0 of each (they also go to LED's). I find that the debug_tx_phase_comp_fifo_error[0] seems to go high which suggests the tx FIFO has an overrun/underrun problem. Both the Tx and Rx FIFO's are being clocked by coreclockout which is generated by the GXB. I'm not sure why there is an error as the timing report seems to state there is no issue with timing.

I've never used a GXB block before and I've been working my way through it trying various things to see if I can get it to work. I don't know if putting it in loopback is as simple as I've described or if there's a sequence that I need to follow. And I don't understand the fifo error flag either as timing seems to be ok.

Thanks

MT

16 Replies

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

    Using the REFCLK pin will give you optimal jitter performance. you should be able to route this into the PLD for use in your logic. Quartus should choose the optimal clock resources. it will fail fitting if you do anything illegal. just try it.

    Rx_Syncstatus (or I believe any of the PLLs) do not have to be asserted in order to enable loopback. Loopback is a diagnostic mode and it wouldnt be very useful if everything had to be synced up prior to it being enabled.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I thought I would feedback some results. I put the reset logic in and the tx fifo error disappeared. I didn't quite simulate the logic but let's just assume it's working for now.

    This next part is not making any sense. If I monitor the rx_freqlocked signal, it's low when the board is powered up. As soon as I connect it to the switch, it goes high. This says that it automatically switched from lock-to-reference mode to lock-to-data mode. In order to make this switch, certain conditions regarding the PLL, voltage levels have to be met.

    What I did was to look at the rx_pll_locked signals on all 4 channels (pulled them out to leds). When the board is powered-up, these leds are on indicated that the rx_pll_locked[3:0] are all 0. In other words, the PLL's are not locking on the REFCLK0 which is the clock that I presume they are trying to lock onto.

    So, if the PLL's aren't locking onto the REFCLK0, the how is the switch from lock-to-reference mode to lock-to-data mode begin made as the following conditions have to be met:

    for automatic transition from the lock-to-reference mode to the

    lock-to-data mode, the following conditions must be met:

    ■ the serial data at the receiver input buffer is within the prescribed

    voltage signal loss threshold.

    ■ the cru pll is within the prescribed ppm frequency threshold

    setting (62.5, 100, 125, 200, 250, 300 , 500, or 1,000 ppm) of the cru

    reference clock.

    ■ the reference clock and cru pll output are phase matched (phases

    are within approximately 0.08 ui).

    Unless I have misunderstood something, I would have expected the rx_pll_locked signals all to be high in the absense of any data coming in on the rx_datain pins.

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

    Hi,

    Just an update and some new issues.

    I put a state machine to carry out the reset sequence and I put in the calibration clock in too. But it still doesn't work.

    In simulation, I discovered that I had to feed the Rx pins K28.5-, K28.5+, K28.3- and K28.3+ in order to get a '07' (Idle) state out of the rx_dataout port. I could then see this idle state data loop it's way around the Tx side and see some activity on the Tx pins that seemed to make some sense. This was all in simulation. Does this mean that after the reset sequence, the GXB block has to be put into idle state before it will accept data?

    However, we've also discovered a problem with the Tx output voltage. It seems to be around -40mv to +40mv. We'eve done all the usual checks on the board with supplies etc. but haven't found a problem. We tried with and without calibration resistors and it does make a difference to the output.

    Any idea's will be most welcome.

    Regards

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

    Hi,

    I'll try to get some hints within this thread because the content discussed here is close to my problem.

    I have an Arria2GX Devkit with the EP2AGX125 FPGA. I try to implement XAUI transceiver using ALTGX, ALTGX_RECONFIG, some user logic an an external loopback adapter at the HSMC A port. The Transceivers GX8, 9, 10, 11 are used for this test.

    For the short time it looks good but there are some misalignments an receive side (see attached jpgs).

    According the status bits the receiver is synchronized (rx_syncstatus = X"FF") and deskewing is done (rx_channelaligned = '1'). rx_errdetect is also X"00".

    Nevertheless the received date are not correct. I have verified the reset sequence, all pll_locks are like in Chapter 4: Reset Control and Power Down in Arria II Devices described.

    Every new reset (or FPGA reconfiguration and reset) produces other behavior of the receivers.

    The misalignment varies slightly. (2 examples attached)

    What could be the problem?

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

    --- Quote Start ---

    Hi,

    I'll try to get some hints within this thread because the content discussed here is close to my problem.

    I have an Arria2GX Devkit with the EP2AGX125 FPGA. I try to implement XAUI transceiver using ALTGX, ALTGX_RECONFIG, some user logic an an external loopback adapter at the HSMC A port. The Transceivers GX8, 9, 10, 11 are used for this test.

    For the short time it looks good but there are some misalignments an receive side (see attached jpgs).

    According the status bits the receiver is synchronized (rx_syncstatus = X"FF") and deskewing is done (rx_channelaligned = '1'). rx_errdetect is also X"00".

    Nevertheless the received date are not correct. I have verified the reset sequence, all pll_locks are like in Chapter 4: Reset Control and Power Down in Arria II Devices described.

    Every new reset (or FPGA reconfiguration and reset) produces other behavior of the receivers.

    The misalignment varies slightly. (2 examples attached)

    What could be the problem?

    Jens

    --- Quote End ---

    Hi

    I am a beginner.

    How do we check the "rx_errdetect" signal ? Do we use a oscilloscope ? Or do we use some sub-software in Quartus II to track this "rx_errdetect" signal ?

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

    Hi,

    you have to include control and status ports for the XAUI - Megafunction in the Wizard.

    (Advanced Options if you are using XAUI Phy Megafunction).

    Then you can use SignalTap to check the rx_errdetect signal. SignalTap is an Onchip Logic Analyzer which is accessible from Quartus Tools Menu.

    Jens