Data transmission method and device, medium and program product

Through the custom data format and credit flow control mechanism based on the CHI C2C protocol, the problem of low communication efficiency in traditional interconnect protocols in heterogeneous integrated systems is solved, and efficient and reliable data transmission and resource balance between processing units are achieved.

CN120353747AActive Publication Date: 2025-07-22LANGCHAO ELECTRONIC INFORMATION IND CO LTD

Patent Information

Application Number
CN202510847285.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-07-22
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

Existing traditional interconnect protocols (such as PCIE) are difficult to meet high-performance computing needs in terms of bandwidth, latency and consistency support, becoming a bottleneck in processing inter-unit communication in heterogeneous integrated systems.

Method used

The data transmission method based on the CHI C2C protocol is adopted, and sharding processing and arbitration scheduling are performed through custom data formats. Combined with the credit flow control mechanism, data transmission is dynamically controlled to prevent overflow or blockage.

Benefits of technology

It realizes efficient and reliable communication between processing units, improves transmission efficiency, adapts to the difference in data volumes of different channels, and dynamically balances resource usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353747A_ABST
    Figure CN120353747A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, a medium and a program product, and relates to the technical field of computers, bus protocol data is acquired, fragmentation processing is performed based on a user-defined data format, flexible splitting and adaptation of data during transmission between processing units are realized, and the transmission requirements of data size differences of different channels can be effectively met. The data transmission of different types of data is realized by performing arbitration scheduling on the fragmented data according to the channel type, and the flow control is performed by dynamically updating the credit value of the sending side based on the authorized credit value returned by the receiving side, so that the data overflow or transmission congestion is prevented, and the transmission efficiency is improved. Therefore, efficient scheduling and reliable transmission of communication between the processing units and dynamic balance of resources are realized, and the overall transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies, and in particular, to a data transmission method, device, medium, and program product. Background Art

[0002] As semiconductor processes approach the physical limit, the marginal benefit of Moore's Law decreases, and single-module full-integration solutions face challenges such as a sharp increase in costs and an extension of the design cycle. At the same time, the demand for heterogeneous computing in scenarios such as artificial intelligence and data centers has surged, driving the rise of multi-die heterogeneous integration technology (Chiplet). This technology integrates computing units with different process nodes and functional positions at the package level to build a high-performance heterogeneous system architecture. This technology not only significantly improves the computing density and energy efficiency ratio but also greatly reduces the development difficulty of complex functional modules. However, efficient interconnection between heterogeneous units has become a key bottleneck. Traditional interconnection protocols (such as PCIE (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard)) are difficult to meet the high-performance computing requirements in terms of bandwidth, latency, and consistency support. Therefore, based on its mature AMBA (Advanced Microcontroller Bus Architecture) ecosystem, Arm has launched the CHI-C2C (Coherent Hub Interface Chip-to-Chip) protocol as an extension of the AMBA CHI architecture, which is deeply optimized for high-speed data exchange in multi-die heterogeneous integration systems and hybrid packaging systems. Currently, the research on the implementation method of inter-unit communication for the CHI-C2C protocol is still in its infancy, which has become the core obstacle hindering the expansion of computing power of advanced processor architectures through heterogeneous integration technology. Summary of the Invention

[0003] This application provides a data transmission method, device, medium, and program product, which can realize communication between processing units based on the CHI C2C protocol.

[0004] In a first aspect, this application provides a data transmission method, including: Obtaining bus protocol data, and fragmenting the bus protocol data according to a preset fragmentation rule based on a custom data format to generate different fragmented data; Arbitrating and scheduling the fragmented data according to the channel type to which the bus protocol data belongs, so as to divide different slice data carriers to transmit the fragmented data and output a complete protocol frame; Send the complete protocol frame to the receiving side based on the credit value of the sending side, and update the credit value of the sending side according to the authorized credit value returned by the receiving side to dynamically control the sending quantity of the slice data carrier; wherein, the authorized credit value is the credit value that can be authorized to the sending side dynamically generated by the receiving side when each complete protocol frame is processed, according to the released slice data carrier.

[0005] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above data transmission methods when executing the computer program.

[0006] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of any of the above data transmission methods when executed by a processor.

[0007] This application also provides a computer program product including a computer program, which implements the steps of any of the above data transmission methods when executed by a processor.

[0008] Beneficial effects: By obtaining bus protocol data and performing fragmentation processing based on a custom data format, the method realizes the flexible splitting and adaptation of data during transmission between processing units, and can effectively meet the transmission requirements of different channel data volume differences; by performing arbitration scheduling on the fragmented data according to the channel type, the data transmission of different types of data is realized, and by dynamically updating the credit value of the sending side based on the authorized credit value returned by the receiving side for traffic control, data overflow or transmission blockage is prevented, so as to realize the efficient scheduling, reliable transmission and dynamic balance of resources in communication between processing units, and improve the overall transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0010] Figure 1 It is a flowchart of a data transmission method disclosed in the present application; Figure 2 It is a diagram of realizing traffic control by credit management between the receiving side and the sending side disclosed in the present application; Figure 3 It is a schematic diagram of Slot scheduling and frame formation disclosed in the present application; Figure 4 It is an architecture diagram of a data transmission disclosed in the present application; Figure 5Structural schematic diagram of a data transmission device disclosed in this application. Detailed implementation manners

[0011] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0012] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0013] Multiple heterogeneous integrated systems combine different functional modules (such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), and accelerators) in a heterogeneous integration manner, breaking through the area limitation of a single processing unit and reducing the design complexity. Common multiple heterogeneous integrated systems, such as those using die technology, with the development of die technology, the CHI protocol has been further extended to the CHI C2C protocol to support high-speed data transmission and communication between dies, aiming to: 1. Achieve high-bandwidth and low-latency interconnection: Support multi-processing unit symmetric multi-processor (SMP) and accelerator connection topologies; 2. Maintain cache coherence: Support cross-die shared memory and atomic operations; 3. Be compatible with the existing ecosystem: Inherit the architectural features of the AMBA CHI single processing unit protocol (such as Realm Management Extension (RME)) to avoid performance losses caused by protocol conversion; 4. Standardize the die interface: Decouple by defining a hierarchical protocol stack and physical layer standards (such as UCIE (Unified Compute Interface Extension), CXL (Compute Express Link)) to achieve flexible deployment.

[0014] Currently, the implementation of supporting the CHI protocol in inter-processor communication is specifically based on containers. The container implementation scheme of CHI C2C uses a container as the smallest fixed unit of transmission, with a size of 256 bytes, which consists of three parts: Link Header: Contains link control information (such as CRC check, sequence number); Protocol Header: Defines message types, credit allocation, resource plane identification, etc.; Payload: Encapsulates the actual CHI C2C message; Dynamic credit update: Dynamically grants credit through the Protocol Header or MiscU message, enabling the sender to adjust the traffic according to the receiver's buffer capacity.

[0015] For the above implementation scheme, based on the container mechanism, through hierarchical encapsulation and optimization, the communication efficiency in the interconnection of processing units or dies can be improved. However, the implementation based on containers is more complex, with a high design difficulty, more resource occupation, and the combinational logic is often too large, resulting in timing differences.

[0016] Therefore, this application provides a data transmission scheme that can realize the communication between processing units based on the CHI C2C protocol. To enable those skilled in the art of this technology to better understand the solution of this application, the following further details this application in combination with the accompanying drawings and specific implementation manners.

[0017] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the data transmission method depends, the specific application environment architecture or specific hardware architecture is described herein.

[0018] In the embodiments of this application, a data transmission method is provided. Taking the CHI protocol as an example for illustration, CHI is the bus protocol for internal communication of processing units. Through the present invention, the CHI protocols inside two processing units can be connected. Similarly, the present invention can also be applied to other internal buses to connect the protocols of the internal buses of two processing units. Combined with the execution process of the data transmission method, see Figure 1 As shown, the method is described in detail. The method includes: Step S11: Obtain bus protocol data, and perform sharding processing on the bus protocol data according to a preset sharding rule based on a custom data format to generate different sharded data.

[0019] In the embodiments of the present application, data transmission between processing units is performed based on the CHI protocol to implement the communication process. Herein, the processing unit refers to an integrated electronic module with data processing, storage, and communication functions, and its hardware architecture may include components such as a computing core, a cache unit, and a communication interface. Similarly, it can also implement data sending, receiving, and protocol processing. For example, the processing unit may include a CPU (Central Processing Unit) core, a GPU (Graphics Processing Unit) computing unit, a cache controller, and a high-speed communication interface, etc.

[0020] First, the bus protocol data is generated at the user layer or the transport layer. Taking the CHI protocol data as an example, it includes data of types such as Req (Request), Rsp (Response), Snp (Snoop), and Dat (Data), and reaches the sending side.

[0021] Then, each type of data has its own independent TX_queue (transmission queue) for the corresponding channel, and enters the TX_queue to complete enqueue fragmentation. During the fragmentation process, the bus protocol data is fragmented according to a preset splitting rule based on a custom data format (according to the number of slots occupied by the protocol frame and the bit width of each channel) to generate different fragmented data. The specific content will be introduced in detail in the following embodiments of the invention and will not be elaborated here.

[0022] It should be noted that after the system is powered on or the link is reset, the initialization process needs to be executed first through the Initializer module. Specifically, obtain the initialization handshake signal sent from the sending side to the receiving side, and establish a link connection between the sending side and the receiving side based on the initialization handshake signal; obtain the loopback test request sent by the sending side based on the link connection, and perform a functional test on the link connection according to the loopback test request, so as to enter the working state after the test passes.

[0023] First, send a special Init Slot data to complete the link initialization handshake. This data does not contain user data, and its purpose is to let the receiving side at the other end detect the existence of the link and be ready for communication. Exemplarily: Initialization handshake flag: When (slot_valid = 0) & (grant_valid = 0) & (slot1 = 1), it is considered that the other end initiates the initialization handshake flag to establish an initial connection.

[0024] After the handshake is successful, a loopback test request is sent. This data will be sent back to the local end as it is by the peer end (loopback) to test the link loopback function. The sending side receives and checks the looped-back data. If the data matches, it indicates that both the sending and receiving functions of the physical link are normal. Exemplary: Loopback request flag: When (slot_valid = 0) & (grant_valid = 0) & (slot1 = 0), the peer end considers that it has received a loopback request and loops back all the received data to the peer end.

[0025] Further, after the test is completed, it enters the working state. After entering the working state, user layer data or transport layer data can be sent, and the link is ready to transmit real CHI protocol data. It should be noted that after the initialization is completed, an initial credit value should be sent to the peer end for use first. This initial credit value is the basis of the "permission token" for the sending side to start sending data subsequently. Exemplary: Loopback frame sending flag: (slot0 = user_tx), (slot1 = 1). When slot is 1, user information is sent through slot0.

[0026] Step S12: Arbitrate and schedule the fragmented data according to the channel type to which the bus protocol data belongs, so as to divide different slice data carriers to transmit the fragmented data and output a complete protocol frame.

[0027] Since the bus protocol data corresponds to four different data types, different data types are transmitted through different channels. Therefore, in the embodiments of the present application, four-channel heterogeneous scheduling (Req / Rsp / Dat / Snp) is adopted. The dispatcher on the sending side takes out the fragmented data from each TX_queue, schedules and frames according to the custom data format, divides different slice data carriers (slots) for transmission, and generates a complete protocol frame after arbitration.

[0028] Step S13: Send the complete protocol frame to the receiving side based on the credit value of the sending side, and update the credit value of the sending side according to the authorized credit value returned by the receiving side to dynamically control the number of slice data carriers sent.

[0029] In the embodiments of this application, a grant-based credit system is used to implement flow control and ensure transmission reliability, which is the key to preventing the receive queue (Rx_queue) at the receiving end from overflowing. The sending side transmits complete protocol frames to the receiving side via the physical link based on the credit value on the sending side. The protocol frames received by the physical link layer pass through the pipe buffer to smooth the transmission delay and clock domain differences. Further, according to the channel ID in the complete protocol frame that can be used to determine the data type, the respective slot data in the complete protocol frame is distributed to the corresponding receive queue (Rx_queue). The receive queue completes the parsing of the transport layer protocol according to the number of slots occupied by each channel bit width (the same as the TX_queue on the sending side), and reassembles the received slot data into complete CHI protocol data.

[0030] It should be noted that the credit value on the sending side is used to record how many slice data carriers (slots) the local end can still send to the peer end. Slots can only be sent when this value is greater than 0, and sending a slot will consume it. When the receiving side finishes processing each complete protocol frame, the local Rx_queue will release space and restore one credit. At this time, the credit value that can be authorized to the sending side dynamically generated according to the released slice data carriers is the authorized credit value. This credit value is sent to the sending side of the peer end through the Tx_queue on the local end of the receiving side and is used for the TX_queue of the peer end.

[0031] In addition, after the initialization stage ends and the working state is entered, the receiving side (the Rx_queue is empty) will have idle positions equal to the maximum initial credit value. This initial credit value should not exceed the maximum depth of the receive queue, which is the upper limit of flow control. At the same time, the receiving side sets the authorized credit value based on the initial credit value and sends it to the peer end through the Tx_queue. After receiving this authorized credit value, the credit value on the sending side of the peer end is set to this value before it can start sending data.

[0032] Therefore, in the flow control mechanism, it should first be ensured that the receive queue depth >= initial credit value >= authorized credit value. This inequality ensures that the authorized credit does not exceed the actual queue capacity, which is the premise for system security.

[0033] In the embodiments of this application, the credit value on the sending side = the current credit value on the sending side - the number of slice data carriers sent (the number of sent slots) + the authorized credit value; the credit value on the receiving side = the current credit value on the receiving side - the authorized credit value + the recovered credit value. Among them, the recovered credit value is the number of slice data carriers released by the receiving side when each complete protocol frame is processed.

[0034] Such as Figure 2The figure shows the credit flow control mechanism and queue interaction architecture for communication between the receiving side and the sending side in the implementation of the CHI protocol. The Rx_queue in the receiving side is a receive buffer divided by channels. Among them, Req / Rsp / Snp / Dat are respectively associated with the credits of grant0-grant3. When the receiving end Rx_queue finishes processing the data of a certain channel and releases the buffer space to generate the corresponding grant signal. The grant signal is directly connected to the dispatcher module of the sending end. The tr_queue on the sending side is a transport layer queue used to cache the data to be sent. The dispatcher checks the grant values of each channel and consumes 1 credit for the corresponding channel for each physical slot sent.

[0035] It can be understood that in this embodiment, the flow control is for point-to-point communication. In the future, multi-node collaborative flow control can be considered. For example, for multiple processing units on the receiving side, the credit values can be jointly allocated to the sending side. The receiving side negotiates and allocates the total credit value according to the status of its own buffer, and dynamically adjusts the priority through the "credit value allocation weight" (such as increasing the credit allocation ratio when GPU computing is urgent). In this way, the resource allocation in the multi-receiving side scenario can be optimized, avoiding the overall transmission being blocked due to insufficient buffer in a certain receiving side, and improving the system parallel processing ability.

[0036] In this embodiment, by obtaining the bus protocol data and performing fragmentation processing based on a custom data format, the flexible splitting and adaptation of data during transmission between processing units are realized, which can effectively meet the transmission requirements of different channel data volumes; by arbitrating and scheduling the fragmented data according to the channel type, the data transmission of different types of data is realized, and by dynamically updating the credit value of the sending side based on the authorization credit value returned by the receiving side for flow control, data overflow or transmission blockage is prevented, so as to realize the efficient scheduling, reliable transmission and dynamic balance of resources in the communication between processing units, and improve the overall transmission efficiency.

[0037] Based on the foregoing embodiments, the data bus widths currently supported by CHI are 128-bit, 256-bit, and 512-bit. In the data transmission process of the processing unit in this application embodiment, the transmission method is described by taking the data stream with a fixed size of 256 bits as the exchange unit on the C2C interface as an example. Among them, the custom data format includes the first preset number of slice data carriers and the second preset number of flow control tokens; among them, based on the first preset number and the bit width occupied by a single slice data carrier, and based on the second preset number and the bit width occupied by a single flow control token, the total frame length determined is the data bus width supported by the preset bus protocol; the preset bus protocol is used to transmit the bus protocol data.

[0038] In the custom data format, 256 bits are divided into three Slots (slice data carriers) and four Grants (flow control tokens). A Slot is the smallest unit within a frame that carries sharded data (Flit slices), and a Grant is a flow control token used to manage the channel resources on the sending side (such as preventing overflows). Each Grant frame corresponds to one channel. The custom data format is shown in Table 1 below: Table 1 Custom Data Format

[0039] In a specific implementation, a Slot contains three fields: a field (valid) for indicating whether the data in the slice data carrier is valid, a data field (data) for carrying sharded data, and a channel identification field (chID) for identifying the type of the channel to which it belongs. The Slot format is shown in Table 2 below: Table 2 Slot Format

[0040] In another specific implementation, a Grant contains two fields: a field (valid) for indicating whether the channel is authorized and valid, and a data field (data) for updating the credit value on the sending side. The Grant format is shown in Table 3 below: Table 3 Grant Format

[0041] Among them, "<<" is the left shift operation symbol. For example, if the data value is 5: 1 << 5 = 32. The sending side credit value can be updated according to this value. Suppose the credit counter corresponding to the original sending side credit value is A, and adding 32 to the original credit number gives A + 32.

[0042] Furthermore, since the bus protocol data corresponds to four different data types, when performing data transmission, the channel types to which the bus protocol data belongs include a request channel (req), a response channel (rsp), a data channel (dat), and a listening channel (snp). Correspondingly, for different channels, the definitions of the field formats are different. Therefore, the data transmission method further includes: determining the field formats corresponding to different channels, and determining the channel type to which the bus protocol data belongs according to the configuration parameters under the field formats.

[0043] In the first specific embodiment, the request channel (req) can transmit control requests (such as memory read / write, cache coherence operations, etc.). The field format of the request channel includes a request address field (Addr), an opcode field (Opcode), a data size field (Size), a memory attribute field (MemAttr), a field for indicating whether to trigger a snooping operation (SnpAttr), a transaction order control field (Order), a source node identification field (SrcID), a target node identification field (TgtID), and a transaction identification field (TxnID). Table 4 shows the Flit fields and meanings of the request channel (req): Table 4 Flit fields and meanings of the request channel (req)

[0044] In the second specific embodiment, the response channel can transmit the response results of requests (such as data return, status code). The field format of the response channel includes a response type field (Resp), a first error code field (RespErr), a forwarding status field (FwdState), a response opcode field (Opcode), a source node identification field (SrcID), a target node identification field (TgtID), and a transaction identification field (TxnID). Table 5 shows the Flit fields and meanings of the response channel (rsp): Table 5 Flit fields and meanings of the response channel (rsp)

[0045] In the third specific embodiment, the data channel can transmit a large amount of data payloads (such as memory data, intermediate calculation results). The field format of the data channel includes an actual data content field (Data), a byte enable field (BE), a data source field (DataSource), a data response status field (Resp), a second error code field (RespErr), a data opcode field (Opcode), a home node identification field (HomeNID), a source node identification field (SrcID), a target node identification field (TgtID), and a transaction identification field (TxnID). Table 6 shows the Flit fields and meanings of the data channel (dat): Table 6 Flit fields and meanings of the data channel (dat)

[0046] In the fourth specific embodiment, the listening channel can transmit listening / snooping signals (such as snoop requests in cache coherence protocols to monitor the cache states of other processing units). The field format of the listening channel includes a snoop address field (Addr), a snoop opcode field (Opcode), a field (RetToSrc) for indicating whether to return the result to the source node, a field (DoNotGoToSD) for indicating whether to allow the data to become a sharable dirty state, a forwarded transaction identification field (FwdTxnID), a forwarded target node identification field (FwdNID), a source node identification field (SrcID), a target node identification field (TgtID), and a transaction identification field (TxnID). Table 7 shows the Flit fields and meanings of the listening channel (snp): Table 7 Flit Fields and Meanings of the Listening Channel (snp)

[0047] Based on the foregoing embodiments, the content of the custom data format has been introduced. Therefore, in this embodiment, the process of fragment processing is introduced. Specifically, based on the custom data format, the bus protocol data is fragmented according to a preset fragmentation rule to generate different fragmented data, including the following steps: Determine the number of fragments according to the matching relationship between the protocol data bit width corresponding to the channel type to which the bus protocol data belongs and the bit width of the slice data carrier; Fragment the bus protocol data according to the number of fragments, and perform padding processing on the data with a bit width less than that of the slice data carrier to generate different fragmented data.

[0048] In this embodiment, the Flit data of each channel is divided into multiple slots according to its bit width (padding with 0 for the part less than the slot bit width). The data bit width of each slot is 77 bits. Therefore, according to the bit widths occupied by the data of different channel types, the request channel (req) and the listening channel (snp) occupy 2 slots, the response (rsp) channel occupies 1 slot, and the data (dat) channel occupies 5 slots. For example, for the request channel (req), its bit width is 93 bits and it occupies 2 slots. Then, Slot1 corresponds to the first 77 bits, Slot2 corresponds to the remaining 16 bits, and 61 bits of 0 are padded.

[0049] In a feasible implementation, to reduce the overhead of invalid padding and improve the transmission efficiency, a dynamic fragmentation strategy can be implemented based on semantics. For example, break through the fixed fragmentation mode by bit width and dynamically adjust the fragmentation granularity according to data semantics (such as instruction type, data structure). For example, use small fragments for short instructions (such as control instructions) and large fragments for large data blocks, and identify the fragment attributes through the "semantic label" field, and the receiving side optimizes the recombination logic accordingly.

[0050] Furthermore, Slot scheduling and framing are performed after fragmentation processing. Specifically, it includes the following steps: Arbitrate the merger of the request channel and the listening channel to generate a first sub-frame, and fixedly fill the response channel to the tail of the first sub-frame; Independently generate a second sub-frame for the data channel, and perform merger arbitration on the first sub-frame and the second sub-frame to output a complete protocol frame.

[0051] In the embodiment of the present application, as Figure 3 shown, the data (dat) channel is independently fragmented, the request channel (req) and the listening channel (snp) are merged and arbitrated, and the response (rsp) channel fixedly fills the frame tail. Specifically, compete for the resources corresponding to the sliced data carrier between the request channel and the listening channel, and fill the winning channel into the sliced data carrier to generate a first sub-frame.

[0052] Since both the request channel (req) and the listening channel (snp) occupy 2 slots, and the response (rsp) occupies 1 slot, so first req and snp arbitrate to compete for slot0 and slot1, and rsp is fixedly filled to the position of slot2, and the composed protocol frame is combArb.

[0053] The data (dat) channel needs to occupy 5 slots, so the protocol frame of the dat channel group is further arbitrated with combArb to complete the final output. That is, perform merger arbitration on the first sub-frame and the second sub-frame including the winning channel and the response channel, and use the winning sub-frame as the complete protocol frame.

[0054] As Figure 4The figure shows a schematic diagram of the data transmission process for overall realizing communication between processing units. The upper part corresponds to the sending-side process. The transport layer protocol interface receives different types of data (Req / Rsp / Snp / Dat) and stores them in the corresponding Tx_queue respectively; the user layer interface (such as io_user_tx, etc.) can also inject data. Entering the TX_queue queue to complete enqueue sharding (according to the number of slots occupied by the protocol frame and the bit width of each channel), and then entering the Dispatcher to complete scheduling and frame grouping for transmission. The Dispatcher module fetches data as needed from each Tx_queue and groups frames according to the protocol rules. The Arb (arbiter) conducts arbitration and selects the grouped frames to be sent through the physical link. Then it enters the lower part, corresponding to the receiving-side process. The protocol frames received by the physical link layer are cached through the pipe and distributed to different receiving queues (Rx_queue) according to the channel ID therein, and the receiving queue completes the parsing of the transport layer protocol according to the number of slots occupied by the bit width of each channel. It can be seen that by decoupling data of different channels through multiple queues and relying on the scheduling and arbitration mechanisms to achieve orderly frame grouping and sending, while supporting two-way interaction between the user layer and the transport layer, ensuring the high efficiency and reliability of communication between processing units.

[0055] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0056] An embodiment of the present application provides a data transmission device. Refer to Figure 5 As shown, the device includes: The sharding module 11 is used to obtain bus protocol data and perform sharding processing on the bus protocol data according to a preset splitting rule based on a custom data format to generate different sharded data; The frame grouping module 12 is used to perform arbitration scheduling on the sharded data according to the channel type to which the bus protocol data belongs, so as to divide different slice data carriers to transmit the sharded data and output a complete protocol frame; The flow control module 13 is used to send the complete protocol frame to the receiving side based on the credit value on the sending side and update the credit value on the sending side according to the authorized credit value returned by the receiving side, so as to dynamically control the sending quantity of the slice data carriers; wherein, the authorized credit value is the credit value that can be authorized to the sending side dynamically generated by the receiving side when each complete protocol frame is processed according to the released slice data carriers.

[0057] For the description of the features in the embodiments corresponding to the data transmission device, reference can be made to the relevant descriptions of the embodiments corresponding to the data transmission method, which will not be elaborated here one by one.

[0058] In a feasible implementation, the data transmission device further includes an initialization module, which is used for: Obtain the initialization handshake signal sent by the sending side to the receiving side, and establish a link connection between the sending side and the receiving side based on the initialization handshake signal; Obtain the loopback test request sent by the sending side based on the link connection, and perform a functional test on the link connection according to the loopback test request, so as to enter the working state after the test passes.

[0059] The initial credit value sending module is used to send the initial credit value from the receiving side to the sending side based on the depth of the receiving queue on the receiving side when first entering the working state.

[0060] The channel type judgment module is used to determine the field format corresponding to different channels, and determine the channel type to which the bus protocol data belongs according to the configuration parameters under the field format.

[0061] In a feasible implementation, the fragmentation module 11 is specifically used for: Determine the number of fragments according to the matching relationship between the protocol data bit width corresponding to the channel type to which the bus protocol data belongs and the bit width of the slice data carrier; Fragment the bus protocol data according to the number of fragments, and perform padding processing on the data that is less than the bit width of the slice data carrier to generate different fragmented data.

[0062] In a feasible implementation, the framing module 12 is specifically used for: Merge and arbitrate the request channel and the listening channel to generate a first sub-frame, and fixedly fill the response channel to the tail of the first sub-frame; Independently generate a second sub-frame for the data channel, and perform merge arbitration on the first sub-frame and the second sub-frame to output a complete protocol frame.

[0063] The embodiments of the present application also provide an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned data transmission method embodiments.

[0064] The embodiments of the present application also provide a computer-readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above-mentioned data transmission method embodiments when running.

[0065] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs, such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disks, magnetic disks, or optical discs.

[0066] The embodiments of the present application also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the data transmission method are implemented.

[0067] The embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the data transmission method are implemented.

[0068] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0069] The above has introduced in detail a data transmission method, device, medium, and program product provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A data transmission method, characterized in that, Including: Obtain bus protocol data, and slice the bus protocol data according to a preset slicing rule based on a custom data format to generate different sliced data; Arbitrarily schedule the sliced data according to the channel type to which the bus protocol data belongs, so as to divide different slice data carriers to transmit the sliced data, and output a complete protocol frame; Send the complete protocol frame to the receiving side based on the sending-side credit value, and update the sending-side credit value according to the authorization credit value returned by the receiving side to dynamically control the sending quantity of the slice data carriers; wherein, the authorization credit value is the credit value that can be authorized to the sending side dynamically generated by the receiving side when each complete protocol frame is processed according to the released slice data carriers.

2. The data transmission method according to claim 1, wherein Before obtaining the bus protocol data, it further includes: Obtain an initialization handshake signal sent by the sending side to the receiving side, and establish a link connection between the sending side and the receiving side based on the initialization handshake signal; Obtain a loopback test request sent by the sending side based on the link connection, and perform a functional test on the link connection according to the loopback test request to enter the working state after the test passes.

3. The data transmission method according to claim 2, wherein It further includes: When first entering the working state, send an initial credit value to the sending side through the receiving side based on the depth of the receiving queue of the receiving side.

4. The data transmission method according to claim 1, wherein The custom data format includes a first preset number of slice data carriers and a second preset number of flow control tokens; wherein, based on the first preset number and the bit width occupied by a single slice data carrier, and based on the second preset number and the bit width occupied by a single flow control token, the total frame length determined is the data bus width supported by a preset bus protocol; the preset bus protocol is used to transmit the bus protocol data.

5. The data transmission method according to claim 4, characterized in that The data format of the slice data carrier includes a field for characterizing whether the data of the slice data carrier is valid, a data field for carrying the sliced data, and a channel identification field for identifying the channel type to which it belongs.

6. The data transmission method according to claim 4, wherein, The data format of the flow control token includes a field for characterizing whether the channel authorization is valid, and a data field for updating the sending-side credit value.

7. The data transmission method according to claim 1, characterized in that The channel types to which the bus protocol data belongs include a request channel, a response channel, a data channel, and a listening channel; Correspondingly, the data transmission method further includes: Determine the field formats corresponding to different channels, and determine the channel type to which the bus protocol data belongs according to the configuration parameters under the field formats.

8. The data transmission method according to claim 7, wherein The determining the field formats corresponding to different channels includes: The field format of the request channel includes a request address field, an opcode field, a data size field, a memory attribute field, a field for characterizing whether to trigger a sniffing operation, a transaction order control field, a source node identification field, a target node identification field, and a transaction identification field; The field format of the response channel includes a response type field, a first error code field, a forwarding status field, a response opcode field, the source node identification field, the target node identification field, and the transaction identification field; The field format of the data channel includes an actual data content field, a byte enable field, a data source field, a data response status field, a second error code field, a data operation code field, an owning node identification field, the source node identification field, the destination node identification field, and the transaction identification field; The field format of the listening channel includes a sniffing address field, a sniffing operation code field, a field for indicating whether to return the result to the source node, a field for indicating whether to allow the data to become a sharable dirty state, a forwarding transaction identification field, a forwarding destination node identification field, the source node identification field, the destination node identification field, and the transaction identification field.

9. The data transmission method according to claim 1, characterized in that The process of fragmenting the bus protocol data according to a preset fragmentation rule based on the custom data format to generate different fragmented data includes: Determining the number of fragments according to the matching relationship between the protocol data bit width corresponding to the channel type to which the bus protocol data belongs and the bit width of the slice data carrier; Fragmenting the bus protocol data according to the number of fragments, and padding the data that is less than the bit width of the slice data carrier to generate different fragmented data.

10. The data transmission method according to claim 7, wherein Arbitrating and scheduling the fragmented data according to the channel type to which the bus protocol data belongs to divide different slice data carriers to transmit the fragmented data and output a complete protocol frame, including: Merging and arbitrating the request channel and the listening channel to generate a first sub-frame, and fixedly filling the response channel to the tail of the first sub-frame; Independently generating a second sub-frame for the data channel, and merging and arbitrating the first sub-frame and the second sub-frame to output a complete protocol frame.

11. The data transmission method according to claim 10, wherein The process of merging and arbitrating the request channel and the listening channel to generate a first sub-frame includes: Competing for the resources corresponding to the slice data carrier between the request channel and the listening channel, and filling the winning channel into the slice data carrier to generate a first sub-frame; Correspondingly, the process of merging and arbitrating the first sub-frame and the second sub-frame to output a complete protocol frame includes: Merging and arbitrating the first sub-frame and the second sub-frame including the winning channel and the response channel, and taking the winning sub-frame as the complete protocol frame.

12. The data transmission method according to claim 1, wherein The update formula for the sending side credit value is the current credit value of the sending side - the sending quantity of the slice data carrier + the authorized credit value; wherein, the authorized credit value is determined based on the receiving side credit value, and the update formula for the receiving side credit value is the current credit value of the receiving side - the authorized credit value + the recycled credit value; the recycled credit value is the quantity of the slice data carrier released by the receiving side when each complete protocol frame is processed.

13. An electronic device, characterized in that, Including: A memory for storing a computer program; A processor for implementing the steps of the data transmission method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 12 are implemented.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Method and system for encrypting and decrypting data in security chip

    CN105095793A

  • Frame decoding method in JESD204B protocol

    CN106933774A

  • Flow control method, device and system and storage medium

    CN113300983A

  • System and method for facilitating fine-grain flow control in a network interface controller (NIC)

    CN113711550A

  • Ordered delivery of data packets based on type of path information in each packet

    CN116324747A

Cited By

  • Message forwarding method and device, computer equipment and program product

    CN121173751A

  • Group unpacking hardware implementation method for CHI protocol inter-core transmission

    CN121442018A