PCIe p2p system and PCIe switch

By mounting PCIe P2P IPs on PCIe hardware IPs and building routing information tables, the flexibility and cost issues of PCIe P2P systems are solved, achieving efficient data transmission and scalability between endpoints, making it suitable for various application scenarios.

CN121365026BActive Publication Date: 2026-05-08SHANGHAI GUANGYU XINCHEN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI GUANGYU XINCHEN TECHNOLOGY CO LTD
Filing Date
2025-12-23
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing PCIe switches present a dilemma in terms of performance, flexibility, and cost. ASIC chips are expensive and cannot be flexibly integrated, while FPGAs are highly flexible but struggle to meet the requirements of high performance and low power consumption, resulting in PCIe P2P systems having poor flexibility and high cost.

Method used

It uses PCIe hardware IP as the underlying layer, mounts PCIe P2P IP, and realizes direct data transmission between endpoints by building a routing information table, providing flexible point-to-point communication functions and reducing host data transmission latency and bandwidth bottlenecks.

Benefits of technology

It enables direct data exchange between multiple endpoints, improving system flexibility and scalability, reducing costs, and is suitable for large-scale PCIe device connections, virtualization, and high-speed data exchange.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365026B_ABST
    Figure CN121365026B_ABST
Patent Text Reader

Abstract

The application provides a PCIe P2P system and a PCIe switch, using a PCIe hardware IP as a bottom layer to provide a basic PCIe interface function of physical layer and link layer management; through a PCIe P2P IP mounted on the PCIe hardware IP, based on a constructed routing information table, data transmission between endpoints connected by the PCIe P2P IP is completed. The application provides flexible point-to-point communication function, so that multiple endpoints can directly exchange data, reducing data transmission delay and bandwidth bottleneck through the host. The application can replace the existing PCIe P2P IP of a manufacturer, provide higher flexibility and scalability, and obtain a better balance in cost control, and is suitable for various applications requiring large-scale PCIe device connection, virtualization and high-speed data exchange.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of PCIe technology, and in particular to a PCIe P2P system and a PCIe switch. Background Technology

[0002] Existing PCIe switches mainly consist of ASIC chip products and FPGA-based implementations. Both have their advantages and disadvantages in terms of performance and flexibility, but both also have significant shortcomings. ASIC chips, as highly integrated finished hardware, offer high performance, low power consumption, stable connectivity, and powerful management capabilities in commercial end products, possessing high bandwidth, strong scalability, and low latency. However, their finished product nature means they cannot be flexibly integrated into other systems; functional modifications and customizations can only rely on existing manufacturer functions, lacking autonomy. Furthermore, they are costly, suitable only for large-scale mass production, with long development cycles, making it difficult to quickly respond to market changes. Conversely, while FPGAs offer high flexibility and programmability, allowing developers to customize functions and modify and optimize them at any time to meet special needs and R&D experimental projects, they cannot match the specifications and power consumption of dedicated ASIC chips, failing to meet application scenarios with strict performance and power consumption requirements.

[0003] Therefore, implementing PCIe P2P functionality on the PCIe Switches of the two aforementioned schemes also perpetuates the inherent contradictions and limitations of each scheme in terms of performance, power consumption, and flexibility. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a PCIe P2P system and a PCIe switch to solve the problems of poor flexibility and high cost of existing PCIe P2P systems.

[0005] To achieve the above and other related objectives, a first aspect of this application provides a PCIe P2P system, comprising: a PCIe P2P IP mounted on PCIe hardware IP; the PCIe P2P IP having multiple endpoints; the PCIe P2P IP being used to forward request messages from one endpoint to the corresponding endpoint in a P2P transmission environment based on a constructed routing information table.

[0006] In some embodiments of the first aspect of this application, the PCIe P2P IP further includes an upstream port, a switch module, and multiple downstream ports; wherein the downstream ports are used to connect endpoints.

[0007] In some embodiments of the first aspect of this application, after receiving a request message from the user side, the endpoint first performs a P2P determination; if the obtained P2P determination result is that P2P is supported, an address query operation is performed, and the request message is transmitted accordingly based on the query result; if the obtained P2P determination result is that P2P is not supported, the request message is directly sent to the switch module.

[0008] In some embodiments of the first aspect of this application, the P2P determination includes: if the request message has a P2P request flag and the endpoint has enabled P2P functionality, then a P2P determination result supporting P2P is obtained; if the request message does not have a P2P request flag, or the endpoint has not enabled P2P functionality, then a P2P determination result not supporting P2P is obtained.

[0009] In some embodiments of the first aspect of this application, performing an address lookup operation and transmitting the request message accordingly based on the lookup result includes: performing a lookup in the ATC or PTE based on the address of the request message; if the lookup is successful, converting the address of the request message according to the ATC or PTE, and sending the address-converted request message to the switch module through the corresponding downstream port; if the lookup is unsuccessful, modifying the P2P request flag in the request message, and sending the modified request message to the switch module through the corresponding downstream port.

[0010] In some embodiments of the first aspect of this application, the method of checking the P2P transmission environment specifically includes: if the request message has a P2P request flag and the address has been translated, then the endpoint to be sent is determined based on the routing information table; further, it is determined whether the endpoint to be sent has enabled P2P function. If it is enabled, then a P2P transmission environment is available; otherwise, a P2P transmission environment is not available; if the request message does not have a P2P request flag, then a P2P transmission environment is not available.

[0011] In some embodiments of the first aspect of this application, the routing information table includes a mapping relationship between each physical address and its corresponding configured endpoint.

[0012] In some embodiments of the first aspect of this application, the system further includes: a management module; the management module is used to manage routing information tables, ATC, and PTE.

[0013] In some embodiments of the first aspect of this application, the endpoint is provided with a configuration space; the configuration space is used to enable and disable the P2P function.

[0014] To achieve the above and other related objectives, a second aspect of this application provides a PCIe switch, including: the PCIe P2P system described above.

[0015] As described above, the PCIe P2P system and PCIe switch of this application have the following beneficial effects: This application provides a PCIe P2P system and PCIe switch that uses PCIe hardware IP as the underlying layer, providing basic PCIe interface functions for physical layer and link layer management; through the PCIe P2P IP mounted on the PCIe hardware IP, data transmission between endpoints connected to the PCIe P2P IP is completed based on the constructed routing information table. This application provides flexible point-to-point communication functionality, enabling direct data exchange between multiple endpoints, reducing data transmission latency and bandwidth bottlenecks through the host. This invention can replace existing PCIe P2P IPs from manufacturers, providing greater flexibility and scalability, and achieving a better balance in cost control, making it suitable for various applications requiring large-scale PCIe device connections, virtualization, and high-speed data exchange. Attached Figure Description

[0016] Figure 1 The diagram shown is a schematic block diagram of a PCIe P2P system according to an embodiment of this application.

[0017] Figure 2 The diagram shown is a schematic representation of the specific structure of a PCIe P2P system in one embodiment of this application.

[0018] Figure 3 The diagram shown is a flowchart of the P2P mechanism in one embodiment of this application. Detailed Implementation

[0019] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0020] This application provides a PCIe P2P system and a PCIe switch, using PCIe hardware IP as the underlying layer to provide basic PCIe interface functions for physical layer and link layer management. Through PCIe P2P IPs mounted on the PCIe hardware IPs, data transmission between endpoints connected to the PCIe P2P IPs is completed based on a constructed routing information table. This application provides flexible point-to-point communication capabilities, enabling direct data exchange between multiple endpoints, reducing data transmission latency and bandwidth bottlenecks through the host. This invention can replace existing PCIe P2P IPs from manufacturers, providing greater flexibility and scalability, and achieving a better balance in cost control. It is suitable for various applications requiring large-scale PCIe device connections, virtualization, and high-speed data exchange.

[0021] To facilitate understanding of the embodiments of this application, firstly, in conjunction with Figure 1 Detailed explanation. Figure 1 A schematic block diagram of a PCIe P2P system according to an embodiment of the present invention is shown. The PCIe P2P system includes:

[0022] The PCIe hardware IP, which can be implemented using existing PCIe hardware IPs (such as those from Xilinx or Intel), plays a crucial role in providing basic PCIe interface functions, covering physical layer (PHY) and link layer management. This module can be flexibly deployed on FPGA platforms and is also compatible with ASIC chips, demonstrating strong versatility and compatibility. In terms of functionality, the PCIe hardware IP provides a solid foundation for the PCIe protocol. Port initialization ensures that the PCIe interface is correctly configured and activated at system startup, preparing for subsequent communication; link bandwidth management dynamically adjusts link bandwidth according to actual needs, optimizing data transmission efficiency; and basic data transmission functions ensure stable and reliable data transmission between PCIe devices and the root complex. Through these functions, the PCIe hardware IP communicates directly with PCIe devices or the root complex, building a bridge between the system and external devices. Ups-Hard-IP serves as the upstream port hard core IP provided by the FPGA manufacturer within the PCIe hardware IP. The PCIe hardware IP also includes Ups-Soft-IP, a soft core IP provided by the ASIC manufacturer. Ups-Soft-IP offers high flexibility, low cost, direct reuse, and high data transfer speeds.

[0023] Given the advantages of Ups-Soft-IP mentioned above, PCIe P2P IP is mounted on Soft-Switch IP. PCIe P2P IP is an IP that supports PCIe bus peer-to-peer transmission, which allows two PCIe endpoints (such as FPGA, GPU, NVMe SSD, etc.) to transmit data directly without the need for host memory relay, thereby improving transmission efficiency and reducing load.

[0024] In one embodiment, such as Figure 2 As shown, the PCIe P2P IP consists of one upstream port, one switch module, and multiple downstream ports. The upstream port, as the key channel for communication between the system and the root complex, undertakes the important tasks of transmitting data upwards and receiving host messages. Each downstream port is precisely connected to a specific endpoint. This one-to-one connection method enables the system to establish stable connections with multiple external devices simultaneously, meeting diverse device access needs and providing strong support for application scenarios such as large-scale data acquisition and multi-device collaborative work. The switch module mainly handles endpoint-to-endpoint (hereinafter referred to as P2P) routing and endpoint-to-upstream (hereinafter referred to as EP2RC) routing.

[0025] In one embodiment, each endpoint has a BAR module and a DMA module. The BAR (Base Address Register) is the base address register in PCIe, used to define the memory-mapped region of the endpoint. The BAR maps the endpoint's internal resources (such as control registers, internal memory, etc.) into the system address space, allowing the root complex or other endpoints to access the endpoint's resources through these addresses. DMA is a technology that allows endpoints to autonomously access system memory. In PCIe P2P, DMA is used for direct data transfer between endpoints, improving data transfer efficiency.

[0026] In one embodiment, the BAR module and DMA module of each endpoint are connected to the user side. Specifically, the user side is implemented through a User App. A User App refers to various user-layer applications that enable direct data transmission between devices using PCIe P2P technology. User-layer applications can be supported by specific hardware and software. This approach can significantly improve data transmission efficiency, reduce latency, and is suitable for various application scenarios such as high-performance computing and real-time communication.

[0027] In one embodiment, each endpoint has a configuration space. The configuration space is an important area for each endpoint to store device information, configure resources, and control the device. When an endpoint needs to respond to a P2P request, it must complete the configuration of P2P-related parameters in the configuration space to enable the P2P function; otherwise, the communication behavior corresponding to the P2P request flag will not take effect.

[0028] In one embodiment, each endpoint has an ATC-PTE module, which mainly manages address translation cache. This module contains both an ATC and a PTE. An ATC (Address Translation Cache) is a high-speed cache used to temporarily store frequently used virtual address-to-physical address mappings (essentially caching commonly used PTE information). ATC solves the problem of slow PTE traversal. The endpoint first queries the ATC; if a match is found (the corresponding translation record is found), the physical address is directly obtained without accessing the PTE. If no match is found, the PTE is traversed. This greatly improves query speed and address translation efficiency. A PTE (Page Table Entry) is the basic unit in the page table, used to store virtual address-to-physical address mappings and related control information. In the virtual memory mechanism, the system divides both virtual and physical addresses into fixed-size pages. The PTE records the physical page number corresponding to a virtual page and contains a series of flags (such as read / write permissions, whether it is cached, and whether it exists in physical memory).

[0029] In one embodiment, the PCIe P2P system also includes a FirmWare management module (FW). The FirmWare management module's main function is to manage the entire P2P information, requiring it to interact with the host to obtain P2P information and manage P2P enabled routes. Specifically, the FirmWare management module mainly manages the routing information table, PTE table, and ATC table. The routing information table records the mapping relationship between each physical address and its corresponding configured endpoint. During PCIe initialization enumeration, the Root Complex allocates address space for each endpoint and records this information in the routing information table. When routing to a destination address, if the destination address falls within the BAR space of an endpoint, the data will be directly forwarded to that endpoint. The mapping relationship between virtual addresses and physical addresses in the PTE table and ATC table can be pre-configured as needed.

[0030] In one embodiment, such as Figure 2 as well as Figure 3As shown, users send request messages through the user side according to their actual needs. These request messages are sent to the corresponding endpoint via the DMA module, which is subsequently referred to as the sending endpoint. Upon receiving the request message, the sending endpoint first performs a P2P determination. The P2P determination mainly checks whether the request message has a P2P request flag and whether the sending endpoint has enabled P2P functionality. If the request message has a P2P request flag and the sending endpoint has enabled P2P functionality, a P2P determination result of "supports P2P" is obtained; if the request message does not have a P2P request flag, or the sending endpoint has not enabled P2P functionality, a P2P determination result of "does not support P2P" is obtained.

[0031] For P2P-enabled P2P determination results, the address is obtained from the request message. The address mainly includes the source address and the destination address. The source address is the address of the sending endpoint, and the destination address is the address of the receiving endpoint. The sending endpoint first queries the ATC of its own ATC-PTE module. If the query is successful, the address of the request message is translated according to the found mapping relationship, and then the address-translated request message is sent to the switch module through the downstream port connected to the sending endpoint. If the ATC query is unsuccessful, a query is performed in the PTE. If the PTE query is successful, the address of the request message is translated according to the mapping relationship found in the PTE, and then the address-translated request message is sent to the switch module through the downstream port connected to the sending endpoint. If the PTE also fails, the P2P request flag in the request message is modified, and the modified request message is sent to the switch module through the downstream port connected to the sending endpoint. The modified request message no longer has the P2P request flag.

[0032] For P2P judgment results that do not support P2P, the sending endpoint directly sends the request message to the switch module through the corresponding downstream port.

[0033] In one embodiment, such as Figure 2 as well as Figure 3 As shown, after receiving a request message from the sending endpoint, the switch module checks whether a P2P transmission environment is currently available. First, it checks if the received request message contains a P2P request flag. If so, it assumes the request message requires P2P transmission. Then, based on the address in the request message and the routing information table, it determines the endpoint to which the message should be sent (hereinafter referred to as the receiving endpoint). It then checks if the receiving endpoint has P2P enabled. If it does, the switch module assumes a P2P transmission environment is available, and in this P2P environment, it sends the request message to the receiving endpoint through the downstream port connected to the receiving endpoint. The receiving endpoint processes the request and returns a completion message.

[0034] If the request message does not have a P2P request flag, or the receiving endpoint does not have P2P enabled, it is assumed that a P2P transmission environment is not currently available. The switch module will send the request message to the root complex via the upstream port, where the root complex will perform address translation and finally send the request message to the corresponding endpoint. The receiving endpoint processes the request and returns completion information.

[0035] To better describe the PCIe P2P system, specific embodiments are provided below.

[0036] Example 1

[0037] Users send request messages from the user side according to their actual needs. These request messages are sent to Endpoint0 via the DMA module. Upon receiving the request message, Endpoint0 first performs a P2P check. If the request message has a P2P request flag and Endpoint0 has enabled P2P functionality, Endpoint0 will perform a lookup in either ATC or PTE. If the lookup matches, the address in the request message is replaced according to the address mapping relationship found in the lookup. The replaced request message is then sent to the switch module via Downstream Port0.

[0038] Upon receiving a request message, the switch module checks the P2P transmission environment. If the request message contains a P2P request flag, it determines the endpoint to be sent to (i.e., the receiving endpoint) as Endpoint2 based on the routing information table and the address in the request message. If P2P is also enabled at Endpoint2, the switch module sends the request message to Endpoint2 via Downstream Port2.

[0039] Example 2

[0040] Users send request messages from the user side according to their actual needs. These request messages are sent to Endpoint0 via the DMA module. Upon receiving the request message, Endpoint0 first performs a P2P check. This request message does not have a P2P request flag. Endpoint0 then sends the request message directly to the switch module via Downstream Port0, so that the switch module can forward the request message to the root complex via the Upstream Port.

[0041] Example 3

[0042] Users send request messages from the user side according to their actual needs. These request messages are sent to Endpoint0 via the DMA module. Upon receiving the request message, Endpoint0 first performs a P2P check. The request message has a P2P request flag, but Endpoint0 has not enabled P2P functionality. Endpoint0 then sends the request message directly to the switch module via Downstream Port0, so that the switch module can forward the request message to the Root Complex via Upstream Port.

[0043] Example 4

[0044] Users send request messages from the user side according to their actual needs. These request messages are sent to Endpoint0 via the DMA module. Upon receiving the request message, Endpoint0 first performs a P2P check. If the request message has a P2P request flag and Endpoint0 has enabled P2P functionality, Endpoint0 will perform a query in either ATC or PTE. If neither query finds a match, the P2P request flag is modified, and the modified request message is sent to the switch module via Downstream Port0. The switch module then forwards the request message to the root complex via the Upstream Port.

[0045] Example 5

[0046] Users send request messages from the user side according to their actual needs. These request messages are sent to Endpoint0 via the DMA module. Upon receiving the request message, Endpoint0 first performs a P2P check. If the request message has a P2P request flag and Endpoint0 has enabled P2P functionality, Endpoint0 will perform a lookup in either ATC or PTE. If the lookup matches, the address in the request message is replaced according to the address mapping relationship found in the lookup. The replaced request message is then sent to the switch module via Downstream Port0.

[0047] Upon receiving a request message, the switch module checks the P2P transmission environment. If the request message contains a P2P request flag, it determines the endpoint to be sent to (i.e., the receiving endpoint) as Endpoint2 based on the routing information table and the address in the request message. If Endpoint2 does not have P2P enabled, the switch module sends the request message to the root complex via the upstream port.

[0048] This invention solves the problem of P2P communication support in existing PCIe designs, providing flexible point-to-point communication capabilities that enable direct data exchange between multiple devices, reducing data transmission latency and bandwidth bottlenecks through the root complex. Simultaneously, it can replace existing PCIe P2P IPs from manufacturers, offering greater flexibility and scalability, and achieving a better balance in cost control. It is particularly suitable for applications in FPGAs such as large-scale virtualization, high-performance computing, and low-latency data exchange.

[0049] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.

[0050] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0051] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0052] This application also provides a PCIe switch. A PCIe (Peripheral Component Interconnect Express) switch is a key device in a computer system used for expanding and flexibly managing PCIe bus connections. It can establish an efficient communication bridge between multiple PCIe devices, enabling high-speed data transmission and resource sharing between devices. The PCIe switch includes: the PCIe P2P system described above. The PCIe P2P system includes: a PCIe P2P IP mounted on PCIe hardware IP; the PCIe P2P IP has multiple endpoints; the PCIe P2P IP is used to forward request packets from one endpoint to the corresponding endpoint in a P2P transmission environment based on a constructed routing information table.

[0053] The specific process of P2P transmission includes: Users send request messages from their side according to their actual needs. These request messages are then sent to the corresponding endpoint via the DMA module; this endpoint is subsequently referred to as the sending endpoint. Upon receiving the request message, the sending endpoint first performs a P2P determination. This determination mainly checks whether the request message has a P2P request flag and whether the sending endpoint has enabled P2P functionality. If the request message has a P2P request flag and the sending endpoint has enabled P2P functionality, a P2P determination result indicating P2P support is obtained; otherwise, if the request message does not have a P2P request flag, or the sending endpoint has not enabled P2P functionality, a P2P determination result indicating P2P not supported is obtained.

[0054] For P2P-enabled P2P determination results, the address is obtained from the request message. The address mainly includes the source address and the destination address. The source address is the address of the sending endpoint, and the destination address is the address of the receiving endpoint. The sending endpoint first queries the ATC of its own ATC-PTE module. If the query is successful, the address of the request message is translated according to the found mapping relationship, and then the address-translated request message is sent to the switch module through the downstream port connected to the sending endpoint. If the ATC query is unsuccessful, a query is performed in the PTE. If the PTE query is successful, the address of the request message is translated according to the mapping relationship found in the PTE, and then the address-translated request message is sent to the switch module through the downstream port connected to the sending endpoint. If the PTE also fails, the P2P request flag in the request message is modified, and the modified request message is sent to the switch module through the downstream port connected to the sending endpoint. The modified request message no longer has the P2P request flag.

[0055] For P2P judgment results that do not support P2P, the sending endpoint directly sends the request message to the switch module through the corresponding downstream port.

[0056] After receiving a request message from the sending endpoint, the switch module checks whether a P2P transmission environment is available. First, it checks if the received request message contains a P2P request flag. If so, it assumes the request message requires P2P transmission. Then, based on the address in the request message and the routing information table, it determines the endpoint to which the message should be sent (hereinafter referred to as the receiving endpoint). It then checks if the receiving endpoint has P2P enabled. If so, it assumes a P2P transmission environment is available, and the switch module sends the request message to the receiving endpoint through the downstream port connected to the receiving endpoint under this P2P transmission environment. The receiving endpoint processes the request and returns a completion message.

[0057] If the request message does not have a P2P request flag, or the receiving endpoint does not have P2P enabled, it is assumed that a P2P transmission environment is not currently available. The switch module will send the request message to the root complex via the upstream port, where the root complex will perform address translation and finally send the request message to the corresponding endpoint. The receiving endpoint processes the request and returns completion information.

[0058] It should be noted that the PCIe P2P system has been explained in the above embodiments, and will not be repeated here.

[0059] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0060] In summary, this application provides a PCIe P2P system and a PCIe switch, using PCIe hardware IP as the underlying layer to provide basic PCIe interface functions for physical layer and link layer management. Through PCIe P2P IP mounted on the PCIe hardware IP, data transmission between endpoints connected to the PCIe P2P IP is completed based on a constructed routing information table. This application provides flexible point-to-point communication capabilities, enabling direct data exchange between multiple endpoints, reducing data transmission latency and bandwidth bottlenecks through the host. This invention can replace existing PCIe P2P IPs from manufacturers, providing greater flexibility and scalability, and achieving a better balance in cost control. It is suitable for various applications requiring large-scale PCIe device connections, virtualization, and high-speed data exchange. Therefore, this application effectively overcomes the various shortcomings of the prior art and has high industrial applicability.

[0061] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A PCIe P2P system, characterized in that, include: A PCIe P2P IP mounted on PCIe hardware IP; the PCIe P2P IP has multiple endpoints; The PCIe P2P IP is used to forward request messages from one endpoint to the corresponding endpoint in a P2P transmission environment based on the constructed routing information table. The PCIe P2P IP also includes an upstream port, a switch module, and multiple downstream ports. The downstream ports are used to connect endpoints. After receiving a request message from the user side, the endpoint first performs a P2P determination. If the P2P determination result indicates that P2P is supported, an address lookup operation is performed, and the request message is transmitted accordingly based on the lookup result. If the P2P determination result indicates that P2P is not supported, the request message is directly sent to the switch module. Performing an address lookup operation and transmitting the request message accordingly based on the lookup result includes: performing a lookup in the ATC or PTE based on the address of the request message; if the lookup is successful, converting the address of the request message according to the ATC or PTE, and sending the address-converted request message to the switch module through the corresponding downstream port; if the lookup is unsuccessful, modifying the P2P request flag in the request message, and sending the modified request message to the switch module through the corresponding downstream port.

2. The PCIe P2P system according to claim 1, characterized in that, The P2P judgment includes: If the request message has a P2P request flag and the endpoint has P2P functionality enabled, then a P2P judgment result indicating that P2P is supported is obtained. If the request message does not have a P2P request flag, or the endpoint does not have P2P functionality enabled, then a P2P judgment result indicating that P2P is not supported is obtained.

3. The PCIe P2P system according to claim 1, characterized in that, The specific methods for checking the P2P transmission environment include: If the request message has a P2P request flag and the address has been translated, the endpoint to be sent is determined based on the routing information table; further, it is determined whether the endpoint to be sent has enabled P2P function. If it has enabled, then it has a P2P transmission environment; otherwise, it does not have a P2P transmission environment. If the request message does not have the P2P request flag, then it does not have a P2P transmission environment.

4. The PCIe P2P system according to claim 3, characterized in that, The routing information table includes the mapping relationship between each physical address and its corresponding configured endpoint.

5. The PCIe P2P system according to claim 1, characterized in that, The system also includes a management module; the management module is used to manage the routing information table, ATC, and PTE.

6. The PCIe P2P system according to claim 1, characterized in that, The endpoint has a configuration space; the configuration space is used to enable and disable the P2P function.

7. A PCIe switch, characterized in that, include: The PCIe P2P system as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • PCIe Switch port test management method and device

    CN114238000A

  • PCIe Switch system and PCIe switch

    CN120994602A