ID Routing
ID routing is sometimes called BDF routing, which uses Bus Number, Device Number, and Function Number to determine the location of the target device. This is a routing method that is compatible with the PCI and PCI-X bus protocols and is mainly used for the routing of configuration requests. It can also be used for the routing of Completion and Messages on the PCIe bus.
As mentioned in the previous article, the TLP Header has 3DW and 4DW, and the 4DW Header is generally only used in Message. The TLP Header with ID routing is shown in the following two figures. The first is the 3DW Header and the second is the 4DW Header:
For the Endpoint, it only needs to check whether the BDF in the TLP Header is the same as its own BDF. If it is the same, it is considered to be sent to itself, otherwise it will be ignored.
Note: Many beginners may have such a question: The TRP Header with ID routing does not contain the Requester ID (BDF). So how does the Completer determine the location of the Requester? In fact, this problem is not difficult to answer, because ID routing is mainly used for configuration requests and Completion, and occasionally for some vendor-defined Message. First of all, the Requester of the configuration request can only be Root, so there is no need to determine its location. In addition, Completion is used to respond to other routing methods. For example, the address routing contains the BDF of the Requester. Finally, the Message is of the Posted type. It doesn't need Completion at all, and naturally it doesn't need the Requester's BDF.
Note: In fact, PCIe is a point-to-point communication method. That is, only one device can be connected to each link. Therefore, using 3 bits of space to describe Device Number is completely redundant. For this reason, PCIe Spec proposed the ARI format, which is not described here in detail. Interested individuals can read the relevant contents of the PCIe Spec.
For Switch, it needs to be judged according to the BDF in the TLP Header. This TLP is for itself or for other devices under its own control. As shown below:
Dongguan SOLEPIN Electronics Co., Ltd , https://www.wentae.com