A method and apparatus for forwarding inter-core transactions
By determining the transaction data upon receiving data and directly writing it into the transmission buffer, the high forwarding latency between the I/O chip and the computing chip is solved, resulting in lower latency and power consumption.
Patent Information
- Application Number
- CN202611655186.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-26
- Publication Date
- 2026-11-24
AI Technical Summary
The problem of high forwarding latency between I/O chips and computing chips.
By determining the transaction data, including the target storage item corresponding to the target calculation chip and the transaction forwarding data, when the sending conditions are met, the transaction forwarding data is written to the target storage item and directly written to the sending temporary storage item, without going through the complete receiving buffer and intermediate transaction format buffer, thus reducing the repeated handling of data between multiple buffers.
It reduces forwarding latency, decreases the number of buffer accesses and power consumption, and improves data transmission efficiency.
Smart Images

Figure CN123157336A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of chip interconnect technology, specifically relating to a method and apparatus for inter-chip transaction forwarding. Background Technology
[0002] As semiconductor processes approach their physical limits, breaking down large system-on-a-chip (SoC) into multiple chips and integrating them through advanced packaging has become a crucial path for sustained performance improvements. In a packaged system consisting of I / O chips and at least two compute chips, the internal interface format between the I / O chips and each compute chip is determined by the same system design. The I / O chip provides an external PCIe (Peripheral Component Interconnect Express) port to connect to an external host, receiving request TLP (Transaction Layer Packet) data from the external host through this PCIe port. The I / O chip also provides an internal UCIe Streaming (Universal Chiplet Interconnect Express) port to connect to the compute chips, forwarding request transactions from the external host to one or more compute chips within the same package through this UCIe Streaming port, and generating completion TLP data conforming to the PCIe protocol based on the completion descriptor and completion data returned by the compute chips, returning it to the external host.
[0003] In related technologies, after an I / O chip receives request TLP data from an external host through a PCIe port, it first writes the request TLP data into a receive buffer. After the request TLP data reception is completed and the link integrity result is generated, the request TLP data in the receive buffer is read for header parsing and routing selection. Based on the parsing result, transaction forwarding data is generated and written into an intermediate transaction format buffer. The data in the intermediate transaction format buffer is read and assembled into streaming unit data for the inter-chip link, and written into a transmit buffer. The transmit buffer forwards the streaming unit data to one or more computing chips within the same encapsulation through a UCIe Streaming port, resulting in high forwarding latency. Summary of the Invention
[0004] The purpose of this application is to provide a method and apparatus for inter-chip transaction forwarding that can solve the problem of high forwarding latency.
[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide an inter-chip transaction forwarding method, including: Applied to input / output chips, wherein the input / output chips are connected to multiple computing chips, the method includes: Receive the data snapshot of the current transaction, and determine the routing data and the original context data based on the data snapshot; Based on the routing data, candidate storage items corresponding to the destination computing chip are determined, and target storage items corresponding to the destination computing chip are determined based on the candidate storage items; wherein, the candidate storage items include transmission temporary storage items; Based on the routing data and the original context data, transaction data is determined, including transaction forwarding data; Write the transaction forwarding data into the target storage item; When the sending conditions of the current transaction are met, the valid bit of the sending temporary item is set to valid, so that the data in the sending temporary item is sent to the destination computing chip; The sending conditions include at least the passing of the input link integrity determination for the current transaction.
[0006] Optionally, the target storage item further includes a shared buffer item; determining the target storage item corresponding to the target computing core based on the candidate storage items includes: When the direct write condition of the sending temporary item is met, the target storage item corresponding to the destination computing chip is determined to be the sending temporary item; Otherwise, before determining that the target storage item corresponding to the target computation kernel is a shared buffer item, and before setting the valid bit of the sending temporary storage item to be valid, the method further includes: reading the transaction forwarding data from the shared buffer item and writing it into the sending temporary storage item.
[0007] Optionally, the direct write conditions include: the destination port corresponding to the destination computing chip is active; the transmit buffer can accommodate all the transaction forwarding data; the sequence status item corresponding to the current transaction in the pre-configured sequence status table allows the current transaction to retain the transmit buffer; and the receive length of the current transaction does not exceed the maximum payload data length recorded in the target capability table of the pre-configured destination computing chip and the locally configured upper limit.
[0008] Optionally, the transaction forwarding data includes an internal transaction descriptor, the internal transaction descriptor includes a context token, the transaction data also includes context data corresponding to the context token, and the method further includes: Receive initial completion data returned by the target computing core after it has executed the transaction forwarding data, the initial completion data including a context token; Based on the initial completion data and the context data that matches the context token in the initial completion data, destination completion data is generated and returned via an external link.
[0009] Optionally, the input link integrity determination is made through the following steps: Based on the transmission mode of the current transaction, create a corresponding integrity association identifier for the current transaction; When the transmission mode is a non-streaming transmission mode, the integrity association identifier includes the receive record identifier corresponding to the current transaction. When the cyclic redundancy check result of the link corresponding to the receive record identifier indicates that the input link integrity determination has passed; When the transmission mode is streaming mode, the integrity association identifier includes all receiving streaming unit identifiers that carry the current transaction. When the integrity results corresponding to all receiving streaming unit identifiers indicate that the input link integrity determination is passed.
[0010] Optionally, the transaction data includes context data, which includes input integrity association data and domain sequence numbers. The method further includes: When the input link integrity determination fails, the input integrity associated data is obtained, the context data is matched according to the input integrity associated data, and the valid state of the corresponding storage item in the target storage item is cleared on the same clock edge, the context data is set to the invalid and pending release state, and the in-domain sequence number is set to the cancellation flag.
[0011] Optionally, the sending conditions further include: the destination port corresponding to the destination computing chip is active, the transaction forwarding data is written, the order arbitration corresponding to the current transaction is allowed, the end-to-end verification corresponding to the current transaction is passed, and the adapter between the input / output chip and the destination computing chip is ready to receive.
[0012] Optionally, the method further includes: When the service idle condition of the destination port corresponding to the destination computing chip is met, and the low power request enable flag of the adapter between the input / output chip and the destination computing chip is valid, a low power request is sent to the adapter. After confirming that the adapter has entered the gating-enabled state, the clock of the data path of the destination port is gating.
[0013] Optionally, the service idle conditions include zero transactions waiting for the input link integrity determination result, no occupied and unreleased temporary items in the sending temporary items, and no pending wake-up requests at the destination port.
[0014] Secondly, embodiments of this application provide an inter-core transaction forwarding device applied to input / output cores, wherein the input / output cores are connected to multiple computing cores, and the device includes: The data extraction module is used to receive the data snapshot of the current transaction and, based on the data snapshot, determine the routing data and the original context data. A storage item determination module is used to determine, based on the routing data, a candidate storage item corresponding to the destination computing chip, and based on the candidate storage items, a target storage item corresponding to the destination computing chip; wherein, the candidate storage items include a transmission temporary storage item; The transaction data determination module is used to determine transaction data based on the routing data and the original context data, wherein the transaction data includes transaction forwarding data; The data writing module is used to write the transaction forwarding data into the target storage item; The data sending module is used to enable the valid bit of the sending temporary item when the sending conditions of the current transaction are met, so that the data in the sending temporary item is sent to the destination computing chip. The sending conditions include at least the passing of the input link integrity determination for the current transaction.
[0015] The inter-chip transaction forwarding method provided in this application has the following beneficial effects: This application determines the transaction data upon receiving the current transaction's data snapshot. The transaction data includes the target storage item corresponding to the destination computing chip and the transaction forwarding data. Before the sending conditions are met, the transaction forwarding data is written into the target storage item. When the sending conditions are met, the valid bit of the sending temporary storage item is set to valid, allowing the data in the sending temporary storage item to be sent to the destination computing chip. The sending conditions at least include passing the input link integrity determination of the current transaction. This achieves parsing, routing, and writing before the integrity result is confirmed, and submission for sending after the integrity result is confirmed, resulting in low forwarding latency. Furthermore, the transaction forwarding data is directly written into the sending temporary storage item without going through the complete receive buffer and intermediate transaction format buffer, reducing repeated data transfer between multiple buffers, thereby reducing the number of buffer accesses and power consumption, and further reducing forwarding latency.
[0016] Furthermore, when the direct write condition is met, the transaction forwarding data is directly written to the sending temporary item without going through the complete receive buffer and intermediate transaction format buffer, which reduces the repeated handling of data between multiple buffers, thereby reducing the number of buffer accesses and power consumption, and further reducing forwarding latency. Attached Figure Description
[0017] Figure 1 A schematic flowchart of an embodiment of the inter-chip transaction forwarding method provided in this application; Figure 2 A schematic diagram of module connection relationships for an embodiment of the inter-chip transaction forwarding system provided in this application; Figure 3 This is a schematic diagram of an embodiment of the inter-chip transaction forwarding device provided in this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0020] The inter-chip transaction forwarding method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0021] Figure 1 This is a flowchart illustrating an inter-core transaction forwarding method provided in an embodiment of this application. The inter-core transaction forwarding method is applied to input / output cores, where the input / output cores are connected to at least two computing cores, such as... Figure 2As shown, the input / output core includes a PCIe link receiving and TLP output module, a selective TLP header parsing module, a fast path condition determination module, a transaction context management module, a routing module, a centralized shared payload buffer and bypass selection module, a UCIeStreaming Flit assembly and transmission buffer module, a TLP generation module, a sequence and flow control module, a power consumption control module, and an input / output core local PCIe processing module. The input / output core connects to an external host via an external PCIe link and connects to multiple compute cores (e.g., compute core A and compute core B) via UCIe Streaming ports, with each compute core having a unique UCIe Streaming port. Each UCIe Streaming Flit assembly and transmission buffer module connects to the corresponding UCIe D2D (Die-to-Die) adapter and physical layer; each compute core has an internal transaction receiving adapter and connects to the input / output core via the corresponding UCIe D2D adapter. In use, the input / output core receives the request TLP transmitted through the external PCIe link via the PCIe link and then determines the transaction forwarding data and converts it into UCIe Streaming Flit form, and forwards it to the computing core through the UCIe Streaming port.
[0022] The methods include: Step 101: Receive the data snapshot of the current transaction, and determine the routing data and context raw data based on the data snapshot; Specifically, the external link between the host and the input / output kernel uses the PCIe protocol. The external host sends a Request for Proposal (TLP) to the input / output kernel via the PCIe link. This TLP includes one or more data packets of the current transaction. The TLP carries access semantics, including header data, payload data, and an optional end-to-end checksum. The header data includes: format and type, describing whether the current transaction is a read or write request; data length; address or routing information of the destination compute kernel; requester identifier; transaction tag; byte enable; transaction category, describing the priority of the current transaction; and transaction attributes, describing the order requirements of the current transaction. The payload data is the actual data carried by the TLP. When the transaction is a read request, the payload data is empty; when the transaction is a write request, the payload data is the data to be written to the destination compute kernel. The end-to-end checksum is used for end-to-end verification to determine whether the entire path from the external host to the destination compute kernel is error-free.
[0023] Correspondingly, each data frame includes at least a header data frame. The PCIe link receiving and TLP output modules receive the header data frames from the external PCIe link, completing physical layer decoding and data link layer receiving processing. When receiving the header data frames, the selective TLP header parsing module identifies the TLP format and type, extracting from the 3- or 4-word headers and supported TLP prefixes: routing data (address, destination identifier, TLP type, etc.) and raw context data (requester identifier, tag, service category, attributes, byte enable, length, order attributes, etc.). At this point, the input integrity result has not yet been generated; the parsing result serves as a candidate result, used only for subsequent route calculation, context pre-allocation, payload storage item selection, and port wake-up, and does not trigger UCIe transmission.
[0024] In some embodiments, the data frame also includes a payload data frame. When receiving the payload data frame, the selective TLP header parsing module disables header field comparison and decoding enable, and only updates the length count, TLP boundary, and input link integrity association status. Thus, the selective TLP header parsing module enables the decoding circuitry of necessary fields only when receiving the TLP header data frame, and disables these decoding circuitry when receiving the payload data frame, reducing the field comparison and control signal toggling that occur as the payload data length increases.
[0025] Through the above steps, the parsing and extraction of routing data and transaction forwarding data are performed as soon as the data is received, without having to wait for the entire transaction to be received or for the input integrity result to be generated.
[0026] Step 102: Based on the routing data, determine the candidate storage items corresponding to the destination calculation core. The candidate storage items include the transmission temporary storage items. In some embodiments, step 102 includes: querying a pre-configured routing table based on routing data to determine candidate storage items corresponding to the destination computational core, wherein the candidate storage items include a transmission temporary item and a shared buffer item.
[0027] Specifically, the routing module calculates candidate destination UCIe ports and destination compute kernels according to configured matching terms. Matching terms include address ranges, TLP types, or destination identifiers. When multiple matching terms match, a unique candidate destination port is output according to the configured priority. An entry in the routing table includes a matching type, matching value and mask, destination compute kernel identifier, destination UCIe port, and destination interface identifier. Address routing is used for memory read / write and atomic transactions; identifier routing is used for configuring, completing, or explicitly identifying destination identifier transactions; type routing is used to direct message transactions or management transactions to the destination port specified in the routing table. When a transaction carries an explicit destination identifier and matches an address range, the routing module selects a result according to the configured priority and writes the chosen matching type into the context. During routing table updates, already allocated contexts retain the original destination result, and newly arriving transactions use the updated routing table entry to avoid inconsistencies between the request sending path and the completion return path for the same incomplete transaction.
[0028] Each destination UCIe port is pre-configured with a corresponding transmit buffer; the shared buffer is a centralized shared payload buffer within the input / output kernel, which can be shared by each destination port and local processing. After the routing module determines the destination port, the transmit buffer and shared buffer corresponding to that destination port become candidate storage items for the current transaction. Here, the destination computation kernel refers to the computation kernel to which the current transaction needs to be forwarded; the transmit buffer is the last level of storage set in the input / output kernel before the data to be sent is sent to the destination computation kernel; the shared buffer is a centralized shared payload buffer set in the input / output kernel, used for transactions with insufficient transmit buffer space, unrecovered destination ports, or requiring local processing.
[0029] Step 103: Based on the candidate storage items, determine the target storage item corresponding to the target computing core; In some embodiments, step 103 includes the following sub-steps: Sub-step S11: Determine whether the current transaction is eligible for internal mapping. If the current transaction is eligible for internal mapping, determine whether the direct write condition for sending the temporary item is met. If the current transaction is not eligible for internal mapping, determine that the target storage item corresponding to the purpose calculation of the current transaction is a shared buffer item. Specifically, the fast path condition determination module determines the eligibility of internal mapping based on the parsing results, the target capability table, and the unique valid route. The target capability table calculates at least one of the following for each destination: the internal transaction descriptor version, supported TLP types, maximum payload length, and port operating status. The unique valid route refers to the route module querying the routing table based on the routing data; when multiple matches are found simultaneously, a unique candidate destination port is output according to the configured priority. If no route is found or a unique candidate destination port cannot be output, a unique valid route is not constituted.
[0030] Internal mapping eligibility includes: the target capability table indicating that the destination computation kernel supports the internal descriptor format, the TLP type and optional prefix being in the supported set, and the routing module outputting a unique candidate destination port. If all of the above conditions are met, the current transaction is determined to be eligible for internal mapping and registered as a fast path candidate; otherwise, it is registered as a local processing candidate and does not have internal mapping eligibility.
[0031] If the current transaction is eligible for internal mapping, it is registered as a fast path candidate. Its candidate storage item is pending, and the candidate storage item will be determined as a send temporary item or a shared buffer item based on the direct write conditions.
[0032] If the current transaction does not qualify for internal mapping, it is registered as a local processing candidate. Its candidate storage item is fixed as a shared buffer item, and it is not allocated a send temporary item for the destination port, nor does it participate in the direct write condition judgment of the send temporary item.
[0033] For transactions registered as local processing candidates, the transaction context management module allocates a context entry, writes the payload to a centralized shared buffer, and does not allocate a send buffer for the destination port. The context entry stores the sequence field, the sequence number within the field, input link integrity association information, and the shared buffer index. Only after input link integrity is verified is the confirmed transaction, its context index, error status, and shared buffer index handed over to the input / output kernel local PCIe processing module, and the commit flag for the corresponding sequence number within the field is set. The input / output kernel local PCIe processing module reads the payload required for the local transaction from the shared buffer according to the transaction type, or releases send buffers or shared buffers that do not need to be read according to PCIe error handling rules. When a completion TLP needs to be generated, this module hands over the completion status and data to the completion TLP generation module; when a completion TLP does not need to be generated, the local processing queue entry is released after the local transaction operation, error recording, or protocol-specified discarding process is completed. For confirmed transactions that have failed due to route miss, unsupported prefix, target capability mismatch, incorrect format, inconsistent length, or ECRC (End-to-End Cyclic Redundancy Check), they are processed in the local PCIe processing module of the input / output chip according to the PCIe transaction type and error reporting rules, generating corresponding statuses such as Unsupported Request (UR) or executing error reports.
[0034] It should be noted that the local processing candidate does not generate an internal transaction descriptor, and its transaction forwarding data is written to the shared buffer. After the input link integrity is passed, the context index and shared buffer index of the local processing candidate are handed over to the local PCIe processing module of the input / output chip. When the local processing candidate is received by the local PCIe processing module, the commit flag of the corresponding domain sequence number is set. The local PCIe processing module reads the payload in the shared buffer and performs local processing. It is not necessary to move the payload to the transmit buffer.
[0035] In sub-step S12, if the direct write condition for sending the temporary item is met, then the target storage item corresponding to the purpose calculation of the current transaction is determined to be the temporary item for sending; if the direct write condition for sending the temporary item is not met, then the target storage item corresponding to the purpose calculation of the current transaction is determined to be the shared buffer item. In some embodiments, the direct write conditions include: the destination port corresponding to the destination computing chip is active; the transmit buffer can accommodate all transaction forwarding data; the sequence status entry corresponding to the current transaction in the pre-configured sequence status table allows the retention of the transmit buffer for the current transaction; and the receive length of the current transaction does not exceed the maximum payload data length recorded in the pre-configured target capability table of the destination computing chip and the locally configured upper limit. Here, the receive length is the data length of the current transaction received by the input / output chip from the external link.
[0036] Specifically, the fast path condition determination module determines the eligibility of internal mapping based on the parsing results, the target capability table, and the unique valid route; when the direct write condition is met, it determines the target storage item corresponding to the current transaction as a send temporary item; when the direct write condition is not met, it determines the target storage item corresponding to the current transaction as a shared buffer item.
[0037] Sub-step S13: If the transaction admission conditions of the current transaction are met, the target storage item is latched for subsequent writing; if the transaction admission conditions of the current transaction are not met, the current transaction is pushed back and no further writing is allowed.
[0038] In some embodiments, transaction admission conditions are used to determine whether the current transaction can actually enter the subsequent level and write to the target storage item, including: context item allocation, sequence status item allocation, target storage item allocation, and resource allow signal being valid.
[0039] Specifically, the sequence status table is maintained by the sequence and flow control module, storing a validity flag, path identifier, commit flag, completion flag, and cancellation flag for each unreclaimed in-domain sequence number. The commit, completion, and cancellation flags are cleared when the sequence status table is allocated. After the integrity results of all input links associated with the transaction have passed, the commit flag of the corresponding in-domain sequence number is set. Successive commit sequences are checked sequentially starting from their successor, advancing only along consecutive in-domain sequences where the commit or cancellation flag is already set; consecutive completion sequences are checked sequentially starting from their successor, advancing only along consecutive in-domain sequences where the completion or cancellation flag is already set; sequence status items are reclaimed after consecutive completion sequences cross the corresponding in-domain sequence number. Entries where the commit flag is already set or has been received by the local processing module must not be converted to a cancellation flag. When both a commit candidate and unified failure control appear simultaneously on the same clock edge, unified failure control takes priority, the cancellation flag is set, and the commit flag remains cleared; for consecutive boundaries, only the status updated by that clock edge is read.
[0040] The success of allocating a sequence number within the domain for the current transaction is determined by the Sequence and Flow Control module. During allocation, the Sequence and Flow Control module clears the commit, completion, and cancellation flags. The sequence arbiter within the Sequence and Flow Control module determines whether a subsequent transaction can be sent or enter local processing based on applicable PCIe ordering rules, transaction type, order attributes in the context, and contiguous boundaries; it blocks subsequent transactions only if the corresponding ordering rule prohibits crossing it. The allocation of a sequence number within the domain for the current transaction is successful when there is an allocatable entry in the order status table and the sequence arbiter allows the reservation of the order status entry for the transaction.
[0041] The resource permission signal corresponding to the current transaction is generated by the Sequence and Flow Control module based on the resource status of the context table, sequence status table, shared buffer entries, and transmit buffer entries. When there are no allocable entries in the context table or sequence status table, the shared buffer entries or transmit buffer entries reach the reservation threshold, the D2D adapter on the destination port is not ready to receive, or the sequence field is blocked, the Sequence and Flow Control module outputs a backpressure indication to the PCIe link receive and TLP output module, restricting it from continuing to deliver new transactions to the subsequent stage.
[0042] When transaction admission conditions are not met, no transaction admission permission signal is generated, restricting new transactions from entering subsequent stages and preventing the writing of transaction forwarding data. Insufficient resources only prevent new transactions from being admitted, without changing the internal mapping eligibility. When the transaction admission permission signal is valid, the path and storage item index are latched, and the first payload data is only written after latching; when subsequent order arbitration, port status, D2D adapter receive ready, or transmit resources are not yet met, the payload data remains in the already selected storage item and is not migrated between the two paths.
[0043] If the transaction admission conditions are met, the sequence and flow control module generates a transaction admission permission signal; the transaction context management module pre-allocates context items and generates context tokens at the same time, the sequence and flow control module allocates sequence status items, and the fast path condition determination module latches the payload path, target storage item, and storage item index. The first payload data cycle is only written after latching is completed, and subsequent data cycles must not change the path. If the transaction admission conditions are not met, back pressure is applied, and transaction forwarding data is not written; insufficient resources only prevent new transaction admissions, without changing the internal mapping eligibility.
[0044] It's important to note that direct write conditions are used to determine candidate payload paths before transaction admission; the final target store and its index are latched when the transaction admission permission signal is valid. Insufficient resources only prevent new transaction admissions; they do not change the eligibility of internal mappings.
[0045] PCIe input-side credits are used only for PCIe link receive flow control and are not converted to D2D adapter receive-ready status. Before receiving a payload TLP, local resources must be able to retain all descriptors and payload data generated before input integrity verification. Relying on mid-transmission backpressure of the TLP to avoid temporary overflow is prohibited.
[0046] Step 104: Based on the routing data and the original context data, determine the transaction data, which includes transaction forwarding data, and write the transaction forwarding data into the target storage item; In some embodiments, the transaction data further includes context data, and the transaction forwarding data includes an internal transaction descriptor, which includes a context token corresponding to the context data.
[0047] Specifically, based on the original context data, the transaction context management module pre-allocates context items for the current transaction, establishes context data, and assigns the corresponding context tokens.
[0048] Context data includes source and return association fields, transaction semantic fields, destination and routing fields, sequence control fields, payload and integrity status fields, and lifecycle fields. The source and return association fields include the source PCIe port, requester identifier, and tag, used to form a completion TLP and select the return port; these fields must not be released before the non-delivery request is completed. Transaction semantic fields include format / type, length, first / last double-byte enable, service category, attribute, and poisoning status, used to generate the target-side internal request and provide the fields required to generate the PCIe completion TLP when calculating the core return completion descriptor. The destination and routing fields include the destination core, UCIe port, target interface, and address or target identifier, used to select candidate assemblers and destination adapters; in case of routing failure, allocating fast path send buffers and committing UCIe send are prohibited. The sequence control fields include the sequence field identifier, domain sequence number, path identifier, and sequence status item index, used to associate the transaction context of fast path candidates or local processing candidates; after a local processing candidate is received, it continues to be associated with a local processing queue item. Record the commit, completion, or cancellation status, and restrict subsequent transactions in two processing paths from bypassing earlier transactions that have not yet completed the commit determination, according to applicable PCIe ordering rules. Payload and integrity status fields include shared buffer index or transmit temporary item index, write length, TLP end status, input link integrity association information, link cyclic redundancy check (LCRC) or receive PCIe Flit integrity result, end-to-end cyclic redundancy check (ECRC) result, and segment count, used to select direct write or shared buffer read, associate receive record identifiers in non-Flit mode or all receive PCIe Flit identifiers carrying the same TLP content in Flit mode, and determine whether the transmit commit condition is met. Lifecycle fields include valid, pre-allocated, uncommitted, committed, sent, received, canceled, completed, and error states. When input link integrity fails, the valid state of the associated payload storage item is cleared on the same clock edge, the context is set to invalid and pending release, and the cancellation flag is set for the sequence number in the corresponding uncommitted field. After the cancellation flag is set and the wake-up request generated by the transaction is cleared, the context valid state is cleared again. The cancellation state is not used for transactions that have already been received by UCIe or the local PCIe processing module of the input / output chip.
[0049] Next, the transaction context management module generates an internal transaction descriptor based on routing data, raw context data, and a context token. The internal transaction descriptor includes at least one of the following: context token, transaction type, target interface, payload length, address or target identifier, byte enable, order attribute, and error status. The context token is sent to the destination computation kernel along with the internal transaction descriptor and is carried by the returned completion descriptor, enabling the completion TLP generation module to recover the original request information within the input / output kernel. If the transaction admission conditions are met, the order and flow control module generates a transaction admission permission signal; simultaneously, the transaction context management module pre-allocates context items and generates context tokens, while also latching the target storage item and its index. This step generates the internal transaction descriptor based on the pre-allocated context.
[0050] The internal transaction descriptor and subsequently received payload data are used as the transaction forwarding data for the current transaction. The internal transaction descriptor and context token are determined before the payload data arrives. If the target store is a send buffer, the internal transaction descriptor, context token, and payload data are written to the send buffer according to the Flit position. If the target store is a shared buffer, only the payload data is written to the centralized shared buffer, and the internal transaction descriptor and context token are stored in the transaction context and not written to the shared buffer. After the sending conditions are met, the payload data is read from the shared buffer, and the UCIe Streaming Flit assembly and send buffer module combines the internal transaction descriptor and context token in the transaction context to assemble the Streaming Flit, writes it to the send buffer, and then sends it.
[0051] It is important to note that for transaction forwarding data to be written to the target storage item, the following conditions must be met: the transaction admission permission signal is valid, the path and storage item index are latched, and the first payload data beat has arrived. Payload data beat reception begins after the header data beat and can proceed in parallel with internal mapping eligibility, direct write conditions, and transaction admission determination. However, the first payload data beat must be written only after the transaction admission permission signal is valid and the path and storage item index are latched. Subsequent payload data beats are written according to the latched path and must not change the path. Context data creation, context token allocation, and internal transaction descriptor generation are completed when the transaction admission permission signal is valid, without waiting for all payload data to be received. If the current transaction is a read request and the payload data is empty, the transaction forwarding data only includes the internal transaction descriptor carrying the context token, excluding the payload data.
[0052] Specifically, if the target storage item is a transmit buffer, the UCIe Streaming Flit assembly and transmit buffer module writes the internal transaction descriptor, context token, and payload data to the transmit buffer according to the Flit position. If the target storage item is a shared buffer, the centralized shared payload buffer and bypass selection module only writes the payload data to the centralized shared buffer. The internal transaction descriptor and context token are stored in the transaction context. After the transmit conditions are met, the payload data is read from the shared buffer and sent to the UCIe Streaming Flit assembly and transmit buffer module. This module assembles the descriptor, context token, and payload data into a Streaming Flit based on the internal transaction descriptor and context token in the transaction context before transmitting. The internal transaction descriptor and context token are determined before the payload data arrives. For transmit buffer paths, the payload data is written to the transmit buffer according to the determined Flit position after the payload data arrives. For shared buffer paths, the payload data is written to the shared buffer according to the determined buffer position after the payload data arrives.
[0053] The internal transaction descriptor is written to the payload field of the UCIe Streaming Flit, without occupying or rewriting the link fields defined by the UCIe D2D adapter. The first temporary Flit follows the descriptor immediately after the first original TLP payload segment, and each subsequent temporary Flit carries a context token and segment sequence number. All temporary Flits corresponding to a TLP remain uncommitted until the TLP ends and all its input link integrity association results have passed; after commit, the destination computation core reassembles the payload based on the context token and segment sequence number.
[0054] It should also be noted that the send buffer refers to the last level of storage set in the input / output kernel before the data to be sent to the destination computation kernel. The valid bit is a status bit in the send buffer used to indicate whether the stored data is allowed to be sent. When the valid bit is invalid, the data in the send buffer remains in an uncommitted state and is not sent to the destination computation kernel; when the valid bit is valid, the data in the send buffer is allowed to be sent to the destination computation kernel. Data in other storage items needs to be moved to the send buffer before being sent. By writing transaction forwarding data directly into the send buffer when the conditions are met, without going through the complete receive buffer and intermediate transaction format buffer, there is no need for repeated handling between multiple buffers; even when writing to a shared buffer, only one handling is required.
[0055] Step 105: When the sending conditions of the current transaction are met, the valid bit of the sending temporary item is set to valid so that the data in the sending temporary item is sent to the destination computing chip. The sending conditions include at least the passing of the input link integrity determination of the current transaction.
[0056] Specifically, when the sending conditions of the current transaction are met, the UCIe Streaming Flit assembly and sending buffer module sets the valid bit of the sending buffer item to be valid, so that the data in the sending buffer item is sent to the destination computing chip.
[0057] In some embodiments, if the target storage item corresponding to the target computation kernel is a shared buffer item, then when the sending conditions are met, the payload data is read from the shared buffer item, and the UCIe Streaming Flit assembly and sending buffer module combines the internal transaction descriptor and context token in the transaction context to assemble the descriptor, token and payload data into a Streaming Flit and write it into the sending buffer item, and then set the valid bit of the sending buffer item to be valid.
[0058] Specifically, if the target storage item corresponding to the target computation kernel is a shared buffer item, then when the sending conditions are met, the centralized shared payload buffer and bypass selection module reads the transaction forwarding data from the shared buffer item and writes it into the sending temporary storage item. Then, the UCIe Streaming Flit assembly and sending temporary storage module sets the valid bit of the sending temporary storage item to be valid.
[0059] In some embodiments, the input link integrity determination is made through the following sub-steps: Sub-step S21: Based on the current transaction's transmission mode, create a corresponding integrity association identifier for the current transaction.
[0060] Specifically, the data snapshot also includes verification data. When the PCIe link receiving and TLP output modules receive the data snapshot from the external PCIe link, they also acquire the verification data for the current transaction. This verification data is used to subsequently determine whether the integrity judgment of the input link for the current transaction has passed. Since the data unit format carrying the current transaction differs under different transmission modes, it is necessary to first determine the corresponding integrity association identifier based on the transmission mode so that the verification data can be associated with the data unit carrying the current transaction later.
[0061] In sub-step S22, when the transmission mode is non-stream transmission mode (i.e., non-Flit mode), the integrity association identifier includes the receiving record identifier corresponding to the current transaction. When the link cyclic redundancy check result corresponding to the receiving record identifier indicates that it has passed, the input link integrity determination is determined to be passed.
[0062] Specifically, the verification data is the Link Cyclic Redundancy Check (LCRC) result in non-streaming mode, and the integrity result corresponding to all received streaming unit identifiers carrying the current transaction in streaming mode.
[0063] When the current transaction is in non-streaming mode, the PCIe link receive and TLP output modules assign an internal receive record identifier to each receive TLP, storing its data link layer sequence number and link cyclic redundancy check (LCRC) result. The PCIe link receive and TLP output modules determine the link cyclic redundancy check result corresponding to the receive record identifier based on the check data. If the link cyclic redundancy check result indicates success, the integrity determination of the input link corresponding to the check data is confirmed to be successful. Thus, in non-streaming mode, by associating the TLP with its data link layer sequence number and LCRC result through the receive record identifier, the transaction is only allowed to forward data and submit for transmission after the entire TLP has been correctly received on the PCIe input link, preventing unacknowledged transactions from being observed by the destination compute chip.
[0064] In sub-step S23, when the transmission mode is streaming transmission mode (i.e., Flit mode), the integrity association identifier includes all received streaming unit identifiers carrying the current transaction. When the integrity results corresponding to all received streaming unit identifiers indicate that they have passed, the input link integrity determination is determined to be passed.
[0065] Specifically, in non-Flit mode, the receive record identifier is recorded; in Flit mode, one or more receive PCIe Flit identifiers carrying the TLP content are recorded. When a receive PCIe Flit carries multiple TLP contents, each related uncommitted context stores the Flit identifier. Before all association results are valid and pass, the aforementioned data sessions are in an uncommitted state and UCIe transmission cannot be triggered directly. That is, in streaming mode, a TLP may span multiple PCIe Flits, therefore, all receive PCIe Flit identifiers carrying the same TLP content need to be associated. Only when the integrity results corresponding to these identifiers all pass can the input integrity of the current transaction be determined to be successful. When a receive PCIe Flit carries multiple TLP contents, each related uncommitted transaction context stores the receive PCIe Flit identifier; before all association integrity results pass, the corresponding data sessions remain uncommitted and UCIe transmission cannot be triggered.
[0066] When the current transaction is in streaming mode, the PCIe link receive and TLP output modules perform forward error correction, CRC (Cyclic Redundancy Check) checks, and corresponding replay control on each received PCIe Flit, and output the received PCIe Flit identifier and its integrity result. When a TLP spans multiple PCIe Flits, the PCIe link receive and TLP output modules obtain all received streaming unit identifiers carrying the current transaction, determine the integrity result corresponding to all received streaming unit identifiers based on the verification data, and determine that the input link integrity judgment corresponding to the verification data is passed when the integrity results corresponding to all received streaming unit identifiers indicate that they have passed. Thus, in streaming mode, by associating all received PCIe Flit identifiers carrying the same TLP content with the input integrity results, it is ensured that even if the TLP spans multiple Flits, it can still be completely verified. Only after all associated results pass is the transaction forwarding data submission allowed, avoiding the mistaken sending of unconfirmed transactions to the destination computing chip when some Flits fail to be received.
[0067] Specifically, by using the above-mentioned input link integrity determination, the valid bit of the sent temporary item is only set to valid after all input link integrity results carrying the current transaction have passed. This ensures that while parsing, routing, and writing are completed in advance, the destination computing chip only observes transactions that have been confirmed by the PCIe input link.
[0068] In some embodiments, the context data includes input integrity association data and a domain sequence number, and the method further includes: When the input link integrity check fails, the context data is matched based on the input integrity associated data. On the same clock edge, the valid state of the corresponding storage item in the target storage item is cleared, the context data is set to an invalid pending release state, and the cancellation flag is set for the domain sequence number. Specifically, the cancellation flag is only set for domain sequence numbers whose commit flag has not yet been set and have not yet been received by the local PCIe processing module. When both a commit candidate and unified failure control appear simultaneously on the same clock edge, unified failure control takes priority, setting the cancellation flag while keeping the commit flag cleared. When input integrity fails, the transaction context management module, payload storage module, and sequence and flow control module atomically update the associated state on the same clock edge; continuous commit boundaries and continuous completion boundaries only read the state updated on that clock edge.
[0069] Specifically, if any input link integrity result fails, the transaction context management module matches one or more uncommitted contexts according to the received record identifier or received PCIe Flit identifier that failed or entered the replay range; unified failure control clears the valid state of the corresponding transmit temporary item and shared buffer item on the same clock edge, sets the context to the failed pending release state, and sets the cancellation flag for the sequence number in the corresponding uncommitted field.
[0070] When a link error triggers replay, in non-Flit mode, the PCIe link receive and TLP output modules determine the receive record identifier within the replay range based on the data link layer sequence number. In Flit mode, the PCIe link receive and TLP output modules determine the affected receive streaming cell identifier based on the failed or entered replay range PCIe Flit identifier. The transaction context management module matches these identifiers with the relevant uncommitted contexts and uniformly invalidates their payload storage items and cancels their domain sequence numbers. After replay, the re-arriving TLP reassigns the receive record identifier and domain sequence number and re-establishes the input integrity association. Thus, when the input link integrity judgment fails or a link replay occurs, uncommitted contexts and storage items can be cleared in a timely manner, preventing unconfirmed transactions from being sent to the destination computing chip.
[0071] In some embodiments, the sending condition refers to the condition that allows data in the sending staging item to be committed to the destination computing kernel. Before the sending condition is met, the data in the destination staging item remains uncommitted and is not sent to the destination computing kernel; only when the sending condition is met is the data in the sending staging item sent to the destination computing kernel. The sending condition includes at least the passing of the input link integrity check for the current transaction.
[0072] The sending conditions also include: the destination port corresponding to the destination compute chip is active, transaction forwarding data writing is complete, the order arbitration corresponding to the current transaction is allowed, the end-to-end verification corresponding to the current transaction passes, the adapter between the input / output chip and the destination compute chip is ready to receive data, and the sending buffer resources are available. The availability of sending buffer resources means that the sending buffer can retain all uncommitted Flits corresponding to the transaction.
[0073] The following are key points regarding transaction forwarding and data access: "Destination port is active" means that after the routing module determines the destination computing chip based on routing data, the power control module detects that the destination port corresponding to that chip is not in a low-power or recovery state. "Transaction forwarding data write complete" means that the fast path condition determination module confirms that the transaction forwarding data and the payload data from the write request have been written to the transmit buffer or shared buffer according to the latched path, and the write length is consistent with the data length in the header data. "Order arbitration allowed for the current transaction" means that the order arbitrator in the order and flow control module determines that the current transaction is not blocked by a preceding transaction based on applicable PCIe order rules, transaction type, order attributes in the context, and contiguous boundaries. "End-to-end verification passed for the current transaction" means that the fast path condition determination module confirms that the current transaction passes the ECRC (End-to-End Cyclic Redundancy Check) result when needed. "D2D adapter ready to receive" means that the UCIe D2D adapter has reported to the input / output chips that it can receive transaction forwarding data.
[0074] Specifically, the commit signal is generated after the TLP ends. The fast path condition determination module summarizes all input link integrity results associated with this TLP and checks the optional ECRC, format, and length. The input link integrity results are provided by the PCIe link receive and TLP output module: in non-Flit mode, this module assigns an internal receive record identifier to each receive TLP, saves its data link layer sequence number and LCRC result, and uses the LCRC result as the input link integrity result; in Flit mode, this module performs forward error correction, CRC check, and corresponding replay control for each receive PCIe Flit, and outputs the receive PCIe Flit identifier and its integrity result.
[0075] It should be noted that CRC and retries on the UCIe link are handled by the D2D adapter. When the adapter reports an unrecoverable error, the link resets, or the link with the destination compute core fails, the transaction context management module iterates through the still valid unaffected context entries and generates a completed TLP with error status according to the PCIe transaction type, reports an uncorrectable error, or executes a software configuration recovery procedure. Delivery write contexts released after the FDI (Flit-level Data Interface) handshake are not re-established; subsequent unrecoverable link failures are recorded by port-level error status.
[0076] In some embodiments, the method further includes: When the input link integrity result passes, the ECRC result passes, the descriptor and payload data of the specified length are written, sequential arbitration is allowed, the destination port corresponding to the destination computation kernel is active, the D2D adapter is ready to receive, and the transmit buffer resources are available, the fast path condition determination module generates a transmit commit signal. After the transmit commit signal is valid, the UCIe Streaming Flit assembly and transmit buffer module sets the output of a valid signal to the UCIe D2D adapter and sequentially transmits transaction forwarding data containing the internal transaction descriptor, context token, and payload data segment.
[0077] Specifically, if the input link integrity passes but the ECRC result fails, the fast path condition determination module prohibits fast path submission and hands over the confirmed TLP context index, error status, and payload data storage index to the input / output chip local PCIe processing module.
[0078] In some embodiments, the method further includes: If the input link integrity passes but the ECRC result fails, fast path commit is disabled, and the context index, error status, and payload data storage index of the confirmed TLP are handed over to the local PCIe processing module of the input / output chip. Transactions that pass the input link integrity but fail the ECRC result are processed according to the local processing rules and the cancellation flag is not set. If the destination port conditions, adapter receive ready, transmit temporary resources, or sequence conditions are not yet met, the transmit commit signal remains invalid, and the transaction forwarding data is retained in the already selected storage item and is not migrated between the two paths.
[0079] Compared with the prior art, this application determines the transaction data when receiving the data of the current transaction. The transaction data includes the target storage item corresponding to the destination computing chip and the transaction forwarding data. Before the sending conditions are met, the transaction forwarding data is written into the target storage item. When the sending conditions are met, the valid bit of the sending temporary item is set to be valid, so that the data in the sending temporary item is sent to the destination computing chip. The sending conditions include at least the passing of the input link integrity judgment of the current transaction. This enables parsing, routing and writing to be completed in advance before the integrity result is confirmed, and the sending is submitted after the integrity result is confirmed, resulting in low forwarding latency.
[0080] Furthermore, when the direct write condition is met, transaction-forwarded data is directly written to the send buffer without passing through the full receive buffer and intermediate transaction format buffer. When the direct write condition is not met, the data is written to the shared buffer. Once the send condition is met, the data is read from the shared buffer and written to the send buffer. Neither path requires copying the transaction-forwarded data to a second full transaction buffer, reducing redundant data movement between multiple buffers, thereby reducing the number of buffer accesses and power consumption, and further reducing forwarding latency.
[0081] In some embodiments, after step 105, the method further includes the following sub-steps: Sub-step S31: Receive the initial completion data returned by the destination computation kernel after it has executed the transaction forwarding data. The initial completion data includes a context token. Specifically, after receiving committed transaction forwarding data, the internal transaction receive adapter of the destination compute kernel parses the internal transaction descriptor and executes the local transaction. The internal transaction descriptor carries a context token; after the destination compute kernel completes execution, it sends this context token, completion status, and / or return data as initial completion data through the return channel of the internal transaction receive adapter. The initial completion data is returned to the input / output kernel via the UCIe D2D adapter and received by the completion TLP generation module. The completion TLP generation module retrieves the context token, completion status, and / or return data from the initial completion data; this context token is the same as the one carried in the internal transaction descriptor at the time of transmission. Using the context token as an index, the completion TLP generation module searches for matching context data in the context table to recover the requester identifier, tag, service category, attributes, and return port of the original PCIe request, and generates the destination completion data accordingly. Therefore, the destination compute kernel does not need to store the original PCIe requester identifier or tag.
[0082] The internal transaction receive adapter sets up request channels, payload channels, and return channels. The request channel includes `req_valid`, `req_ready`, `req_opcode`, `req_addr`, `req_len`, `req_be`, and `req_ctx`; the payload channel includes `data_valid`, `data_ready`, `data`, and `data_last`; the return channel includes `rsp_valid`, `rsp_ready`, `rsp_ctx`, `rsp_status`, `rsp_data`, and `rsp_last`. Input / output kernels only generate `req_valid` and `data_valid` via the UCIe link after the commit signal is valid; the return channel associates the context item in the input / output kernel with `rsp_ctx`. Sub-step S32 generates destination completion data based on the initial completion data and context data matching the context token in the initial completion data, and returns the destination completion data via the external link.
[0083] Sub-step S32 generates destination completion data based on the initial completion data and context data that matches the context token in the initial completion data, and returns the destination completion data through the external link.
[0084] Specifically, the transaction context management module in the input / output core maintains a context table, which stores the context data of admitted fast path candidates or local processing candidates. The completion TLP generation module uses the context token as an index to search for matching context data in the context table. The completion TLP generation module receives the returned Flit through the Streaming return interface of the UCIe D2D adapter, obtains the completion descriptor, completion payload, and context token from it, and reads the requester identifier, tag, service category, attributes, and return port of the original request based on the context token, generates a PCIe completion TLP, and hands it over to the PCIe sending interface.
[0085] The context data includes source and return association fields and transaction semantic fields. The source and return association fields include the source PCIe port, requester identifier, and tag, used to form the completion TLP and select the return port. The transaction semantic fields include format / type, length, first / last double-byte enable, service category, attributes, and poisoning status. The completion TLP generation module generates the PCIe completion TLP, i.e., the destination completion data, based on the requester identifier, tag, service category, attributes, and return port in the matched context data, as well as the completion status and return data in the initial completion data. After the PCIe sending interface completes the receive handshake for the last completion TLP and writes the TLP to the sending queue, the transaction context management module releases the context, and the sequence and flow control module marks the corresponding sequence number within the domain as complete, and updates the sequence status according to the consecutive completion sequence number advancement rule.
[0086] It should be noted that for direct write paths, the corresponding transmit buffer is released after all Flits have completed the FDI handshake and the corresponding transmit buffer is no longer being read; for shared buffer paths, the corresponding data block index chain is released after all payload data blocks have been read and the assembled Flit has completed the FDI handshake; the transaction context is released after the corresponding path resources are released. For deliverable writes, the context is released and the completion flag is set after the corresponding path resources are released; for requests that require TLP completion, the context is released and the completion flag is set after the last TLP receive handshake is completed on the PCIe transmit interface and the data is written to the transmit queue.
[0087] Thus, by matching context data with context tokens, generating destination completion data, and returning it, the destination computation core does not need to save the original request information or maintain the complete PCIe protocol stack. The input and output cores uniformly complete the return association and transaction layer group generation.
[0088] In some embodiments, the method further includes the following sub-steps: Sub-step S41: When the service idle condition of the destination port corresponding to the destination computing chip is met, and the low power request flag of the adapter between the input / output chip and the destination computing chip is valid, a low power request is sent to the adapter.
[0089] Specifically, the power consumption control module sets a saturation-type idle counter, a configurable threshold register, and a low-power request status register for each destination port. The power consumption control module obtains data on the number of transactions waiting for the input link integrity determination result from the sequence and flow control module, data on the number of occupied and unreleased temporary items from the sending temporary items, and data on whether there are pending wake-up requests at the destination port from the routing module.
[0090] The conditions for service idleness include: the number of transactions waiting for the integrity determination result of the input link is zero; there are no occupied and unreleased temporary items in the sending temporary items; and there are no pending wake-up requests on the destination port. In other words, service idleness conditions include: the port's sending queue and sending temporary items are empty; the number of incomplete contexts and contexts waiting for integrity results on the port are both zero; and there are no wake-up requests. The counter increments by one cycle only when the service idle conditions are consecutively met, and resets to zero when any service idle condition fails. Therefore, by using the number of contexts waiting for integrity results, the number of unreleased temporary items, and pending wake-up requests as necessary inputs for service idleness determination, the system distinguishes between the intermediate states where temporary items have been written but not committed and those where transactions have been established but not committed, avoiding misjudging idleness when transactions are still in progress.
[0091] The "Allow Low Power Request" flag indicates that the UCIe D2D adapter has reported to the power control module that it has requested a low power state for its input / output chips.
[0092] Specifically, when the count value reaches or exceeds the threshold, the service idle condition is still fully met in the current period, and the D2D adapter reports that a request is allowed, the threshold comparator outputs a low-power request enable signal. The power control module then issues a low-power state request and sets the low-power request status register to transition in progress. The low-power request enable signal is only used to initiate a low-power state request once and is not required to remain valid during state transitions. Once the low-power request status register enters transition in progress, it is not cleared by the D2D adapter revoking its pre-request eligibility during normal state transitions; it is only cleared when a new transaction or wake-up request is detected, the service idle condition fails, the adapter rejects or times out, a link error occurs, or a reset occurs.
[0093] Sub-step S42: After confirming that the adapter has entered the gating-enabled state, the clock of the data path of the destination port is gating.
[0094] Specifically, after the D2D adapter confirms that it has entered the gating-enabled state, the power control module updates the register to "approved." When the status is "approved" and there is no wake-up request, it outputs a data path clock gating enable signal, and then disables the clock for the shared buffer read, Flit assembly, and transmit buffer submodules corresponding to that port. The FDI status interaction, wake-up detection, and clock recovery logic remain operational. The clock for the shared TLP header parsing submodule is only disabled when all destination ports' data path clock gating enable signals are valid and the PCIe receive front-end has not reported a TLP start. The PCIe link receive front-end and TLP start detection logic remain operational; upon detecting a new TLP start, the shared parsing clock is restored before the header data is delivered.
[0095] After the new TLP header generates a unique candidate route, the routing module immediately registers the wake-up request for the corresponding destination port. This request clears the low-power request status register and cancels the data path clock gating enable signal. The power control module first restores the clock of the local buffer read / write, Flit assembly, and transmit temporary storage submodule, and then the D2D adapter performs port wake-up.
[0096] When the candidate port is in a low-power or recovery state, the payload data is written to the centralized shared payload buffer. After the D2D adapter reports port recovery, input link integrity pass, reception ready and other transmission submission conditions are met, it reads the shared buffer and assembles and transmits the data.
[0097] If the input link integrity fails, the power control module clears the wake-up request generated by the transaction; if there are other pending transactions at the destination port, the port remains awake; otherwise, it re-enters the idle count. The link status from the UCIe clock domain and the D2D adapter receive-ready status are synchronized and then entered into the local comparison logic of the input / output chip.
[0098] Therefore, the port clock is only turned off when it is confirmed that there are no transactions in transit and the link allows it, to prevent the clock from being turned off accidentally when there are still transactions waiting for integrity results, thus reducing dynamic power consumption.
[0099] Figure 3 This is a schematic diagram of an inter-chip transaction forwarding device provided in an embodiment of this application. The device 300 is applied to input / output chips and specifically includes the following modules: The data extraction module 301 is used to receive the data snapshot of the current transaction, and based on the data snapshot, determine the candidate storage item and the original context data corresponding to the target calculation core; wherein, the candidate storage item includes the sending temporary item.
[0100] In some embodiments, the data extraction module 301 includes a PCIe link receiving and TLP output module and a selective TLP header parsing module.
[0101] The storage item determination module 302 is used to determine the target storage item corresponding to the target computing core based on the candidate storage items.
[0102] In some embodiments, the storage item determination module 302 includes a routing module and a fast path condition determination module.
[0103] The transaction data determination module 303 is used to determine transaction data based on routing data and original context data. The transaction data includes transaction forwarding data.
[0104] In some embodiments, the transaction data determination module 303 includes a transaction context management module.
[0105] The data writing module 304 is used to write transaction forwarding data to the target storage item.
[0106] In some embodiments, the data writing module 304 includes a UCIe Streaming Flit assembly and transmission temporary storage module.
[0107] The data sending module 305 is used to set the valid bit of the sending temporary item to valid when the sending conditions of the current transaction are met, so that the data in the sending temporary item is sent to the destination computing chip. The sending conditions include at least the passing of the input link integrity determination of the current transaction.
[0108] In some embodiments, the data sending module 305 includes an order and flow control module and a transaction context management module.
[0109] In addition, the device 300 also includes a TLP generation module, a power consumption control module, and an input / output chip local PCIe processing module.
[0110] It should be noted that the specific working process of each of the above modules can be found in the relevant descriptions of the method embodiments, and will not be repeated here to avoid repetition. The inter-chip transaction forwarding device provided in this application embodiment can implement each process of the inter-chip transaction forwarding method in the above method embodiments, and can achieve the same technical effect.
[0111] The inter-chip transaction forwarding device in this application embodiment can be disposed in the input / output chip, as part of the input / output chip, or as an integrated circuit or chip in the input / output chip. The input / output chip can be an application-specific integrated circuit chip, a field-programmable gate array chip, or a dedicated digital circuit chip. The inter-chip transaction forwarding device can be implemented by hardware circuitry, for example, by at least one of decoding logic, comparators, state machines, register files, multi-port memories, and clock gating logic. This application embodiment does not limit the specific hardware implementation form of the inter-chip transaction forwarding device.
[0112] The inter-chip transaction forwarding device provided in this application embodiment can implement all the processes implemented by the inter-chip transaction forwarding device in the above method embodiment. To avoid repetition, it will not be described again here.
[0113] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0114] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by hardware circuits, such as by at least one of decoding logic, comparators, state machines, register files, multi-port memories, and clock gating logic. The technical solution of this application is essentially an improvement on the hardware data path and processing timing.
[0115] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for inter-chip transaction forwarding, characterized in that, Applied to input / output chips, wherein the input / output chips are connected to multiple computing chips, the method includes: Receive the data snapshot of the current transaction, and determine the routing data and the original context data based on the data snapshot; Based on the routing data, candidate storage items corresponding to the destination computing chip are determined, and target storage items corresponding to the destination computing chip are determined based on the candidate storage items; wherein, the candidate storage items include transmission temporary storage items; Based on the routing data and the original context data, transaction data is determined, including transaction forwarding data, and the transaction forwarding data is written into the target storage item. When the sending conditions of the current transaction are met, the valid bit of the sending temporary item is set to valid, so that the data in the sending temporary item is sent to the destination computing chip; The sending conditions include at least the passing of the input link integrity determination for the current transaction.
2. The inter-chip transaction forwarding method according to claim 1, characterized in that, The target storage item further includes a shared buffer item; based on the candidate storage items, determining the target storage item corresponding to the target computing core includes: When the direct write condition of the sending temporary item is met, the target storage item corresponding to the destination computing chip is determined to be the sending temporary item; Otherwise, before determining that the target storage item corresponding to the target computation kernel is a shared buffer item, and before setting the valid bit of the sending temporary storage item to be valid, the method further includes: reading the transaction forwarding data from the shared buffer item and writing it into the sending temporary storage item.
3. The inter-chip transaction forwarding method according to claim 2, characterized in that, The direct write conditions include: the destination port corresponding to the destination computing chip is active; the transmit buffer can accommodate all the transaction forwarding data; the sequence status item corresponding to the current transaction in the pre-configured sequence status table allows the current transaction to retain the transmit buffer; and the receive length of the current transaction does not exceed the maximum payload data length recorded in the target capability table of the pre-configured destination computing chip and the locally configured upper limit.
4. The inter-chip transaction forwarding method according to claim 1, characterized in that, The transaction forwarding data includes an internal transaction descriptor, the internal transaction descriptor includes a context token, the transaction data also includes context data corresponding to the context token, and the method further includes: Receive initial completion data returned by the target computing core after it has executed the transaction forwarding data, the initial completion data including a context token; Based on the initial completion data and the context data that matches the context token in the initial completion data, destination completion data is generated and returned via an external link.
5. The inter-chip transaction forwarding method according to claim 1, characterized in that, The input link integrity determination is made through the following steps: Based on the transmission mode of the current transaction, create a corresponding integrity association identifier for the current transaction; When the transmission mode is a non-streaming transmission mode, the integrity association identifier includes the receive record identifier corresponding to the current transaction. When the cyclic redundancy check result of the link corresponding to the receive record identifier indicates that the input link integrity determination has passed; When the transmission mode is streaming mode, the integrity association identifier includes all receiving streaming unit identifiers that carry the current transaction. When the integrity results corresponding to all receiving streaming unit identifiers indicate that the input link integrity determination is passed.
6. The inter-chip transaction forwarding method according to claim 1, characterized in that, The transaction data includes context data, which includes input integrity association data and domain sequence numbers. The method further includes: When the input link integrity determination fails, the input integrity associated data is obtained, the context data is matched according to the input integrity associated data, and the valid state of the corresponding storage item in the target storage item is cleared on the same clock edge, the context data is set to the invalid and pending release state, and the in-domain sequence number is set to the cancellation flag.
7. The inter-chip transaction forwarding method according to claim 1, characterized in that, The sending conditions also include: the destination port corresponding to the destination computing chip is active, the transaction forwarding data is written, the order arbitration corresponding to the current transaction is allowed, the end-to-end verification corresponding to the current transaction is passed, and the adapter between the input / output chip and the destination computing chip is ready to receive.
8. The inter-chip transaction forwarding method according to claim 1, characterized in that, The method further includes: When the service idle condition of the destination port corresponding to the destination computing chip is met, and the low power request enable flag of the adapter between the input / output chip and the destination computing chip is valid, a low power request is sent to the adapter. After confirming that the adapter has entered the gating-enabled state, the clock of the data path of the destination port is gating.
9. The inter-chip transaction forwarding method according to claim 8, characterized in that, The service idle conditions include zero transactions waiting for the input link integrity determination result, no occupied and unreleased temporary items in the sending temporary items, and no pending wake-up requests at the destination port.
10. An inter-chip transaction forwarding device, characterized in that, Applied to input / output chips, which are connected to multiple computing chips, including: The data extraction module is used to receive the data snapshot of the current transaction and, based on the data snapshot, determine the routing data and the original context data. A storage item determination module is used to determine, based on the routing data, a candidate storage item corresponding to the destination computing chip, and based on the candidate storage items, a target storage item corresponding to the destination computing chip; wherein, the candidate storage items include a transmission temporary storage item; The transaction data determination module is used to determine transaction data based on the routing data and the original context data, wherein the transaction data includes transaction forwarding data; The data writing module is used to write the transaction forwarding data into the target storage item; The data sending module is used to enable the valid bit of the sending temporary item when the sending conditions of the current transaction are met, so that the data in the sending temporary item is sent to the destination computing chip. The sending conditions include at least the passing of the input link integrity determination for the current transaction.
