Forum Discussion

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

Stratix II GX Transceiver: Does 8b/10b coding work properly?

Hi again,

I have limited the problem of undefined bits in the tx-output datastream to a problem with the 8b/10b-encoder.

In ModelSim, I found the internal signal between the Phase Compensation FIFO Buffer and the 8b/10b encoder. The dwords from the fifo are ok.

The output wire of the 8b/10b encoder contains some undefined bits I have no explanation for. Here is the signal example:

FIFO-in: ... FF0F33FB.....................................................................................

FIFO-out: ...| FF0F | 33FB | FF0F | 33FB | ....

8b/10-out: ...|1001010011U00U011011 | U00U1101010010111010 | 1001010011U00U011011 | U00U1101010010111010 | ...

I expected to see the follwowing, 8b/10b- encoded words:

1010110001 (RD+) or 0101001110 (RD-) for FF

0101110100 1010001011 for 0F

1100101001 1100101001 for 33

1101100001 0010011110 for FB

Of course, the serialized data is wrong, too. I have no idea how to fix that problem and really need some help..

daniel

4 Replies

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

    Problem solved! I assumed that if the tx_ctrlenable port is not used, all words would be handled as data (Dx.y). That was wrong! At every point in my datastream including a word which also is part of the control-words (Kx.y) which are listed in the table 6-2 of the stratix II gx-handbook (vol. 2)), I got undefined output of 8b/10b encoding. Now I asserted the tx_ctrlenable to "0000" and it works fine.

    The next problem is that word alignment on the receiver-side does not work. after a reset I do a rx_enapatternalign (rising edge) whith an alignment pattern (x"0000BC1C") in my input data (20b after 8b10b-endoding, the word to specify in the MegaWizard?). tx_ctrlenable is set to "1111", so I expect to get both the rx_patterndetect and rx_syncstatus high. That is not the case and I don't know how to fix. The rx_dataout is always 9C9C9C9C after the reset time.

    I hope somebody sees whats wrong here. Thank you for an answer,

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

    Hi Daniel,

    I have a question for you which is a bit off topic, but anyway.

    I also have a Stratix II GX kit with an SFP module for optical transmission and would like to implement a loop-back test that you are implementing now.

    The problem is that my SFP module uses NRZ encoding to transmit the data. I checked the SFP specification and actually it states that the modules can use 8b10, 4b5b, NRZ, Manchester or "Unspecified" coding. Since the SFP module is encoding the data i cannot use the 8b10b decoder in the ALTGX megafunction: i need to decode it using NRZ first and then apply a 8b10b decoder.

    Have you come across this problem? Any idea how to solve it (besides building the PCS layer myself)?

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

    Hi Faruk,

    I'm sorry, but I have not much experience with SFP modules. But my suggestion is to try the "unspecific" mode in combination with the 8b/10b encoding of the fpga. In my case, there is a possibility to configure the SFP-Module via I2C bus. Fortunetely, the default mode is "unspecific" and I don't need to use this.

    With using NRZ, I am afraid you will get problems with clock recovery, too. As I know, you need a seperate clock signal for NRZ and everything could become complicated... Is there a special reason for using NRZ?

    In between, I solved my problem with 8b/10b coding. I didn't notice that every byte is transferred with the least significant bit first. So, in the MegaWizard, you have to write down the 8b/10b code (20b) of the LSB-first-ordered bytes of the pattern bytes (usually Comma, BC). Additionally, while sending this the tx_ctrlenable has to be "0011", indicating that the two right bytes 0000BC1C are control bytes (K28.5 and K28.0). having those signals set, a single rx_enapatternalign on a rising edge works and the rx_syncstatus gets high (1111). with this signal, it is possible to set tx_ctrlenable to 0000 again.

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

    Hi Daniel,

    I'm working in the same topic as you encoding with 8b10b using SIIGX. I'm trying to syncrhonize my transceivers but I don't achieve it.

    Could you send me any example code??

    Thanks, Fer.