PCIE学习
PCIe在传输中用8b/10b编码,所以单PCEe2.0的有效带度是4Gb/s
x2模式将用于内部接口而非插槽模式
PCIe卡能使用在至少与之传输通道相当的插槽上(例如x1接口的卡也能工作在x4或x16的插槽上)。一个支援较多传输通道的插槽可以建立较少的传输通道(例如8个通道的插槽能支援1个通道)。PCIe设备之间的链接将使用两设备中较少通道数的作为标准。一个支援较多通道的设备不能在支援较少通道的插槽上正常工作,例如x4接口的卡不能在x1的插槽上正常工作(插不入),但它能在x4的插槽上只建立1个传输通道(x1)。PCIe卡能在同一数据传输通道内传输包括中断在内的全部控制信息。这也方便了与PCI的兼容。多传输通道上的数据传输采取交叉存取,这意味着连续字节交叉存取在不同的通道上。这一特性被称之为“数据条纹”,需要非常复杂的硬件支援连续数据的同步存取,也对链接的数据吞吐量要求极高。由于数据填充的需求,数据交叉存取不需要缩小数据包。与其它高速数传输协议一样,时钟信息必须嵌入信号中。在物理层上,PCIe采用常见的8B/10B代码方式来确保连续的1和0字符串长度符合标准,这样保证接收端不会误读。编码方案用10位编码比特代替8个未编码比特来传输数据,占用20%的总带宽。到了PCIe 3.0,采用128B/130B代码方式,仅占用1.538%的总带宽。
PCIe有1x,2x,4x,8x甚至16x之分。也有end point和root complex,end point是作从机来用,root complex是作主机来用。DM8168是x2的,能作为一个x1或者一个x2来使用。而且可以配置成主从两种模式。DM8168文档说明如下:
One PCI Express® (PCIe®) 2.0 Port With Integrated PHY – Single Port With 1 or 2 Lanes at 5.0 GT/s – Configurable as Root Complex or Endpoint
具体配置应该由PL_GEN2来完成是使用x1还是x2。
如果要配置成x1,只能使用Lane0,关于这点请参考下面的说明。 17.1.5 Supported Use Case Statement The PCIe subsystem has only one interface link and this link can be used in a x1 or x2 lane arrangements
connecting to only one single device. In other words, there exists no support for connecting to two devices
in an x1 arrangement since it has the support of a single interface link. It also means that it cannot be
used as a switch. Lane 0 must always be connected and functioning, either alone or in conjunction with Lane 1, for the link to be established. Lane 1 cannot be used alone. 请参考Technical Reference Manual
如果要配置成x1,只能使用Lane0,关于这点请参考下面的说明。 17.1.5 Supported Use Case Statement The PCIe subsystem has only one interface link and this link can be used in a x1 or x2 lane arrangements connecting to only one single device. In other words, there exists no support for connecting to two devices in an x1 arrangement since it has the support of a single interface link. It also means that it cannot be used as a switch. Lane 0 must always be connected and functioning, either alone or in conjunction with Lane 1, for the link to be established. Lane 1 cannot be used alone. 请参考Technical Reference Manual