EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Freshman on April 11, 2024, 01:09:18 pm

Title: MLT-3 and NRZ and 4B5B Encoding
Post by: Freshman on April 11, 2024, 01:09:18 pm
In this Ethernet PHY datasheet (https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/LAN8720A-LAN8720Ai-Data-Sheet-DS00002165.pdf), page 14, Figure 3-1, I see the blocks 4b5b encoding, NRZI and MLT-3.

I was reading about line coding and it's purpose.

One of the critical purpose of line coding is to have an average 0V DC level in the signal.
So, NRZI, NRZ, MLT-3 are trying to achieve this.

Also, when I went through 4b5b encoding, I noticed that this is done to ensure that there are no multiple consecutive 0s in the signal. Which I infer to be the same purpose of the NRZ etc line coding.

Also, there's a mention of Manchester encoding in the datasheet.

My question:

1. Are the blocks 4B5B encoding, NRZI & MLT-3 are present for the purpose of having an average 0V DC Level?

2. Are the above block different line coding schemes?

3. If each block has a different purpose, can someone explain me the purpose of each block?

4. Also, why is Manchester encoding not present as a block in the diagram? Doesn't it do the same line coding job? 
Title: Re: MLT-3 and NRZ and 4B5B Encoding
Post by: jwet on April 12, 2024, 02:41:37 pm
This looks suspiciously like homework Freshman...

Here are a few hints.  Yes controlling DC is one of main uses, there are other reasons.  The also provide zero stuffing for long strings of the same bit, most also have provisions for error detection and correction through redundancy.  Manchester does provide DC balance but doesn't provide any of those other features.  Lookup "Digital Communications" by Bissel and Chapman for details.
Title: Re: MLT-3 and NRZ and 4B5B Encoding
Post by: aliarifat794 on April 12, 2024, 03:17:21 pm
4B5B encoding: Ensures data integrity by mapping 4-bit data to 5-bit code words, preventing long sequences of zeroes, and facilitating clock recovery.
NRZI: Prevents long sequences of zeroes to aid clock recovery, though it doesn't inherently maintain a zero DC level.
MLT-3: Maintains a zero DC level by encoding data using three voltage levels, effectively reducing EMI and improving signal quality.
Title: Re: MLT-3 and NRZ and 4B5B Encoding
Post by: Freshman on April 12, 2024, 05:26:58 pm
Thank you for your answer @aliarifat794.

But That's why it is confusing for me.

In your answer, I infer that each block's purpose overlaps with the other.


For example, from your answer, 4B/5B and NRZI - both prevents long sequence of zeros and aids clock recovery.
In that case, why do we need both?

1. Why 4B/5B and NRZI are required?

2. Also, just a small clarification. How does MLT-3 help reduce EMI and improve signal quality?
Title: Re: MLT-3 and NRZ and 4B5B Encoding
Post by: Freshman on April 12, 2024, 05:29:30 pm
Hi @jwet, it's not homework.

I am confused that the purpose of the blocks overlaps each other.
In that case, why should I have all 3 where I can have either 1 or 2 blocks that perform specific function rather than all 3 being there performing similar/same functions.
Title: Re: MLT-3 and NRZ and 4B5B Encoding
Post by: xvr on April 13, 2024, 09:29:39 am
> In that case, why should I have all 3 where I can have either 1 or 2 blocks

May be because Ethernet use point-to-point connection, and if one side support 3 different protocols it doesn't assume that other side will support the same set of protocols.

So you have to have a set of protocol to choose from.