PCI Express(三) - A story of packets, stack and network

原文出处:http://www.fpga4fun.com/PCI-Express3.html

Packetized transactions

PCI express is a serial bus. Or is it? From the computer‘s perspective, it is a conventional bus where read and write transactions can be achieved.

The trick is that all operations are packetized. Let‘s assume the CPU wants to write some data to a device. It forwards the order to the PCI Express bridge which then creates a packet. The packet contains the address and data to be written and is forwarded serially to the targeted device, which de-packetizes the write order and executes it.

所有的操作都是基于数据包的,CPU想要往设备里写入数据,它先把命令发给PCI-E桥,由PCI-E桥创建数据包,包里面包含了地址和数据,然后串行发送到目标设备,由目标设备解包并执行命令。

What if the CPU wants to read? Same thing, the bridge forwards a packet to the targeted device, which now has to execute the read, create a return packet and send it to the bridge.
All that is pretty straighforward to do in practice thanks for the help from...

The PCI Express stack

Getting packets flowing reliably along the wires takes some magic. As packets are transmitted serially at very high speed, they have to be de-serialized/assembled, decoded at the destination (remove the 8b/10b encoding), de-interleaved (if multiple lanes are used), and checked against line corruption (CRC checks).

Sounds complicated? It probably is. The thing is, we don‘t really care because most of the complexity is handled in the "PCI Express stack", composed of three layers.

  1. The physical layer.
  2. The data link layer.
  3. The transaction layer.

数据包是以非常高的速度进行串行传输的,所以需要一系列的解码,序列恢复和CRC校验。然而这么复杂的东西我们压根不用关心,有一个叫做"PCI Express stack"的东西来处理它们,这个stack包括了物理层、数据链路层和 事务层?(不知道怎么翻译,就叫它事务层吧)

The first two layers are the ones implemented for us in the PCI Express FPGA core (usually a combination of hard and soft core) and handling all the complexity. As a user, we work only in the transaction layer, where life is easy, the sky is blue and girls are beautiful.

前两层都交给FPGA core去实现了,作为用户,我们只需要关心事务层,这里生活如意,天空湛蓝,绿草如茵,美女遍地~(哈哈,看到这里笑出声)

In more details:

  1. The physical layer: that‘s where the pins are toggling. The 8b/10b encoding/decoding and the lanes disassembly/reassembly are done there.
  2. The data link layer: that‘s where data integrity is checked (CRCs) and packets are re-transmitted if required (hopefully a rare occurance).
  3. The transaction layer: that‘s the user level. Once a packet arrives here, it is guaranteed to be good data.

Good data? That‘s great, that‘s what we want!

Let‘s see how working in the transaction layer looks like.

verilog-IT大道是有多无耻,我发一篇你立刻就转一篇,看看你们首页那乱的,文章也不分一下类,转载的也从来不标注出处。你那所有的文章都是从别人那里转来的吧,IT大道就是辣鸡!

时间: 2024-12-16 01:12:55

PCI Express(三) - A story of packets, stack and network的相关文章

Ubuntu 16.04 RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller” 不能上网

来源:http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=463646 1.执行如下命令 uname -a sudo lspci -knn sudo lshw -C network ifconfig ping 192.168.1.1 -c 4 tail /var/log/syslog -n 20 2.查看状态: [email protected]:~$ uname -aLinux gofox-To-be-filled-by-O-E-M 3.13.0-

PCI Express(四) - The transaction layer

原文出处:http://www.fpga4fun.com/PCI-Express4.html 感觉没什么好翻译的,都比较简单,主要讲了TLP的帧结构 In the transaction layer, we receive "packets". There is a 32-bits bus and the packets arrive on the bus (packet lengths are always multiples of 32-bits). Maybe one packe

PCI千兆网卡和PCI Express千兆网卡

千兆网卡按总线接口标准分为PCI千兆网卡和PCI Express千兆网卡. PCI网卡,即PCI插槽的网卡.是工作在数据链路层的网路组件,是局域网中连接计算机和传输介质的接口,不仅能实现与局域网传输介质之间的物理连接和电信号匹配,还涉及帧的发送与接收.帧的封装与拆封.介质访问控制.数据的编码与解码以及数据缓存的功能等.这种总线类型的网卡在当前的台式机上相当普遍,因为它的I/O速度远比ISA总线型的网卡快(ISA最高仅为33MB/s,而目前的PCI 2.2标准32位的PCI接口数据传输速度最高可达

PCI Express(五) - Xilinx wizard

原文地址:http://www.fpga4fun.com/PCI-Express5.html Xilinx makes using PCI express easy - they provide a free PCI Express core (called "Endpoint Block Plus") and a wizard to configure it, all that in their free version of ISE - ISE WebPack. So let's

PCI Express(六) - Simple transactions

原文地址:http://www.fpga4fun.com/PCI-Express6.html Let's try to control LEDs from the PCI Express bus. Xilinx's "Endpoint Block Plus" core allows us to work at the transaction layer level, so it's just going to take us a few lines of code.Instead of

PCI Express(二) - Topology

原文出处:http://www.fpga4fun.com/PCI-Express2.html Point-to-point architecture At 2.5Gbps, the PCI Express Gen1 line speed is a whopping 75 times faster than the 33MHz legacy PCI speed.How is that possible? only because PCI express is a point-to-point bu

PCI Express(一)

在FPGA4FUN上看到一篇介绍PCI-E的帖子,简单易懂,适合入门,特地搬过来 原文地址:http://www.fpga4fun.com/PCI-Express.html 前言: As PCI Express becomes common place in high-end FPGAs, let's see how easy FPGA vendors made the technology available. In particular, we look more closely at Xi

《PCI EXPRESS体系结构导读》读书笔记之第 1 章 PCI总线的基本知识(3)

PCI总线的中断机制 中断信号与中断控制器的连接关系 中断信号与PCI总线的连接关系 PCI桥规范并没有要求桥片传递其下PCI设备的中断请求.事实上多数PCI桥也没有为下游PCI总线提供中断引脚INTx#,管理其下游的PCI设备. 而同时又说,在PCI EXPRESS中的中断机制,用的是MSI中断机制.所以这种外部中断引脚的中断机制我就暂时不看了. 版权声明:本文为博主原创文章,欢迎垂询 email: [email protected]

PCI Express

1.1课题研究背景 在目前高速发展的计算机平台上,应用软件的开发越来越依赖于硬件平台,尤其是随着大数据.云计算的提出,人们对计算机在各个领域的性能有更高的需求.日常生活中的视频和图像信息包含大量的数据,对此计算机对这些海量信息的实时处理.高效传输和大容量存储都是今后计算机发展的趋势和目标. 总线是由多个部件和设备所共享的,是计算机通信接口的重要技术.为了简化硬件电路设计.简化系统结构,通常用一组线路配置适当的接口电路,与各部件和外围设备连接,这组共用的连接线路称为总线.采用总线结构便于部件和设备