Forum Discussion

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

problem with "commas and word alignement"

hello,

i'm student and i'm working on the receiver parts of "SERDES" ,my program is in VHDL.

for explain my project, I receive a incoming serial data.

In the first time, i use a PRBS for test the "data".

In the second time, my data are send in a demultiplexer 1b/20b .

And now i must realize in front of decoder 10b/8b a commas word alignement in VHDL.

so for the moment i detect the commas K28.5(on 10b) on my parallel data ("DATAIN" on 20b) and my problem is for aligned my data.

in fact, for example i'm detected my commas(K28.5) in DATAIN( 13 downto 4) and for aligned the future data i must put the commas in DATAIN( 9 downto 0) because after that the data will be aligned and send to my decoder.

But i can't see how do this without loose an data.

I don't found a VHDL code about this, so if you have a source code about "commas and word alignement" or just explain me how do this !

Sorry for my english i'm french.

I thank you in advance for all informations on this subject

Mathieu

3 Replies

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

    The word alignment needs to be done in the deserializer, before the decoder.

    If the 8B/10B protocol is implemented correctly and you do send K28.7 symbols, whenever you have a 11_00000_xxx or 00_11111_xxx word in the deserializer, you have a properly aligned word.

    So, you make your deserializer look for those words to find alignment and keep the alignment for any other words.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    The word alignment needs to be done in the deserializer, before the decoder.

    If the 8B/10B protocol is implemented correctly and you do send K28.7 symbols, whenever you have a 11_00000_xxx or 00_11111_xxx word in the deserializer, you have a properly aligned word.

    So, you make your deserializer look for those words to find alignment and keep the alignment for any other words.

    --- Quote End ---

    Thank you for your answer, i will try to realize this.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, I just noticed a big mistake on what I wrote.

    It should read "If the 8B/10B protocol is implemented correctly and you do NOT send K28.7 symbols, whenever you have a 11_00000_xxx or 00_11111_xxx word in the deserializer, you have a properly aligned word."

    If you do send K28.7, the concept is the same but it will be a bit more complicated and dependent on what sequences you may send.