Forum Discussion

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

about the 8B/10B encoder altgx

hello,

according with the manual, in double width mode, the 8B/10B encoder starts the LSByte with a negative disparity (RD-)and the MSByte with a positive disparity (RD+) after reset. In my simulation, most of data are encoded according with the rule, but

there are serveral data that cann't be encoded accoding with this rule. Anyone have met this problem.

i attach the simulation result. the red's data can not be encoded correctly according with the rule.

4 Replies

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

    I don't see a problem.

    It's just how 8B/10B works: RD doesn't always toggle from byte to byte.

    Consider a single encoder:

    a) Most cases are encoded such that RD toggles after each byte.

    b) However, there are some cases which are encoded in such a way that the RD stays the same.

    For the double encoder scheme, which are used for every other byte, this becomes:

    a) Most cases, each encoder's RD stays quiet.

    b) In some cases, both encoders toggle their RD.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    3k Rbugalho.

    According with what your said, if the RD's toggle don't have a rule, how the 8B/10B decoder do? are y sure this?

    the manual( stx4_siv520001.pdf) write "After reset, the 8B/10B encoder starts the LSByte with a negative disparity (RD-)

    and the MSByte with a positive disparity (RD+) and transmits six K28.5 code groups

    (three on the LSByte and three on the MSByte encoder) for synchronizing before it

    starts encoding and transmitting data. "

    --- Quote Start ---

    I don't see a problem.

    It's just how 8B/10B works: RD doesn't always toggle from byte to byte.

    Consider a single encoder:

    a) Most cases are encoded such that RD toggles after each byte.

    b) However, there are some cases which are encoded in such a way that the RD stays the same.

    For the double encoder scheme, which are used for every other byte, this becomes:

    a) Most cases, each encoder's RD stays quiet.

    b) In some cases, both encoders toggle their RD.

    --- Quote End ---

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

    There is a rule for disparity in 8B/10B encoding.

    It's just that the rule is a bit more complicated. And what you're seeing in the documentation is correct, but it's a particular case.

    This is how8B/10B encoding works:

    a) The first 5 data bits plus K are encoded into a 6 bit code (5B/6B ) according to the current value of RD.

    b) RD is updated based on the disparity of the chosen 6B code

    c) The last 3 data bits plus K are encoded into a 4 bit code (3B/4B ) according to the current value of RD.

    d) RD is updated again based on the disparity of the chosen 4B code

    e) Repeat for the next byte.

    The goals is ensure that the disparity (unbalance between zeros and ones) is kept below 6.

    Now, what you're seeing in the documentation is a particular case of how it works.

    If you're transmitting a sequence of K28.1 (or many other cases), the RD value toggles between +1 and -1 after each byte.

    But once you actually start transmitting variable data this is no longer always true.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thanks.

    I misundertand what the manual refered.

    you are rigth.

    For the control code, the rd toggle is a particule case.

    i misunderstand that the data also is encoded with rd toggle rule.

    3ks again.:)