Data transmission method, PCIe device and electronic device

By assigning internal identifiers and request pointers to non-forward transaction requests in PCIe devices, and sorting and detecting response data in order of sending, the problem of response data out of order caused by the out of order of AXI protocol is solved, and the order return of response data is achieved and the improvement of transmission efficiency.

CN119003414APending Publication Date: 2024-11-22XIANGDIXIAN COMPUTING TECH (CHONGQING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903065.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When the AXI protocol is the application layer interface of the PCIe protocol, the out-of-order feature and the non-forward transaction request response feature cause the request response to be transmitted out-of-order, and the request response needs to be reordered.

Method used

In PCIe devices, by assigning internal identification HID and request pointers to non-forward transaction requests in Outbound and Inbound directions, the request and response data are sorted and stored in the order of sending, predefined detection operations are performed to ensure that the response data is returned to the upper layer in sequence, and Shorten the detection cycle through grouping parallel detection.

Benefits of technology

The response data of the same AXI ID is returned to the upper layer in sequence, which improves the order and efficiency of data transmission and avoids data transmission errors caused by response data interleaving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003414A_ABST
    Figure CN119003414A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method, PCIe equipment and electronic equipment. The method comprises the following steps: in a request sending stage, for any non-forwarding transaction request in a preset number of non-forwarding transaction requests in an Outbound direction, allocating an internal identifier HID and a request pointer to the non-forwarding transaction request; for a plurality of non-forwarding transaction requests in the Outbound direction corresponding to the same HID, sorting according to a sending sequence to obtain serial numbers of the plurality of non-forwarding transaction requests; in the response processing stage, aiming at any response data, determining a request pointer of the response data, and marking the request pointer as received response data and not returned to the upper layer; for any request pointer in the preset number of request pointers, determining whether the request pointer is marked as the received response data and is not returned to the upper layer; and if yes, further determining a serial number corresponding to the request pointer, and returning response data corresponding to the request pointer to an upper layer according to the serial number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data transmission method, a PCIe device, and an electronic device. Background Art

[0002] The AXI protocol is a bus standard used in high-performance computing systems. It is an open, scalable interface standard designed to provide high-bandwidth, low-latency data transmission. The AXI bus has a multi-stage pipeline structure that supports out-of-order transmission and bandwidth allocation, allowing the system to process multiple data requests simultaneously, improving the system's concurrency and efficiency.

[0003] PCIe is a high-speed serial bus standard used to connect various external devices in computer systems. The PCIe bus supports multiple types of data transmission, one of which is non-posted request. Non-posted request requires the target device to return CplD / Cpl, that is, return response data.

[0004] When AXI is used as the application layer interface of the PCIe protocol, the out-of-order characteristics of the AXI protocol and the non-posted request-response characteristics of PCIe will cause the request and response to be transmitted out of order, and the request and response need to be reordered. Summary of the invention

[0005] The purpose of the present disclosure is to provide a data transmission method, a PCIe device, and an electronic device.

[0006] According to one aspect of the present disclosure, a data transmission method is provided, the method being applied to a PCIe device, wherein the application layer interface of the PCIe device is an AXI protocol interface; the method comprising:

[0007] In the request sending stage, for any non-forwarding transaction request in a preset number of outbound direction non-forwarding transaction requests, an internal identifier HID and a request pointer are allocated to the non-forwarding transaction request; wherein non-forwarding transaction requests with the same AXI ID correspond to the same HID, and one non-forwarding transaction request corresponds to one request pointer;

[0008] For a number of outbound non-forwarding transaction requests corresponding to the same HID, the non-forwarding transaction requests are sorted according to the sending order to obtain the serial numbers of the non-forwarding transaction requests; the non-forwarding transaction requests and their serial numbers are stored in the first storage space corresponding to the request pointer allocated thereto;

[0009] In the response processing stage, for any response data, a request pointer of the response data is determined, the response data is stored in a second storage space corresponding to the request pointer, and the request pointer is marked as having received the response data and not returned to the upper layer;

[0010] For any request pointer among the preset number of request pointers, a predefined detection operation is performed: determining whether the request pointer is marked as having received response data and not returned to the upper layer; if so, further determining whether the serial number corresponding to the request pointer is the same as the accumulated number of response data of the HID corresponding to the recorded request pointer that has been returned to the upper layer; if they are the same, returning the response data corresponding to the request pointer to the upper layer.

[0011] In one implementation, after returning the response data corresponding to the request pointer to the upper layer, the method further includes:

[0012] The accumulated number is updated, the request pointer is marked as not receiving response data and having been returned to the upper layer, and the first storage space and the second storage space corresponding to the request pointer are cleared.

[0013] In one embodiment, the method further comprises:

[0014] After returning the response data of all non-forwarded transaction requests corresponding to any HID to the upper layer, the HID is released.

[0015] In one embodiment, the method further comprises:

[0016] The preset number of request pointers are grouped, each group including a number of request pointers; a group including at least one target request pointer is determined as a target group; the target request pointer includes: a request pointer marked as having received response data and not returned to an upper layer;

[0017] The performing of a predefined detection operation for any request pointer among the preset number of request pointers includes:

[0018] For each target group in turn, the predefined detection operation is performed on several request pointers therein in parallel.

[0019] In one implementation, the preset number is 2^m; and grouping the preset number of request pointers includes:

[0020] Divide the 2^m request pointers into 2^(mn) groups, each group has 2^n request pointers;

[0021] The step of determining a group including at least one target request pointer as a target group comprises:

[0022] Detect whether any group includes at least one target request pointer. If so, determine the group as the target group. After detecting all groups, generate target group identification information including 2^(mn) bits, wherein any group corresponds to one bit. When any group is the target group, set the bit corresponding to the target group.

[0023] Generate a base address of each target group address using the position of each set bit in the target group identification information, wherein the base address includes mn bits for describing the addresses of 2^(mn) groups; and the fixed offset address of the target group address includes n bits for describing the addresses of 2^n request pointers in each group;

[0024] The step of sequentially executing the predefined detection operation on a plurality of request pointers in each target group in parallel includes:

[0025] According to the generated target group address, each target group is accessed in sequence, and the predefined detection operation is performed in parallel on a number of request pointers in each target group.

[0026] In one embodiment, the method further comprises:

[0027] In the request sending stage, for any non-forwarding transaction request in a preset number of inbound direction non-forwarding transaction requests, an AXI ID is allocated to the non-forwarding transaction request; wherein non-forwarding transaction requests of the same TAG correspond to the same AXI ID; and the non-forwarding transaction request is stored in a third storage space corresponding to the AXI ID allocated thereto;

[0028] In the response processing stage, for any response data, the AXI ID of the response data is determined, and the response data is stored in the fourth storage space corresponding to the AXI ID; after all the response data corresponding to the AXI ID are stored in the fourth storage space, the response data corresponding to the AXI ID is read out and returned to the request initiator.

[0029] According to a second aspect of the present disclosure, a PCIe device is provided, wherein the application layer interface of the PCIe device is an AXI protocol interface; the PCIe device comprises an outbound conversion module;

[0030] The outbound conversion module is used to allocate an internal identifier HID and a request pointer to any non-forwarding transaction request in a preset number of non-forwarding transaction requests in the outbound direction during the request sending phase; wherein non-forwarding transaction requests with the same AXI ID correspond to the same HID, and one non-forwarding transaction request corresponds to one request pointer;

[0031] For a number of outbound non-forwarding transaction requests corresponding to the same HID, the non-forwarding transaction requests are sorted according to the sending order to obtain the serial numbers of the non-forwarding transaction requests; the non-forwarding transaction requests and their serial numbers are stored in the first storage space corresponding to the request pointer allocated thereto;

[0032] In the response processing stage, for any response data, a request pointer of the response data is determined, the response data is stored in a second storage space corresponding to the request pointer, and the request pointer is marked as having received the response data and not returned to the upper layer;

[0033] For any request pointer among the preset number of request pointers, a predefined detection operation is performed: determining whether the request pointer is marked as having received response data and not returned to the upper layer; if so, further determining whether the serial number corresponding to the request pointer is the same as the accumulated number of response data of the HID corresponding to the recorded request pointer that has been returned to the upper layer; if they are the same, returning the response data corresponding to the request pointer to the upper layer.

[0034] In one implementation, the outbound conversion module is further used to update the accumulated number, mark the request pointer as having not received response data and returned to the upper layer, and clear the first storage space and the second storage space corresponding to the request pointer.

[0035] In one implementation manner, the outbound conversion module is further configured to release any HID after returning the response data of all non-forwarded transaction requests corresponding to any HID to the upper layer.

[0036] In one embodiment, the outbound conversion module is further used to group the preset number of request pointers, each group including a number of request pointers; determine a group including at least one target request pointer as a target group; the target request pointer includes: a request pointer marked as having received response data and not returned to an upper layer;

[0037] The outbound conversion module is specifically used to execute the predefined detection operation on several request pointers in each target group in parallel.

[0038] In one embodiment, the preset number is 2^m;

[0039] The outbound conversion module is specifically used to divide 2^m request pointers into 2^(mn) groups, each group having 2^n request pointers; detect whether any group includes at least one target request pointer, and if so, determine the group as a target group, and generate target group identification information including 2^(mn) bits after detecting all groups, wherein any group corresponds to one bit, and when any group is a target group, set the bit corresponding to the target group;

[0040] Generate a base address of each target group address using the position of each set bit in the target group identification information, wherein the base address includes mn bits for describing the addresses of 2^(mn) groups; and the fixed offset address of the target group address includes n bits for describing the addresses of 2^n request pointers in each group;

[0041] According to the generated target group address, each target group is accessed in sequence, and the predefined detection operation is performed in parallel on a number of request pointers in each target group.

[0042] In one embodiment, the PCIe device further includes an Inbound conversion module and an AXI top-level module;

[0043] The inbound conversion module is specifically used to allocate an AXI ID to any non-forwarding transaction request in a preset number of inbound direction non-forwarding transaction requests during the request sending phase; wherein non-forwarding transaction requests of the same TAG correspond to the same AXI ID; and store the non-forwarding transaction request in a third storage space corresponding to the AXI ID allocated thereto;

[0044] The AXI top-level module is specifically used to determine the AXI ID of any response data during the response processing phase, and store the response data in a fourth storage space corresponding to the AXI ID; after all the response data corresponding to the AXI ID are stored in the fourth storage space, read out the response data corresponding to the AXI ID and return it to the request initiator.

[0045] In one embodiment, the PCIe device includes a graphics processing system.

[0046] According to a third aspect of the present disclosure, an electronic component is provided, comprising the PCIe device of the second aspect.

[0047] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising the electronic component of the third aspect.

[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of the structure of a PCIe device provided by an embodiment of the present disclosure;

[0050] Figure 2 A schematic diagram of the structure of another PCIe device provided by an embodiment of the present disclosure;

[0051] Figure 3 A flowchart of a data transmission method provided by an embodiment of the present disclosure;

[0052] Figure 4 A schematic diagram of a target group address provided for one embodiment of the present disclosure;

[0053] Figure 5 A schematic diagram of the structure of a graphics processing system provided by one embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] Before introducing the embodiments of the present disclosure, it should be noted that:

[0055] Some embodiments of the present disclosure are described as processing flows. Although the various operation steps of the flow may be given sequential step numbers, the operation steps therein may be implemented in parallel, concurrently or simultaneously.

[0056] In the embodiments of the present disclosure, the terms "first", "second", etc. may be used to describe various features, but these features should not be limited by these terms. These terms are used only to distinguish one feature from another.

[0057] The term “and / or” may be used in embodiments of the present disclosure. “And / or” includes any and all combinations of one or more of the associated features listed.

[0058] It should be understood that when describing the connection or communication relationship between two components, unless it is explicitly stated that the two components are directly connected or directly communicating, the connection or communication between the two components can be understood as direct connection or communication, or as indirect connection or communication through an intermediate component.

[0059] In order to make the technical solutions and advantages of the embodiments of the present disclosure more clearly understood, the exemplary embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0060] The AXI protocol is a bus standard used in high-performance computing systems. It is an open, scalable interface standard designed to provide high-bandwidth, low-latency data transmission. The AXI bus has a multi-stage pipeline structure that supports out-of-order transmission and bandwidth allocation, allowing the system to process multiple data requests simultaneously, improving the system's concurrency and efficiency.

[0061] PCIe is a high-speed serial bus standard used to connect various external devices in computer systems. The PCIe bus supports multiple types of data transmission, one of which is non-posted request. Non-posted request requires the target device to return CplD / Cpl, that is, to return response data.

[0062] When AXI is used as the PCIe protocol application layer interface, the AXI protocol out-of-order characteristics and PCIe non-posted transaction request (non-posted request) response characteristics will cause the request responses to be transmitted out of order, that is, the AXI protocol out-of-order characteristics allow the response data of multiple requests to be transmitted out of order by the slave, and the PCIe non-posted request requires corresponding response data to be returned, so the returned data may be out of order. According to the provisions of the AXI protocol, for requests with the same AIX ID, the data returned by the request must be returned to the host in order, that is, the order in which the data is returned to the host must be consistent with the order in which the requests are sent. Requests with different AXI IDs may be returned to the host out of order, so requests with the same AXI ID need to be sorted before returning to the host.

[0063] like Figure 1 As shown in the figure, in a PCIe device, if the application layer interface of the PCIe device is an AXI protocol interface, the data transmission method in the outbound (from the local device to other devices) direction is: convert the AXI message sent by the top layer into a PCIe message, and then send it to other PCIe devices through the PCIe interface. The data transmission method in the inbound (transmitted from other devices to the local device) direction is: convert the received PCIe message into an AXI message, and then transmit it to the upper layer.

[0064] In the outbound direction, since the response data returned by the non-forwarded transaction request will arrive at the PCIe interface out of order, the received messages need to be sorted before being transmitted to the upper layer.

[0065] In response to the above problems, Figure 2 As shown, the present disclosure proposes a PCIe device, which includes an inbound conversion module, an outbound conversion module and an AXI top-level module. The application layer interface of the PCIe device is an AXI protocol interface.

[0066] like Figure 3As shown, the present disclosure also proposes a data transmission method, which is applied to Figure 2 The outbound conversion module in the PCIe device shown, the method includes:

[0067] S301, in the request sending phase, for any non-forwarding transaction request in a preset number of outbound direction non-forwarding transaction requests, an internal identifier HID and a request pointer are allocated to the non-forwarding transaction request; wherein non-forwarding transaction requests with the same AXI ID correspond to the same HID, and one non-forwarding transaction request corresponds to one request pointer;

[0068] Among them, the preset number can be the maximum number of non-posted transaction requests in the outbound direction of in-transit transmission supported by the AXI protocol, such as 256. Non-posted requests in the outbound direction, that is, non-posted transaction requests, can essentially be classified as a type of AXI request. They are all requests from the initiator to the other end to return CplD / Cpl (response data returned by PCIe). The AXI request can be a read request or a write request, such as an IO read and write request or a configuration space read and write request. Read requests usually carry RIDs, and write requests usually carry WIDs. In this disclosure, RIDs and WIDs are collectively referred to as AXI IDs.

[0069] For the outbound direction, this end initiates more than non-posted requests, and the AXI ID range may be much larger than the maximum number of non-forwarded transaction requests in the outbound direction of in-transit transmission supported by the AXI protocol. For example, if the AXI ID width is 9, the AXI interface can present 512 different ID values. Here, it is assumed that the maximum number of non-forwarded transaction requests in the outbound direction of in-transit transmission supported by the AXI protocol is 256, then only 256 requests can be in an unfinished state at a time. In order to facilitate the subsequent sorting of the response data of the AXI request, the present disclosure proposes to convert the AXI ID into an internal identifier HID, and the value of the HID is 0-255. In specific implementation, the conversion of AXI ID to HID can be achieved by looking up the hid_lut table, and the AXI ID value can be stored as a hid_lut entry, and the corresponding entry index is the mapped HID. When a new AXI request arrives, all entries in hid_lut are first searched to check whether the AXI ID already exists in the table. If it exists, the matched HID value will be assigned to the new request. If it does not exist, the new AXI ID value will be written into the smallest hid_lut entry, and the index of the entry will be mapped to the HID value. This method can achieve a one-to-one correspondence between AXI ID and HID. If the AXIIDs of the 256 requests are different, there are 256 HIDs corresponding to them. If the AXI IDs of the 256 requests are the same, there is only one HID corresponding to them. In order to identify whether the hid_lut entry is valid, an additional indication signal valid_index[255:0] is required. Each bit is used to identify whether an entry is valid. For example, when it is set to 1, it indicates that the corresponding entry is valid, and when it is set to 0, it indicates that the corresponding title is invalid.

[0070] In order to distinguish each AXI request, a request pointer lut_ptr is also allocated for each non-forwarded transaction request, and the size of the pointer is 0-255. It should be noted here that the request pointer lut_ptr is different from the HID. It is used to distinguish each request. Even if some requests have the same AXI ID, the request pointer lut_ptr is unique.

[0071] S302, for a number of outbound non-forwarding transaction requests corresponding to the same HID, sort them according to the sending order to obtain the serial numbers of the non-forwarding transaction requests; store the non-forwarding transaction requests and their serial numbers in the first storage space corresponding to the request pointer allocated thereto;

[0072] Since the response data of the request with the same AXI ID cannot be transmitted back to the upper layer out of order, when sending the message, several non-forwarded transaction requests with the same AXI ID, i.e. the same HID, are sorted to obtain the sequence number req_ptr. In the most extreme case, there are 256 requests with the same HID, and req_ptr is arranged in sequence from 0 to 255. For example, as shown in Table 1.

[0073] HID Serial Number Request pointer HID 0 0 0 HID 0 1 1 HID 0 2 2 HID 1 0 3 HID 1 1 4 HID 2 0 5

[0074] Table 1

[0075] As shown, if there are 6 AXI requests in total, the assigned HIDs are HID 0, HID 1, and HID 2. After sorting the 3 AXI requests of HID 0, the obtained serial numbers are 0, 1, and 2; after sorting the 2 AXI requests of HID 1, the obtained serial numbers are 0 and 1; after sorting the 1 AXI request of HID 2, the obtained serial numbers are 0.

[0076] After obtaining the serial number req_ptr, the non-forwarded transaction request and its serial number can be stored in the first storage space corresponding to the request pointer allocated to it. The purpose of storing the non-forwarded transaction request here is to verify the received response data according to the data in the request. In the specific implementation, the first storage space corresponding to each request pointer can be a pre-configured storage entry req_lut[lut_ptr] for each request pointer, and the request and serial number are stored in the storage entry corresponding to the pointer. In addition, since the size of the request pointer lut_ptr is 0-255, valid_req[lut_ptr] can also be used, that is, a 256-bit valid identifier is used to mark whether each request pointer is valid. When the request pointer is assigned to a non-forwarded transaction request, the request pointer is marked as valid.

[0077] After performing the above operations, the AXI request can be converted into a PCIe request and sent to the corresponding device through the PCIe interface. When converting, the address is converted from the AXI address to the PCIe address, and a TRG number is assigned to the request, and the correspondence between the TRG number and the request pointer is saved. When converting the AXI request to the PCIe request, the sideband mode or the regional mode can be used, where the band mode means that the additional information of the PCIe packet is provided by ARUSER / AWUSER, and the regional mode means that the additional information of the PCIe packet is provided by the internal register, which needs to be configured in advance. The two modes can be distinguished by the highest bit of ARUSER / AWUSER. The sideband mode and the regional mode can be specifically referred to the relevant technology, and this disclosure will not be described in detail.

[0078] S303, in the response processing stage, for any response data, determine the request pointer of the response data, store the response data in the second storage space corresponding to the request pointer, and mark the request pointer as having received the response data and not returned to the upper layer;

[0079] After receiving any response data, since the response data is PCIe data, it carries a TAG number, and the TAG number needs to be converted into a request pointer according to the pre-stored correspondence. At the same time, the register read_complete[lut_ptr] is used to mark the request pointer as having received the response data, and the register data_avail_mask[lut_ptr] is used to mark the request pointer as not returned to the upper layer. Among them, read_complete[lut_ptr] and data_avail_mask[lut_ptr] each include 256 bits, each bit corresponds to a request pointer, and when the bit corresponding to any request pointer is high, it indicates that the request pointer is marked as having received the response data and not returned to the upper layer. Because of the sorting issue, when the response data is received, the response data is not immediately transmitted to the upper layer, but is stored in the second storage space corresponding to the request pointer.

[0080] S304, for any request pointer among the preset number of request pointers, perform a predefined detection operation: determine whether the request pointer is marked as having received response data and not returned to the upper layer; if so, further determine whether the serial number corresponding to the request pointer is the same as the accumulated number of response data returned to the upper layer of the HID corresponding to the recorded request pointer; if they are the same, return the response data corresponding to the request pointer to the upper layer.

[0081] Since the storage space corresponding to the request pointer stores the response data, a polling-type predefined detection operation may be periodically performed on each request pointer to determine whether the response data corresponding to each request pointer can be returned to the upper layer.

[0082] When performing the detection, it is necessary to first determine whether the request pointer is marked as having received the response data and not returned to the upper layer. If so, it means that there is already data in the storage space of the request pointer that can be returned to the upper layer. Furthermore, it is also necessary to ensure the order of returning to the upper layer, so it is necessary to determine whether the sequence number corresponding to the request pointer is the same as the cumulative number of response data returned to the upper layer of the HID corresponding to the request pointer. If they are the same, it means that the sequence is correct and can be returned to the upper layer. If they are different, it is incorrect and cannot be returned to the upper layer.

[0083] For example, taking the content in Table 1 above as an example, if the current detection is request pointer 0, the sequence number corresponding to the request pointer 0 is 0; its corresponding HID is HID 0, and the cumulative number of response data corresponding to the currently recorded HID 0 that has been returned to the upper layer is 0. This means that none of the response data corresponding to HID 0 has been returned to the upper layer, and the sequence number corresponding to the request pointer 0 is 0, which means that the current order is correct and will not destroy the data return order of HID 0, so it can be returned to the upper layer.

[0084] For another example, if the currently detected pointer is request 1, the sequence number corresponding to the request pointer 1 is 1; the corresponding HID is HID 0, and the cumulative number of response data corresponding to the currently recorded HID 0 that has been returned to the upper layer is 0. This means that none of the response data corresponding to HID 0 has been returned to the upper layer, and the sequence number corresponding to the request pointer 0 is 1, which means that the current order is incorrect, which will destroy the data return order of HID 0, and therefore cannot be returned to the upper layer.

[0085] Based on the above method, it can be ensured that when AXI is used as the PCIe protocol application layer interface, in the outbound transmission direction, it can be ensured that the response data of the same AXI ID can be returned to the upper layer in sequence.

[0086] It is understandable that after returning the response data corresponding to the request pointer to the upper layer, the accumulated number needs to be updated, that is, the accumulated number is added by 1, so as to be used for subsequent detection of other request pointers. In addition, the request pointer needs to be marked as not receiving response data and returned to the upper layer, and the first storage space and the second storage space corresponding to the request pointer need to be cleared to release the request pointer. Finally, valid_req[lut_ptr] needs to be used to mark the request pointer as invalid.

[0087] After returning the response data of all non-forwarded transaction requests corresponding to any HID to the upper layer, the HID also needs to be released. Specifically, the AXI ID in the entry of the response HID can be deleted in the lookup table hid_lut, and the corresponding HID is marked invalid using valid_index.

[0088] The above content introduces the specific content of performing predefined detection on a request pointer. The following introduces the method of performing predefined detection on all request pointers.

[0089] The above introduction can be a periodic polling predefined detection operation for each request pointer, but considering that if each detection needs to traverse each request pointer, it will take a long time. For example, if there are 256 request pointers in total, 256 cycles are required for detection.

[0090] Based on this problem, the present disclosure proposes that a preset number of request pointers may be grouped, each group including a number of request pointers; a group including at least one target request pointer is determined as a target group; the target request pointer includes: a request pointer marked as having received response data and not returned to an upper layer;

[0091] In the above S203, a predefined detection operation is performed for any request pointer among the preset number of request pointers, and specifically, the predefined detection operation may be performed in parallel for several request pointers in each target group in turn.

[0092] In this way, the target group is first screened out, and then the predefined detection operation is performed in parallel for each request pointer in the target group, which can effectively shorten the detection cycle to the number of target groups.

[0093] like Figure 4 As shown, specifically, in one implementation, the preset number of request pointers is 2^m, and the addresses of the storage spaces corresponding to the preset number of request pointers are continuous, and the 2^m request pointers may be divided into 2^(mn) groups, each group having 2^n request pointers;

[0094] Detect whether any group includes at least one target request pointer. If so, determine the group as the target group. After detecting all groups, generate target group identification information including 2^(mn) bits, wherein any group corresponds to one bit. When any group is the target group, set the bit corresponding to the target group.

[0095] The base address of each target group address is generated by utilizing the position of each set bit in the target group identification information, wherein the base address includes mn bits (as shown in the dark part in the figure, from the nth bit to the m-1th bit), which is used to describe the addresses of 2^(mn) groups; the fixed offset address of the target group address includes n bits (as shown in the light part in the figure, from the 0th bit to the n-1th bit), which is used to describe the addresses of 2^n request pointers in each group.

[0096] According to the generated target group address, each target group is visited in turn, and the predefined detection operation is performed in parallel on several request pointers in each target group.

[0097] Using the above method, after the target group is detected, the base address of each target group address is generated directly based on the target group identification information, and the offset address of the request pointer in each target group is fixed, so it is possible to jump directly based on the generated base address to access each target group in turn, and execute the predefined detection operation in parallel on several request pointers in each target group. Using the above method, the address of the target group can be quickly generated, thereby effectively shortening the detection time.

[0098] The above describes the outbound data transmission method. The following describes the inbound data transmission method.

[0099] Combination Figure 2 Specifically, in the request sending stage, the Inbound conversion module in the PCIe device can allocate an AXI ID to any non-forwarding transaction request in a preset number of non-forwarding transaction requests in the Inbound direction; wherein non-forwarding transaction requests of the same TAG correspond to the same AXI ID; store the non-forwarding transaction request in the third storage space corresponding to the AXI ID allocated thereto; and convert the non-forwarding transaction request into an AXI request and send it to the upper layer. The third storage space is in the Inbound conversion module.

[0100] In the response processing stage, for any response data, the AXI top-level module in the PCIe device determines the AXI ID of the response data and stores the response data in the fourth storage space corresponding to the AXI ID; after all the response data corresponding to the AXI ID are stored in the fourth storage space, the response data corresponding to the AXI ID is read out and returned to the request initiator. The fourth storage space is in the AXI top-level module.

[0101] By adopting the above method, when data is transmitted in the inbound direction, the response data corresponding to the same AXI ID is stored. After all the response data corresponding to the same AXI ID are stored in the fourth storage space, they are returned together to the request initiator. This can realize de-interleaving of the response data and avoid data transmission errors caused by interleaving of the response data.

[0102] Based on the same inventive concept, Figure 4 As shown, the present disclosure also proposes a PCIE device, wherein the application layer interface of the PCIe device is an AXI protocol interface; the PCIe device includes an outbound conversion module;

[0103] The outbound conversion module is used to allocate an internal identifier HID and a request pointer to any non-forwarding transaction request in a preset number of non-forwarding transaction requests in the outbound direction during the request sending phase; wherein non-forwarding transaction requests with the same AXI ID correspond to the same HID, and one non-forwarding transaction request corresponds to one request pointer;

[0104] For a number of outbound non-forwarding transaction requests corresponding to the same HID, the non-forwarding transaction requests are sorted according to the sending order to obtain the serial numbers of the non-forwarding transaction requests; the non-forwarding transaction requests and their serial numbers are stored in the first storage space corresponding to the request pointer allocated thereto;

[0105] In the response processing stage, for any response data, a request pointer of the response data is determined, the response data is stored in a second storage space corresponding to the request pointer, and the request pointer is marked as having received the response data and not returned to the upper layer;

[0106] For any request pointer among the preset number of request pointers, a predefined detection operation is performed: determining whether the request pointer is marked as having received response data and not returned to the upper layer; if so, further determining whether the serial number corresponding to the request pointer is the same as the accumulated number of response data of the HID corresponding to the recorded request pointer that has been returned to the upper layer; if they are the same, returning the response data corresponding to the request pointer to the upper layer.

[0107] In one implementation, the outbound conversion module is further used to update the accumulated number, mark the request pointer as having not received response data and returned to the upper layer, and clear the first storage space and the second storage space corresponding to the request pointer.

[0108] In one implementation manner, the outbound conversion module is further configured to release any HID after returning the response data of all non-forwarded transaction requests corresponding to any HID to the upper layer.

[0109] In one embodiment, the outbound conversion module is further used to group the preset number of request pointers, each group including a number of request pointers; determine a group including at least one target request pointer as a target group; the target request pointer includes: a request pointer marked as having received response data and not returned to an upper layer;

[0110] The outbound conversion module is specifically used to execute the predefined detection operation on several request pointers in each target group in parallel.

[0111] In one embodiment, the preset number is 2^m;

[0112] The outbound conversion module is specifically used to divide 2^m request pointers into 2^(mn) groups, each group having 2^n request pointers; detect whether any group includes at least one target request pointer, and if so, determine the group as a target group, and generate target group identification information including 2^(mn) bits after detecting all groups, wherein any group corresponds to one bit, and when any group is a target group, set the bit corresponding to the target group;

[0113] Generate a base address of each target group address using the position of each set bit in the target group identification information, wherein the base address includes mn bits for describing the addresses of 2^(mn) groups; and the fixed offset address of the target group address includes n bits for describing the addresses of 2^n request pointers in each group;

[0114] According to the generated target group address, each target group is accessed in sequence, and the predefined detection operation is performed in parallel on a number of request pointers in each target group.

[0115] In one embodiment, the PCIe device further includes an Inbound conversion module and an AXI top-level module;

[0116] The inbound conversion module is specifically used to allocate an AXI ID to any non-forwarding transaction request in a preset number of inbound direction non-forwarding transaction requests during the request sending phase; wherein non-forwarding transaction requests of the same TAG correspond to the same AXI ID; and store the non-forwarding transaction request in a third storage space corresponding to the AXI ID allocated thereto;

[0117] The AXI top-level module is specifically used to determine the AXI ID of any response data during the response processing phase, and store the response data in a fourth storage space corresponding to the AXI ID; after all the response data corresponding to the AXI ID are stored in the fourth storage space, read out the response data corresponding to the AXI ID and return it to the request initiator.

[0118] Based on the same inventive concept, the present disclosure also proposes a graphics processing system, which is the above-mentioned PCIe device. The graphics processing system, such as Figure 5 As shown, it at least includes:

[0119] GPU core is used to process commands, such as drawing commands, and executes the image rendering pipeline according to the drawing commands. Among them, the GPU core mainly includes a computing unit, which is used to execute shader compiled instructions. It is a programmable module composed of a large number of ALUs; Cache (memory), which is used to cache GPU core data to reduce memory access; controller (not shown in the figure). In addition, the GPU core also has a variety of functional modules, such as rasterization (a fixed stage of the 3D rendering pipeline), Tilling (slicing a frame in the TBR and TBDR GPU architecture), cropping (a fixed stage of the 3D rendering pipeline, cropping out the primitives outside the observation range or not displayed on the back), post-processing (scaling, cropping, rotating, etc. of the drawn image), etc.

[0120] General DMA is used to perform data movement between host memory and GPU graphics card memory. For example, for 3D drawing, general DMA moves vertex data from host memory to GPU graphics card memory.

[0121] On-chip network, used for data exchange between masters and slaves on the SOC;

[0122] The application processor is used to schedule tasks of various modules on the SOC. For example, after the GPU renders a frame of image, it notifies the application processor, and then the application processor powers on the display controller to display the image drawn by the GPU on the screen.

[0123] PCIe controller is used to communicate with the host, implement PCIe protocol, and connect GPU graphics card to the host through PCIe interface. Graphics API and graphics card driver are running on the host;

[0124] Memory controller, used to connect memory devices and save data on SOC;

[0125] Display controller, used to control the output of the frame buffer in the memory to the display via the display interface (HDMI, DP, etc.);

[0126] Video decoder, used to decode the encoded video on the host hard disk into a displayable picture.

[0127] The video encoder is used to encode the original video code stream on the host hard disk into a specified format and return it to the host.

[0128] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic component, which includes the graphics processing system described in the above embodiment. In some usage scenarios, the product form of the electronic device is embodied as a graphics card; in other usage scenarios, the product form of the electronic device is embodied as a CPU motherboard.

[0129] Based on the same inventive concept, the disclosed embodiment also provides an electronic device, which includes the above-mentioned electronic components. In some usage scenarios, the product form of the electronic device is a portable electronic device, such as a smart phone, a tablet computer, a VR device, etc.; in some usage scenarios, the product form of the electronic device is a personal computer, a game console, etc.

[0130] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present disclosure.

[0131] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A data transmission method, the method being applied to a PCIe device, wherein the application layer interface of the PCIe device is an AXI protocol interface; the method comprising: In the request sending stage, for any non-forwarding transaction request in a preset number of outbound direction non-forwarding transaction requests, an internal identifier HID and a request pointer are allocated to the non-forwarding transaction request; wherein non-forwarding transaction requests with the same AXIID correspond to the same HID, and one non-forwarding transaction request corresponds to one request pointer; For a number of outbound non-forwarding transaction requests corresponding to the same HID, the non-forwarding transaction requests are sorted according to the sending order to obtain the serial numbers of the non-forwarding transaction requests; the non-forwarding transaction requests and their serial numbers are stored in the first storage space corresponding to the request pointer allocated thereto; In the response processing stage, for any response data, a request pointer of the response data is determined, the response data is stored in a second storage space corresponding to the request pointer, and the request pointer is marked as having received the response data and not returned to the upper layer; For any request pointer among the preset number of request pointers, a predefined detection operation is performed: determining whether the request pointer is marked as having received response data and not returned to the upper layer; if so, further determining whether the serial number corresponding to the request pointer is the same as the accumulated number of response data of the HID corresponding to the recorded request pointer that has been returned to the upper layer; if they are the same, returning the response data corresponding to the request pointer to the upper layer.

2. The method according to claim 1, after returning the response data corresponding to the request pointer to the upper layer, further comprises: The accumulated number is updated, the request pointer is marked as not receiving response data and having been returned to the upper layer, and the first storage space and the second storage space corresponding to the request pointer are cleared.

3. The method according to claim 1, further comprising: After returning the response data of all non-forwarded transaction requests corresponding to any HID to the upper layer, the HID is released.

4. The method according to claim 1, further comprising: The preset number of request pointers are grouped, each group including a number of request pointers; a group including at least one target request pointer is determined as a target group; The target request pointer includes: a request pointer marked as having received response data and not returned to the upper layer; The performing of a predefined detection operation for any request pointer among the preset number of request pointers includes: For each target group in turn, the predefined detection operation is performed on several request pointers therein in parallel.

5. The method according to claim 4, wherein the preset number is 2^m; and the step of grouping the preset number of request pointers comprises: Divide the 2^m request pointers into 2^(mn) groups, each group has 2^n request pointers; The step of determining a group including at least one target request pointer as a target group comprises: Detect whether any group includes at least one target request pointer. If so, determine the group as the target group. After detecting all groups, generate target group identification information including 2^(mn) bits, wherein any group corresponds to one bit. When any group is the target group, set the bit corresponding to the target group. Generate a base address of each target group address using the position of each set bit in the target group identification information, wherein the base address includes mn bits for describing the addresses of 2^(mn) groups; and the fixed offset address of the target group address includes n bits for describing the addresses of 2^n request pointers in each group; The step of sequentially executing the predefined detection operation on a plurality of request pointers in each target group in parallel includes: According to the generated target group address, each target group is accessed in sequence, and the predefined detection operation is performed in parallel on a number of request pointers in each target group.

6. The method according to claim 1, further comprising: In the request sending stage, for any non-forwarding transaction request in a preset number of inbound direction non-forwarding transaction requests, an AXI ID is allocated to the non-forwarding transaction request; wherein non-forwarding transaction requests of the same TAG correspond to the same AXI ID; and the non-forwarding transaction request is stored in a third storage space corresponding to the AXI ID allocated thereto; In the response processing stage, for any response data, the AXI ID of the response data is determined, and the response data is stored in the fourth storage space corresponding to the AXIID; after all the response data corresponding to the AXI ID are stored in the fourth storage space, the response data corresponding to the AXI ID is read out and returned to the request initiator.

7. A PCIe device, wherein the application layer interface of the PCIe device is an AXI protocol interface; the PCIe device comprises an outbound conversion module; The outbound conversion module is used to allocate an internal identifier HID and a request pointer to any non-forwarding transaction request in a preset number of non-forwarding transaction requests in the outbound direction during the request sending phase; wherein, Non-forwarded transaction requests with the same AXIID correspond to the same HID, and one non-forwarded transaction request corresponds to one request pointer; For a number of outbound non-forwarding transaction requests corresponding to the same HID, the non-forwarding transaction requests are sorted according to the sending order to obtain the serial numbers of the non-forwarding transaction requests; the non-forwarding transaction requests and their serial numbers are stored in the first storage space corresponding to the request pointer allocated thereto; In the response processing stage, for any response data, a request pointer of the response data is determined, the response data is stored in a second storage space corresponding to the request pointer, and the request pointer is marked as having received the response data and not returned to the upper layer; For any request pointer among the preset number of request pointers, a predefined detection operation is performed: determining whether the request pointer is marked as having received response data and not returned to an upper layer; If yes, further determine whether the serial number corresponding to the request pointer is the same as the accumulated number of response data of the HID corresponding to the recorded request pointer that has been returned to the upper layer. If they are the same, return the response data corresponding to the request pointer to the upper layer.

8. The PCIe device according to claim 7, The outbound conversion module is further used to update the accumulated number, mark the request pointer as not receiving response data and having returned to the upper layer, and clear the first storage space and the second storage space corresponding to the request pointer.

9. The PCIe device according to claim 7, The outbound conversion module is further configured to release any HID after returning the response data of all non-forwarded transaction requests corresponding to any HID to the upper layer.

10. The PCIe device according to claim 7, The outbound conversion module is further used to group the preset number of request pointers, each group including a number of request pointers; determine a group including at least one target request pointer as a target group; the target request pointer includes: a request pointer marked as having received response data and not returned to an upper layer; The outbound conversion module is specifically used to execute the predefined detection operation on several request pointers in each target group in parallel.

11. The PCIe device according to claim 10, wherein the preset number is 2^m; The outbound conversion module is specifically used to divide 2^m request pointers into 2^(mn) groups, each group of 2^n request pointers; detect whether any group includes at least one target request pointer, if so, determine the group as the target group, and generate target group identification information including 2^(mn) bits after detecting all groups, wherein, Any group corresponds to one bit, and when any group is a target group, the bit corresponding to the target group is set; Generate a base address of each target group address using the position of each set bit in the target group identification information, wherein the base address includes mn bits for describing the addresses of 2^(mn) groups; and the fixed offset address of the target group address includes n bits for describing the addresses of 2^n request pointers in each group; According to the generated target group address, each target group is accessed in sequence, and the predefined detection operation is performed in parallel on a number of request pointers in each target group.

12. The PCIe device according to claim 7, further comprising an Inbound conversion module and an AXI top-level module; The inbound conversion module is specifically used to allocate an AXI ID to any non-forwarding transaction request in a preset number of inbound direction non-forwarding transaction requests during the request sending phase; wherein, Non-forwarded transaction requests of the same TAG correspond to the same AXI ID; the non-forwarded transaction request is stored in the third storage space corresponding to the AXI ID allocated thereto; The AXI top-level module is specifically used to determine the AXI ID of any response data during the response processing phase, and store the response data in a fourth storage space corresponding to the AXI ID; after all the response data corresponding to the AXI ID are stored in the fourth storage space, read out the response data corresponding to the AXI ID and return it to the request initiator.

13. The PCIe device according to any one of claims 7 to 12, wherein the PCIe device comprises a graphics processing system.

14. An electronic component comprising the PCIe device of claim 13.

15. An electronic device comprising the electronic component according to claim 14.