8b/10b编码

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

 

文章目录


提示:以下是本篇文章正文内容,下面案例可供参考

一、为什么要编码?

由于串行链路中会有交流耦合电容,理想电容的阻抗公式是Zc=1/2πf*C。因此信号频率越高,阻抗越低,反之频率越低,阻抗越高。当码型是为“0”、“1”交替出现时,码型的频率,则电容阻抗低,信号基本上可以不损耗的传输过去;但是当码型为连续“0”或者“1”的情况时,码型的频率低,则电容阻抗大,导致信号幅度不断降低,带来的严重后果是无法识别到底是“1”还是“0”。因此编码就是为了尽量把低频的码型优化成较高频的码型,从而保证低损耗的传输过去。

随笔:这是我第一次看到从硬件角度说明为什么要编码,豁然开朗的感觉。

二、8b/10b的编码方式

1.简介

通俗地说,8b/10b是把8bit的实际数据扩展为10bit,那开销就是20%,效率就只有80%了,更通俗来说就是增加了20%的非实际数据的传输 。 

2.编码中的两个术语:不均等性(disparity)和极性偏差(running disparity,RD)

不均等性是指编码后的码型数据是“1”多还是“0”多。

极性偏差:

The Running Disparity (or RD) is defined as the difference between the number of logic 1 bits and logic 0 bits between the start of a data sequence and a particular instant in time during its transmission.

In other words, the RD for a character is the difference between the number of logic 1 bits and logic 0 bits in that character.

1)if there are more logic 1 bits than logic 0 bits (within a character or string of consecutive bits) then we can state that the RD is positive.

2)If there are more logic 0 bits than logic 1 bits then we can state that the RD is negative.

3)if the number of logic 1 and logic 0 bits are the same, then we can state that the RD is neutral or zero.

RD表示为整数:

RD = (Number of Logic 1 bits in the character or string) – (Number of Logic 0 bits in the character or string)

RD表示为比值:

Number of Logical 1s (in character/string) :  Number of Logical 0s (in character/string)

那么,定义+-RD有什么意义?+-RD代表着同一个码型的两种编码方式。编码的目标本身就是为了缓解长“0”或长“1”的影响,因此在编码后如果“1”多的话,我们下一次的编码就要把这种码型做一个修正,从-RD码型变成+RD码型。如果是“0”和“1”一样多,极性则不用变,如下图:

3.编码实现方法与编码表

参考文献:

http://sierrahardwaredesign.com/basic-networking/running-disparity-rd/

转载于:

https://zhuanlan.zhihu.com/p/30041020

  • 5
    点赞
  • 36
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值