Data transmission method and communication system of processing card based on PCIe protocol

By virtualizing multiple transmission channels and splitting PCIe signaling data and computing data, the problem of wasted hardware resources in the prior art is solved, efficient parallel transmission is achieved, and data transmission efficiency and throughput are improved.

CN118295954BActive Publication Date: 2025-03-11TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410503692.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2025-03-11
Estimated Expiration
2044-04-25

AI Technical Summary

Technical Problem

In the prior art, a single processing path is used when processing PCIe signaling and data, resulting in the inability to fully utilize hardware resources and waste of resources.

Method used

By virtualizing multiple transmission channels, the PCIe signaling data and calculation data are split and distributed to the corresponding virtual channels, achieving efficient parallel transmission.

Benefits of technology

It effectively reduces the waste of hardware resources, improves the transmission efficiency of large-traffic data and small-traffic data, and improves the throughput of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118295954B_ABST
    Figure CN118295954B_ABST
Patent Text Reader

Abstract

The present application provides a data transmission method and communication system for a processing card based on the PCIe protocol, wherein the method includes: pre-virtualizing the transmission channel into 8 virtual data channels and 3 virtual signaling channels; establishing a mapping relationship between the storage space on the host and the address interval of the BAR space of the PCIe; PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship; PCIe processes the downlink data, and outputs the protocol message and the flag signal for identifying the BAR space to which the message belongs to the target hardware device through the hardware high-speed communication interface; the target hardware device sends the downlink data carried by the message to the corresponding virtual channel. The above scheme achieves the technical effect of effectively reducing the waste of hardware resources, reducing the probability of busy and blocked communication networks, improving the throughput of data transmission, and improving the efficiency of data transmission of large and small traffic data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of digital information transmission, and in particular, relates to a data transmission method and a communication system for a processing card based on a PCIe protocol. Background Art

[0002] PCIe (Peripheral Component Interconnect Express) is a high-speed serial bus standard that is widely used for communication between components inside a computer. With the continuous development of computer technology, the application scenarios of PCIe are becoming more and more extensive. For example, graphics cards, solid-state drives, network adapters and other devices all transmit data through the PCIe bus.

[0003] Currently, when processing PCIe signaling and data, a single processing path is generally used, which will inevitably lead to the inability to fully utilize hardware resources and cause a waste of hardware resources.

[0004] Currently, no effective solution has been proposed to address the problem of hardware resource waste caused by using a single processing path to process PCIe signaling data and computing data. Summary of the invention

[0005] The purpose of this application is to provide a data transmission method and communication system for a processing card based on the PCIe protocol, which can realize efficient parallel transmission of PCIe signaling data and computing data, thereby achieving the technical effect of reducing the waste of hardware resources.

[0006] The present application provides a data transmission method and communication system for a processing card based on the PCIe protocol, which is implemented as follows:

[0007] A data transmission method for a processing card based on a PCIe protocol, the method comprising:

[0008] A mapping relationship between the storage space on the host and the address range of the BAR space of PCIe is established through the software on the host;

[0009] The PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, wherein the host and the target hardware device are connected via the PCIe;

[0010] PCIe processes the downlink data and outputs a protocol message (TLP, Transaction Layer Packet) and a flag signal for identifying the BAR space to which the TLP belongs to the target hardware device through a hardware high-speed communication interface, wherein the TLP carries message header information and downlink data;

[0011] The target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs.

[0012] In one embodiment, before the target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs, the method further includes:

[0013] The channels are virtualized in advance into 8 virtual data channels and 3 virtual signaling channels, among which the 8 virtual data channels include: 4 large-traffic data channels and 4 small-traffic data channels, and the 3 virtual signaling channels include: a signaling channel for transmitting content related to the initial configuration environment, a signaling channel for transmitting large-traffic data uplink and downlink related information, and a signaling channel for transmitting service-related content.

[0014] In one embodiment, the target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs, including:

[0015] The target hardware device parses the message header information to determine the type of downlink data carried by the TLP, wherein the type of downlink data carried by the TLP includes: signaling data and calculation data;

[0016] In the case where the type of downlink data is signaling data, the downlink data is sent to the corresponding virtual signaling channel according to the address information in the message header information;

[0017] When the type of the downlink data is computing data, the downlink data is sent to the corresponding virtual data channel according to the address information in the message header information.

[0018] In one embodiment, the PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, including:

[0019] The downlink data transmitted from the host to the target hardware device is placed in the target address of the host's storage space through the software on the host;

[0020] The function provided by the PCIe driver is called by the software on the host, and the downlink data is written into the BAR space of the PCIe according to the mapping relationship.

[0021] In one implementation, the message header information includes: data length, address range of data in the BAR space, etc.

[0022] In one embodiment, before the PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, and the downlink data is large-volume data, it also includes:

[0023] Receive a request from a user to access information about a task currently being executed by a target hardware device connected to the PCIe through downlink signaling;

[0024] In response to the request, determining whether the current target hardware device is in a busy state;

[0025] If it is determined to be in a busy state, busy information is returned to indicate that downlink high-volume data transmission is currently unavailable;

[0026] When it is determined that the device is in an idle state, idle information is returned to indicate that downlink high-volume data transmission is currently available;

[0027] The pre-transmitted high-volume data is used as downlink data transmitted from the host to the target hardware device.

[0028] In one embodiment, it further comprises:

[0029] After the downlink high-volume data transmission is completed, the high-volume data channel and resources occupied by this downlink high-volume data transmission are released through downlink signaling notification.

[0030] A data communication system of a processing card based on a PCIe protocol, comprising: a host, a PCIe and a target hardware device, wherein the host and the target hardware device are connected via the PCIe;

[0031] The host establishes a mapping relationship between the storage space on the host and the address range of the BAR space of the PCIe through the software on the host;

[0032] PCIe, receives downlink data transmitted from the host to the target hardware device according to the mapping relationship, processes the downlink data, and outputs a protocol message TLP and a flag signal for identifying the BAR space to which the TLP belongs to the target hardware device through the hardware high-speed communication interface, wherein the TLP carries the downlink data and message header information;

[0033] The target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs.

[0034] In one embodiment, the host is a computer that provides services in the network, including: a server, a desktop computer, etc.

[0035] In one embodiment, the target hardware device is a processing card based on the PCIe protocol.

[0036] The data transmission method and communication system of the processing card based on the PCIe protocol provided by the present application, by virtualizing multiple transmission channels, determines the PCIeBAR space to which the TLP belongs and the type of the downlink data when receiving the downlink data transmitted by the host to the target hardware device, and thus sends the downlink data to the corresponding virtual transmission channel. Because after the TLP carrying the downlink data is output from the hardware high-speed communication interface, it is changed from serial to multi-channel parallel on the hardware device, which greatly reduces the probability of high-speed transmission communication network being busy and blocked, and improves data

[0037] The transmission throughput effectively reduces the waste of hardware resources and improves the transmission efficiency of large and small flow data. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0039] Figure 1 It is a method flow chart of an embodiment of a data transmission method of a processing card based on the PCIe protocol provided by the present application;

[0040] Figure 2 It is a schematic diagram of the connection between the host and the hardware device provided by this application;

[0041] Figure 3 It is a structural block diagram of a PCIe data processing device provided by the present application;

[0042] Figure 4 It is a schematic diagram of the allocation of BAR space provided by this application;

[0043] Figure 5 This is a flowchart for processing PCIe downstream high-volume data provided by this application;

[0044] Figure 6 It is a hardware structure block diagram of an electronic device for a data transmission method of a processing card based on the PCIe protocol provided by the present application;

[0045] Figure 7 It is a schematic diagram of the module structure of an embodiment of a data transmission device of a processing card based on the PCIe protocol provided in the present application. DETAILED DESCRIPTION

[0046] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0047] PCIe communication usually includes signaling transmission and data transmission. Signaling transmission is usually used for control and configuration, and data transmission is usually used for the transmission of actual data. In PCIe communication, signaling and data usually need to be processed separately to ensure efficient communication. In view of the problem that the existing processing of PCIe signaling and data generally adopts a single processing path for processing, which leads to a lack of flexibility and waste of hardware resources, considering that the existing PCIe signaling and data are generally processed by a single processing path, this will inevitably lead to the inability to fully utilize hardware resources and cause a waste of hardware resources. Based on this, in this example, the transmission channel of PCIe signaling and data is virtualized into multiple channels, and different channels transmit different signaling or data, so as to achieve the purpose of parallel processing and effectively improve the utilization of hardware resources.

[0048] Figure 1 It is a method flow chart of an embodiment of a data transmission method for a processing card based on the PCIe protocol provided by the present application. Although the present application provides method operation steps or device structures as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure described in the embodiments of the present application and shown in the drawings. When the method or module structure described is applied to an actual device or terminal product, it can be connected according to the method or module structure shown in the embodiments or drawings for sequential execution or parallel execution (for example, a parallel processor or a multi-threaded processing environment, or even a distributed processing environment).

[0049] Specifically, Figure 1 As shown, the data transmission method of the processing card based on the PCIe protocol may include the following steps:

[0050] Step 101: A mapping relationship between a storage space on the host and an address range of a PCIe BAR space (a concept in a PCIe device, used to store specific address information of a device) is established through software on the host;

[0051] Step 102: PCIe receives downlink data transmitted from the host to the target hardware device according to the mapping relationship, wherein the host and the target hardware device are connected via PCIe;

[0052] Step 103: PCIe processes the downlink data, and outputs a protocol message (TLP, Transaction Layer Packet) and a flag signal for identifying the BAR space to which the TLP belongs to to the target hardware device through a hardware high-speed communication interface, wherein the TLP carries the downlink data and message header information;

[0053] The message header information may include: data length and address range of data in the BAR space.

[0054] Step 104: The target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs.

[0055] The types of downlink data carried by TLP include: signaling data and calculation data. Signaling data includes: signaling for transmitting content related to configuring the initial environment, signaling for transmitting uplink and downlink control information of large-volume data, and signaling for transmitting other business-related content. Calculation data includes: large-volume data and small-volume data.

[0056] Based on this, the channels for splitting and decoding downlink computing data and signaling data can be virtualized into 8 data channels and 3 signaling channels in advance, among which the 8 data channels can include: 4 high-traffic data channels and 4 low-traffic data channels, and the 3 signaling channels can include: signaling channels for transmitting content related to configuring the initial environment, signaling channels for transmitting uplink and downlink control related information of high-traffic data, and signaling channels for transmitting other business-related content. By dividing the data channels into two types, high-traffic and low-traffic, it is more flexible to use, and there are 4 data channels of each type, which can adapt to multi-user usage scenarios in a cluster environment, and can solve the problem of single transmission channel blocking of a node in an interconnected cluster.

[0057] Based on this, the target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs, which may include:

[0058] S1: The target hardware device parses the message header information to determine the type of downlink data carried by the TLP, wherein the type of downlink data includes: signaling data and calculation data;

[0059] S2: When the type of the downlink data is signaling data, according to the address information in the message header information, the downlink data carried in the TLP is sent to the corresponding virtual signaling channel;

[0060] S3: When the type of the downlink data is computing data, the downlink data carried in the TLP is sent to the corresponding virtual data channel according to the address information in the message header information.

[0061] During implementation, PCIe receives downlink data transmitted by the host to the target hardware device according to the mapping relationship, which may include: placing the downlink data transmitted by the host to the target hardware device in the target address of the host's storage space through the software on the host; calling the function provided by the PCIe driver through the software on the host, and writing the downlink data to the BAR space of PCIe according to the mapping relationship.

[0062] Taking the downlink high-volume data transmission as an example, before the PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, it also includes:

[0063] S1: receiving a request from a user to access information about a task currently being executed by a target hardware device connected to PCIe via downlink signaling;

[0064] S2: responding to the request and determining whether the current target hardware device is in a busy state;

[0065] S3: When it is determined that the system is in a busy state, a busy message is returned to indicate that downlink high-volume data transmission is currently unavailable;

[0066] S4: When it is determined that the device is in an idle state, idle information is returned to indicate that downlink high-volume data transmission is currently available;

[0067] S5: Use the pre-transmitted high-traffic data as downlink data transmitted from the host to the target hardware device.

[0068] That is, when there is a demand for downlink high-volume data transmission, an application can be made by the user, and after the user's application is approved, the downlink high-volume data can be transmitted through a certain high-volume data transmission channel. During the process of downlink high-volume data transmission, if an abnormality occurs and causes the downlink data task to fail, the monitoring unit can feedback the abnormality to the user layer and the abnormality handling unit by means of transmission signaling, so that the downlink data task can run normally. If the amount of downlink data is too large and exceeds the address interval range of a single high-volume data transmission channel, the downlink data transmission operation can be performed multiple times until the downlink high-volume data task is completed.

[0069] Furthermore, after the downlink high-volume data transmission is completed, the high-volume data channel and resources occupied by this downlink high-volume data transmission may be released through downlink signaling notification.

[0070] The above method is described below in conjunction with a specific embodiment. However, it is worth noting that this specific embodiment is only for better illustrating the present application and does not constitute an improper limitation on the present application.

[0071] For existing PCIe signaling and data, a single processing path is usually used for processing, which will inevitably lead to the inability to fully utilize hardware resources and waste of hardware resources; further, when the amount of PCIe signaling and data is large, the existing method cannot meet the requirements of real-time and efficiency. When processing large-scale data, the existing data processing method may cause delays and performance bottlenecks, thereby affecting the performance of the entire system. For this reason, in this example, it is considered that multiple virtual transmission channels can be virtualized, and the data in the PCIe message is split into multiple types according to type, and these parts are processed in parallel, thereby improving the data processing efficiency and making full use of hardware resources.

[0072] like Figure 2 As shown in the figure, the host and the hardware device are connected through PCIe, and a mapping relationship between the host's storage space and the address of the PCIe BAR space is established, where the host refers to a computer that provides services in the network, which can be a server or a desktop computer. One end of the PCIe is connected to the host, and the host can recognize the PCIe. After the host loads the PCIe driver, it can use the software on the host to transmit data to the hardware device connected to the PCIe, and the hardware device can also transmit data to the host through PCIe.

[0073] Specifically, in this example, a downlink data processing device for PCIe is provided, such as Figure 3 As shown, the following modules may be included:

[0074] 1) Data receiving and parsing module:

[0075] The reception of data refers to the device receiving information sent from the outside in real time through the PCIe interface, wherein the information may include but is not limited to: messages (TLP, Transaction Layer Packet), flag signals, etc.

[0076] Among them, data parsing is that after receiving the message, the data parsing module inside the device parses the header information of the message according to the protocol specification to identify the type of message and the length of the downlink data carried by the message. The parsing process may include: message error checking, message header information extraction and other steps.

[0077] 2) Data splitting module:

[0078] When performing data splitting, the parsed data needs to be split according to the strategy. Specifically, the corresponding splitting strategy can be determined based on the type of data and data volume information obtained from the analysis. For example, it can be split by fixed size, split by data block, split by priority, etc.

[0079] According to the determined splitting strategy, the downlink data in the message can be split into multiple sub-data flows, and these sub-data flows will enter different data processing paths respectively.

[0080] Specifically, the existing PCIe data and signaling split decoding processing generally treats data and signaling in the same way and tends to be serial processing. In this example, a split decoding method is provided. For the received message (TLP, Transaction Layer Packet) transmitted by the hardware high-speed communication interface, according to the different BAR spaces to which the message belongs or the different starting addresses under the same BAR space, the received messages of different types and purposes are distinguished, and all data and signaling of different nature or different targets are processed through a split decoding (named Rx unpack in the private protocol) module to complete the split decoding processing. On this basis, all subsequent more detailed processing of data and signaling is parallel processing, thereby improving data processing efficiency.

[0081] Taking the PCIe downstream small traffic data (named direct in the private protocol) type transaction packet as an example, assuming that the current transaction packet is a small traffic data type, the downstream transmission of this type of transaction packet is achieved by directly writing to a certain address segment of the PCIe BAR4 space. Compared with the existing processing method, this method of transmitting data can improve flexibility and scalability while strengthening proprietary properties.

[0082] Furthermore, in this example, the concept of multiple virtual channels is proposed to make data transmission more efficient and flexible. Specifically, the general PCIe data and signaling split decoding method is only divided into one data channel and one signaling channel. In this example, in the processing of PCIe data and signaling split decoding, 8 data channels and 3 signaling channels are divided.

[0083] Among them, 4 of the 8 data channels are high-traffic data channels, and the other 4 data channels are low-traffic data channels. The characteristic of the high-traffic data channel is that the hardware device obtains the high-traffic data based on the information of the address interval where the high-traffic data is stored through signaling downlink. The characteristic of the low-traffic data channel is that the user directly writes the data to a smaller address interval in the PCIe BAR4 space to realize data downlink. By dividing the data channels into two types, high-traffic and low-traffic, it is more flexible to use, and there are 4 data channels of each type, which can adapt to multi-user usage scenarios in a cluster environment, and can solve the problem of single transmission channel blocking of a node in the interconnected cluster.

[0084] Among them, the three signaling channels are: the signaling channel for transmitting content related to configuring the initial environment, the signaling channel for transmitting uplink and downlink related information of large-volume data packets, and the signaling channel for transmitting other business-related content. These three signaling channels are referred to as the configuration signaling channel, the large-volume transmission control signaling channel, and the business signaling channel.

[0085] For example: Figure 4 As shown, the address 0000_0000~0000_007F of the PCIe BAR2 space is the address interval where the downlink service signaling channel is located; the address 0000_0080~0000_3FFF of the PCIe BAR2 space is the address interval where the configuration signaling channel is located; the address 0000_0000~0000_1FFF of the PCIe BAR4 space is the address interval where the small traffic data channel 0 of the downlink small traffic data packet is located; the address 0000_2000~0000_3FFF of the BAR4 space is the address interval where the small traffic data channel 1 of the downlink small traffic data packet is located, and so on.

[0086] 3) Data processing module:

[0087] Parallel processing: The split data streams will enter different data processing units, which can work in parallel to improve the speed and efficiency of data processing. When implementing, different data processing units can adopt different processing methods, such as calculation, storage, etc., according to actual needs.

[0088] 4) Feedback and control module:

[0089] The feedback and control module monitors the status of the entire processing flow in real time to ensure the integrity and correctness of the data. Furthermore, according to the actual operation situation and demand changes, the feedback and control module can dynamically adjust and control the data processing flow to achieve optimal performance.

[0090] Furthermore, considering that various errors or abnormal situations may occur during the entire data processing process. To this end, the above-mentioned processing device can be set with an error handling and recovery mechanism to ensure the stability and reliability of data processing. In order to facilitate users to configure, monitor and debug, the above-mentioned data processing device can provide a friendly user interface and debugging tools, through which users can view the processing status, set parameters, perform troubleshooting and other operations. At the same time, the debugging tool can help developers quickly locate problems and optimize them. The above-mentioned data processing device also has good compatibility and interoperability, and can connect and communicate with other devices, thereby ensuring reliability and wide applicability in practical applications. The design of the above-mentioned data processing device should follow industry standards and specifications to ensure that it has good maintainability and upgradeability, and improve the ease of use and scalability of the device through standardized interfaces and modular design.

[0091] Specifically, in this example, a data transmission method is provided, which may include:

[0092] S1: The software can complete address mapping between a certain address range on the host (i.e., a certain storage space of the host) and a certain address range of a certain BAR space of PCIe;

[0093] S2: The software calls the function provided by the PCIe driver to write data to the PCIe BAR space content;

[0094] S3: When receiving the downlink data from the host, PCIe transmits the received downlink data from the host to the connected device at the other end, that is, the hardware;

[0095] S4: Downlink data is processed in PCIe.

[0096] S5: The processed data is output from the hardware high-speed communication interface as a message. The message contains header information and downlink data. The message header information carries information such as data length and address. In addition to the message, the hardware high-speed communication interface also has a flag signal specifically used to indicate which BAR space the currently transmitted message belongs to.

[0097] S6: The hardware mainly receives two pieces of information from the hardware high-speed communication interface, one is the message, and the other is which BAR space of PCIe the message belongs to. The message contains header information and downlink data.

[0098] S7: The hardware device performs splitting and decoding processing according to the flag signal of which BAR space of PCIe the message belongs to and the various information contained in the message header information. Specifically, the hardware splitting and decoding processing device can send the original downlink data carried in the message to the corresponding virtual channel (i.e., one of 8 virtual data transmission channels and 3 signaling transmission channels, a total of 11 virtual transmission channels) according to the parsed flag signal of the BAR space and the message header information.

[0099] For example, the software personnel and the hardware logic personnel agree on a private protocol. Take the downlink transmission service signaling as an example: the software personnel will write the service signaling to the address range 0000_0000~0000_007F of the BAR2 space of PCIe. Based on the above steps S1 to S7, when the hardware splitting processing device receives a message containing downlink service signaling, the flag signal of which BAR space the transmission message of the hardware high-speed communication interface belongs to will mark the current transmission message belongs to the BAR2 space, and the starting address information in the header information of the message will be 0000_0000. In this way, the hardware unpacking and decoding device knows that the data content in the downlink message of the host is service signaling. Then the unpacking and decoding device can distinguish the service signaling and send the service signaling to the virtual service signaling channel corresponding to the service signaling.

[0100] In the above example, by splitting the PCIe signaling data and computing data paths, a large amount of data can be processed in a short time, thereby reducing the time delay of data processing, improving data throughput, and meeting the high-bandwidth, low-latency high-speed transmission and communication requirements. Compared with the problem of hardware resource waste caused by the existing processing method using a single processing path, the split path processing method in this example can select the most suitable processing path according to data characteristics and requirements, thereby making full use of hardware resources and improving the overall processing efficiency. Furthermore, through the modular design concept, when new high-speed transmission equipment or protocols appear, only the corresponding processing modules need to be added or modified, without major changes to the entire system, which greatly enhances the scalability of the system. The method in the above example can be applied to various scenarios that require large-scale high-speed transmission and communication, in addition to the existing cluster environment, such as: data centers, high-performance computing, real-time image processing, etc., to better cope with the needs of high data volume and high transmission rate.

[0101] like Figure 5 The following is a flowchart of the processing of large PCIe downstream traffic data, taking a user's downstream large traffic data task as an example. The hardware environment may include but is not limited to: a single hardware processing card, a large-scale interconnected cluster, etc. After the initial power-on, the environment needs to be configured to a certain extent, which can be achieved through PCIe downstream configuration related signaling.

[0102] Specifically, the PCIe data and signaling splitting and decoding method and device are adapted to the multi-user, multi-task interconnected cluster environment, so if the user wants to complete the task of downlink large traffic data, he can first access the information of the task currently being executed by the hardware environment connected to the PCIe through downlink signaling. If the current hardware environment is busy, the application will not be approved. If the business is idle and the task of downlink large traffic data is allowed to be executed, the application will be approved.

[0103] After the user's application is approved, high-traffic data is transmitted downstream through a high-traffic data transmission channel of PCIe.

[0104] During the process of downlinking large-volume data, if an exception occurs that causes the downlink data task to fail, some of the monitoring unit logic will feedback the exception to the user layer and the exception handling unit by means of transmission signaling, so that the downlink data task can run normally. If the user's downlink data is large and exceeds the address range of a single large-volume data transmission channel, it is necessary to perform the downlink data operation multiple times until the downlink large-volume data task is completed. Furthermore, in order to ensure that the resources of the hardware environment can be fully utilized, when the user task is completed, the PCIe downlink signaling can be used to notify that the channel and other resources occupied by this task can be released.

[0105] The method embodiments provided in the above embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on an electronic device as an example, Figure 6 This is a hardware structure block diagram of an electronic device for a data transmission method of a processing card based on the PCIe protocol provided by the present application. Figure 6 As shown, the electronic device 10 may include one or more (only one is shown in the figure) processors 02 (the processor 02 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 04 for storing data, and a transmission module 06 for communication functions. It can be understood by those skilled in the art that Figure 6 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown.

[0106] The memory 04 can be used to store software programs and modules of application software, such as program instructions / modules corresponding to the data transmission method based on PCIe in the embodiment of the present application. The processor 02 executes various functional applications and data processing by running the software programs and modules stored in the memory 04, that is, the data transmission method of the processing card based on the PCIe protocol of the above-mentioned application is realized. The memory 04 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 04 may further include a memory remotely arranged relative to the processor 02, and these remote memories may be connected to the electronic device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0107] The transmission module 06 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 10. In one example, the transmission module 06 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 06 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

[0108] At the software level, the data transmission device of the processing card based on the PCIe protocol can be as follows: Figure 7 As shown, including:

[0109] Receiving module 701, used for receiving target message;

[0110] A first determination module 702, configured to determine a PCIe BAR space to which a target message belongs;

[0111] The second confirmation module 703 is used to determine the starting address of the PCIe BAR space to which the target message belongs and the data length carried by the message;

[0112] The transmission module 704 is configured to transmit the original downlink data carried by the target message to the corresponding virtual transmission channel based on the BAR space information to which the target message belongs and the header information of the target message.

[0113] Because after the message carrying downlink data is output from the hardware high-speed transmission interface, it is changed from serial to multi-channel parallel on the hardware device, which greatly reduces the probability of high-speed transmission communication network being busy and blocked, and improves the data transmission throughput.

[0114] The embodiment of the present application also provides a specific implementation of an electronic device capable of implementing all the steps in the data transmission method of the processing card based on the PCIe protocol in the above embodiment, and the electronic device specifically includes the following contents: a processor, a memory, a communication interface and a bus; wherein the processor, the memory and the communication interface communicate with each other through the bus; the processor is used to call a computer program in the memory, and when the processor executes the computer program, all the steps in the data transmission method of the processing card based on the PCIe protocol in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0115] Step 1, for receiving the target message;

[0116] Step 2: Determine the PCIe BAR space to which the target message belongs;

[0117] Step 3: Determine the starting address of the PCIe BAR space to which the target message belongs and the data length carried in the message;

[0118] Step 4: Based on the BAR space information to which the target message belongs and the target message header information, the downlink data carried by the target message is transmitted to the corresponding virtual transmission channel.

[0119] The embodiment of the present application also provides a computer-readable storage medium capable of implementing all the steps in the data transmission method of the processing card based on the PCIe protocol in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the data transmission method of the processing card based on the PCIe protocol in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0120] Step 1, for receiving the target message;

[0121] Step 2: Determine the PCIe BAR space to which the target message belongs;

[0122] Step 3: Determine the starting address of the PCIe BAR space to which the target message belongs and the data length carried by the message;

[0123] Step 4: Based on the BAR space information to which the target message belongs and the target message header information, the downlink data carried by the target message is transmitted to the corresponding virtual transmission channel.

[0124] From the above description, it can be seen that the data transmission method and communication system of the processing card based on the PCIe protocol provided by the embodiment of the present application, by virtualizing multiple transmission channels, when receiving the downlink data transmitted by the host to the target hardware device, determines the PCIe BAR space to which the message belongs, and the type of the original downlink data, thereby sending the original downlink data to the corresponding virtual transmission channel. Because after the message carrying the downlink data is output from the hardware high-speed communication interface, it is changed from serial to multi-channel parallel on the hardware device, thereby greatly reducing the probability of high-speed transmission communication network being busy and blocked, improving the throughput of data transmission, and improving the transmission efficiency of large flow data and small flow data.

[0125] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0126] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0127] Although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).

[0128] Although the present specification embodiment provides the method operation steps as described in the embodiment or flow chart, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way in the order of execution of many steps, and does not represent a unique execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel (such as a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment) according to the method shown in the embodiment or the accompanying drawings. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements.

[0129] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0130] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0131] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0132] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0133] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0134] The above is only an example of the embodiment of the present specification and is not intended to limit the embodiment of the present specification. For those skilled in the art, the embodiment of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of the present specification shall be included in the scope of the claims of the embodiment of the present specification.

Claims

1. A data transmission method for a processing card based on the PCIe protocol, characterized in that: The method comprises: A mapping relationship between the storage space on the host and the address range of the BAR space of PCIe is established through the software on the host; The PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, wherein the host and the target hardware device are connected via the PCIe; PCIe processes the downlink data and outputs a protocol message TLP and a flag signal for identifying the BAR space to which the TLP belongs to the target hardware device through a hardware high-speed communication interface, wherein the TLP carries message header information and downlink data; The target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs; Wherein, before the target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs, the method further includes: The channels are virtualized in advance into 8 virtual data channels and 3 virtual signaling channels, among which the 8 virtual data channels include: 4 large-traffic data channels and 4 small-traffic data channels, and the 3 virtual signaling channels include: a signaling channel for transmitting content related to the initial configuration environment, a signaling channel for transmitting large-traffic data uplink and downlink related information, and a signaling channel for transmitting service-related content.

2. The method according to claim 1, characterized in that The target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs, including: The target hardware device parses the message header information to determine the type of downlink data carried by the TLP, wherein the type of downlink data carried by the TLP includes: signaling data and calculation data; In the case where the type of downlink data is signaling data, the downlink data is sent to the corresponding virtual signaling channel according to the address information in the message header information; In the case where the type of the downlink data is computing data, the downlink data is sent to the corresponding virtual data channel according to the address information in the message header information.

3. The method according to claim 1, characterized in that The PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, including: The downlink data transmitted from the host to the target hardware device is placed in the target address of the host's storage space through the software on the host; The function provided by the PCIe driver is called by the software on the host, and the downlink data is written into the BAR space of the PCIe according to the mapping relationship.

4. The method according to claim 1, characterized in that: The message header information includes: data length and address range of data in the BAR space.

5. The method according to claim 1, characterized in that Before the PCIe receives the downlink data transmitted by the host to the target hardware device according to the mapping relationship, wherein the downlink data is high-traffic data, the method further includes: Receive a request from a user to access information about a task currently being executed by a target hardware device connected to the PCIe through downlink signaling; In response to the request, determining whether the current target hardware device is in a busy state; If it is determined to be in a busy state, busy information is returned to indicate that downlink high-volume data transmission is currently unavailable; When it is determined that the device is in an idle state, idle information is returned to indicate that downlink high-volume data transmission is currently available; The pre-transmitted high-volume data is used as downlink data transmitted from the host to the target hardware device.

6. The method according to claim 5, characterized in that Also includes: After the downlink high-volume data transmission is completed, the high-volume data channel and resources occupied by this downlink high-volume data transmission are released through downlink signaling notification.

7. A data communication system for a processing card based on the PCIe protocol, characterized in that: include: A host, a PCIe and a target hardware device, wherein the host and the target hardware device are connected via the PCIe; The host establishes a mapping relationship between the storage space on the host and the address range of the BAR space of the PCIe through the software on the host; PCIe, receives downlink data transmitted from the host to the target hardware device according to the mapping relationship, processes the downlink data, and outputs a protocol message TLP and a flag signal for identifying the BAR space to which the TLP belongs to the target hardware device through the hardware high-speed communication interface, wherein the TLP carries the downlink data and message header information; The target hardware device sends the downlink data carried in the TLP to the corresponding virtual channel according to the message header information and the flag signal of the BAR space to which the TLP belongs; Among them, the virtual channel is 8 virtual data channels and 3 virtual signaling channels that are pre-virtualized. The 8 virtual data channels include: 4 large-traffic data channels and 4 small-traffic data channels. The 3 virtual signaling channels include: a signaling channel for transmitting content related to the initial configuration environment, a signaling channel for transmitting large-traffic data uplink and downlink related information, and a signaling channel for transmitting service-related content.

8. The system according to claim 7, characterized in that The host is a computer that provides services in the network, including servers and desktop computers.

9. The system according to claim 7, characterized in that The target hardware device is a processing card based on the PCIe protocol.

Citation Information

Patent Citations

  • Virtual multichannel data transmission method and system based on PCIE interface

    CN112631969A

  • Communication method and device based on PCIE (Peripheral Component Interface Express), computer equipment and readable storage medium

    CN114416630A