PCIe controller, chip, electronic device, transaction packet transmission method

By optimizing the storage queue and identification mechanism in the PCIe controller, the storage and transmission conditions of transaction packets are improved, solving the problem of low transmission efficiency of the PCIe bus and achieving more efficient transaction packet transmission.

CN123157652APending Publication Date: 2026-11-24VIA ALLIANCE SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611443261.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

When transmitting transaction packets, the strict ordering method of the PCIe bus leads to excessive delay and reduces transmission efficiency. However, the out-of-order transmission of some transaction packets does not affect data correctness. Therefore, existing technologies cannot improve transmission efficiency while ensuring data correctness.

Method used

By using multiple storage queues and storage modules in the PCIe controller, different types of transaction packets are distinguished and stored by using identifiers (such as RO and IDO) carried by the transaction packets. The sending conditions of the transaction packets are determined based on the identifiers and attribute information, and the storage method is optimized to improve the transmission efficiency of the transaction packets while complying with the PCIe protocol.

Benefits of technology

It reduces the complexity of determining whether a transaction packet meets the sending conditions, improves the sending efficiency and transmission rate of transaction packets, and ensures that the sending order of transaction packets complies with the order requirements of the PCIe protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157652A_ABST
    Figure CN123157652A_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of bus technology, proposing a PCIe controller, chip, electronic device, and transaction packet transmission method. In the PCIe controller, multiple storage queues are used to store first-type transaction packets, which are Posted type PCIe transaction packets. A storage module stores attribute information indicating that the first-type transaction packets have been converted into first-type requests and sent to a storage node but have not yet been processed by the storage node. A processing module writes received first-type transaction packets into storage queues according to the identifiers carried by the first-type transaction packets. When the attribute information in the storage module determines that any first-type transaction packet in any storage queue meets the transmission conditions, the first-type transaction packet meeting the transmission conditions is converted into a first-type request and sent to the storage node. The PCIe controller in this embodiment can utilize the identifiers carried by the transaction packets to significantly improve transaction packet transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of bus technology, and in particular to a PCIe controller, chip, electronic device, and transaction packet transmission method. Background Technology

[0002] Peripheral Component Interconnect Express (PCIe) is a high-speed serial computer expansion bus standard. Peripheral devices connect to the processor via the PCIe bus, and the processor connects to memory via the Advanced eXtensible Interface (AXI) bus.

[0003] When a peripheral device wants to access memory, it sends a Transaction Layer Packet (TLP) to the processor. Depending on whether a response is required and the type of response, transaction packets are categorized into three types: Posted, Non-Posted, and Complete. To ensure data integrity and the production and sales model mechanism, PCIe sends these three types of transaction packets in strict order by default. The processor determines whether a transaction packet can be sent based on the order requirements. If it determines that a transaction packet can be sent, it converts the packet into a request and sends it to memory. Memory then performs read / write operations based on the request. The disadvantage of strict ordering is excessive latency and reduced transmission efficiency.

[0004] Since out-of-order transmission of some transaction packets does not affect data integrity, PCIe also specifies that transaction packets can carry identifiers to indicate whether a transaction packet can be transmitted out of order and with which other transaction packets. Based on this, utilizing the identifiers carried by transaction packets to further improve the transmission efficiency of transaction packets has become a research hotspot in this field. Summary of the Invention

[0005] In view of this, this disclosure proposes a PCIe controller, a chip, an electronic device, and a transaction packet transmission method. The PCIe controller in embodiments of this disclosure can utilize the identifier carried in the transaction packet to further improve the transmission efficiency of the transaction packet.

[0006] According to one aspect of this disclosure, a PCIe controller is provided, comprising: a plurality of storage queues for storing first type transaction packets, wherein the first type transaction packets are Posted type PCIe transaction packets, and the first type transaction packets in different storage queues have different sending conditions; a storage module for storing attribute information, wherein the attribute information belongs to the first type transaction packets that have been converted into first type requests and sent to the storage node connected to the PCIe controller, and the first type requests have not yet been processed by the storage node; and a processing module for, upon receiving the first type transaction packets, writing the first type transaction packets into one of the plurality of storage queues according to the indication of the identifier carried by the first type transaction packets; and, when it is determined from the attribute information in the storage module that any first type transaction packet in any storage queue meets the sending conditions, converting the first type transaction packets that meet the sending conditions into first type requests and sending them to the corresponding storage node.

[0007] In one possible implementation, the PCIe controller connects to multiple peripheral devices, and the multiple storage queues include a first storage queue and multiple second storage queues, with each peripheral device corresponding to one of the multiple second storage queues; the identifier includes a first identifier, and a valid first identifier indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets; the processing module is used to write the first type of transaction packet into the first storage queue when the first identifier carried by the first type of transaction packet is valid; and to write the first type of transaction packet into the second storage queue corresponding to the peripheral device that sent the first type of transaction packet when the first identifier carried by the first type of transaction packet is invalid.

[0008] In one possible implementation, the processing module is used to determine, based on the attribute information in the storage module, whether the first type of transaction packets in the plurality of second storage queues meet the sending conditions; and when it is determined that the first type of transaction packets in the plurality of second storage queues do not meet the sending conditions, determine that the first type of transaction packets in the first storage queue meet the sending conditions.

[0009] In one possible implementation, the identifier further includes a second identifier, the validity of which indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets from different peripheral devices. When the processing module determines whether the first type of transaction packet in the second storage queue meets the sending condition: if the second identifier carried by the first type of transaction packet is valid, it determines whether the first type of transaction packet meets a first sub-condition based on the attribute information; the first sub-condition is: other first type of transaction packets from the same peripheral device as the first type of transaction packet but corresponding to different storage nodes have all been processed; if the second identifier carried by the first type of transaction packet is invalid, it determines whether the first type of transaction packet meets a second sub-condition based on the attribute information; the second sub-condition is: other first type of transaction packets corresponding to different storage nodes have all been processed; when the first type of transaction packet meets either the first sub-condition or the second sub-condition, the sending condition is met.

[0010] In one possible implementation, the storage module stores multiple sets of attribute information, each set belonging to a first type of transaction packet; each set of attribute information includes the storage queue number to which the first type of transaction packet belongs and the storage node number corresponding to the first type of transaction packet; the processing module is further configured to, when sending the first type of request to the corresponding storage node, write the attribute information of the first type of transaction packet corresponding to the first type of request into the storage module; and when receiving a response from the storage node corresponding to the first type of request, confirm that the first type of request has been processed by the storage node and clear the attribute information of the first type of transaction packet corresponding to the first type of request.

[0011] In one possible implementation, the PCIe controller further includes a counting module. The processing module is further configured to receive second-type transaction packets and add a third identifier to each second-type transaction packet, wherein the second-type transaction packet is a PCIe transaction packet of type Completion; the third identifier indicates the receiving order of the second-type transaction packets; the counting module is configured to record a send count value and a receive count value corresponding to each third identifier, wherein the send count value is equal to the number of first-type requests that have been sent to the storage node and correspond to the third identifier, and the receive count value is equal to the number of first-type requests that have been received and correspond to the third identifier; the processing module is further configured to, based on the attribute information in the storage module and the send count value and receive count value recorded by the counting module, determine that the second-type transaction packet meets the sending conditions, and then convert the second-type transaction packet into a second-type request before sending it.

[0012] In one possible implementation, the processing module is configured to find, in the counting module, a send count value and a receive count value corresponding to the third identifier of the second type of transaction packet; and when the found send count value and receive count value are equal, determine that the second type of transaction packet meets the sending condition.

[0013] According to another aspect of this disclosure, a transaction packet transmission method is provided, the method being applied to a PCIe controller, the PCIe controller including multiple storage queues, a storage module, and a processing module, the multiple storage queues being used to store first type transaction packets, the first type transaction packets being Posted type PCIe transaction packets, the first type transaction packets in different storage queues having different sending conditions; the storage module being used to store attribute information, the attribute information belonging to first type transaction packets that have been converted into first type requests and sent to storage nodes connected to the PCIe controller, and the first type requests have not yet been processed by the storage nodes; the method comprising: when the processing module receives a first type transaction packet, writing the first type transaction packet into one of the multiple storage queues according to the indication of the identifier carried by the first type transaction packet; when it is determined from the attribute information in the storage module that a first type transaction packet in any storage queue meets the sending conditions, converting the first type transaction packet that meets the sending conditions into a first type request and sending it to the corresponding storage node.

[0014] In one possible implementation, the PCIe controller connects to multiple peripheral devices, and the multiple storage queues include a first storage queue and multiple second storage queues, with each peripheral device corresponding to one of the multiple second storage queues. The identifier includes a first identifier, and a valid first identifier indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets. The step of writing the first type of transaction packet into one of the multiple storage queues according to the indication of the identifier carried by the first type of transaction packet includes: writing the first type of transaction packet into the first storage queue when the first identifier carried by the first type of transaction packet is valid; and writing the first type of transaction packet into the second storage queue corresponding to the peripheral device that sent the first type of transaction packet when the first identifier carried by the first type of transaction packet is invalid.

[0015] In one possible implementation, determining that a first type of transaction packet in any storage queue meets the sending condition based on the attribute information in the storage module includes: determining, in turn, whether a first type of transaction packet in a plurality of second storage queues meets the sending condition based on the attribute information in the storage module; and determining that a first type of transaction packet in the first storage queue meets the sending condition when it is determined that none of the first type of transaction packets in the plurality of second storage queues meet the sending condition.

[0016] In one possible implementation, the identifier further includes a second identifier, the validity of which indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets from different peripheral devices. When the processing module determines whether the first type of transaction packet in the second storage queue meets the sending condition: if the second identifier carried by the first type of transaction packet is valid, it determines whether the first type of transaction packet meets a first sub-condition based on the attribute information; the first sub-condition is: other first type of transaction packets from the same peripheral device as the first type of transaction packet but corresponding to different storage nodes have all been sent; if the second identifier carried by the first type of transaction packet is invalid, it determines whether the first type of transaction packet meets a second sub-condition based on the attribute information; the second sub-condition is: other first type of transaction packets corresponding to different storage nodes have all been sent; when the first type of transaction packet meets either the first sub-condition or the second sub-condition, the sending condition is met.

[0017] In one possible implementation, the storage module stores multiple sets of attribute information, each set belonging to a first type of transaction packet; each set of attribute information includes the storage queue number to which the first type of transaction packet belongs and the storage node number corresponding to the first type of transaction packet; the method further includes: when the processing module sends the first type of request to the corresponding storage node, it writes the attribute information of the first type of transaction packet corresponding to the first type of request into the storage module; when it receives a response from the storage node corresponding to the first type of request, it confirms that the first type of request has been processed by the storage node, and clears the attribute information of the first type of transaction packet corresponding to the first type of request.

[0018] In one possible implementation, the PCIe controller further includes a counting module, and the method further includes: the processing module receiving a second type of transaction packet and adding a third identifier to each second type of transaction packet, wherein the second type of transaction packet is a PCIe transaction packet of type Completion; the third identifier indicates the receiving order of the second type of transaction packets; the counting module records a send count value and a receive count value corresponding to each third identifier, wherein the send count value is equal to the number of first type requests that have been sent to the storage node and correspond to the third identifier, and the receive count value is equal to the number of first type requests that have been received and correspond to the third identifier; the processing module determines, based on the attribute information in the storage module and the send count value and receive count value recorded by the counting module, that the second type of transaction packet meets the sending conditions, and then converts the second type of transaction packet into a second type of request and sends it.

[0019] In one possible implementation, determining that the second type of transaction packet meets the sending condition based on the attribute information in the storage module and the send count and receive count recorded by the counting module includes: finding the send count and receive count corresponding to the third identifier of the second type of transaction packet in the counting module; and determining that the second type of transaction packet meets the sending condition when the found send count and receive count are equal.

[0020] According to another aspect of this disclosure, a chip is provided, including the PCIe controller described in any of the preceding claims.

[0021] According to another aspect of this disclosure, an electronic device is provided, including the chip described above.

[0022] According to an embodiment of this disclosure, a PCIe controller includes: multiple storage queues for storing first-type transaction packets, wherein the first-type transaction packets are Posted type PCIe transaction packets, and the transmission conditions of the first-type transaction packets in different storage queues are different; a storage module for storing attribute information, wherein the attribute information pertains to first-type transaction packets that have been converted into first-type requests and sent to a storage node connected to the PCIe controller, and the first-type requests have not yet been processed by the storage node; and a processing module for, upon receiving a first-type transaction packet, writing the first-type transaction packet into one of the multiple storage queues according to the indication of the identifier carried by the first-type transaction packet; and, when determining from the attribute information in the storage module that a first-type transaction packet in any storage queue meets the transmission conditions, converting the first-type transaction packet that meets the transmission conditions into a first-type request and sending it to the corresponding storage node. Based on the identifier of the first type of transaction packet, the first type of transaction packet is written into a storage queue. First type of transaction packets with different sending conditions are written into different storage queues. This optimizes the storage method of the first type of transaction packet in the PCIe controller, so that only one sending condition needs to be considered for each first type of transaction packet in the storage queue. This reduces the complexity of determining whether the first type of transaction packet in the storage queue meets the sending condition, improves the judgment speed, and makes the transaction packet sending efficiency higher. The attribute information indicates that the first type of transaction packet has been converted into a first type request and sent to the storage node connected to the PCIe controller, and the first type request has not yet been processed by the storage node. Therefore, based on the attribute information, it can be determined whether the first type of transaction packet meets the sending condition, ensuring that the sending order of the first type of transaction packets complies with the PCIe protocol's order requirements. In summary, the PCIe controller of this embodiment can utilize the identifier carried by the transaction packet to further improve the transmission efficiency of the transaction packet while ensuring that the transmission of the transaction packet complies with the PCIe protocol.

[0023] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0024] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0025] Figure 1 An exemplary application scenario of a PCIe controller according to an embodiment of this disclosure is shown.

[0026] Figure 2 A schematic diagram showing the structure of a PCIe controller according to an embodiment of the present disclosure is provided.

[0027] Figure 3 This diagram illustrates the process of determining whether a first type of transaction packet in a first storage queue meets the sending conditions according to an embodiment of the present disclosure.

[0028] Figure 4 This diagram illustrates the process of determining whether a first type of transaction packet in a second storage queue meets the sending conditions according to an embodiment of the present disclosure.

[0029] Figure 5 A schematic diagram of the structure of a storage module according to an embodiment of the present disclosure is shown.

[0030] Figure 6 This diagram illustrates the addition of a third identifier to a second type of transaction packet according to an embodiment of this disclosure.

[0031] Figure 7 A schematic diagram illustrating the numerical accumulation method of the first counter and the second counter according to an embodiment of the present disclosure is shown.

[0032] Figure 8 A schematic diagram illustrating the flow of a transaction packet transmission method according to an embodiment of the present disclosure is shown. Detailed Implementation

[0033] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0034] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.

[0035] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.

[0036] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.

[0037] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0038] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0039] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant regions.

[0040] The PCIe standard, by default, transmits TLPs in a strict ordering manner (strong order model): all Post type TLPs must be sent in the order they are received, and a later Posted type TLP cannot bypass an earlier Posted type TLP. This ensures data consistency but leads to increased latency and decreased bandwidth. Especially after system architecture optimization, memory is divided into multiple storage nodes, so Post type TLPs sent by the processor to memory may be sent to different storage nodes. To ensure that TLP transmission follows the order requirement, the PCIe controller needs to ensure that all earlier Post type TLPs destined for other storage nodes have arrived at their respective storage nodes before sending a Post type TLP destined for a specific storage node. This further increases latency and reduces bandwidth performance.

[0041] In fact, some TLPs can be transmitted out of order. Building on this, the PCIe standard also proposes two more lenient sorting methods.

[0042] One sorting method is Relaxed Ordering (RO). An RO flag can be added to a TLP, and its validity is controlled by the enable register on the peripheral device issuing the TLP. A valid (set) RO flag indicates that the TLP supports relaxed ordering, while an invalid RO flag indicates that the TLP does not support relaxed ordering. For example, if the RO flag of a later Posted type TLP is valid, it can bypass an earlier Posted type TLP.

[0043] Another sorting method is ID-Based Ordering (IDO). Each peripheral device has a unique ID. An IDO identifier can be added to a TLP, and the validity of the IDO identifier is controlled by the enable register on the peripheral device that issued the TLP. A valid (set) IDO identifier indicates that the TLP supports ID-based ordering, while an invalid IDO identifier indicates that the TLP does not support ID-based ordering. For example, if the current Posted type TLP comes from a peripheral device and the IDO identifier is valid, it can override a previous Posted type TLP from another peripheral device.

[0044] For a TLP that carries both RO and IDO identifiers, the RO and IDO identifiers can be valid simultaneously, invalid simultaneously, or one can be valid while the other is invalid. Table 1 shows the impact of the validity of the RO and IDO identifiers on the transmission order followed by the TLP.

[0045] Table 1

[0046]

[0047] As shown in Table 1, 0 indicates invalid and 1 indicates valid.

[0048] RO=0, IDO=0 indicates that TLP transmissions follow the default strict ordering.

[0049] RO=0, IDO=1 indicates that TLP transmissions follow ID-based ordering.

[0050] RO=1, IDO=0 or 1 indicates that TLP transmissions follow loose ordering.

[0051] Table 2 shows the transmission order that the three types of TLPs must follow when TLPs are allowed to carry RO identifiers and / or IDO identifiers.

[0052] Table 2

[0053]

[0054] As shown in Table 2, Row Pass Column is interpreted as a TLP located in any row passing over a TLP located in any column. The TLPs in row A and column 2 are Posted type TLPs, the TLPs in row B, row C, column 3, and column 4 are Non-Posted type TLPs, and the TLPs in row D and column 5 are Complete type TLPs.

[0055] a) and b) indicate two possibilities. No means not allowed, Yes means must be allowed, and Y / N is used to indicate that it can be allowed. Referring to Table 2, the PCIe protocol's rules regarding TLP transmission order can be specifically interpreted as follows:

[0056] 1. When the RO identifier of a Posted type TLP is valid, it can override an earlier Posted type TLP; when the IDO identifier of a Posted type TLP is valid, it can override an earlier Posted type TLP that comes from a different peripheral device. In other cases, a Posted type TLP is not allowed to override an earlier Posted type TLP.

[0057] 2. Posted type TLPs must be able to override prior Non-Posted type TLPs to avoid deadlock.

[0058] 3. In a PCIe2PCI bridge, in the direction from PCIe to PCI, the Posted type TLP must be able to pass over the preceding Completion type TLP; in other cases, the Posted type TLP can pass over the preceding Completion type TLP.

[0059] 4. When a Non-Posted type TLP is used for a read request, it only has an IDO identifier and no RO identifier. If the IDO identifier is valid, it can bypass the previous Posted type TLP from other peripheral devices; otherwise, it is not allowed to bypass the previous Posted type TLP.

[0060] 5. When a Non-Posted type TLP is a request with data (Non-Posted Request with Data, NPRD), if the RO identifier is valid, it is allowed to bypass the previous Posted type TLP; if the IDO identifier is valid, it is allowed to bypass the previous Posted type TLP from other peripheral devices; otherwise, it is not allowed to bypass the previous Posted type TLP.

[0061] 6. I / O or configuration write completion type TLPs are allowed to override prior posted type TLPs; RO-identified completion type TLPs are allowed to override prior posted type TLPs; IDO-identified completion type TLPs are allowed to override prior posted type TLPs from other peripheral devices; otherwise, completion type TLPs are not allowed to override prior posted type TLPs.

[0062] 7. A Completion type TLP is allowed to override a prior Completion type TLP from another peripheral device; a Completion type TLP is not allowed to override a prior Completion type TLP from the same peripheral device.

[0063] Therefore, under the premise that the transmission of transaction packets complies with the PCIe protocol, utilizing the identifier carried by the transaction packets to further improve the transmission efficiency has become a research hotspot in this field.

[0064] In view of this, this disclosure proposes a PCIe controller, a chip, an electronic device, and a transaction packet transmission method. The PCIe controller in embodiments of this disclosure can utilize the identifier carried in the transaction packet to further improve the transmission efficiency of the transaction packet.

[0065] Figure 1 An exemplary application scenario of a PCIe controller according to an embodiment of this disclosure is shown.

[0066] like Figure 1 As shown, the chip includes a PCIe controller, memory, and multiple peripheral devices. The memory may include multiple storage nodes. The PCIe controller connects to the multiple peripheral devices and the multiple storage nodes. In one example, the PCIe controller may be a PCIe root complex (RC).

[0067] The PCIe controller and peripheral devices are connected via the PCIe bus (not shown). The PCIe controller and storage nodes are connected via the AXI bus (not shown).

[0068] When a peripheral device wants to access a storage node, it generates a PCIe Transfer Message (TLP), which corresponds to the desired storage node. After the peripheral device sends the TLP to the PCIe controller, the PCIe controller first stores the TLP. When it determines that the TLP meets the transmission conditions, it converts the TLP into a request, which also corresponds to the desired storage node. The PCIe controller then sends the request to the corresponding storage node via the AXI bus.

[0069] Figure 2A schematic diagram showing the structure of a PCIe controller according to an embodiment of the present disclosure is provided.

[0070] like Figure 2 As shown, the PCIe controller includes:

[0071] Multiple storage queues are used to store Type I transaction packets, which are Posted type PCIe transaction packets. The sending conditions for Type I transaction packets in different storage queues are different.

[0072] The storage module is used to store attribute information, which belongs to the first type of transaction packet that has been converted into a first type of request and sent to the storage node connected to the PCIe controller, and the first type of request has not yet been processed by the storage node.

[0073] The processing module is used to write the first type of transaction packet into one of multiple storage queues according to the indication of the identifier carried by the first type of transaction packet when it receives the first type of transaction packet; and when it is determined from the attribute information in the storage module that the first type of transaction packet in any storage queue meets the sending conditions, the first type of transaction packet that meets the sending conditions is converted into a first type of request and sent to the corresponding storage node.

[0074] For example, a PCIe controller may include storage queues, each of which is a First-Input First-Out (FIFO) memory. Storage queues are used to store Type I transaction packets, which are Posted type PCIe transaction packets. The transmission conditions for Type I transaction packets differ between storage queues. Exemplary transmission conditions are given later. If the transmission conditions are met, the Type I transaction packet is converted into a Type I request and sent to the storage node.

[0075] The PCIe controller may include a storage module for storing attribute information. The storage module may have a multi-layered FIFO (First-In, First-Out) memory structure, etc. This disclosure does not limit the specific implementation of the storage module. The attribute information belongs to a first-type transaction packet that has been converted into a first-type request and sent to the storage node connected to the PCIe controller, but has not yet been fully processed by the storage node.

[0076] For example, suppose that requests 1, 2, and 3 are type 1 requests. The PCIe controller has issued requests 1, 2, and 3. Request 1 has been processed by the storage node, while requests 2 and 3 have not been processed by the storage node. In this case, the attribute information belongs to requests 2 and 3.

[0077] In one example, the attribute information can be maintained by the PCIe controller. When the storage node finishes processing the request, it can return a response corresponding to the request to the PCIe controller. Upon receiving a response corresponding to any first-type request, the PCIe controller can determine that the first-type request has been processed by the storage node and update the attribute information. This disclosure does not limit the specific method of maintaining the attribute information.

[0078] The first type of transaction packet is a Posted type PCIe transaction packet, and therefore may carry identifiers (first identifier RO and second identifier IDO), which indicate the ordering method of the first type of transaction packet. Exemplary ordering methods are described in Table 1. The PCIe controller may include a processing module. After receiving a first type of transaction packet, the processing module may select a storage queue from the storage queues whose transmission method matches the ordering method indicated by the identifier, and write the first type of transaction packet to the selected storage queue.

[0079] Based on the attribute information in the storage module, the processing module can determine whether the first type of transaction packets in each storage queue meet the sending conditions. When it is determined that a first type of transaction packet in any storage queue meets the sending conditions, the processing module converts the packet into a first type of request and sends it to the corresponding storage node. Since the first type of request needs to be transmitted via the AXI bus between the PCIe controller and the storage node, it can be an AXI protocol request.

[0080] Those skilled in the art will understand that as long as the protocol of the first type of request is consistent with the protocol of the bus between the PCIe controller and the storage node, the embodiments of this disclosure do not limit the protocol of the first type of request.

[0081] According to an embodiment of this disclosure, a PCIe controller includes: multiple storage queues for storing first-type transaction packets, wherein the first-type transaction packets are Posted type PCIe transaction packets, and the transmission conditions of the first-type transaction packets in different storage queues are different; a storage module for storing attribute information, wherein the attribute information pertains to first-type transaction packets that have been converted into first-type requests and sent to a storage node connected to the PCIe controller, and the first-type requests have not yet been processed by the storage node; and a processing module for, upon receiving a first-type transaction packet, writing the first-type transaction packet into one of the multiple storage queues according to the indication of the identifier carried by the first-type transaction packet; and, when determining from the attribute information in the storage module that a first-type transaction packet in any storage queue meets the transmission conditions, converting the first-type transaction packet that meets the transmission conditions into a first-type request and sending it to the corresponding storage node. Based on the identifier of the first type of transaction packet, the first type of transaction packet is written into a storage queue. First type of transaction packets with different sending conditions are written into different storage queues. This optimizes the storage method of the first type of transaction packet in the PCIe controller, so that only one sending condition needs to be considered for each first type of transaction packet in the storage queue. This reduces the complexity of determining whether the first type of transaction packet in the storage queue meets the sending condition, improves the judgment speed, and makes the transaction packet sending efficiency higher. The attribute information indicates that the first type of transaction packet has been converted into a first type request and sent to the storage node connected to the PCIe controller, and the first type request has not yet been processed by the storage node. Therefore, based on the attribute information, it can be determined whether the first type of transaction packet meets the sending condition, ensuring that the sending order of the first type of transaction packets complies with the PCIe protocol's order requirements. In summary, the PCIe controller of this embodiment can utilize the identifier carried by the transaction packet to further improve the transmission efficiency of the transaction packet while ensuring that the transmission of the transaction packet complies with the PCIe protocol.

[0082] The following describes an exemplary method by which the processing module writes the first type of transaction packet into the storage queue.

[0083] In one possible implementation, the PCIe controller connects to multiple peripheral devices, and the multiple storage queues include a first storage queue and multiple second storage queues, with each peripheral device corresponding to one of the multiple second storage queues.

[0084] The identifier includes a first identifier, which, when valid, indicates that a first type of transaction packet is allowed to be sent before other first type of transaction packets;

[0085] The processing module is used to write the first type of transaction packet into a first storage queue when the first identifier carried by the first type of transaction packet is valid; and to write the first type of transaction packet into a second storage queue corresponding to the peripheral device that issued the first type of transaction packet when the first identifier carried by the first type of transaction packet is invalid.

[0086] For example, a PCIe controller includes multiple root ports, each connected to a peripheral device. Type I transaction packets are received through the root ports. These packets may originate from any of the peripheral devices. As mentioned above, each Type I transaction packet carries a first identifier and a second identifier. A valid first identifier indicates that the Type I transaction packet is allowed to be sent before other Type I transaction packets; a valid second identifier indicates that the Type I transaction packet is allowed to be sent before other Type I transaction packets originating from different peripheral devices. Therefore, when the first identifier is invalid, the Type I transaction packet cannot be sent before other Type I transaction packets originating from the same peripheral device. In this case, the transmission conditions for a Type I transaction packet with a valid first identifier differ from those for a Type I transaction packet with an invalid first identifier; and the transmission conditions for Type I transaction packets originating from different peripheral devices differ when the first identifier is invalid.

[0087] Based on this, multiple storage queues may include a first storage queue and multiple second storage queues. There is a one-to-one correspondence between multiple peripheral devices and multiple second storage queues. When the first identifier carried by the first type of transaction packet is valid, the first type of transaction packet is written to the first storage queue. When the first identifier carried by the first type of transaction packet is invalid, the first type of transaction packet is written to the second storage queue corresponding to the peripheral device that sent the first type of transaction packet. In this case, it can be ensured that first type of transaction packets with different sending conditions are stored in different storage queues.

[0088] In one example, when a peripheral device generates a first-type data packet, it adds its own identifier to the first-type transaction packet. Based on the peripheral device identifier carried in the first-type data packet, the processing module can write the first-type transaction packet into the second storage queue corresponding to the peripheral device that sent the first-type transaction packet.

[0089] For example, a PCIe controller with 8 root ports can include one first storage queue and 8 second storage queues. When the first identifier (RO) of a first type of transaction packet is valid, it is stored in the first storage queue; when the first identifier (RO) of a first type of transaction packet is invalid, it is written to the corresponding second storage queue based on the peripheral device number carried by the first type of transaction packet.

[0090] By storing the first type of transaction packets corresponding to different sending conditions into different storage queues, the speed of subsequent judgment on whether the first type of transaction packets in each storage queue meet the sending conditions can be improved.

[0091] Figure 3 This diagram illustrates the process of determining whether a first type of transaction packet in a first storage queue meets the sending conditions according to an embodiment of the present disclosure.

[0092] like Figure 3As shown, in one possible implementation, the processing module is used to determine, according to the attribute information in the storage module, whether the first type of transaction packets in multiple second storage queues meet the sending conditions (step S31); when it is determined that the first type of transaction packets in multiple second storage queues do not meet the sending conditions, it determines that the first type of transaction packets in the first storage queue meet the sending conditions (step S32).

[0093] For example, the PCIe controller issues one Type I request per cycle. Therefore, each cycle requires arbitrating one of the storage queues to issue the Type I transaction packet.

[0094] Since the first type of transaction packets written to the first storage queue carry a valid first identifier, they can be sent before other first type of transaction packets. Therefore, as long as the first storage queue is not empty, any transaction packet in the first storage queue can be converted into a first type request and sent at any time in each cycle. However, the first type of transaction packets in the second storage queue carry invalid first identifiers and cannot be sent before other first type of transaction packets from the same peripheral device. Therefore, when the second storage queue is not empty, it may not necessarily have first type of transaction packets available for sending in each cycle. In this case, in order to improve the transmission efficiency of transaction packets and increase bandwidth, each cycle can first determine whether the first type of transaction packets in multiple second storage queues meet the sending conditions. If any first type of transaction packet in a second storage queue meets the sending conditions, then that second storage queue is the storage queue arbitrated in the current cycle, and that second storage queue will send the first type of transaction packets that meet the conditions. If it is determined that the first type of transaction packets in multiple second storage queues do not meet the sending conditions, then it is directly determined that the first type of transaction packets in the first storage queue meet the sending conditions, and the first type of transaction packets in the first storage queue are sent.

[0095] Furthermore, each storage queue can be a first-in, first-out (FIFO) memory. Therefore, to determine whether a first-type transaction packet in any second storage queue meets the sending conditions, it can be determined whether the first-type transaction packet with the earliest write time in that second storage queue meets the sending conditions, without further checking whether other first-type transaction packets in that second storage queue meet the sending conditions. If it is determined that first-type transaction packets in multiple second storage queues do not meet the sending conditions, the first-type transaction packet with the earliest write time in the first storage queue is directly determined to meet the sending conditions.

[0096] In this way, the transmission rate of the first type of transaction packets can be increased, thereby increasing bandwidth.

[0097] Figure 4 This diagram illustrates the process of determining whether a first type of transaction packet in a second storage queue meets the sending conditions according to an embodiment of the present disclosure.

[0098] like Figure 4 As shown, in one possible implementation, the identifier carried by the first type of transaction packet also includes a second identifier, which effectively indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets from different peripheral devices.

[0099] When the processing module determines whether the first type of transaction packet in the second storage queue meets the sending conditions:

[0100] When the second identifier carried by the first type of transaction packet is valid, it is determined whether the first type of transaction packet meets the first sub-condition based on the attribute information; the first sub-condition is: other first type of transaction packets that come from the same peripheral device as the first type of transaction packet and correspond to different storage nodes as the first type of transaction packet have all been processed;

[0101] When the second identifier carried by the first type of transaction packet is invalid, determine whether the first type of transaction packet meets the second sub-condition based on the attribute information; the second sub-condition is: all other first type of transaction packets corresponding to different storage nodes as the first type of transaction packet have been processed.

[0102] The sending condition is met when the first sub-condition or the second sub-condition is met for the first type of transaction packet.

[0103] For example, as described above, the first type of transaction packet also carries a second identifier, which effectively indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets from different peripheral devices. Based on this, the processing module can determine whether the first type of transaction packet in the second storage queue meets the sending conditions in the following way:

[0104] When the second identifier carried by the first type of transaction packet is valid, the attribute information is used to determine whether the first type of transaction packet meets the first sub-condition. The first sub-condition is: all other first type of transaction packets that come from the same peripheral device as the first type of transaction packet but correspond to different storage nodes have been processed.

[0105] When the second identifier carried by the first type of transaction packet is invalid, the attribute information is used to determine whether the first type of transaction packet meets the second sub-condition. The second sub-condition is: all other first type of transaction packets corresponding to different storage nodes as the first type of transaction packet have been processed.

[0106] The process of processing the first type of transaction packet includes: converting the first type of transaction packet into a first type of request and sending it; and receiving the response corresponding to the first type of request. The first type of transaction packet is considered processed when the response corresponding to the first type of request converted from the first type of transaction packet has been received.

[0107] If the first type of transaction packet does not meet the first sub-condition or the second sub-condition, then the first type of transaction packet in the current second storage queue does not meet the sending condition, and the process continues to determine whether the first type of transaction packet in the next second storage queue meets the sending condition.

[0108] For example, suppose the PCIe controller connects storage node 1 to storage node 4, and peripheral device 1 to peripheral device 3. A first-type transaction packet is received from peripheral device 1, corresponding to storage node 1.

[0109] If the second identifier carried by the first type of transaction packet is valid, then the first sub-condition is satisfied when it is determined from the attribute information that all other first type of transaction packets from peripheral device 1 and corresponding storage nodes 2-4 have been processed.

[0110] If the second identifier carried by the first type of transaction packet is invalid, the second sub-condition is satisfied when it is determined from the attribute information that all other first type of transaction packets of the corresponding storage nodes 2-4 have been processed.

[0111] In this case, even with multiple storage nodes, the sending order of the first type of transaction packets in the second storage queue can still be guaranteed to comply with the order requirements specified by the PCIe protocol.

[0112] The following section introduces the content of attribute information and how to maintain it.

[0113] In one possible implementation, the storage module stores multiple sets of attribute information, each set of attribute information belonging to a first-type transaction package;

[0114] Each set of attribute information includes the storage queue number to which the first type of transaction packet belongs and the storage node number corresponding to the first type of transaction packet;

[0115] The processing module is also used to write the attribute information of the first type of transaction packet corresponding to the first type of request into the storage module when the first type of request is sent to the corresponding storage node; and to clear the attribute information of the first type of transaction packet corresponding to the first type of request when a response corresponding to the first type of request is received from the storage node.

[0116] Figure 5 A schematic diagram of the structure of a storage module according to an embodiment of the present disclosure is shown.

[0117] like Figure 5 As shown, the storage module may include multiple entries, each entry may store one copy of attribute information, and each copy of attribute information belongs to a first-type transaction package. The number of entries can be set according to the application scenario requirements, for example, 256. This embodiment of the disclosure does not limit the number of entries in the storage module.

[0118] Each piece of attribute information may include the storage queue number to which the first type of transaction package belongs and the storage node number corresponding to the first type of transaction package. The storage queue number is stored in the first field of each entry, and the storage node number is stored in the second field of each entry.

[0119] The bit widths of the first and second fields can be set according to the application scenario requirements. In one example, the bit width of the first field is 8 bits, and the bit width of the second field is 16 bits. This disclosure embodiment does not impose any limitations on the bit widths of the first and second fields.

[0120] When the processing module determines whether a first type of transaction packet in the second storage queue satisfies the first sub-condition, it searches the storage module for entries whose first field stores the same storage queue number, based on the second storage queue number. Among the found entries, it further searches for entries whose second field stores a different storage node number. If no entry with a different storage node number in its second field is found, then the first sub-condition is satisfied.

[0121] When the processing module determines whether the first type of transaction packet in the second storage queue satisfies the second sub-condition, it searches the storage module for an entry whose second field stores a different storage node number, based on the storage node number corresponding to the first type of transaction packet. If no entry is found whose second field stores a different storage node number, then the second sub-condition is satisfied.

[0122] When the processing module sends a first-type request to the corresponding storage node, it also writes the attribute information of the first-type transaction packet corresponding to the first-type request into the storage module. Upon receiving a response from the storage node corresponding to the first-type request, it confirms that the first-type request has been processed by the storage node and clears the attribute information of the first-type transaction packet corresponding to the first-type request. In this way, it ensures that the attribute information stored in the storage module belongs to the first-type transaction packet that has been converted into a first-type request and sent to the storage node, and that the first-type request has not yet been processed by the storage node, thus ensuring the accuracy of using attribute information to determine whether the first-type transaction packets in each storage queue meet the sending conditions.

[0123] As described above, the peripheral device also generates PCIe transaction packets of type Completion (hereinafter also referred to as second type transaction packets). An exemplary method by which the PCIe controller of this disclosure sends PCIe transaction packets of type Completion is described below.

[0124] In one possible implementation, the PCIe controller also includes a counting module.

[0125] The processing module is also used to receive second-type transaction packets and add a third identifier to each second-type transaction packet, wherein the second-type transaction packet is a PCIe transaction packet of type Completion; the third identifier indicates the receiving order of the second-type transaction packets;

[0126] The counting module is used to record the sending count value and receiving count value corresponding to each third identifier. The sending count value is equal to the number of first-type requests that have been sent to the storage node and are corresponding to the third identifier, and the receiving count value is equal to the number of first-type requests that have been received and are corresponding to the third identifier.

[0127] The processing module is also used to convert the second type of transaction packet into a second type of request and send it when it determines that the second type of transaction packet meets the sending conditions based on the attribute information in the storage module and the sending count value and receiving count value recorded by the counting module.

[0128] For example, the PCIe protocol requires that a Completion type TLP cannot exceed a Post type TLP, and that responses to Post type TLPs can be returned to the PCIe controller out of order. To meet this requirement, the PCIe controller must wait until the first type of request converted from the Post type TLP is written to the corresponding storage node (as determined by receiving the response) before returning the Completion type TLP to the sender of the request.

[0129] The processing module can receive second-type transaction packets, which are PCIe transaction packets of type Completion. A third identifier is added to each second-type transaction packet, indicating the order in which the packets are received.

[0130] To monitor the sending and receiving of Type 1 requests and their corresponding responses in real time, a counting module can be set up in the PCIe controller to record the send count and receive count for each third identifier. The send count is equal to the number of Type 1 requests that have been sent to the storage node and correspond to the third identifier, and the receive count is equal to the number of Type 1 requests that have been received and correspond to the third identifier.

[0131] Figure 6 This diagram illustrates the addition of a third identifier to a second type of transaction packet according to an embodiment of this disclosure.

[0132] like Figure 6 As shown, the processing module successively receives multiple second-type transaction packets and adds third identifiers h0-h5 to each of the multiple second-type transaction packets according to the receiving order.

[0133] For example, such as Figure 5 As shown, each entry in the storage module also includes a third field, which is used to store a third identifier.

[0134] When a first type of request is issued, if there is no second type of transaction packet yet, a third identifier h0 is written to the third field of the corresponding entry. Upon receiving the first second type of transaction packet, the third identifier h0 is added to that second type of transaction packet. After receiving the first second type of transaction packet, when a new first type of request is issued, h1 is written to the third field of the corresponding entry. Upon receiving the first second type of transaction packet, the third identifier h1 is added to that second type of transaction packet. This process continues, writing the third identifier to the entry when issuing a request and adding the third identifier to the second type of transaction packet after it is received.

[0135] The bit width of the third field can be set according to the application scenario requirements. In one example, the bit width of the third field is 8 bits. This disclosure does not impose any limitations on the bit width of the third field.

[0136] At this point, multiple storage queues also store multiple Type 1 transaction packets. According to the rules shown in Table 2, some Type 1 transaction packets cannot be surpassed by specific Type 2 transaction packets. For example... Figure 6 As shown, there are 3 Type I transaction packets that cannot be surpassed by Type II transaction packets carrying the third identifier h0, 2 Type I transaction packets that cannot be surpassed by Type II transaction packets carrying the third identifier h1, 2 Type I transaction packets that cannot be surpassed by Type II transaction packets carrying the third identifier h2, 1 Type I transaction packet that cannot be surpassed by Type II transaction packets carrying the third identifier h3, and 1 Type I transaction packet that cannot be surpassed by Type II transaction packets carrying the third identifier h4.

[0137] The counting module may include multiple sets of counters, each corresponding one-to-one with a plurality of third identifiers. Each set of counters includes a first counter and a second counter. The first counter records the transmission count value corresponding to the third identifier, which is equal to the number of first-type requests that have been sent to the storage node and correspond to the third identifier. The second counter records the reception count value, which is equal to the number of first-type requests that have received responses and correspond to the third identifier.

[0138] The first counter corresponding to each third identifier is incremented by one when the processing module sends a first type of request corresponding to the third identifier; the second counter corresponding to each third identifier is incremented by one when the processing module receives a response to the first type of request corresponding to the third identifier.

[0139] Figure 7 A schematic diagram illustrating the numerical accumulation method of the first counter and the second counter according to an embodiment of the present disclosure is shown.

[0140] like Figure 7As shown, the third identifier h0 corresponds to the first counter ADS_CNT0 and the second counter WRDY_CNT0. The third identifier h1 corresponds to the first counter ADS_CNT1 and the second counter WRDY_CNT1. The third identifier h2 corresponds to the first counter ADS_CNT2 and the second counter WRDY_CNT2. The third identifier h3 corresponds to the first counter ADS_CNT3 and the second counter WRDY_CNT3.

[0141] The first counter ADS_CNT0 is incremented by one when the processing module sends a first type of request corresponding to the third identifier h0, and the second counter WRDY_CNT0 is incremented by one when the processing module receives a response to the first type of request corresponding to the third identifier h0.

[0142] The first counter ADS_CNT1 is incremented by one when the processing module sends a first type of request corresponding to the third identifier h1, and the second counter WRDY_CNT1 is incremented by one when the processing module receives a response to the first type of request corresponding to the third identifier h1.

[0143] The first counter ADS_CNT2 is incremented by one when the processing module sends the first type of request corresponding to the third identifier h2, and the second counter WRDY_CNT2 is incremented by one when the processing module receives the response to the first type of request corresponding to the third identifier h2.

[0144] The first counter ADS_CNT3 is incremented by one when the processing module sends a first type of request corresponding to the third identifier h3, and the second counter WRDY_CNT3 is incremented by one when the processing module receives a response to the first type of request corresponding to the third identifier h3.

[0145] The processing module can determine whether the second type of transaction packet meets the sending conditions based on the attribute information in the storage module and the send and receive count values ​​recorded by the counting module. If it is determined that the second type of transaction packet meets the sending conditions, it converts the second type of transaction packet into a second type of request and sends it.

[0146] By using attribute information and the counting results of the counting module to determine whether the second type of transaction packet meets the sending conditions, the complexity of determining whether the second type of transaction packet meets the sending conditions is reduced.

[0147] The following describes the sending conditions for the second type of transaction packet.

[0148] In one possible implementation, the processing module is used to find the send count value and receive count value corresponding to the third identifier of the second type of transaction packet in the counting module; when the found send count value and receive count value are equal, it is determined that the second type of transaction packet meets the sending condition.

[0149] For example, when the processing module determines whether a certain type II transaction packet meets the sending conditions, it can find the sending count value and receiving count value corresponding to the third identifier in the counting module based on the third identifier of the type II transaction packet. If the found sending count value and receiving count value are equal, it means that the responses to all the type I transaction packets that cannot be surpassed have been received. At this time, it can be determined that the type II transaction packet meets the sending conditions.

[0150] In this case, it is guaranteed that PCIe transaction packets of type Completion are also transmitted in the order specified by the PCIe protocol.

[0151] Actual testing showed that, in a scenario where the PCIe controller transmits Post-type TLPs at full speed, with a length of 64QW and all Post-type TLPs carrying a valid first identifier (RO) (RO=1), there is only one first storage queue. The PCIe controller sends Post-type TLPs to the four storage nodes in turn. Without restricting the validity of the second identifier carried by the Post-type TLP (IDO=0 or 1), the bandwidth reached 60GB / s. With the Post-type TLP restricted to carrying an invalid second identifier (IDO=0), the bandwidth reached 6.2GB / s.

[0152] Actual testing revealed that, in a scenario where the PCIe controller transmits Post-type TLPs at full speed, with a length of 64QW and all Post-type TLPs carrying an invalid first identifier RO (RO=0), there are four second storage queues. Each second storage queue accesses only one storage node. When Post-type TLPs are restricted to carrying a valid second identifier (IDO=1), the bandwidth reached 60GB / s. When Post-type TLPs are restricted to carrying an invalid second identifier (IDO=0), the bandwidth reached 6.2GB / s.

[0153] This disclosure also proposes a transaction packet transmission method. Figure 8 A schematic diagram illustrating the flow of a transaction packet transmission method according to an embodiment of the present disclosure is shown.

[0154] like Figure 8 As shown, in one possible implementation, the method is applied to a PCIe controller, which includes multiple storage queues, storage modules, and processing modules.

[0155] Multiple storage queues are used to store Type I transaction packets, which are Posted type PCIe transaction packets. The sending conditions for Type I transaction packets in different storage queues are different.

[0156] The storage module is used to store attribute information, which belongs to the first type of transaction packet that has been converted into a first type of request and sent to the storage node connected to the PCIe controller, and the first type of request has not yet been processed by the storage node.

[0157] The method includes: when the processing module receives a first type of transaction packet, it writes the first type of transaction packet into one of multiple storage queues according to the indication of the identifier carried by the first type of transaction packet (step S81); when it determines that the first type of transaction packet in any storage queue meets the sending conditions according to the attribute information in the storage module, it converts the first type of transaction packet that meets the sending conditions into a first type of request and sends it to the corresponding storage node (step S82).

[0158] In one possible implementation, the PCIe controller connects to multiple peripheral devices, and the multiple storage queues include a first storage queue and multiple second storage queues, with each peripheral device corresponding to one of the multiple second storage queues. The identifier includes a first identifier, and a valid first identifier indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets. The step of writing the first type of transaction packet into one of the multiple storage queues according to the indication of the identifier carried by the first type of transaction packet includes: writing the first type of transaction packet into the first storage queue when the first identifier carried by the first type of transaction packet is valid; and writing the first type of transaction packet into the second storage queue corresponding to the peripheral device that sent the first type of transaction packet when the first identifier carried by the first type of transaction packet is invalid.

[0159] In one possible implementation, determining that a first type of transaction packet in any storage queue meets the sending condition based on the attribute information in the storage module includes: determining, in turn, whether a first type of transaction packet in a plurality of second storage queues meets the sending condition based on the attribute information in the storage module; and determining that a first type of transaction packet in the first storage queue meets the sending condition when it is determined that none of the first type of transaction packets in the plurality of second storage queues meet the sending condition.

[0160] In one possible implementation, the identifier further includes a second identifier, the validity of which indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets from different peripheral devices. When the processing module determines whether the first type of transaction packet in the second storage queue meets the sending condition: if the second identifier carried by the first type of transaction packet is valid, it determines whether the first type of transaction packet meets a first sub-condition based on the attribute information; the first sub-condition is: other first type of transaction packets from the same peripheral device as the first type of transaction packet but corresponding to different storage nodes have all been processed; if the second identifier carried by the first type of transaction packet is invalid, it determines whether the first type of transaction packet meets a second sub-condition based on the attribute information; the second sub-condition is: other first type of transaction packets corresponding to different storage nodes have all been processed; when the first type of transaction packet meets either the first sub-condition or the second sub-condition, the sending condition is met.

[0161] In one possible implementation, the storage module stores multiple sets of attribute information, each set belonging to a first type of transaction packet; each set of attribute information includes the storage queue number to which the first type of transaction packet belongs and the storage node number corresponding to the first type of transaction packet; the method further includes: when the processing module sends the first type of request to the corresponding storage node, it writes the attribute information of the first type of transaction packet corresponding to the first type of request into the storage module; when it receives a response from the storage node corresponding to the first type of request, it confirms that the first type of request has been processed by the storage node, and clears the attribute information of the first type of transaction packet corresponding to the first type of request.

[0162] In one possible implementation, the PCIe controller further includes a counting module, and the method further includes: the processing module receiving a second type of transaction packet and adding a third identifier to each second type of transaction packet, wherein the second type of transaction packet is a PCIe transaction packet of type Completion; the third identifier indicates the receiving order of the second type of transaction packets; the counting module records a send count value and a receive count value corresponding to each third identifier, wherein the send count value is equal to the number of first type requests that have been sent to the storage node and correspond to the third identifier, and the receive count value is equal to the number of first type requests that have been received and correspond to the third identifier; the processing module determines, based on the attribute information in the storage module and the send count value and receive count value recorded by the counting module, that the second type of transaction packet meets the sending conditions, and then converts the second type of transaction packet into a second type of request and sends it.

[0163] In one possible implementation, determining that the second type of transaction packet meets the sending condition based on the attribute information in the storage module and the send count and receive count recorded by the counting module includes: finding the send count and receive count corresponding to the third identifier of the second type of transaction packet in the counting module; and determining that the second type of transaction packet meets the sending condition when the found send count and receive count are equal.

[0164] This disclosure also proposes a chip including the PCIe controller described above. A schematic diagram of the chip structure can be found [link to schematic diagram]. Figure 1 The chip can be a CPU or a GPU, etc., and this disclosure does not limit the embodiments thereto.

[0165] This disclosure also proposes an electronic device including the chip described above. The electronic device may be a terminal device or a server; this disclosure does not limit the specific type of electronic device.

[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0167] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A PCIe controller, characterized in that, include: Multiple storage queues are used to store the first type of transaction packets, which are Posted type PCIe transaction packets. The sending conditions of the first type of transaction packets in different storage queues are different. Storage module for storing attribute information, the attribute information belonging to a first type of transaction packet that has been converted into a first type of request and sent to the storage node connected to the PCIe controller, and the first type of request has not yet been processed by the storage node; The processing module is configured to, upon receiving the first type of transaction packet, write the first type of transaction packet into one of the plurality of storage queues according to the indication of the identifier carried by the first type of transaction packet; When the attribute information in the storage module determines that the first type of transaction packet in any storage queue meets the sending conditions, the first type of transaction packet that meets the sending conditions is converted into a first type of request and sent to the corresponding storage node.

2. The PCIe controller according to claim 1, characterized in that, The PCIe controller connects to multiple peripheral devices, and the multiple storage queues include a first storage queue and multiple second storage queues, with each of the multiple peripheral devices corresponding to one of the multiple second storage queues. The identifier includes a first identifier, which effectively indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets; The processing module is configured to write the first type of transaction packet into the first storage queue when the first identifier carried by the first type of transaction packet is valid; and to write the first type of transaction packet into the second storage queue corresponding to the peripheral device that issued the first type of transaction packet when the first identifier carried by the first type of transaction packet is invalid.

3. The PCIe controller according to claim 2, characterized in that, The processing module is used to determine, based on the attribute information in the storage module, whether the first type of transaction packets in the plurality of second storage queues meet the sending conditions; and when it is determined that the first type of transaction packets in the plurality of second storage queues do not meet the sending conditions, it determines that the first type of transaction packets in the first storage queue meet the sending conditions.

4. The PCIe controller according to claim 3, characterized in that, The identifier also includes a second identifier, which effectively indicates that the first type of transaction packet is allowed to be sent before other first type of transaction packets that come from different peripheral devices; When the processing module determines whether the first type of transaction packet in the second storage queue meets the sending conditions: When the second identifier carried by the first type of transaction packet is valid, it is determined whether the first type of transaction packet meets the first sub-condition based on the attribute information; the first sub-condition is: other first type of transaction packets that come from the same peripheral device as the first type of transaction packet and correspond to different storage nodes as the first type of transaction packet have all been processed; When the second identifier carried by the first type of transaction packet is invalid, it is determined whether the first type of transaction packet meets the second sub-condition based on the attribute information; the second sub-condition is: other first type of transaction packets corresponding to different storage nodes as the first type of transaction packet have been processed; The sending condition is met when the first type of transaction packet satisfies either the first sub-condition or the second sub-condition.

5. The PCIe controller according to claim 1, characterized in that, The storage module stores multiple sets of attribute information, each set of attribute information belonging to a first type of transaction package; Each set of attribute information includes the storage queue number to which the first type of transaction packet belongs and the storage node number corresponding to the first type of transaction packet; The processing module is further configured to, when sending the first type of request to the corresponding storage node, write the attribute information of the first type of transaction packet corresponding to the first type of request into the storage module; Upon receiving a response from the storage node corresponding to the first type of request, confirming that the first type of request has been processed by the storage node, clear the attribute information of the first type of transaction packet corresponding to the first type of request.

6. The PCIe controller according to claim 5, characterized in that, The PCIe controller also includes a counting module. The processing module is further configured to receive a second type of transaction packet and add a third identifier to each second type of transaction packet, wherein the second type of transaction packet is a PCIe transaction packet of type Completion; The third identifier indicates the order in which the second type of transaction packets are received; The counting module is used to record the sending count value and receiving count value corresponding to each third identifier, respectively. The sending count value is equal to the number of first-type requests that have been sent to the storage node and are corresponding to the third identifier, and the receiving count value is equal to the number of first-type requests that have been received and are corresponding to the third identifier. The processing module is further configured to, based on the attribute information in the storage module and the sending count value and receiving count value recorded by the counting module, determine that the second type of transaction packet meets the sending conditions, and then convert the second type of transaction packet into a second type of request before sending it.

7. The PCIe controller according to claim 6, characterized in that, The processing module is used for, The counting module identifies the send count value and receive count value corresponding to the third identifier of the second type of transaction packet; When the detected send count and receive count are equal, the second type of transaction packet is determined to meet the sending condition.

8. A chip, characterized in that, Includes the PCIe controller according to any one of claims 1-7.

9. An electronic device, characterized in that, Includes the chip described in claim 8.

10. A method for transmitting transaction packets, characterized in that, The method is applied to a PCIe controller, which includes multiple storage queues, storage modules, and processing modules. The multiple storage queues are used to store the first type of transaction packets, which are Posted type PCIe transaction packets. The sending conditions of the first type of transaction packets in different storage queues are different. The storage module is used to store attribute information, which belongs to a first type of transaction packet that has been converted into a first type of request and sent to the storage node connected to the PCIe controller, and the first type of request has not yet been processed by the storage node. The method includes: when the processing module receives the first type of transaction packet, it writes the first type of transaction packet into one of the plurality of storage queues according to the indication of the identifier carried by the first type of transaction packet; when the attribute information in the storage module determines that the first type of transaction packet in any storage queue meets the sending conditions, it converts the first type of transaction packet that meets the sending conditions into a first type of request and sends it to the corresponding storage node.