Message transmission method and device, electronic equipment and readable medium

By splitting the message to be transmitted into micro-packets in the computer system and transmitting them, the problem of maintaining cache consistency in point-to-point interconnection scenarios is solved, and efficient message transmission and cache consistency maintenance are achieved.

CN120075291BActive Publication Date: 2025-12-19LOONGSON TECH CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411936649.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-12-19
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In computer systems, how to effectively maintain cache consistency between chips, especially in point-to-point interconnection scenarios, is crucial for ensuring cache consistency during message transmission.

Method used

By acquiring the message to be transmitted in the transmission channel, determining the micro-packet type and specifications based on the preset correspondence between message and micro-packet information, splitting the message to be transmitted into micro-packets, and transmitting them to the receiver based on the micro-packets.

Benefits of technology

This ensures the universality and effectiveness of message transmission without modifying the message content, avoids deadlock problems during transmission, and improves transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075291B_ABST
    Figure CN120075291B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a message transmission method and device, electronic equipment and readable medium, which relate to the chip technical field. In the method, for any transmission channel of a sender, the sender obtains a to-be-transmitted message in the transmission channel. Based on a preset message corresponding to the transmission channel and a micro-packet information corresponding relationship, a micro-packet type and a micro-packet specification corresponding to the to-be-transmitted message are determined, and a target micro-packet type and a target micro-packet specification are obtained. The to-be-transmitted message is split into a micro-packet according to the target micro-packet type and the target micro-packet specification, and a to-be-transmitted micro-packet is obtained. The sender performs message transmission to a receiver based on the to-be-transmitted micro-packet. In this way, by first splitting the to-be-transmitted message into the to-be-transmitted micro-packet and performing message transmission to the receiver based on the to-be-transmitted micro-packet, message transmission of the to-be-transmitted message is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the chip technical field, in particular to a message transmission method and device, electronic equipment and readable medium. BACKGROUND

[0002] At present, in order to improve the computing power, not only a single processor with multiple cores exists in a computer system (for example, a server), but also multiple other chips exist. In order to realize data exchange between different chips, point-to-point interconnection technology is widely applied.

[0003] In order to ensure the normal operation of the computer system, the maintenance of cache coherency between chips is particularly important in the point-to-point interconnection scene. Therefore, how to transmit the to-be-transmitted message required for maintaining cache coherency becomes a technical problem to be solved. SUMMARY

[0004] The embodiments of the present application provide a message transmission method and device, electronic equipment and readable medium, which can realize the transmission of the to-be-transmitted message.

[0005] In order to solve the above problems, the embodiments of the present application disclose a message transmission method, which comprises the following steps:

[0006] For any transmission channel of a sender, the sender acquires a to-be-transmitted message in the transmission channel;

[0007] The sender determines a micro packet type and a micro packet specification corresponding to the to-be-transmitted message based on a preset message-micro packet information correspondence corresponding to the transmission channel, and obtains a target micro packet type and a target micro packet specification;

[0008] The sender splits the to-be-transmitted message into a micro packet according to the target micro packet type and the target micro packet specification, and obtains a to-be-transmitted micro packet;

[0009] The sender performs message transmission to a receiver based on the to-be-transmitted micro packet.

[0010] On the other hand, the embodiments of the present application disclose a message transmission device, which comprises the following steps:

[0011] An acquisition module located at a sender is configured to acquire a to-be-transmitted message in any transmission channel of the sender;

[0012] A determination module located at the sender is configured to determine a micro packet type and a micro packet specification corresponding to the to-be-transmitted message based on a preset message-micro packet information correspondence corresponding to the transmission channel, and obtain a target micro packet type and a target micro packet specification;

[0013] A first splitting module located at the sender is configured to split the to-be-transmitted message into micro-packets according to the target micro-packet type and the target micro-packet specification, to obtain to-be-transmitted micro-packets.

[0014] A transmission module located at the sender is configured to perform message transmission to a receiver based on the to-be-transmitted micro-packets.

[0015] In another aspect, the embodiment of the present application discloses an electronic device, comprising a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction makes the processor execute the foregoing method.

[0016] The embodiment of the present application also discloses a machine readable medium, which stores instructions, and when executed by one or more processors, causes the processors to execute the method described above.

[0017] The embodiment of the present application has the following advantages: the message transmission method provided by the embodiment of the present application, for any transmission channel of the sender, the sender obtains to-be-transmitted messages in the transmission channel. Based on the preset message corresponding to the transmission channel and the micro-packet information corresponding relationship, the micro-packet type and the micro-packet specification corresponding to the to-be-transmitted message are determined, to obtain the target micro-packet type and the target micro-packet specification. The to-be-transmitted message is split into micro-packets according to the target micro-packet type and the target micro-packet specification, to obtain to-be-transmitted micro-packets. The sender performs message transmission to a receiver based on the to-be-transmitted micro-packets. In this way, by first splitting the to-be-transmitted message into to-be-transmitted micro-packets and performing message transmission to the receiver based on the to-be-transmitted micro-packets, message transmission of the to-be-transmitted message is realized.

[0018] Meanwhile, since it is not necessary to modify the content of the to-be-transmitted message itself, but only to split the to-be-transmitted message into micro-packets for subsequent transmission in the form of micro-packets, the generality of the message transmission method is ensured. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0020] Figure 1 is a step flow chart of a message transmission method provided by the embodiment of the present application;

[0021] Figure 2 is a block diagram of a message transmission device provided by the embodiment of the present application;

[0022] Figure 3 Figure 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0024] Referring to Figure 1 Figure 2 is a step flowchart of a message transmission method provided by an embodiment of the present application. The method can be applied to a point-to-point interconnection system, which includes a sender and a receiver. As shown in Figure 1 The message transmission method specifically includes the following steps:

[0025] Step 101: For any transmission channel of the sender, the sender obtains a to-be-transmitted message in the transmission channel.

[0026] Step 102: The sender determines a target micro packet type and a target micro packet specification based on a preset message-micro packet information correspondence corresponding to the transmission channel, to obtain the target micro packet type and the target micro packet specification.

[0027] Step 103: The sender splits the to-be-transmitted message into a micro packet according to the target micro packet type and the target micro packet specification, to obtain a to-be-transmitted micro packet.

[0028] Step 104: The sender performs message transmission to the receiver based on the to-be-transmitted micro packet.

[0029] The embodiments of the present application can be applied to a point-to-point interconnection scene. For example, point-to-point interconnection between chips and chips (Chip to Chip), dies and dies (Die to Die), inter-silicon point-to-point interconnection, etc. The point-to-point interconnection scene is an inter-chip interconnection scene. The chip (chip) or die (Die) participating in the point-to-point interconnection can perform data transmission based on an inter-chip data transmission bus. The die can be regarded as a chip that has not been packaged. The die can be a separate wafer area that contains a complete functional unit or a group of related functional units of a chip. The point-to-point interconnection system can include a plurality of chips participating in the point-to-point interconnection. The point-to-point interconnection system can be deployed in the same electronic device. The chips can be connected through a bus, or can be distributed in different devices. The embodiments of the present application do not limit this.

[0030] The sender in the point-to-point interconnection system can be a chip that needs to send a message in the system. The receiver in the point-to-point interconnection system can be a chip that needs to receive a message in the system, for example, the receiver can be a chip connected to the sender. In actual application scenarios, a chip can send data or receive data, that is, a chip can act as a sender in some cases and can also act as a receiver in some cases, and the embodiments of the present application do not limit this. In a point-to-point interconnection scenario, in order to maintain cache consistency between chips participating in point-to-point interconnection, it is necessary to maintain cache consistency by transmitting a consistency message. The chips maintain cache consistency between processor cores and between processors by transmitting a consistency message. The consistency message is a message that needs to be transmitted to maintain cache consistency, which can be referred to as a to-be-transmitted message. Accordingly, the to-be-transmitted message to be sent by the sender can be information that needs to be synchronized between the chips in the interconnection.

[0031] The sender can include a transmission channel, where the transmission channel can be a virtual channel (VC), and the sender can include multiple virtual channels. The virtual channel can be used for information transmission between two or more ends. Exemplarily, the virtual channel can be a logical path inside the sender to realize internal data transmission. Alternatively, it can also be a logical path between the sender and other chips outside, and the embodiments of the present application do not limit this. Further, the consistency message can be divided into a cache data block and a command block, and the command block includes the address of the cache data block, the cache block state, and the consistency request or response information, that is, the consistency message can be composed of one or more combinations of attributes, addresses, and data. The attributes and the address are non-data parts in the consistency message, and the non-data part is the command part. The data is the data part in the consistency message, and the data can be read or write data, that is, the data is read / write data. The attributes can include operation commands and the like generated by the source device / destination device, the tags of the source / destination device, and the data attributes (characteristic description of the data). The attributes of different types of messages can be different, and accordingly, the size of the attribute field can be different. Exemplarily, the size of the attribute field is generally within 1 double word (DW) to 3 DWs. 1 DW includes 32 bits. The address represents the destination physical address, and the size of the address field can be a fixed value. Exemplarily, the size of the address field can be no more than 2 DWs, and part of the messages can be sent by default, that is, part of the messages does not have an address part. The size of the data field can be a fixed value. Exemplarily, the size of the data field can be fixed as a data block size (16 DW). The attribute field, the data field, and the address field can represent the part for carrying attributes, the part for carrying data, and the part for carrying addresses in the message, respectively.

[0032] A flit can refer to a transmission unit in the field of interconnection, i.e., a basic unit of data transmission. Each flit can contain part of information of a coherency message. A to-be-transmitted message in a transmission channel can refer to a coherency message entering the virtual channel and requiring point-to-point transmission. In an embodiment of the present application, a coherency message corresponding to a transmission channel requiring cache coherency transmission can be obtained as a to-be-transmitted message in the transmission channel. Further, the sender can also obtain a message irrelevant to the transmission channel as a to-be-transmitted message. The message irrelevant to the transmission channel can include a non-coherency message, for example, a message from an input / output (IO).

[0033] The preset message-flit information correspondence can be used to represent the flit type and the flit specification corresponding to different messages. The flit type corresponding to a message indicates the type of flit that can be split from the message. The flit type corresponding to a message can be set according to the characteristics of the message. For example, in the case where the message of this type does not include a data part, the flit type corresponding to the message can be a command flit type. In the case where the message of this type includes a data part, the flit type corresponding to the message can be a command flit type and a data flit type. For example, if the flit type corresponding to a message is a command flit type, the message can be split into a command flit accordingly. If the flit type corresponding to a message is a command flit type and a data flit type, the message can be split into a command flit and a data flit accordingly. The flit specification corresponding to a message can be set according to the size of the non-data part and the size of the data part of the message. The flit specification corresponding to a message is used to indicate the size of each flit obtained by splitting the message into flits of this type. For example, the flit specification can include a command flit specification and a data flit specification. The command flit specification is used to indicate the size of a command flit obtained by splitting a message into command flits, and the data flit specification is used to indicate the size of a data flit obtained by splitting a message into data flits. In the preset message-flit information correspondence corresponding to a transmission channel, each message transmitted by the transmission channel and its corresponding flit information are defined. The flit information is the flit type and the flit specification corresponding to a message.

[0034] Further, the to-be-transmitted message can be matched with each message in the preset message-micro packet information correspondence corresponding to the transmission channel. Specifically, the name of the to-be-transmitted message can be compared with the name of each message defined in the preset message-micro packet information correspondence. If the names are consistent, it can be determined that the to-be-transmitted message is consistent with the message. Then, the micro packet type and the micro packet specification corresponding to the matched message are taken as the target micro packet type and the target micro packet specification. Accordingly, the to-be-transmitted message can be split into a micro packet conforming to the target micro packet type and the target micro packet specification. The split micro packet is the to-be-transmitted micro packet. After obtaining the to-be-transmitted micro packet, the to-be-transmitted micro packet can be packetized to obtain a target data packet. Then, the target data packet is sent to the receiver. In this way, after the data packet is obtained based on the to-be-output micro packet, the to-be-transmitted message in the transmission channel can be conveniently synchronized to the receiver in the point-to-point interconnection. By sending the target data packet to the receiver, the receiver can obtain the to-be-transmitted micro packet. The receiver can process the target data packet, thereby realizing the maintenance of cache consistency. Illustratively, the receiver can restore the target data packet to a consistency message. Accordingly, a corresponding operation can be performed in response to the consistency message, thereby realizing the maintenance of cache consistency.

[0035] In summary, in the message transmission method provided by the embodiment of the present application, for any transmission channel of the sender, the sender obtains the to-be-transmitted message in the transmission channel. Based on the preset message-micro packet information correspondence corresponding to the transmission channel, the micro packet type and the micro packet specification corresponding to the to-be-transmitted message are determined to obtain the target micro packet type and the target micro packet specification. The to-be-transmitted message is split into a micro packet according to the target micro packet type and the target micro packet specification to obtain the to-be-transmitted micro packet. The sender performs message transmission to the receiver based on the to-be-transmitted micro packet. In this way, by first splitting the to-be-transmitted message into a to-be-transmitted micro packet and performing message transmission to the receiver based on the to-be-transmitted micro packet, the to-be-transmitted message is realized.

[0036] At the same time, since the content of the to-be-transmitted message does not need to be modified, and only the to-be-transmitted message is split into a micro packet for subsequent transmission in the form of a micro packet, the generality of the message transmission method is ensured.

[0037] Optionally, in the embodiments of the present application, different transmission channels can be used to transmit different messages. The transmission channels can include a read request transmission channel, a read response transmission channel, a write request transmission channel, and a write response transmission channel. The four transmission channels each transmit different consistency messages, that is, different types of messages. Among them, the messages transmitted by the read request transmission channel include messages for requesting to read data, which can be regarded as read requests. The messages transmitted by the write request transmission channel include messages for requesting to write data, which can be regarded as write requests. The messages transmitted by the read response transmission channel include messages for responding to read requests. The messages for responding to read requests can be regarded as read responses. The messages transmitted by the write response transmission channel include messages for responding to write requests, which can be regarded as write responses. In this way, since different transmission channels transmit different messages, the deadlock problem caused by data dependency between messages in the transmission process can be avoided. It should be noted that in addition to transmitting read requests, read responses, write requests, and write responses, the four transmission channels can also transmit other consistency messages, and the embodiments of the present application do not limit this.

[0038] Exemplarily, the consistency messages transmitted by the read request transmission channel can include a level 1 cache read invalidation (ar_request_read) and a level 1 cache write invalidation (ar_request_write). The consistency messages transmitted by the write request transmission channel can include a level 1 cache replacement request (aw_replace), a last level cache (LLC) invalidation response aw_writeback_invalid, an LLC writeback response aw_writeback, and an LLC writeback and invalidation response aw_invalid. Among them, the LLC invalidation response, the LLC writeback response, and the LLC writeback and invalidation response are response messages sent by the processor core to the LLC. The consistency messages transmitted by the read response transmission channel can include a read request response (r_response), an LLC invalidation command (r_invalid), an LLC writeback command (r_writeback), and an LLC writeback and invalidation command (r_writeback_invalid). The consistency messages transmitted by the write response transmission channel can include a write request channel response (b_respense). The messages transmitted by each transmission channel and the related information of each message can be as shown in Table 1:

[0039]

[0040]

[0041] Table 1

[0042] Among them, the level one cache read miss and the level one cache write miss both read the data block to obtain the latest state of the data block, thereby triggering subsequent actions. The related information of the message includes message description, message content composition, and the size of the attribute field. The four transmission channels can be mapped into four virtual channels (VC0-VC3), wherein all the virtual channels generate command micro-packets, and only the read response transmission channel and the write request transmission channel have data micro-packets.

[0043] Optionally, the above splitting the to-be-transmitted message into micro-packets according to the target micro-packet type and the target micro-packet specification to obtain to-be-transmitted micro-packets can specifically include the following steps.

[0044] In the case where the target micro-packet type only includes the command micro-packet type, the to-be-transmitted message is split into command micro-packets conforming to the command micro-packet specification in the target micro-packet specification.

[0045] In the case where the target micro-packet type includes the command micro-packet type and the data micro-packet type, the non-data part of the to-be-transmitted message is split into command micro-packets conforming to the command micro-packet specification in the target micro-packet specification, and the data part of the to-be-transmitted message is split into data micro-packets conforming to the data micro-packet specification in the target micro-packet specification.

[0046] In the embodiment of the application, the consistency message includes a non-data part (including an attribute or an attribute and an address), or the consistency message includes a non-data part and a data part. If the to-be-transmitted message does not include a data part, for example, the to-be-transmitted message is a read request or a write response, then the target micro-packet type obtained by searching in the preset message and micro-packet information correspondence relationship includes only the command micro-packet type, and the target micro-packet specification includes only the command micro-packet specification. If the to-be-transmitted message includes a data part, for example, the to-be-transmitted message is a write request or a read response, then the target micro-packet type obtained by searching in the preset message and micro-packet information correspondence relationship includes the command micro-packet type and the data micro-packet type, and the target micro-packet specification includes the command micro-packet specification and the data micro-packet specification.

[0047] Further, the coherency message to be transmitted can be divided into data flits and command flits. The data flits have a large length span, and can include the size of one or more cache lines. The command flits usually have a small length, and according to the nature and characteristics of the content, the maximum length is generally not more than 96 bits, and the minimum length can be only a few bits. In the embodiment of the present application, the size of the supported data flit can be 16 DW. Further, the size of the supported command flit can be not more than 3 DW. Specifically, for different types of command flits, the size of the valid content can be rounded up to two specifications: 1 DW and 3 DW. Correspondingly, taking the existence of four transmission channels as an example, the preset message and flit information corresponding relationship corresponding to the four transmission channels can be shown in Table 2 as follows:

[0048]

[0049]

[0050] Table 2

[0051] Based on Table 2, the micro-packet type corresponding to the coherency message transmitted by each transmission channel and the micro-packet length (i.e., micro-packet specification) that can be split can be distinguished. Wherein, “-” represents the absence. If the content of the command flit item corresponding to the coherency message is not “-”, it is determined that the micro-packet type corresponding to the coherency message includes the command micro-packet type. If the content of the data flit item corresponding to the coherency message is not “-”, it is determined that the micro-packet type corresponding to the coherency message includes the data micro-packet type. The content of the command flit item and the content of the data flit item are the command micro-packet specification and the data micro-packet specification corresponding to the coherency message. Exemplarily, assuming that the to-be-transmitted message is a read request response r_response, the name of the to-be-transmitted message “read request response r_response” can be compared with the name of each coherency message defined in Table 2 to find the micro-packet type and the micro-packet specification corresponding to the matching message. Specifically, the content in the column of “coherency message” in Table 1 and Table 2 can represent the name of the message. Specifically, by searching, it can be found that the target micro-packet type includes the command micro-packet type and the data micro-packet type, and the target micro-packet specification includes the command micro-packet specification: 1 DW and the data micro-packet specification: 16 DW. In the embodiment of the present application, by searching in the preset message and flit information corresponding relationship, the splittable micro-packet type and the micro-packet length can be obtained. Correspondingly, subsequent splitting of the to-be-transmitted message according to the searched micro-packet type and the micro-packet length can avoid the problem of resource waste caused by uncertain micro-packet length. At the same time, splitting according to the searched micro-packet type and the micro-packet length can avoid the problem of increased complexity caused by too high degree of freedom, thereby increasing the transmission delay.

[0052] It should be noted that other transmission channels can also be set, and the messages in the other transmission channels can be non-coherent messages. For example, the other transmission channels can be used to transmit input / output (IO) messages, network messages, and the like.

[0053] Further, in the case where the target micro packet type only includes the command micro packet type, since the to-be-transmitted message does not include the data part, the to-be-transmitted message can be directly split into a micro packet of the corresponding specification according to the command micro packet specification in the target micro packet specification, to obtain the command micro packet. For example, assuming that the command micro packet specification in the target micro packet specification is 3DW, a 3DW-sized micro packet can be generated based on the non-data part of the to-be-transmitted message, to obtain a command micro packet.

[0054] In the case where the target micro packet type includes the command micro packet type and the data micro packet type, since the to-be-transmitted message includes the data part and the non-data part, the non-data part (i.e., the component of the message body) of the to-be-transmitted message can be split into a micro packet of the corresponding specification according to the command micro packet specification in the target micro packet specification, to obtain the command micro packet. For example, assuming that the command micro packet specification in the target micro packet specification is 3DW, a 3DW-sized micro packet can be generated based on the non-data part of the to-be-transmitted message, to obtain a command micro packet. It should be noted that the command micro packet can include fixed bits, and therefore, when the to-be-transmitted message is split into the command micro packet, the content of the non-data part of the to-be-transmitted message and the fixed bits can be combined into a micro packet. The fixed bits can be used as flag bits, and the content of the non-data part can be written into non-fixed bits. Specifically, the command part of the coherent message, i.e., the non-data part, will not exceed 3DW, and accordingly, at most one command micro packet is generated for one coherent message.

[0055] According to the data micro packet specification in the target micro packet specification, a micro packet of the corresponding specification is generated based on the data part of the to-be-transmitted message, to obtain the data micro packet. The data part can refer to the data carried by the to-be-transmitted message. For example, the content of a specific bit in the to-be-transmitted message can be identified as the data part of the to-be-transmitted message. Accordingly, the content of other bits except the specific bit is the non-data part of the to-be-transmitted message. Assuming that the data micro packet specification in the target micro packet specification is 16DW, a 16DW-sized micro packet is generated based on the data part of the to-be-transmitted message, to obtain a data micro packet. Specifically, the data part of the coherent message will not exceed 16DW, and accordingly, at most one data micro packet is generated for one coherent message, i.e., the size of the generated data micro packet is fixed at 16DW. However, the data part of the non-coherent message can be 3-16DW.

[0056] It should be noted that when the non-data part / data part is insufficient for the command micro packet size / data micro packet size, a command micro packet / data micro packet conforming to the command micro packet size / data micro packet size can be formed by padding. The padding can ensure that the boundary of the data packet is aligned, facilitating the receiving end to parse. For example, the non-data part / data part can be placed first, and then the remaining bits are padded with default characters, i.e., the content of the padding is located after the non-data part / data part. The default characters can be blank characters or special characters representing no function.

[0057] In the embodiment of the application, in the case where the micro packet size target micro packet type only includes the command micro packet type, the micro packet size to-be-transmitted message is split into a command micro packet conforming to the command micro packet size in the micro packet size target micro packet size. In the case where the micro packet size target micro packet type includes the command micro packet type and the data micro packet type, the non-data part of the micro packet size to-be-transmitted message is split into a command micro packet conforming to the command micro packet size in the micro packet size target micro packet size, and the data part of the micro packet size to-be-transmitted message is split into a data micro packet conforming to the data micro packet size in the micro packet size target micro packet size. In this way, the command micro packet is split according to the non-data part, and the data micro packet is split according to the data part, which is equivalent to a more general abstraction, and is decoupled from the semantics of each transmission protocol. This makes it more suitable for actual application scenarios.

[0058] Optionally, the embodiment of the application further includes the following steps:

[0059] In step S21, in the case where the target micro packet type only includes the command micro packet type, the value of the first flag bit in the command micro packet is set to a first target value.

[0060] In step S22, in the case where the target micro packet type includes the command micro packet type and the data micro packet type, the value of the first flag bit in the command micro packet is set to a second target value. The first target value is used to represent that the command micro packet is not accompanied by a data micro packet, to instruct the receiving end to directly process after receiving the command micro packet. The second target value is used to represent that the command micro packet is accompanied by a data micro packet, to instruct the receiving end to process after receiving the command micro packet and the data micro packet accompanied by the command micro packet.

[0061] In the embodiment of the present application, the first flag bit can be a fixed bit in the command micro packet, and the specific position of the first flag bit can be set as needed. For example, for a command micro packet of 3DW specification, the first flag bit can be the 95th bit. For a command micro packet of 1DW specification, the first flag bit can be the 31st bit. The first flag bit can also be referred to as a Data bit. In this way, when encapsulating the content of the consistent message through the command micro packet, 1 bit of content is used to indicate whether the command micro packet is accompanied by a data micro packet. Wherein, the command micro packet is accompanied by a data micro packet, which means that the to-be-transmitted message used to split the command micro packet is also split into a data micro packet, that is, the to-be-transmitted message used to split the command micro packet includes a data part. The command micro packet is not accompanied by a data micro packet, which means that the to-be-transmitted message used to split the command micro packet is only split into a command micro packet, that is, the to-be-transmitted message used to split the command micro packet does not include a data part. The first target value and the second target value can be set as needed. For example, the first target value can be 0, and the second target value can be 1.

[0062] Correspondingly, in the case where the target micro packet type only includes the command micro packet type, it is indicated that the to-be-transmitted message does not include a data part, and only a command micro packet is obtained after splitting. Correspondingly, the subsequent receiver does not need to wait for a data micro packet, and can obtain the to-be-transmitted message based on the command micro packet. Therefore, the value of the first flag bit can be set as the first target value. In the case where the target micro packet type includes the command micro packet type and the data micro packet type, it is indicated that the to-be-transmitted message includes a data part, and a command micro packet and a data micro packet are obtained after splitting. Correspondingly, the subsequent receiver needs to wait for a data micro packet, and can obtain the to-be-transmitted message based on the command micro packet and the accompanying micro packet. Therefore, the value of the first flag bit can be set as the second target value.

[0063] In the embodiment of the present application, after the to-be-transmitted message is split, only a command micro packet can be obtained, or a command micro packet and a data micro packet can be obtained. That is, for any kind of consistent message, a command micro packet exists, and a data micro packet can be sent by default. Therefore, by setting the first flag bit and setting the specific value of the first flag bit according to the splitting condition, the first flag bit can represent whether the command micro packet is accompanied by a data micro packet, so that the receiver can know whether to directly process after receiving the command micro packet or to wait for the data micro packet accompanied by the command micro packet and then process after receiving the command micro packet and the data micro packet accompanied by the command micro packet, thereby avoiding the problem that the receiver starts processing before receiving the data micro packet accompanied by the command micro packet, and cannot obtain the to-be-transmitted message due to incomplete data.

[0064] Optionally, before the above-mentioned message transmission to the receiver based on the to-be-transmitted micro packet, the embodiment of the present application can further include the following steps:

[0065] Step S31, compressing the data micro-packet in the to-be-transmitted micro-packet based on a target compression algorithm, and replacing the data micro-packet with the compressed data micro-packet.

[0066] Step S32, in the case of replacing the data micro-packet with the compressed data micro-packet, setting the value of the second flag bit in the command micro-packet to a third target value; the third target value is used to represent that the data micro-packet accompanied by the command micro-packet is compressed, to instruct the receiver to perform a decompression operation after receiving the data micro-packet.

[0067] In the embodiment of the present application, for the data micro-packet obtained by splitting the consistency message, the content is the content of the cache data block in the system, and the length is fixed. The content of these data blocks has repetition or certain composition rule (for example, there are continuous "0" values or "1" values, or the content is the repetition of a certain data pattern, etc.). Therefore, a target compression algorithm can be introduced to compress the data micro-packet in the to-be-transmitted micro-packet, and replace the data micro-packet with the compressed data micro-packet.

[0068] The second flag bit can be a fixed bit in the command micro-packet, and the specific position of the second flag bit can be set as needed. The third target value can also be set as needed. For example, the third target value can be 1. For example, the bit field content of the command micro-packet of the 3DW specification and the bit field content of the command micro-packet of the 1DW specification can be as shown in Table 3 and Table 4:

[0069] Bit 95 94 ... N: 0 (N <= 93) Content Data Cmpr ... Non-data portion

[0070] Table 3

[0071] Bit 31 30 ... N: 0 (N <= 29) Content Data Cmpr ... Non-data portion

[0072] Table 4

[0073] For the command micro-packet of the 3DW specification, the second flag bit can be the 94th bit. For the command micro-packet of the 1DW specification, the second flag bit can be the 30th bit. The second flag bit can also be referred to as the Cmpr bit, which is used to indicate whether the accompanied data micro-packet is compressed. In this way, it is equivalent to indicating whether it is compressed through the 1-bit position in the command micro-packet corresponding to the data micro-packet (the command micro-packet is split from the same to-be-transmitted message as the data micro-packet). Accordingly, when the receiver parses the command micro-packet, it can be judged according to the second flag bit whether the corresponding data micro-packet needs to be decompressed.

[0074] In the embodiment of the present application, the data micro-packet in the to-be-transmitted micro-packet is compressed based on a target compression algorithm, and the data micro-packet is replaced by the compressed data micro-packet, thereby reducing the length of the data to be transmitted subsequently, reducing the bandwidth required for subsequent transmission, and improving the channel utilization rate. Meanwhile, in the case of replacing the data micro-packet with the compressed data micro-packet, the value of the second flag bit in the command micro-packet is set to a third target value, so that the receiver can know to perform the decompression operation after receiving the data micro-packet, thereby avoiding the problem that the receiver does not perform decompression, resulting in processing errors.

[0075] Optionally, the data micro-packet is replaced by the compressed data micro-packet, which can specifically include: in the case that the data amount of the compressed data micro-packet is less than the original data amount, the data micro-packet is replaced by the compressed data micro-packet; the original data amount is the data amount before the data micro-packet is compressed.

[0076] In the actual application scenario, compression can cause uncertainty in the length of the data micro-packet. For example, assuming that each data block is 16DW before compression, the transmission length after compression by the compression algorithm can be any length in 3-16DW. That is, for each consistent message, the size of the corresponding data micro-packet after compression is any length in 3-16DW. If the data amount of the compressed data micro-packet is less than the original data amount, it means that compression can reduce the length of the data micro-packet, and therefore the operation of replacing the data micro-packet with the compressed data micro-packet can be performed. Correspondingly, if the data amount of the compressed data micro-packet is not less than the original data amount, it means that compression cannot reduce the length of the data micro-packet. Therefore, the operation of replacing the data micro-packet with the compressed data micro-packet is not performed. In this way, unnecessary replacement operations can be avoided, thereby saving processing resources. It should be noted that in the case where the data micro-packet is not replaced by the compressed data micro-packet, the second flag bit can be set to a fifth target value. The fifth target value is used to represent that the data micro-packet accompanied by the command micro-packet has not been compressed. For example, the fifth target value can be 0.

[0077] Optionally, the data micro-packet in the to-be-transmitted micro-packet is compressed based on a target compression algorithm, which can specifically include:

[0078] Step S311, selecting a data compression algorithm from the preset data compression algorithms as the target compression algorithm.

[0079] Step S312, compressing the data micro-packet according to the target compression algorithm based on the special compression engine.

[0080] Correspondingly, the embodiment of the present application can also include the following steps: step S41, setting the value of the third flag bit in the command micro-packet to a fourth target value; the fourth target value is used to represent that the data micro-packet accompanied by the command micro-packet is compressed by the target compression algorithm, to instruct the receiving party to perform a decompression operation by using the decompression algorithm corresponding to the target compression algorithm.

[0081] In the embodiment of the present application, the preset data compression algorithm can be a lossless compression algorithm, and the preset data compression algorithm can be selected as needed. For example, the preset data compression algorithm can include a BDI (Base-Delta-Immediate) compression algorithm and a FPC (Frequent-Pattern Compression) compression algorithm. The BDI compression algorithm can uniformly divide the data micro-packet into multiple segments, and each segment is subtracted from a selected base value to obtain a delta, so as to achieve compression. In the compressible scenario, the length of the delta is less than the length of the original data micro-packet. Accordingly, the delta (representing the compressed data micro-packet) can be used to replace the original data micro-packet (referring to the data micro-packet that has not been compressed). The FPC compression algorithm can count the data patterns that frequently appear in the actual application scenario, and encode the data micro-packet for these data patterns to achieve compression.

[0082] When selecting the target compression algorithm, a preset data compression algorithm can be randomly selected as the target compression algorithm, or a preset data compression algorithm set as the default algorithm can also be selected as the target compression algorithm. Alternatively, a preset data compression algorithm with the largest compression rate can be selected as the target compression algorithm. For example, the data micro-packet can be first compressed by using each preset data compression algorithm, and the compression rate of each preset data compression algorithm can be determined based on the compression result. Then, the preset data compression algorithm with the largest compression rate is selected as the target compression algorithm. The special compression engine can be a hardware component in the sending party that is specially used for compressing the data micro-packet. Specifically, the target compression algorithm can be run by the special compression engine, and the compression operation can be performed on the input data micro-packet. Accordingly, the special compression engine can output the compressed data micro-packet.

[0083] The third flag bit can be a fixed bit in the command micro-packet, and a specific position of the third flag bit can be set as needed. The fourth target value can be a preset value for indicating a target compression algorithm, and preset values of different preset data compression algorithms are different. A bit number of the third flag bit can be set according to a total number of preset data compression algorithms. For example, assuming that there are three preset data compression algorithms, the third flag bit can be two bits, and preset values of the three preset data compression algorithms can be 00, 01 and 10 respectively. The third flag bit and the second flag bit described above can be collectively referred to as compression-related flag bits.

[0084] In the embodiment of the application, one data compression algorithm is selected from preset data compression algorithms as a target compression algorithm, and a data micro-packet is compressed based on a special compression engine according to the target compression algorithm. Since the special compression engine is specially used for compressing data micro-packets, compression speed can be ensured to a certain extent, transmission delay caused by compression is reduced, and an overhead of introducing a compression operation on transmission delay is within an acceptable range. Meanwhile, a value of the third flag bit in the command micro-packet is set as the fourth target value, so that a receiving party can know which decompression algorithm is used for decompression operation after receiving the data micro-packet, and a problem that the receiving party causes decompression error due to mismatching of a used decompression algorithm is avoided.

[0085] Optionally, the message transmission to the receiving party based on the to-be-transmitted micro-packet can specifically include the following steps.

[0086] In step 1041, a data packet is generated based on the to-be-transmitted micro-packet, and a target data packet is obtained.

[0087] In step 1042, the target data packet is sent to the receiving party.

[0088] In the embodiment of the present application, the split obtained to-be-transmitted micro-packets can be merged to form a target data packet. Exemplarily, the to-be-transmitted micro-packets can be packaged according to the packet grouping rule of the used transmission protocol to obtain the target data packet. For example, the to-be-transmitted micro-packets are selected according to the packet size, the number of micro-packets and the type of micro-packets specified by the packet grouping rule, and the target data packet is obtained based on the selected to-be-transmitted micro-packets. The number and type of the selected to-be-transmitted micro-packets meet the number of micro-packets and the type of micro-packets specified by the packet grouping rule, and the total size of the selected to-be-transmitted micro-packets does not exceed the packet size specified by the packet grouping rule. In the embodiment of the present application, the obtained to-be-transmitted micro-packets can access various transmission protocols, for example, the to-be-transmitted micro-packets can be packaged into target data packets according to the HyperTransport (HT) protocol, the Peripheral Component Interconnect Express (PCIE) protocol, the Universal Chiplet Interconnect Express (UCIe) protocol or the QuickPath Interconnect (QPI) protocol, so as to be transmitted point-to-point.

[0089] The lengths of different target data packets can be consistent or inconsistent, that is, the to-be-transmitted micro-packets can be merged to form to-be-transmitted micro-packets of different lengths. A to-be-transmitted micro-packet can only include to-be-transmitted micro-packets split from to-be-transmitted messages in the same transmission channel, or can include to-be-transmitted micro-packets split from to-be-transmitted messages in different transmission channels. The arrangement order of the to-be-transmitted micro-packets belonging to the same transmission channel in the target data packet matches the generation order of the to-be-transmitted micro-packets. That is, the placement order of the to-be-transmitted micro-packets corresponding to the same transmission channel in the packet grouping process is the same as the generation order in their to-be-sent queues. The generation order can be the order in which the micro-packets are split. Since the source end and the destination end have strict dependence on the order of consistent messages on the same transmission channel, and the content transmitted by the micro-packet does not need to be analyzed in the transmission process, that is, the information of the micro-packet does not need to be processed and processed. Therefore, in the embodiment of the present application, the to-be-transmitted micro-packets are grouped by splitting the to-be-transmitted messages into micro-packets. And the to-be-transmitted micro-packets are grouped according to the generation order, so that the arrangement order of the to-be-transmitted micro-packets corresponding to the same transmission channel in the target data packet matches the generation order. In this way, the correct work of the sending end and the receiving end can be ensured, and the consistency of the consistent messages of each transmission channel at the receiving end and the consistent messages of the sending end can be ensured.

[0090] Correspondingly, the embodiment of the present application can also include the following steps:

[0091] Step 105, the receiver splits the received target data packet into micro-packets to obtain target micro-packets.

[0092] Step 106, the receiver processes the target micro-packets based on the flag bit of the command micro-packet in the target micro-packet.

[0093] In the embodiment of the application, the receiver can parse the target data packet to obtain the micro-packets included therein. Specifically, the receiver can extract the identifiers of the transmission channels to which the target micro-packets carried by the target data packet belong from the bits in the packet header information used to store the identifiers of the transmission channels, and determine the target micro-packets with the same identifier of the transmission channel as belonging to the same transmission channel. Different to-be-processed queues can be set for different transmission channels, i.e., the transmission channels and the to-be-processed queues in the receiver correspond to each other in a one-to-one manner. For the target micro-packets belonging to the same transmission channel and carried by the target data packet, these target micro-packets can be sequentially written into the to-be-processed queues corresponding to the transmission channels to which these target micro-packets belong in the order of arrangement. Since the order of arrangement is consistent with the order of generation of the target micro-packets, the processing order of the receiver and the sender for the consistent message on the same transmission channel can be consistent when subsequent processing is performed based on the to-be-processed queues. It should be noted that the receiver can determine the consistent message represented by the micro-packets stored in the to-be-processed queue corresponding to each transmission channel and perform the consistent message represented thereby, thereby realizing the cache consistency between the receiver and the sender. Since the to-be-transmitted message can be composed of only command micro-packets or composed of command micro-packets and data micro-packets, the receiver can process the target micro-packets based on the flag bit of the command micro-packet in the target micro-packet. The flag bit can include the first flag bit, the second flag bit, and the third flag bit. In this way, the receiver can normally complete the processing.

[0094] Optionally, the processing of the target micro-packet based on the flag bit of the command micro-packet in the target micro-packet can specifically include:

[0095] Step 1061, in the case where the value of the first flag bit in the command micro-packet is a first target value, the command micro-packet is directly processed.

[0096] Step 1062, in the case where the value of the first flag bit in the command micro-packet is a second target value and the value of the second flag bit is a third target value, after receiving the data micro-packet accompanied by the command micro-packet, the data micro-packet accompanied by the command micro-packet is decompressed based on a target decompression algorithm, and the decompressed data micro-packet and the command micro-packet are processed; the target decompression algorithm is a decompression algorithm corresponding to a target compression algorithm represented by the value of the third flag bit in the command micro-packet.

[0097] In the embodiment of the present application, for the command micro-packet in the to-be-processed queue of any transmission channel, if the value of the first flag bit in the command micro-packet is the first target value, it means that no data micro-packet is accompanied, and accordingly, the command micro-packet in the to-be-processed queue can be directly processed. For example, the command micro-packets in the to-be-processed queue from the same to-be-transmitted packet can be merged to obtain the to-be-transmitted packet. If the value of the first flag bit in the command micro-packet is the second target value, it means that a data micro-packet is accompanied, and accordingly, the accompanied data micro-packet can be written into the to-be-processed queue of the transmission channel. Accordingly, if the accompanied data micro-packet is written into the to-be-processed queue of the transmission channel, it can be determined that the data micro-packet accompanied by the command micro-packet is received. Accordingly, the command micro-packet and the data micro-packet can be converted into a to-be-transmitted packet. Specifically, if the value of the second flag bit is the third target value, it means that the data micro-packet is compressed, and therefore, the data micro-packet accompanied by the command micro-packet can be first decompressed based on the target decompression algorithm. Conversely, if the value of the second flag bit is not the third target value, it means that the data micro-packet is not compressed, and therefore, no decompression is performed. Specifically, if the value of the second flag bit is the third target value, the value of the third flag bit in the command micro-packet can be read, and the decompression algorithm corresponding to the target compression algorithm represented by the value of the third flag bit in the command micro-packet is used for decompression.

[0098] Correspondingly, if the data micro packet arrives at the corresponding to-be-processed queue of the transmission channel first, the corresponding command micro packet needs to be received in the to-be-processed queue corresponding to the transmission channel. In the embodiment of the present application, there are two cases for the micro packet generated by a to-be-transmitted message: only one command micro packet, or one command micro packet and one data micro packet. For the first micro packet written into the to-be-processed queue, if the first micro packet is a data micro packet, it can be determined that the data micro packet arrives first, and the command micro packet from the same message needs to be waited for. Specifically, the next command micro packet written into the to-be-processed queue can be determined as the command micro packet from the same message as the data micro packet, and the command micro packet accompanied by the data micro packet and the data micro packet accompanying the command micro packet are obtained. Correspondingly, the command micro packet and the data micro packet accompanying the command micro packet can be dequeued and restored into a consistent message. If the first micro packet is a command micro packet and the value of the first flag bit is the second target value, that is, the command micro packet is accompanied by a data micro packet, the next data micro packet written into the to-be-processed queue can be determined as the data micro packet from the same message as the command micro packet, and the command micro packet accompanied by the data micro packet and the data micro packet accompanying the command micro packet are obtained. Correspondingly, the command micro packet and the data micro packet accompanying the command micro packet can be dequeued and restored into a consistent message. If the first micro packet is a command micro packet and the value of the first flag bit is the first target value, that is, the command micro packet is not accompanied by a data micro packet, the command micro packet can be dequeued and restored into a consistent message. Further, for the subsequent newly enqueued micro packet, it can be judged whether the micro packet is a data micro packet, a command micro packet with the value of the first flag bit being the second target value, or a command micro packet with the value of the first flag bit being the first target value, and then the corresponding processing can be performed according to the above processing mode.

[0099] In the embodiment of the present application, if the consistent message is directly packaged and transmitted according to the point-to-point transmission protocol, a large overhead and bandwidth performance loss will be caused in the conversion process, and the compatibility and expansibility between devices are not possessed. In the embodiment of the present application, the consistent message is first split into micro packets, and then the micro packets are combined based on the micro packets, so that the target data packet can be obtained. In this way, the consistent message can be conveniently converted into a point-to-point transmission data packet. Moreover, in the embodiment of the present application, the content of the to-be-transmitted message itself does not need to be modified, and only the micro packet is used as a carrier to split the to-be-transmitted message into micro packets, and when the packet is combined, the micro packets are combined to obtain the target data packet. In this way, it can be ensured that the cross-chip transmission mode can support various consistent transmission protocols, without modifying the transmission protocol, and the universality is high, and the compatibility and expansibility are better.

[0100] The embodiment of the present application also provides a message transmission device which can be located at a sending end in a point-to-point interconnection system. The message transmission device specifically comprises a first transmission controller and a second transmission controller. The first transmission controller comprises an acquisition component, a micro-packet generation component, a micro-packet enqueuing controller, a channel interface corresponding to a transmission channel, a micro-packet queue memory and a micro-packet dequeuing controller. The second transmission controller comprises a receiving component, a data packet generation component and a sending component. The acquisition component is connected with the channel interface corresponding to each transmission channel and the micro-packet generation component respectively. The micro-packet generation component is connected with the micro-packet enqueuing controller. The micro-packet enqueuing controller is connected with the micro-packet queue memory. The micro-packet dequeuing controller is connected with the micro-packet queue memory and the receiving component respectively.

[0101] The micro-packet queue memory comprises a command queue memory and a data queue memory. The micro-packet enqueuing controller comprises a command micro-packet enqueuing sub-controller and a data micro-packet enqueuing sub-controller. The micro-packet generation component is connected with the command micro-packet enqueuing sub-controller and the data micro-packet enqueuing sub-controller respectively. The data micro-packet enqueuing sub-controller specifically comprises a dedicated compression engine and an enqueuing unit. The dedicated compression engine is connected with the enqueuing unit. The enqueuing unit is connected with the data queue memory. The command micro-packet enqueuing sub-controller is also connected with the dedicated compression engine. The receiving component is connected with the data packet generation component. The data packet generation component is connected with the sending component.

[0102] The acquisition component can realize the step 101. The micro-packet generation component can be used to realize the steps 102-103 and send the obtained to-be-transmitted micro-packet to the micro-packet enqueuing controller. The micro-packet enqueuing controller, the micro-packet dequeuing controller, the micro-packet queue memory and the second transmission controller can realize the step 104. Specifically, the coherence message generated in the chip can be input based on the channel interface corresponding to the transmission channel. Accordingly, the acquisition component can determine the message input by the channel interface corresponding to each transmission channel as the to-be-transmitted message in each transmission channel. Different transmission channels are used to transmit different messages. The coherence message generated in the chip can be input through the channel interface corresponding to the transmission channel. Different transmission channels correspond to different channel interfaces. The channel interface can be a network-on-chip interface. Specifically, it can be a bus interface which needs to be transmitted through point-to-point cross-chip in the network-on-chip. In the embodiment of the present application, the coherence message input by the channel interface corresponding to the transmission channel which needs to be transmitted through cache coherence can be acquired to obtain the to-be-transmitted message in the transmission channel.

[0103] The micro packet generation component can send the data micro packets in the generated to-be-transmitted micro packets to the special compression engine in sequence, the special compression engine sends the data micro packets to the enqueuing unit after processing the data micro packets, the enqueuing unit combines the data micro packets into a second element item in the data queue in the data queue storage, and writes the second element item into the data queue.

[0104] The element item in the micro packet queue can include at least one micro packet. The micro packet dequeuing controller dequeues the element item in the micro packet queue storage to the receiving component. The data packet generation component obtains the to-be-transmitted micro packet included in the dequeued element item, and generates a target data packet based on the to-be-transmitted micro packet. The sending component sends the target data packet to the receiving party.

[0105] The micro packet dequeuing controller can include a command micro packet dequeuing sub-controller and a data micro packet dequeuing sub-controller. The command micro packet dequeuing sub-controller is connected with the command queue storage, and is used to dequeue the element item of the command queue in the command queue storage. The data micro packet dequeuing sub-controller is connected with the data queue storage, and is used to dequeue the element item of the data queue in the data queue storage. In this way, by performing the enqueuing and dequeuing operations on the micro packet queue, and after obtaining the target data packet based on the to-be-output micro packet in the dequeued element item, the to-be-transmitted message in the transmission channel can be conveniently synchronized to the receiving party in the point-to-point interconnection.

[0106] The micro packet queue storage includes the micro packet queue used for storing the to-be-transmitted micro packet corresponding to each transmission channel. One transmission channel corresponds to at least one micro packet queue, and the micro packet queue corresponding to each transmission channel only writes the micro packet obtained by splitting the to-be-transmitted message in the transmission channel. The channel interface corresponding to the transmission channel and the micro packet queue storage can both belong to the category of the transmission channel.

[0107] In the embodiment of the application, the to-be-transmitted micro packet obtained by splitting the to-be-transmitted message can only include the command micro packet, or can include the command micro packet and the data micro packet. For any transmission channel, if the consistent message transmitted by the transmission channel does not include the data part, that is, the to-be-transmitted micro packet obtained by splitting the to-be-transmitted message in the transmission channel only includes the command micro packet, then the command queue can be only set in the command queue storage for the transmission channel. If the consistent message transmitted by the transmission channel includes the data part, that is, there is a to-be-transmitted message in the transmission channel that splits the command micro packet and the data micro packet, then the command queue and the data queue can be set in the command queue storage and the data queue storage for the transmission channel.

[0108] In the embodiment of the present application, one transmission channel corresponds to one channel interface, so there are four transmission channels: transmission channel A, transmission channel B, transmission channel C and transmission channel D. The consistency message transmitted by transmission channel A and transmission channel D does not include a data part. The consistency message transmitted by transmission channel B and transmission channel D includes a consistency message including a data part. In the first transmission control, the channel interface included in the first transmission control can include the channel interface corresponding to transmission channel A, the channel interface corresponding to transmission channel B, the channel interface corresponding to transmission channel C and the channel interface corresponding to transmission channel D. The micro packet queue specifically includes a plurality of micro packet queues corresponding to transmission channel A, transmission channel B, transmission channel C and transmission channel D: the command queue a corresponding to transmission channel A, the command queue b1 and the data queue b2 corresponding to transmission channel B, the command queue c1 and the data queue c2 corresponding to transmission channel C, and the command queue d corresponding to transmission channel D.

[0109] The operation of setting the value of the first flag bit in the command micro packet can be performed by the micro packet generation component. Specifically, the first element item refers to an element item in the command queue in the command queue memory, and the second element item refers to an element item in the data queue in the data queue memory. The command micro packet enqueuing sub-controller can write the command micro packet in the to-be-transmitted micro packet into the command queue corresponding to the transmission channel to which the to-be-transmitted micro packet belongs. For example, if the to-be-transmitted micro packet is obtained by splitting the to-be-transmitted message in transmission channel B, the command micro packet in the to-be-transmitted micro packet can be written into the above-mentioned command queue b1 in the command queue memory. Specifically, the command micro packet enqueuing sub-controller can combine a plurality of command micro packets into one item to obtain a first element item, and perform an enqueuing operation to write the first element item into the command queue in the command queue memory. For example, if the plurality of command micro packets are: command micro packet 1, command micro packet 2, command micro packet 3 and command micro packet 4, the command micro packet 1, the command micro packet 2, the command micro packet 3 and the command micro packet 4 can be spliced to obtain a first element item, which is then written into an element of the command queue to implement the enqueuing operation.

[0110] Further, if the to-be-transmitted micro packet further includes a data micro packet, the data micro packet enqueuing sub-controller can further write the data micro packet in the to-be-transmitted micro packet into a data queue corresponding to the transmission channel to which the to-be-transmitted micro packet belongs. For example, assuming that the to-be-transmitted micro packet is obtained by splitting the to-be-transmitted packet in the transmission channel B, the to-be-transmitted micro packet further includes a data micro packet, and the first transmission control can write the data micro packet in the to-be-transmitted micro packet into the data queue b2 in the data queue storage. Specifically, the data micro packet enqueuing sub-controller can combine a plurality of data micro packets into one second element item, and perform an enqueuing operation to write the second element item into the data queue in the data queue storage. For example, assuming that the plurality of data micro packets are data micro packet 1 and data micro packet 2, the data micro packet 1 and the data micro packet 2 can be spliced to obtain a second element item, which is then written into an element of the data queue to implement the enqueuing operation.

[0111] In the embodiment of the application, by respectively setting the command queue storage and the data queue storage, and writing the command micro packet and the data micro packet in the to-be-transmitted micro packet into the command queue and the data queue in the form of the first element item and the second element item, the command micro packet and the data micro packet can be prevented from being mixed together, and subsequent processing of the command micro packet and the data micro packet is facilitated.

[0112] Optionally, in the embodiment of the application, the command micro packet enqueuing sub-controller is specifically configured to select, as to-be-merged command micro packets, command micro packets generated adjacently from the command micro packet according to a command queue width of the command queue, the total data width of the to-be-merged command micro packets being not greater than the command queue width; and the data micro packet enqueuing sub-controller is specifically configured to select, as to-be-merged data micro packets, data micro packets generated adjacently from the data micro packet according to a data queue width of the data queue, the total data width of the to-be-merged data micro packets being not greater than the data queue width.

[0113] The command queue width represents the bit width of the element item in the command queue, and the data queue width represents the bit width of the element item in the data queue. The total data width of the to-be-merged command micro packets can be the sum of the data widths of all the to-be-merged command micro packets, and the total data width of the to-be-merged data micro packets can be the sum of the data widths of all the to-be-merged data micro packets. The data width of the micro packet refers to the bit width occupied by the micro packet, which can correspond to the length of the micro packet.

[0114] The command queue width is often larger than the bit width occupied by the command micro-packet, and the data queue width is often larger than the bit width occupied by the data micro-packet. Therefore, the command micro-packets can be merged and written into a command queue in the command queue memory, and the data micro-packets can be merged and written into a data queue in the data queue memory. The command queue and the data queue can be first-in-first-out queues (FIFOs). The micro-packet generation component generates the micro-packets in sequence in the process of splitting the to-be-transmitted packet. For any command micro-packet generated in sequence, the command micro-packets generated before and after the command micro-packet can be regarded as the command micro-packets generated adjacently to the command micro-packet.

[0115] The micro packet generation component can send the generated command micro packet to the command micro packet enqueuing sub-controller. Specifically, the micro packet generation component sends the generated command micro packet to the command micro packet enqueuing sub-controller responsible for enqueuing in the first transmission controller in the order of generation. Accordingly, after receiving the command micro packet, the command micro packet enqueuing sub-controller can enqueue the command micro packet. The command micro packet enqueuing sub-controller can first obtain the to-be-merged command micro packet from the received non-enqueued command micro packet according to the command queue width of the command queue. Specifically, the command micro packet enqueuing sub-controller can select the command micro packet from the non-enqueued command micro packet in the order of reception (wherein the command micro packet received in turn is the command micro packet generated in turn), until the total data width of the selected command micro packet reaches the command queue width, or the difference between the command queue width and the total data width is less than the data width of the next command micro packet (at this time, there can be non-selected non-enqueued command micro packets, but since the command queue width cannot accommodate more command micro packets at present, the selection can be ended), or all non-enqueued command micro packets are selected (at this time, the difference between the command queue width and the total data width can be greater than the data width of a command micro packet, but since all non-enqueued command micro packets have been selected, the selection can be ended to facilitate subsequent enqueuing operation and avoid waiting). The total data width of the selected command micro packet represents the sum of the data widths of all selected command micro packets. Accordingly, the selected command micro packet is the to-be-merged command micro packet. Further, the to-be-merged command micro packet can be merged to obtain a first element item. The to-be-merged command micro packet can be merged by connecting the command micro packets obtained in turn at the head and tail according to the order of reception, which is equivalent to writing the command micro packets in the order of generation into the command queue. Accordingly, if there are many command micro packets sent, multiple command micro packets can be obtained as to-be-merged command micro packets, and accordingly, the multiple command micro packets obtained can be merged into a first element item, which can be dequeued together in subsequent dequeuing. If there are few command micro packets sent, only one command micro packet can be obtained (for example, the current non-enqueued command micro packet only includes one command micro packet), i.e., the number of to-be-merged data micro packets is one, and at this time, the obtained command micro packet can be directly taken as a first element item.

[0116] For any data micro packet generated in sequence, the data micro packet generated before and the data micro packet generated after can be regarded as the adjacent generated data micro packet of the data micro packet. The micro packet generation component sends the generated data micro packet to the data micro packet enqueuing sub-controller. Specifically, the micro packet generation component can send the generated data micro packet to the data micro packet enqueuing sub-controller responsible for enqueuing in the first transmission controller in sequence according to the generation order. Correspondingly, after receiving the data micro packet, the data micro packet enqueuing sub-controller can enqueue the data micro packet. The data queue width of the data queue can be used to obtain the to-be-merged data micro packet from the received unenqueued data micro packet. Specifically, the data micro packet can be selected from the unenqueued data micro packet in sequence according to the receiving order (wherein the data micro packet received in sequence is the adjacent generated data micro packet), until the total data width of the selected data micro packet reaches the data queue width, or the difference obtained by subtracting the total data width from the data queue width is less than the data width of the next data micro packet (at this time, there may still be unenqueued data micro packets that have not been selected, but since the data queue width currently cannot accommodate more data micro packets, the selection can be ended), or all unenqueued data micro packets are selected (at this time, the difference obtained by subtracting the total data width from the data queue width may be greater than the data width of a data micro packet, but since all unenqueued data micro packets have been selected, the selection can be ended to facilitate subsequent enqueuing operation and avoid waiting). The total data width of the selected data micro packet represents the sum of the data widths of all selected data micro packets. Correspondingly, the selected data micro packet is the to-be-merged data micro packet. Further, the to-be-merged data micro packet can be merged to obtain a first element item. The to-be-merged data micro packet can be merged by sequentially connecting the first positions of the data micro packets obtained in sequence according to the receiving order, which is equivalent to writing the data micro packets into the data queue in sequence according to the generation order. Correspondingly, if the data micro packet sent is more, a plurality of data micro packets can be obtained, and correspondingly, the plurality of data micro packets obtained can be merged into a second element item, which can be dequeued together when the queue is dequeued. If the data micro packet sent is less, only one data micro packet can be obtained, that is, the number of to-be-merged data micro packets is 1, at this time, the obtained data micro packet can be directly taken as a second element item.

[0117] In the embodiment of the present application, by selecting the to-be-merged command micro-packet with a total data width not greater than the command queue width, a first element item in the command queue is generated by merging, and by selecting the to-be-merged data micro-packet with a total data width not greater than the data queue width, a second element item in the data queue is generated by merging. When subsequent packet transmission to the receiving party based on the element items in the micro-packet queue in the micro-packet queue memory is performed, the element items in the micro-packet queue are dequeued, which is equivalent to sending the merged micro-packets in the same item as a longer micro-packet combination, so that the transmission efficiency can be improved and the channel bottleneck can be prevented.

[0118] Optionally, in the embodiment of the present application, the micro-packet generation component is specifically configured to send the generated command micro-packets to the command micro-packet enqueue sub-controller in sequence according to a first clock frequency, and send the generated data micro-packets to the data micro-packet enqueue sub-controller in sequence; wherein the first clock frequency is greater than a clock frequency used for dequeuing the first element item in the command queue in the command queue memory, and the first clock frequency is greater than a clock frequency used for dequeuing the second element item in the data queue in the data queue memory.

[0119] The first clock frequency can be set as needed, the first clock frequency can correspond to an on-chip clock domain, and the clock frequency used for dequeuing the first element item and the clock frequency used for dequeuing the second element item can correspond to a controller clock domain. The first clock frequency is greater than the clock frequency used for dequeuing the first element item in the command queue, and is greater than the clock frequency used for dequeuing the second element item in the data queue, which means that the command micro-packet and the data micro-packet are sent to the command queue memory / data queue memory in a fast clock domain, and are output to the second transmission controller in a slow clock domain. In this way, sufficient command micro-packets and data micro-packets can be merged and written into the command queue memory / data queue memory. By merging and writing the command micro-packet and the data micro-packet into the command queue memory / data queue memory, the clock domain conversion characteristics involved in enqueueing and dequeuing can be adapted, so that the data channel bandwidths before and after the command queue memory remain substantially the same, the data channel bandwidths before and after the data queue memory remain substantially the same, and thus the channel bottleneck can be avoided.

[0120] Further, a dedicated compression engine can be used to implement the above steps S31-S32. Specifically, the dedicated compression engine can instruct the command micro packet enqueue sub-controller to set the second flag and the third flag. The dedicated compression engine can also notify the command micro packet enqueue sub-controller when the data micro packet is replaced by the compressed data micro packet, so that the command micro packet enqueue sub-controller sets the second flag and the third flag. In the embodiment of the present application, the data micro packet is compressed by the dedicated compression engine before entering the data queue in the data queue memory. If the total data width of the adjacent compressed data micro packets is not greater than the data queue width, the data micro packets can be stored in the same entry of the data queue.

[0121] In the embodiment of the present application, the first transmission controller can be a sending end of a consistent message transmission controller, and the second transmission controller can also be referred to as a point-to-point transmission controller. The consistent message transmission controller and the point-to-point transmission controller are arranged on the same chip, and the consistent message transmission controller can also include a receiving end. The sending end can implement the functions of the first transmission controller. According to the general interconnection protocol concept, the second transmission controller can include a data link layer and a physical layer, and the first transmission controller can be a part of the entire point-to-point transmission protocol layer. The second transmission controller can include an arbitrator. The command queue memory and the data queue memory corresponding to all transmission channels can dequeue the element entries to the arbitrator. The arbitrator can control the priority of the micro packets in the command queue memory and the data queue memory corresponding to different transmission channels input to the arbitrator according to a preset arbitration method, to control the priority of the micro packets for packet assembly. The higher the priority, the earlier the micro packet is assembled into the target data packet.

[0122] Further, the receiving end can be configured to receive the target data packet sent by other chips, and parse the target data packet according to the packet information to obtain the micro-packets on each transmission channel, obtain the consistent messages on each transmission channel based on the micro-packets on each transmission channel, and send the messages back to the on-chip network of the end. In the embodiment of the present application, the message transmission device can further include a non-consistent transmission channel, and the embodiment of the present application does not limit whether the non-consistent transmission channel exists. The non-consistent transmission channel can be configured to transmit non-consistent messages, and the non-consistent transmission channel can adopt the same structure as the consistent transmission channel, or can adopt a different structure, and the embodiment of the present application does not limit this. The embodiment of the present application further provides a point-to-point interconnection device, and the point-to-point interconnection device includes the message transmission device. The point-to-point interconnection device transmits the micro-packets through the specified pins of the chip. The message transmission device can be located in the chip in the point-to-point interconnection device, and the chip can be integrated with multiple groups of pins. The point-to-point interconnection device in the embodiment of the present application can achieve the same technical effects as the message transmission device, and details are not described herein. Specifically, the micro-packet dequeuing controller can dequeue the element items composed of the micro-packets to the second transmission controller through the specified pins, so as to realize the transmission of the micro-packets through the specified pins. Further, the point-to-point interconnection device can further include the receiving end, and the message transmission device in the point-to-point interconnection device and the receiving end can also transmit messages through the interconnected pins. Optionally, the specified pins can include the PCIE pins provided in the chip, and the number of the specified pins is one or more. Specifically, the chip can be integrated with multiple groups of PCIE pins in advance, and one or more pins can be used as the specified pins. Through the multiplexing of the PCIE pins, all the micro-packets can be transmitted. Alternatively, the chip can be provided with independent pins in advance, and all the micro-packets can be transmitted through the independent pins. In this implementation manner, the independent pins are only used for transmitting the micro-packets, and are not used for transmitting the PCIE data.

[0123] In the embodiments of the present application, the obtaining component can be a data register or a data buffer, the micro packet generating component can be a data register or a data buffer, and the obtaining component and the micro packet generating component can be the same hardware entity. The command micro packet enqueuing sub-controller in the micro packet enqueuing controller can be a queue controller, the enqueuing unit in the data micro packet enqueuing sub-controller can be a queue controller, and the special compression engine can be an operator. The queue controller includes a control logic circuit and a control register. The micro packet queue memory can be a register bank or a static random-access memory (SRAM) structure, and the command queue memory and the data queue memory in the micro packet queue memory can be different register banks or SRAM structures. The command micro packet dequeuing sub-controller and the data micro packet dequeuing sub-controller in the micro packet dequeuing controller can both be queue controllers, and the queue controller can include a control logic circuit and a control register. The receiving register can be a data register, the data packet generating component can be a data register, the receiving register and the data packet generating component can be the same hardware entity, and the sending component can be a control register or a sending controller.

[0124] With reference to Figure 2 , a block diagram of a message transmission device provided by an embodiment of the present application is shown, as shown in Figure 2 , the message transmission device specifically includes:

[0125] An obtaining module 201 is configured to obtain a to-be-transmitted message in a transmission channel of a sending party for any transmission channel of the sending party.

[0126] A determining module 202 is configured to determine a target micro packet type and a target micro packet specification based on a preset message-micro packet information correspondence relationship corresponding to the transmission channel, and obtain the target micro packet type and the target micro packet specification.

[0127] A first splitting module 203 is configured to split the to-be-transmitted message into micro packets according to the target micro packet type and the target micro packet specification, and obtain to-be-transmitted micro packets.

[0128] A transmission module 204 is configured to perform message transmission to a receiving party based on the to-be-transmitted micro packets. The obtaining module 201, the determining module 202, the first splitting module 203, and the transmission module 204 are located in the sending party.

[0129] Optionally, the first splitting module 203 is specifically configured to:

[0130] in a case where the target micro packet type only includes a command micro packet type, split the to-be-transmitted message into command micro packets conforming to a command micro packet specification in the target micro packet specification.

[0131] In a case where the target micro packet type includes the command micro packet type and the data micro packet type, a non-data part of the to-be-transmitted packet is split into a command micro packet conforming to a command micro packet specification in the target micro packet specification, and a data part of the to-be-transmitted packet is split into a data micro packet conforming to a data micro packet specification in the target micro packet specification.

[0132] Optionally, the first splitting module 203 is specifically further configured to:

[0133] In a case where the target micro packet type only includes the command micro packet type, a value of a first flag bit in the command micro packet is set to a first target value;

[0134] In a case where the target micro packet type includes the command micro packet type and the data micro packet type, a value of the first flag bit in the command micro packet is set to a second target value;

[0135] The first target value is used to represent that the command micro packet is not accompanied by a data micro packet, to instruct the receiver to directly perform processing after receiving the command micro packet; and the second target value is used to represent that the command micro packet is accompanied by a data micro packet, to instruct the receiver to perform processing after receiving the command micro packet and the data micro packet accompanied by the command micro packet.

[0136] Optionally, the apparatus further includes:

[0137] a compression module configured to compress a data micro packet in the to-be-transmitted micro packet based on a target compression algorithm, and replace the data micro packet with the data micro packet after compression;

[0138] In a case where the data micro packet is replaced with the data micro packet after compression, a value of a second flag bit in the command micro packet is set to a third target value; the third target value is used to represent that the data micro packet accompanied by the command micro packet is compressed, to instruct the receiver to perform a decompression operation after receiving the data micro packet. The compression module is located at the sender.

[0139] Optionally, the compression module is specifically configured to:

[0140] select a data compression algorithm from preset data compression algorithms as the target compression algorithm;

[0141] compress the data micro packet based on a special compression engine according to the target compression algorithm;

[0142] In a case where a data amount of the data micro packet after compression is less than an original data amount, the data micro packet is replaced with the data micro packet after compression; the original data amount is a data amount before compression of the data micro packet;

[0143] The apparatus further includes a setting module configured to set a value of a third flag bit in the command micro-packet to a fourth target value; the fourth target value is used to represent that a data micro-packet accompanying the command micro-packet is compressed by using the target compression algorithm, so as to instruct the receiver to perform a decompression operation by using a decompression algorithm corresponding to the target compression algorithm. The setting module is located at the sender.

[0144] Optionally, the transmission channels include a read request transmission channel, a read response transmission channel, a write request transmission channel, and a write response transmission channel; different transmission channels are used to transmit different messages.

[0145] Optionally, the transmission module is specifically configured to:

[0146] generate a target data packet based on the to-be-transmitted micro-packet;

[0147] send the target data packet to the receiver;

[0148] The apparatus further includes a second splitting module configured to split the received target data packet into micro-packets to obtain target micro-packets;

[0149] a processing module configured to process the target micro-packets based on a flag bit in a command micro-packet in the target micro-packets; the second splitting module and the processing module are located at the receiver.

[0150] Optionally, the processing module is specifically configured to, in a case where a value of the first flag bit in the command micro-packet is a first target value, directly process the command micro-packet.

[0151] in a case where the value of the first flag bit in the command micro-packet is a second target value and a value of a second flag bit is a third target value, after receiving a data micro-packet accompanying the command micro-packet, decompress the data micro-packet accompanying the command micro-packet based on a target decompression algorithm, and process the decompressed data micro-packet and the command micro-packet; the target decompression algorithm is a decompression algorithm corresponding to a target compression algorithm represented by the value of the third flag bit in the command micro-packet.

[0152] In summary, the packet transmission device provided by the embodiment of the present application obtains the to-be-transmitted packet in the transmission channel of the sender for any transmission channel of the sender. Based on the preset packet corresponding to the transmission channel and the micro-packet information corresponding relationship, the micro-packet type and the micro-packet specification corresponding to the to-be-transmitted packet are determined, and the target micro-packet type and the target micro-packet specification are obtained. The to-be-transmitted packet is split into micro-packets according to the target micro-packet type and the target micro-packet specification, and the to-be-transmitted micro-packet is obtained. The sender performs packet transmission to the receiver based on the to-be-transmitted micro-packet. In this way, by first splitting the to-be-transmitted packet into to-be-transmitted micro-packets and performing packet transmission to the receiver based on the to-be-transmitted micro-packet, packet transmission of the to-be-transmitted packet is realized.

[0153] Meanwhile, since the content of the to-be-transmitted packet itself does not need to be modified, and only the to-be-transmitted packet is split into micro-packets for subsequent transmission in the form of micro-packets, the generality of the packet transmission method is ensured.

[0154] Reference Figure 3 is a structural schematic diagram of an electronic device provided by the embodiment of the present application. As shown in Figure 3 , the electronic device comprises a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction makes the processor execute the packet transmission method of the foregoing embodiment. The executable instruction can constitute a program.

[0155] The embodiment of the present application provides a machine readable medium having instructions stored thereon, which, when executed by one or more processors, enable the processors to execute the packet transmission method of the foregoing embodiment. Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts of each embodiment can be referred to.

[0156] Those skilled in the art should understand that the embodiments of the embodiment of the present application can be provided as a method, an apparatus or a computer program product. Therefore, the embodiment of the present application can adopt a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiment of the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0157] It should be noted that all actions of obtaining signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulations and policies of the country where the device is located, and with the authorization of the corresponding device owner.

[0158] The embodiments of the present application are described with reference to the flowchart illustrations and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0159] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operational steps are performed on the computer or other programmable terminal devices to produce a computer implemented process so that the instructions which execute on the computer or other programmable terminal devices provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0161] Although preferred embodiments of the present application have been described, those skilled in the art will be able to make additional modifications and variations to the embodiments without departing from the scope of the present application. Accordingly, the appended claims are intended to cover all such modifications and variations as falling within the scope of the embodiments of the present application.

[0162] Finally, it is to be understood that the phraseology or terminology such as "first" and "second" etc. used herein is merely intended to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0163] The above provides a message transmission method, a message transmission device, an electronic device and one or more machine readable media. The principles and implementation manners of the present application are described by applying specific examples in the present application. The above description of the embodiments is only used to help understand the method of the present application and its core idea. For those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed. In summary, the content of the present application should not be understood as a limitation.

Claims

1. A method of transmitting a packet, characterized by, The method comprises: For any transmission channel of a sender, the sender acquires a to-be-transmitted message in the transmission channel; The sender determines a target micro packet type and a target micro packet specification of the to-be-transmitted message based on a preset message-micro packet information correspondence corresponding to the transmission channel, and obtains the target micro packet type and the target micro packet specification; The sender splits the to-be-transmitted message into micro packets according to the target micro packet type and the target micro packet specification, and obtains to-be-transmitted micro packets; in the case where the target micro packet type only includes a command micro packet type, the value of a first flag bit in a command micro packet in the to-be-transmitted micro packets is set to a first target value; the first target value is used to represent that the command micro packet is not accompanied by a data micro packet, so as to instruct a receiver to directly process after receiving the command micro packet; in the case where the target micro packet type includes the command micro packet type and a data micro packet type, the value of the first flag bit in the command micro packet is set to a second target value; the second target value is used to represent that the command micro packet is accompanied by a data micro packet, so as to instruct the receiver to process after receiving the command micro packet and the data micro packet accompanied by the command micro packet; The sender transmits a target data packet to the receiver based on the to-be-transmitted micro packets; and the arrangement order of the to-be-transmitted micro packets corresponding to the same transmission channel in the target data packet matches the generation order of the to-be-transmitted micro packets.

2. The method of claim 1, wherein, The splitting of the to-be-transmitted message into micro packets according to the target micro packet type and the target micro packet specification to obtain the to-be-transmitted micro packets comprises: in the case where the target micro packet type only includes a command micro packet type, the to-be-transmitted message is split into command micro packets conforming to the command micro packet specification in the target micro packet specification; in the case where the target micro packet type includes the command micro packet type and a data micro packet type, a non-data part of the to-be-transmitted message is split into command micro packets conforming to the command micro packet specification in the target micro packet specification, and a data part of the to-be-transmitted message is split into data micro packets conforming to the data micro packet specification in the target micro packet specification.

3. The method according to claim 1 or 2, characterized in that, Before the message transmission based on the to-be-transmitted micro packets to the receiver, the method further comprises: compressing a data micro packet in the to-be-transmitted micro packet based on a target compression algorithm, and replacing the data micro packet with the data micro packet after compression; in the case where the data micro packet is replaced with the data micro packet after compression, the value of a second flag bit in the command micro packet is set to a third target value; the third target value is used to represent that the data micro packet accompanied by the command micro packet is compressed, so as to instruct the receiver to perform a decompression operation after receiving the data micro packet.

4. The method of claim 3, wherein, The compression of the data micro packet in the to-be-transmitted micro packet based on the target compression algorithm comprises: selecting a data compression algorithm from preset data compression algorithms as the target compression algorithm; compressing the data micro packet according to the target compression algorithm based on a special compression engine; The replacing the data micro-packet with the compressed data micro-packet comprises: in a case where a data amount of the compressed data micro-packet is less than an original data amount, replacing the data micro-packet with the compressed data micro-packet; the original data amount is a data amount before compression of the data micro-packet; The method further comprises: setting a value of a third flag bit in the command micro-packet to a fourth target value; the fourth target value is used to represent that a data micro-packet accompanying the command micro-packet is compressed by using the target compression algorithm, so as to instruct the receiver to perform a decompression operation by using a decompression algorithm corresponding to the target compression algorithm.

5. The method of claim 1, wherein, The transmission channels comprise a read request transmission channel, a read response transmission channel, a write request transmission channel, and a write response transmission channel. Different transmission channels are used to transmit different messages.

6. The method of claim 1, wherein, The transmitting the target data packet to the receiver based on the to-be-transmitted micro-packet comprises: generating a data packet based on the to-be-transmitted micro-packet to obtain the target data packet; sending the target data packet to the receiver; The method further comprises: splitting, by the receiver, the received target data packet into micro-packets to obtain target micro-packets; processing, by the receiver, the target micro-packets based on the flag bits in the command micro-packets in the target micro-packets.

7. The method of claim 6, wherein, The processing, based on the flag bits in the command micro-packets in the target micro-packets, of the target micro-packets comprises: in a case where a value of a first flag bit in the command micro-packet is a first target value, directly processing the command micro-packet; in a case where the value of the first flag bit in the command micro-packet is a second target value and a value of a second flag bit is a third target value, after receiving a data micro-packet accompanying the command micro-packet, decompressing the data micro-packet accompanying the command micro-packet based on a target decompression algorithm, and processing the decompressed data micro-packet and the command micro-packet; the target decompression algorithm is a decompression algorithm corresponding to a target compression algorithm represented by the value of the third flag bit in the command micro-packet.

8. The method of claim 5, wherein, The read request transmission channel is used to transmit a level-1 cache read invalidation and a level-1 cache write invalidation. The read response transmission channel is used to transmit a read request response, an LLC invalidation command, an LLC write-back command, and an LLC write-back and invalidation command. The write request transmission channel is used to transmit a level-1 cache replacement request, an LLC invalidation response, an LLC write-back response, and an LLC write-back and invalidation response. The write response transmission channel is used to transmit a write request channel response.

9. A packet transmission apparatus characterized by comprising: The apparatus comprises: an acquisition module located at a sender, configured to acquire, for any transmission channel of the sender, a to-be-transmitted message in the transmission channel; a determination module located at the sender, configured to determine a micro-packet type and a micro-packet specification corresponding to the to-be-transmitted message based on a preset message and micro-packet information correspondence relationship corresponding to the transmission channel, to obtain a target micro-packet type and a target micro-packet specification; A first splitting module located at the sender is configured to split the to-be-transmitted packet into micro-packets according to the target micro-packet type and the target micro-packet specification, to obtain to-be-transmitted micro-packets; in the case where the target micro-packet type only includes a command micro-packet type, set the value of a first flag bit in a command micro-packet in the to-be-transmitted micro-packets to a first target value; the first target value is used to represent that the command micro-packet is not accompanied by a data micro-packet, to instruct the receiver to directly perform processing after receiving the command micro-packet; in the case where the target micro-packet type includes a command micro-packet type and a data micro-packet type, set the value of the first flag bit in the command micro-packet to a second target value; the second target value is used to represent that the command micro-packet is accompanied by a data micro-packet, to instruct the receiver to perform processing after receiving the command micro-packet and the data micro-packet accompanied by the command micro-packet; A transmission module located at the sender is configured to transmit a target data packet to the receiver based on the to-be-transmitted micro-packets; the arrangement order of the to-be-transmitted micro-packets corresponding to a same transmission channel in the target data packet matches the generation order of the to-be-transmitted micro-packets.

10. An electronic device, comprising: Comprise: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used to store executable instructions, and the executable instructions make the processor execute the method in any one of claims 1 to 8.

11. One or more machine readable media having instructions, recorded thereon, that if executed by a machine, cause the machine to perform operations comprising: instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for determining data fragments based on data transmission and related device

    CN115314555A

  • Data reading method for chip, chip, computer equipment and storage medium

    CN117785043A