PCIe P2P system and PCIe switch

By using PCIe hardware IP and PCIe P2P IP in the PCIe system to build a routing information table to enable direct data transmission between endpoints, the contradiction between flexibility and cost in PCIe Switch is resolved, providing efficient point-to-point communication functionality, suitable for large-scale PCIe device connections and high-speed data exchange.

CN121365026AActive Publication Date: 2026-01-20SHANGHAI GUANGYU XINCHEN TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511948875.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-01-20
Estimated Expiration
2045-12-23

AI Technical Summary

Technical Problem

Existing PCIe switches present a dilemma in terms of performance, flexibility, and cost. ASIC chips are expensive and difficult to integrate flexibly, 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 CN121365026A_ABST
    Figure CN121365026A_ABST
Patent Text Reader

Abstract

According to the PCIe P2P system and the PCIe switch, a PCIe hardware IP is used as a bottom layer, and a basic PCIe interface function of physical layer and link layer management is provided; and through the PCIe P2P IP mounted on the PCIe hardware IP, completing data transmission between the endpoints connected with the PCIe P2P IP based on the constructed routing information table. According to the invention, a flexible point-to-point communication function is provided, so that data exchange can be directly carried out among a plurality of endpoints, and the data transmission delay and bandwidth bottleneck of a host are reduced. The method can replace the existing PCIe P2P IP of a manufacturer, provides higher flexibility and expansibility, obtains better balance in the aspect of cost control, and is suitable for various applications needing large-scale PCIe equipment connection, virtualization and high-speed data exchange.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the PCIe technical field, in particular to a PCIe P2P system and a PCIe switch. BACKGROUND

[0002] The existing PCIE Switch mainly has ASIC chip products and FPGA-based implementation schemes, both of which have advantages and disadvantages in performance and flexibility but have obvious shortcomings. As a highly integrated finished hardware, the ASIC chip can provide high performance, low power consumption, stable connection and powerful management capability in commercial terminal products, with high bandwidth, strong expansion and low delay characteristics. However, its finished product attribute determines that it cannot be flexibly integrated into other systems, and function modification and customization can only rely on the existing functions of the manufacturer, lacking autonomy. Moreover, the cost is high, only suitable for large-scale batch production, the development cycle is long, and it is difficult to quickly respond to market changes. On the contrary, although FPGA has high flexibility and programmability, allowing developers to customize functions and modify and optimize at any time, it meets special needs and research and development test projects, but it is difficult to match the dedicated ASIC chip in terms of demand specifications and power consumption, and cannot meet the application scenarios with strict requirements on performance and power consumption.

[0003] Therefore, the implementation of the PCIe P2P function on the PCIe Switch of the above two schemes also continues the inherent contradictions and limitations of the respective schemes in performance, power consumption and flexibility. SUMMARY

[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a PCIe P2P system and a PCIe switch, which can solve the problems of poor flexibility and high cost of the existing PCIe P2P system.

[0005] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a PCIe P2P system, comprising: a PCIe P2P IP mounted on a PCIe hardware IP; the PCIe P2P IP is provided with a plurality of endpoints; the PCIe P2P IP is used to forward a request message issued by an endpoint to a corresponding endpoint in a P2P transmission environment based on a constructed routing information table.

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

[0007] In some embodiments of the first aspect of the present application, after receiving a request message from a user side, the endpoint first performs P2P judgment; if the obtained P2P judgment result is to support P2P, the endpoint performs address query operation, and transmits the request message according to the query result; if the obtained P2P judgment result is not to support P2P, the endpoint directly sends the request message to the switch module.

[0008] In some embodiments of the first aspect of the present application, the P2P judgment includes: if the request message has a P2P request flag and the endpoint has enabled the P2P function, obtaining a P2P judgment result to support P2P; if the request message does not have a P2P request flag or the endpoint has not enabled the P2P function, obtaining a P2P judgment result not to support P2P.

[0009] In some embodiments of the first aspect of the present application, performing address query operation and transmitting the request message according to the query result includes: querying the address of the request message in the ATC or the PTE; if the query hits, converting the address of the request message according to the ATC or the PTE, and sending the request message after address conversion to the switch module through the corresponding downstream port; if the query does not hit, modifying the P2P request flag in the request message, and sending the request message after modification to the switch module through the corresponding downstream port.

[0010] In some embodiments of the first aspect of the present application, the way of checking the P2P transmission environment specifically includes: if the request message has a P2P request flag and the address is converted, determining the endpoint to be sent based on the routing information table; further judging whether the endpoint to be sent has enabled the P2P function, if yes, the P2P transmission environment is available; otherwise, the P2P transmission environment is not available; if the request message does not have a P2P request flag, the P2P transmission environment is not available.

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

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

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

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

[0015] As described above, the PCIe P2P system and the PCIe switch of the present application have the following beneficial effects: the present application provides a PCIe P2P system and a PCIe switch, using a PCIe hardware IP as the bottom layer, providing a basic PCIe interface function of physical layer and link layer management; through the PCIe P2P IP mounted on the PCIe hardware IP, based on the constructed routing information table, the data transmission between the endpoints connected by the PCIe P2P IP is completed. The present application provides flexible point-to-point communication function, which enables multiple endpoints to directly exchange data, reducing the data transmission delay and bandwidth bottleneck through the host. The present application can replace the existing PCIe P2P IP of the manufacturer, provide higher flexibility and scalability, and achieve better balance in cost control, and is suitable for various applications requiring large-scale PCIe device connection, virtualization and high-speed data exchange. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 A schematic block diagram of a PCIe P2P system in an embodiment of the present application is shown.

[0017] Figure 2 A schematic diagram of the specific structure of a PCIe P2P system in an embodiment of the present application is shown.

[0018] Figure 3 A flowchart of a P2P mechanism in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0019] The embodiments of the present application will be described in detail below with specific reference to the drawings. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. The present application can also be implemented or applied by different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0020] The application provides a PCIe P2P system and a PCIe switch, uses a PCIe hardware IP as a bottom layer, provides a basic PCIe interface function of physical layer and link layer management, and completes data transmission between endpoints connected by a PCIe P2P IP based on a constructed routing information table through a PCIe P2P IP mounted on the PCIe hardware IP. The application provides flexible point-to-point communication function, so that multiple endpoints can directly exchange data, reduces data transmission delay and bandwidth bottleneck through a host. The application can replace an existing PCIe P2P IP of a manufacturer, provides higher flexibility and expansibility, and obtains better balance in cost control, and is suitable for various applications requiring large-scale PCIe device connection, virtualization and high-speed data exchange.

[0021] In order to understand the embodiments of the application, first, a PCIe P2P system in the embodiments of the application is described in combination with the accompanying drawings. Figure 1 The application is described in detail. Figure 1 A schematic block diagram of a PCIe P2P system in the embodiments of the application is shown. The PCIe P2P system comprises:

[0022] The PCIe hardware IP can be implemented by using an existing PCIe hardware IP (such as a hardware IP of Xilinx or Intel), which undertakes a key task of providing a basic PCIe interface function, and covers management of a physical layer (PHY) and a link layer. This module can not only be flexibly deployed on an FPGA platform, but also be adapted to an ASIC chip, and exhibits strong versatility and compatibility. In terms of function implementation, the PCIe hardware IP provides solid basic support for the PCIe protocol. A port initialization function ensures that the PCIe interface can be correctly configured and activated when the system starts, and prepares for subsequent communication; link bandwidth management dynamically adjusts the link bandwidth according to actual requirements, and optimizes data transmission efficiency; and basic data transmission function guarantees stable and reliable transmission of data between a PCIe device and a root complex. Through these functions, the PCIe hardware IP directly communicates with the PCIe device or the root complex, and builds a bridge between the system and external devices. Ups-Hard-IP, which is an upstream port hard core IP provided by an FPGA manufacturer in the PCIe hardware IP, and the PCIe hardware IP is also mounted with Ups-Soft-IP, which is a soft core IP provided by an ASIC manufacturer. Ups-Soft-IP has higher flexibility, lower cost, can be directly reused, and has higher data transmission speed.

[0023] In view of the advantages of the above Ups-Soft-IP, PCIe P2P IP is mounted on the Soft-Switch IP. The PCIe P2P IP is an IP supporting the Peer-to-Peer transmission function of the PCIe bus. It enables two PCIe endpoints (such as FPGA, GPU, NVMe SSD, etc.) to directly transmit data without the need for host memory transfer, thereby improving transmission efficiency and reducing load.

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

[0025] In an embodiment, each endpoint is provided with a BAR module and a DMA module. BAR (Base Address Register) is the base address register of PCIe, which is used to define the memory mapping area of the endpoint. BAR maps the internal resources (such as control registers, internal memory, etc.) of the endpoint to the system address space, so that the root complex (Root Complex) or other endpoints can access the resources of the endpoint through these addresses. DMA is a technology that allows endpoints to access system memory autonomously. In PCIe P2P, DMA is used for direct data transmission between endpoints, improving data transmission efficiency.

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

[0027] In an embodiment, each endpoint is provided with a configuration space. The configuration space is an important area for each endpoint to store device information, configuration resources and control the device. When an endpoint needs to respond to a P2P request, P2P related parameter configuration needs to be completed in the configuration space to start the P2P function, otherwise the P2P request flag corresponding communication behavior cannot take effect.

[0028] In an embodiment, each endpoint is provided with an ATC-PTE module, which mainly completes cache conversion management of address translation. The module is provided with an ATC and a PTE. The ATC (Address Translation Cache) is a kind of cache, which is used to temporarily store the mapping relationship of frequently used virtual addresses to physical addresses (essentially, the commonly used PTE information is cached). The ATC can solve the problem of slow PTE traversal speed. The endpoint will first query the ATC, if it hits (finds the corresponding conversion record), it directly obtains the physical address without accessing the PTE again. If it does not hit, it traverses the PTE again. This greatly improves the query speed and improves the address translation efficiency. The PTE (Page Table Entry) is a basic unit in the page table, which is used to store the mapping relationship of virtual addresses to physical addresses and related control information. In the virtual memory mechanism, both virtual addresses and physical addresses are divided into fixed-size pages, and the PTE records the physical page number corresponding to a virtual page, and contains a series of flag bits (such as read-write permission, whether to cache, whether to exist in physical memory, etc.).

[0029] In an embodiment, the PCIe P2P system further includes a FirmWare management module (FW), which is mainly used to manage the entire P2P information, needs to complete the interaction with the HOST to obtain the P2P information, and manage the P2P enabled route. Specifically, the FirmWare management module is mainly used to manage the route information table, the PTE table and the ATC table. The route information table records the mapping relationship between each physical address and the corresponding configured endpoint. When the PCIe initialization enumeration is performed, the root complex allocates address space for each endpoint, and records these information in the route information table. When routing the target address, when the target address falls within the BAR space of an endpoint, the data is directly forwarded to the endpoint. The mapping relationship of virtual addresses to physical addresses in the PTE table and the ATC can be configured in advance according to the demand.

[0030] In an embodiment, as shown in FIG. 6, the PCIe P2P system further includes a P2P request module. The P2P request module is mainly used to respond to the P2P request. When the P2P request module receives a P2P request, it needs to complete the P2P related parameter configuration in the configuration space to start the P2P function, otherwise the P2P request flag corresponding communication behavior cannot take effect. Figure 2 and Figure 3As shown, a user sends a request message according to actual needs of the user, and the request message is sent to a corresponding endpoint (hereinafter referred to as a sending endpoint) via a DMA module. After receiving the request message, the sending endpoint first performs P2P judgment. The P2P judgment mainly checks whether the request message has a P2P request flag and checks whether the sending endpoint has enabled a P2P function. If the request message has the P2P request flag and the sending endpoint has enabled the P2P function, a P2P judgment result supporting P2P is obtained. If the request message does not have the P2P request flag or the sending endpoint has not enabled the P2P function, a P2P judgment result not supporting P2P is obtained.

[0031] For the P2P judgment result supporting P2P, an address is obtained from the request message. The address mainly includes a source address and a target address. The source address is an address of the sending endpoint, and the target address is an address of a receiving endpoint. The sending endpoint first performs a query in an ATC of an ATC-PTE module set by itself. If the query hits, the address of the request message is converted according to a mapping relationship obtained by the query, and the request message after the address conversion is sent to a switch module via a downstream port connected by the sending endpoint. If the ATC query does not hit, a query is performed in a PTE. If the PTE query hits, the address of the request message is converted according to a mapping relationship obtained by the query in the PTE, and the request message after the address conversion is sent to the switch module via the downstream port connected by the sending endpoint. If the PTE also does not hit, a P2P request flag in the request message is modified, and the request message after the modification is sent to the switch module via the downstream port connected by the sending endpoint. The request message after the modification no longer has the P2P request flag.

[0032] For the P2P judgment result not supporting P2P, the sending endpoint directly sends the request message to the switch module via a corresponding downstream port.

[0033] In an embodiment, as shown in Figure 2 and Figure 3 As shown, after receiving the request message sent by the sending endpoint, the switch module checks whether a P2P transmission environment is currently available. First, it is checked whether the received request message has a P2P request flag. If the request message has the P2P request flag, it is considered that the request message needs to be transmitted by P2P, and then a receiving endpoint to be transmitted is determined based on an address and routing information table in the request message. It is checked whether the receiving endpoint has enabled a P2P function. If the receiving endpoint has enabled the P2P function, it is considered that the P2P transmission environment is currently available, and the switch module sends the request message to the receiving endpoint via a downstream port connected by the receiving endpoint in the P2P transmission environment. The receiving endpoint processes the request and returns completion information.

[0034] If the request message does not have the P2P request flag, or the receiving endpoint does not have the P2P function enabled, it is considered that the P2P transmission environment is not available. The switch module sends the request message to the root complex through the upstream port, so that the root complex completes address translation and finally sends the request message to the corresponding endpoint. The receiving endpoint processes the request and returns completion information.

[0035] In order to better describe the PCIe P2P system, specific embodiments are provided.

[0036] Embodiment one

[0037] The user sends a request message according to actual needs through the user side, and the request message is sent to Endpoint0 through the DMA module. Endpoint0 first performs P2P judgment after receiving the request message. The request message has the P2P request flag and Endpoint0 has the P2P function enabled. Endpoint0 performs query in ATC or PTE. If the query hits, the address of the request message is replaced according to the address mapping relationship of the query, and the replaced request message is sent to the switch module through the Downstream Port0.

[0038] The switch module checks the P2P transmission environment after receiving the request message. In the case that the request message has the P2P request flag, the receiving endpoint (i.e. Endpoint2) is determined according to the routing information table and the address in the request message. In the case that Endpoint2 also has the P2P function enabled, the switch module sends the request message to Endpoint2 through the Downstream Port2.

[0039] Embodiment two

[0040] The user sends a request message according to actual needs through the user side, and the request message is sent to Endpoint0 through the DMA module. Endpoint0 first performs P2P judgment after receiving the request message. The request message does not have the P2P request flag. Endpoint0 sends the request message to the switch module through the Downstream Port0, so that the switch module sends the request message to the root complex through the Upstream Port.

[0041] Embodiment three

[0042] The user sends a request message according to actual needs through the user side, and the request message is sent to Endpoint 0 through the DMA module. Endpoint 0 first performs P2P judgment after receiving the request message. The request message has a P2P request flag, but Endpoint 0 does not start the P2P function. Endpoint 0 sends the request message to the switch module through the Downstream Port 0, so that the switch module sends the request message to the root complex (Root Complex) through the Upstream Port.

[0043] Embodiment Four

[0044] The user sends a request message according to actual needs through the user side, and the request message is sent to Endpoint 0 through the DMA module. Endpoint 0 first performs P2P judgment after receiving the request message. The request message has a P2P request flag, and Endpoint 0 starts the P2P function. Endpoint 0 queries in the ATC or PTE. If the query does not hit, the P2P request flag is modified. The modified request message is sent to the switch module through the Downstream Port 0, so that the switch module sends the request message to the root complex (Root Complex) through the Upstream Port.

[0045] Embodiment Five

[0046] The user sends a request message according to actual needs through the user side, and the request message is sent to Endpoint 0 through the DMA module. Endpoint 0 first performs P2P judgment after receiving the request message. The request message has a P2P request flag, and Endpoint 0 starts the P2P function. Endpoint 0 queries in the ATC or PTE. If the query hits, the address of the request message is replaced according to the address mapping relationship of the query. The replaced request message is sent to the switch module through the Downstream Port 0.

[0047] The switch module checks the P2P transmission environment after receiving the request message. In the case that the request message has a P2P request flag, the address in the request message and the routing information table are used to determine that the endpoint to be sent (i.e., the receiving endpoint) is Endpoint 2. If Endpoint 2 does not start the P2P function, the switch module sends the request message to the root complex (Root Complex) through the Upstream Port.

[0048] The application solves the problem of supporting P2P communication in the existing PCIe design, provides flexible point-to-point communication function, enables direct data exchange between multiple devices, reduces data transmission delay and bandwidth bottleneck through the Root Complex. At the same time, it can replace the existing PCIe P2P IP of the manufacturer, provide higher flexibility and scalability, and achieve better balance in cost control, and is particularly suitable for large-scale virtualization, high-performance computing and low-latency data exchange in FPGA and other application scenarios.

[0049] In the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using "first", "second", etc. The skilled in the art can understand that "first", "second", etc. do not limit the number and execution order, and "first", "second", etc. also do not limit the difference.

[0050] It should be noted that in the embodiments of the present application, "exemplary" or "for example" means an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0051] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association between the associated objects, which means that there can be three kinds of relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can represent a, b, c, a-b, a-c, b-c or a-b-c, where a, b and c can be single or multiple.

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

[0053] The specific process of P2P transmission comprises: a user sends a request message according to actual needs through a user side, the request message is sent to a corresponding endpoint via a DMA module, and the endpoint is subsequently referred to as a sending endpoint. After receiving the request message, the sending endpoint first performs P2P judgment. The P2P judgment mainly checks whether the request message has a P2P request flag and checks whether the sending endpoint has enabled the P2P function. If the request message has the P2P request flag and the sending endpoint has enabled the P2P function, a P2P judgment result supporting P2P is obtained; if the request message does not have the P2P request flag or the sending endpoint has not enabled the P2P function, a P2P judgment result not supporting P2P is obtained.

[0054] For the P2P judgment result supporting P2P, an address is obtained from the request message. The address mainly comprises a source address and a target address. The source address is the address of the sending endpoint, and the target address is the address of a receiving endpoint. The sending endpoint first queries in the ATC of the ATC-PTE module set by itself, and if the query hits, the address of the request message is converted according to the mapping relationship obtained by the query, and then the request message after address conversion is sent to the switch module through the downstream port connected to the sending endpoint. If the ATC query does not hit, a query is performed in the PTE. If the PTE query hits, the address of the request message is converted according to the mapping relationship obtained by the query in the PTE, and then the request message after address conversion is sent to the switch module through the downstream port connected to the sending endpoint. If the PTE also does not hit, 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 the P2P judgment result not supporting 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 only illustrative of the principles of the present application and their effects, and are not intended to limit the present application. Any modification or change made by any person skilled in the art without departing from the spirit and scope of the present application shall be covered by the claims of the present 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.

2. The PCIe P2P system according to claim 1, characterized in that, The PCIe P2P IP also includes an upstream port, a switch module, and multiple downstream ports; the downstream ports are used to connect endpoints.

3. The PCIe P2P system according to claim 2, characterized in that, After receiving a request message from the user side, the endpoint first performs a P2P judgment. If the obtained P2P judgment result indicates that P2P is supported, then an address query operation is performed, and the request message is transmitted accordingly based on the query result; if the obtained P2P judgment result indicates that P2P is not supported, then the request message is directly sent to the switch module.

4. The PCIe P2P system according to claim 3, 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.

5. The PCIe P2P system according to claim 3, characterized in that, Performing an address lookup operation and transmitting the request message accordingly based on the lookup result includes: The address in the request message is used to perform a lookup in ATC or PTE. If the query is successful, the address of the request message is translated according to ATC or PTE, and the address-translated request message is sent to the switch module through the corresponding downstream port. If the query fails, modify the P2P request flag in the request message and send the modified request message to the switch module through the corresponding downstream port.

6. The PCIe P2P system according to claim 2, 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.

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

8. 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.

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

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

Citation Information

Patent Citations

  • PCIe Switch port test management method and device

    CN114238000A

  • PCIe Switch system and PCIe switch

    CN120994602A

  • Server management method and device, equipment and storage medium

    CN121116877A

  • Scalable peer to peer data routing for servers

    US11487695B1

  • Method, system, and apparatus for supporting multiple address spaces to facilitate data movement

    US20220283946A1