Message transmission method and device, electronic equipment and readable medium
By splitting the packets to be transmitted into micro packets in a point-to-point interconnect scenario and transmitting them in the form of micro packets, the problem of cache consistency maintenance between chips is solved, and efficient message transmission and universality is achieved.
Patent Information
- Application Number
- CN202411936649.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In point-to-point interconnect scenarios, how to effectively maintain cache consistency between chips, especially when transmitting packets to be transmitted.
By obtaining the packet to be transmitted in the transmission channel, and based on the preset correspondence relationship between the packet and the micro packet information, the micro packet type and specification of the packet to be transmitted are determined, and the packets to be transmitted are split into micro packets, and the packets are transmitted in the form of micro packets.
It realizes effective transmission of packets to be transmitted, ensures cache consistency maintenance, and does not need to modify the content of packets to be transmitted, and maintains the universality of the method.
Smart Images

Figure CN120075291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a message transmission method, apparatus, electronic device, and readable medium. Background Art
[0002] Currently, in order to improve computing power, in a computer system (such as a server), there is not only a single processor with multiple cores, but also multiple other chips. In order to achieve data exchange between different chips, point-to-point interconnection technology has been widely used.
[0003] In order to ensure the normal operation of the computer system, in a point-to-point interconnection scenario, it is particularly important to maintain cache coherence between chips. Therefore, how to transmit the to-be-transmitted messages required for maintaining cache coherence has become a technical problem to be urgently solved. Summary of the Invention
[0004] Embodiments of the present invention provide a message transmission method, apparatus, electronic device, and readable medium, which can achieve the transmission of to-be-transmitted messages.
[0005] To solve the above problems, embodiments of the present invention disclose a message transmission method, the method comprising:
[0006] For any transmission channel of the sender, the sender obtains the to-be-transmitted message in the transmission channel;
[0007] The sender determines the micro-packet type and micro-packet specification corresponding to the to-be-transmitted message based on the 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;
[0008] The sender splits 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;
[0009] The sender performs message transmission to the receiver based on the to-be-transmitted micro-packets.
[0010] On the other hand, embodiments of the present invention disclose a message transmission apparatus, the apparatus comprising:
[0011] An obtaining module located at the sender, configured to obtain, for any transmission channel of the sender, the to-be-transmitted message in the transmission channel;
[0012] A determining module located at the sender, configured to determine the micro-packet type and micro-packet specification corresponding to the to-be-transmitted message based on the 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;
[0013] A first splitting module located at the sender is configured to split the message to be transmitted into micro - packets according to the target micro - packet type and the target micro - packet specification, so as to obtain the micro - packets to be transmitted.
[0014] A transmission module located at the sender is configured to transmit the message to a receiver based on the micro - packets to be transmitted.
[0015] In another aspect, an embodiment of the present invention discloses an electronic device, including: 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 causes the processor to execute the foregoing method.
[0016] An embodiment of the present invention also discloses a machine - readable medium, on which instructions are stored. When executed by one or more processors, the instructions cause the processors to execute the method as described above.
[0017] The embodiments of the present invention have the following advantages: In the message transmission method provided by the embodiments of the present invention, for any transmission channel of the sender, the sender obtains the message to be transmitted in the transmission channel. Based on the preset correspondence between the message and the micro - packet information corresponding to the transmission channel, the micro - packet type and the micro - packet specification corresponding to the message to be transmitted are determined, so as to obtain the target micro - packet type and the target micro - packet specification. The message to be transmitted is split into micro - packets according to the target micro - packet type and the target micro - packet specification, so as to obtain the micro - packets to be transmitted. The sender transmits the message to the receiver based on the micro - packets to be transmitted. In this way, by first splitting the message to be transmitted into micro - packets to be transmitted and transmitting the message to the receiver based on the micro - packets to be transmitted, the message transmission of the message to be transmitted is realized.
[0018] At the same time, since it is not necessary to modify the content of the message to be transmitted itself, but only to split the message to be transmitted into micro - packets and perform subsequent transmission in the form of micro - packets, the generality of the message transmission method is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is a flowchart of the steps of a message transmission method provided by an embodiment of the present invention;
[0021] Figure 2 is a block diagram of a message transmission device provided by an embodiment of the present invention;
[0022] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0024] Referring to Figure 1 , a step flowchart of a message transmission method provided by an embodiment of the present invention is shown. This method can be applied to a point-to-point interconnection system, and the point-to-point interconnection system includes a sender and a receiver. As Figure 1 shown, the message transmission method specifically includes the following steps:
[0025] Step 101: For any transmission channel of the sender, the sender obtains the message to be transmitted in the transmission channel.
[0026] Step 102: The sender determines the micro-packet type and micro-packet specification corresponding to the message to be transmitted based on the preset message and micro-packet information correspondence relationship corresponding to the transmission channel, and obtains the target micro-packet type and target micro-packet specification.
[0027] Step 103: The sender splits the message to be transmitted into micro-packets according to the target micro-packet type and the target micro-packet specification to obtain the micro-packets to be transmitted.
[0028] Step 104: The sender performs message transmission to the receiver based on the micro-packets to be transmitted.
[0029] The embodiments of the present invention can be applied to point-to-point interconnection scenarios. For example, point-to-point interconnection between chips (Chip to Chip), between dies (Die to Die), point-to-point interconnection between silicon, etc. The point-to-point interconnection scenario is the inter-chip interconnection scenario. The chips (chips) or dies participating in the point-to-point interconnection can perform data transmission based on the inter-chip data transmission bus. Among them, a die can be regarded as a chip that has not been packaged yet, and a die can be a separate wafer area that contains a complete functional unit of the chip or a group of related functional units. The point-to-point interconnection system can include multiple chips participating in the point-to-point interconnection. The point-to-point interconnection system can be deployed in the same electronic device, and the chips can be connected through a bus. Or, they can also be distributed in different devices. The embodiments of the present invention do not limit this.
[0030] The sender in a point-to-point interconnection system can be a chip in the system that needs to send messages. The receiver in a point-to-point interconnection system can be a chip in the system that needs to receive messages. For example, the receiver can be a chip connected to the sender. In actual application scenarios, a chip may send data or receive data. That is to say, a chip can act as a sender in some cases and also as a receiver in some cases. The embodiments of the present invention do not limit this. In a point-to-point interconnection scenario, in order to maintain cache coherence among the chips participating in the point-to-point interconnection, it is necessary to maintain cache coherence by transmitting coherence messages. Cache coherence between processor cores and between processors is achieved through the transmission of coherence messages between chips. Among them, the coherence message is a message that needs to be transmitted to maintain cache coherence and can be called a message to be transmitted. Correspondingly, the message to be transmitted that the sender needs to send can be information that needs to be synchronized between interconnected chips.
[0031] The sender may include a transmission channel. Among them, the transmission channel can be a virtual channel (Vitural Channel, VC). The sender may include multiple virtual channels, and the virtual channels can be used to transmit information between two or more ends. Exemplarily, the virtual channel can be a logical path inside the sender to achieve internal data transmission. Or, it can also be a logical path between the sender and other external chips. The embodiments of the present invention do not limit this. Further, the coherence message can be divided into a cache data block and a command block. The command block includes information such as the address of the cache data block, the cache block status, and the coherence request or response. That is to say, the coherence message can be composed of one or more combinations of attributes, addresses, and data. Among them, the attribute and the address are the non-data parts in the coherence message, and the non-data part is the command part. The data is the data part in the coherence message, and the data can be the data requested to be read or written, that is, the data is read / write data. The attribute can include information such as operation commands generated by the source device / destination device, tags of the source / destination device, and data attributes (feature descriptions of the data). The content included in the attribute may be different for different types of messages. Correspondingly, the size of the attribute field may vary. Exemplarily, the size of the attribute field is generally within 1 double word (Double Word, DW) to 3 DW. Among them, 1 DW includes 32 bits (bit). 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 not exceed 2 DW, and some messages can be sent by default, that is, some messages do 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 to the size of one data block (16 DW). Among them, the attribute field, the data field, and the address field can respectively represent the part in the message used to carry the attribute, the part used to carry the data, and the part used to carry the address.
[0032] A flit can refer to a transmission unit in the field of interconnection, that is, the basic unit of data transmission. Each flit can contain a part of the information of a coherent message. The message to be transmitted in the transmission channel can refer to the coherent message that needs to be transmitted point-to-point and enters this virtual channel. In the embodiments of the present invention, the coherent message corresponding to the transmission channel that needs to perform cache coherence transmission can be obtained as the message to be transmitted in this transmission channel. Further, the sender can also obtain a message that has nothing to do with the transmission channel as the message to be transmitted. Among them, the message that has nothing to do with the transmission channel can include non-coherent messages, for example, messages from Input / Output (IO).
[0033] The corresponding relationship between the preset message and the flit information can be used to characterize the flit type and flit specification corresponding to different messages. Among them, the flit type corresponding to the message indicates the flit type that the message can be split into. The flit type corresponding to the message can be set according to the characteristics of the message. For example, when this type of message does not include a data part, the flit type corresponding to the message can be the command flit type. When this type of message includes a data part, the flit type corresponding to the message can be the command flit type and the data flit type. Exemplarily, if the flit type corresponding to the message is the command flit type, correspondingly, this message can be split into command flits. If the flit type corresponding to the message is the command flit type and the data flit type, correspondingly, this message can be split into command flits and data flits. The flit specification corresponding to the 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 the message is used to indicate: when the message is split into flits of this flit type, the size of each split flit. Exemplarily, the flit specification can include the command flit specification and the data flit specification. The command flit specification is used to indicate the size of the command flit when the message is split into command flits, and the data flit specification is used to indicate the size of the data flit when the message is split into data flits. In the corresponding relationship between the preset message and the flit information corresponding to the transmission channel, it is specifically defined that each message transmitted by this transmission channel and its corresponding flit information. Among them, the flit information is the flit type and flit specification corresponding to the message.
[0034] Further, the message to be transmitted can be matched with each message in the corresponding preset message and micro - packet information correspondence relationship of the transmission channel. Specifically, the name of the message to be transmitted can be compared with the names of each message defined in the preset message and micro - packet information correspondence relationship respectively. If the names are the same, it can be determined that the message to be transmitted is the same as this message. Then, the micro - packet type and micro - packet specification corresponding to the matched message are used as the target micro - packet type and target micro - packet specification. Correspondingly, the message to be transmitted can be split into micro - packets that conform to the target micro - packet type and target micro - packet specification. The split micro - packets are the micro - packets to be transmitted. After obtaining the micro - packets to be transmitted, the micro - packets to be transmitted can be packetized to obtain the target data packet. Then, the target data packet is sent to the receiving party. In this way, after the data packet is packetized based on the micro - packets to be output, the message to be transmitted in the transmission channel can be conveniently synchronized to the receiving party in the point - to - point interconnection. By sending the target data packet to the receiving party, the receiving party can obtain the micro - packets to be transmitted. The receiving party can process the target data packet, thereby achieving the maintenance of cache consistency. Exemplarily, the receiving party can restore the target data packet to a consistent message. Correspondingly, corresponding operations can be executed in response to the consistent message, thereby achieving the maintenance of cache consistency.
[0035] In summary, in the message transmission method provided by the embodiments of the present invention, for any transmission channel of the sender, the sender obtains the message to be transmitted in the transmission channel. Based on the corresponding preset message and micro - packet information correspondence relationship of the transmission channel, the micro - packet type and micro - packet specification corresponding to the message to be transmitted are determined to obtain the target micro - packet type and target micro - packet specification. According to the target micro - packet type and target micro - packet specification, the message to be transmitted is split into micro - packets to obtain the micro - packets to be transmitted. The sender performs message transmission to the receiving party based on the micro - packets to be transmitted. In this way, by first splitting the message to be transmitted into micro - packets to be transmitted and performing message transmission to the receiving party based on the micro - packets to be transmitted, the message transmission of the message to be transmitted is realized.
[0036] At the same time, since there is no need to modify the content of the message to be transmitted itself, only the message to be transmitted is split into micro - packets and subsequent transmission is performed in the form of micro - packets. In this way, the generality of the message transmission method is ensured.
[0037] Optionally, in the embodiments of the present invention, different transmission channels can be used to transmit different packets. 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. These four transmission channels each transmit different coherence packets, that is, different types of packets. Among them, the packets transmitted by the read request transmission channel include packets for requesting data reading, and the packets for requesting data reading can be regarded as read requests. The packets transmitted by the write request transmission channel include packets for requesting data writing, and the packets for requesting data writing can be regarded as write requests. The packets transmitted by the read response transmission channel include packets for responding to read requests. The packets for responding to read requests can be regarded as read responses. The packets transmitted by the write response transmission channel include packets for responding to write requests, and the packets for responding to write requests can be regarded as write responses. In this way, since different transmission channels transmit different packets, the deadlock problem caused by data dependencies between packets during transmission can be avoided. It should be noted that in addition to transmitting read requests, read responses, write requests, and write responses, these four transmission channels can each also transmit other coherence packets, and the embodiments of the present invention do not limit this.
[0038] Exemplarily, the coherence packets transmitted by the read request transmission channel can include: a first-level cache read miss (ar_request_read) and a first-level cache write miss (ar_request_write). The coherence packets transmitted by the write request transmission channel can include: a first-level cache replacement request (aw_replace), a last-level cache (LLC) invalidation response aw_writeback_invalid, an LLC write-back response aw_writeback, and an LLC write-back and invalidation response aw_invalid. Among them, the LLC invalidation response, the LLC write-back response, and the LLC write-back and invalidation response are response messages sent by the processor core to the LLC. The coherence packets transmitted by the read response transmission channel can include: a read request response (r_response), an LLC invalidation command (r_invalid), an LLC write-back command (r_writeback), an LLC write-back and invalidation command (r_writeback_invalid); the coherence packets transmitted by the write response transmission channel can include: a write request channel response (b_respense). The packets transmitted by each transmission channel and the relevant information of each packet can be as shown in Table 1 below:
[0039]
[0040]
[0041] Table 1
[0042] Among them, both the first-level cache read miss and the first-level cache write miss read the data block to obtain the latest state of the data block, thereby triggering subsequent actions. The relevant information of the message includes the message description, the composition of the message content, and the size of the attribute field. These 4 transmission channels can be respectively mapped to four virtual channels (VC0-VC3), where command micro-packets are generated in all virtual channels, and data micro-packets only exist in the read response transmission channel and the write request transmission channel.
[0043] Optionally, splitting the message to be transmitted into micro-packets according to the target micro-packet type and the target micro-packet specification to obtain the micro-packets to be transmitted may specifically include:
[0044] Step 1031: When the target micro-packet type only includes the command micro-packet type, split the message to be transmitted into command micro-packets that conform to the command micro-packet specification in the target micro-packet specification.
[0045] Step 1033: When the target micro-packet type includes the command micro-packet type and the data micro-packet type, split the non-data part of the message to be transmitted into command micro-packets that conform to the command micro-packet specification in the target micro-packet specification, and split the data part of the message to be transmitted into data micro-packets that conform to the data micro-packet specification in the target micro-packet specification.
[0046] In the embodiment of the present invention, the coherence message includes a non-data part (including attributes, or attributes and addresses), or the coherence message includes a non-data part and a data part. If the message to be transmitted does not include a data part, for example, the message to be transmitted is a read request or a write response, then after searching in the preset message and micro-packet information correspondence, the obtained target micro-packet type only includes the command micro-packet type, and the target micro-packet specification only includes the command micro-packet specification. If the message to be transmitted includes a data part, for example, the message to be transmitted is a write request or a read response, then after searching in the preset message and micro-packet information correspondence, the obtained 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 and the data micro-packet specification.
[0047] Furthermore, the coherence messages to be transmitted can be divided into data micro - packets and command micro - packets. Among them, the length of the data micro - packet has a large span and may include the size of one or more cache lines. The length of the command micro - packet is usually small. According to the nature and characteristics of its content, the maximum generally does not exceed 96 bits, and the minimum may be only a dozen bits. In the embodiments of the present invention, the size of the supported data micro - packet can be 16 DW. Further, the size of the supported command flit can not exceed 3 DW. Specifically, for different types of command flits, they can be rounded up to two specifications according to the size of the valid content: 1 DW and 3 DW. Correspondingly, taking the existence of 4 transmission channels as an example, the corresponding relationship between the preset messages and micro - packet information of these 4 transmission channels can be shown in Table 2 below:
[0048]
[0049]
[0050] Table 2
[0051] Based on Table 2, the micro - packet types corresponding to the coherence messages transmitted by each transmission channel and the micro - packet lengths (i.e., micro - packet specifications) that can be split can be distinguished. Among them, "-" indicates non - existence. If the content of the command flit item corresponding to the coherence message is not "-", it is determined that the micro - packet type corresponding to the coherence message includes the command micro - packet type. If the content of the data flit item corresponding to the coherence message is not "-", it is determined that the micro - packet type corresponding to the coherence 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 coherence message. Exemplarily, assuming that the message to be transmitted is a read request response r_response, the name of the message to be transmitted, "read request response r_response", can be compared with the names of each coherence message defined in Table 2 to find the corresponding micro - packet type and micro - packet specification of the matching message. Among them, the content in the "coherence message" column in Table 1 and Table 2 can specifically represent the name of the message. Specifically, through searching, it can be obtained that the target micro - packet type includes the command micro - packet type and the data micro - packet type, and the command micro - packet specification in the target micro - packet specification is 1 DW and the data micro - packet specification is 16 DW. In the embodiments of the present invention, by searching in the corresponding relationship between the preset message and micro - packet information, the splittable micro - packet type and micro - packet length can be known. Correspondingly, subsequently, the message to be transmitted is split according to the found micro - packet type and micro - packet length, which can avoid the problem of resource waste caused by uncertain micro - packet length. At the same time, splitting according to the found micro - packet type and micro - packet length can avoid the problem of increased complexity and then increased transmission delay caused by excessive freedom.
[0052] It should be noted that other transmission channels can also be set, and the messages in other transmission channels can be non-conformance messages. For example, other transmission channels can be used to transmit Input / Output (IO) messages, network messages, and so on.
[0053] Furthermore, in the case where the target micro-packet type only includes the command micro-packet type, since the message to be transmitted does not include a data part, the message to be transmitted can be directly split into micro-packets of the corresponding specification according to the command micro-packet specification in the target micro-packet specification to obtain command micro-packets. Exemplarily, assuming that the command micro-packet specification in the target micro-packet specification is 3DW, then a 3DW-sized micro-packet can be generated based on the non-data part of the message to be transmitted 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 message to be transmitted includes a data part and a non-data part. Therefore, the non-data part of the message to be transmitted (i.e., the component of the message body) can be split into micro-packets of the corresponding specification according to the command micro-packet specification in the target micro-packet specification to obtain command micro-packets. Exemplarily, assuming that the command micro-packet specification in the target micro-packet specification is 3DW, then a 3DW-sized micro-packet can be generated based on the non-data part of the message to be transmitted to obtain a command micro-packet. It should be noted that the command micro-packet may include fixed bits. Therefore, when splitting the message to be transmitted into command micro-packets, specifically, the content of the non-data part and the fixed bits in the message to be transmitted can be combined into a micro-packet. Among them, the fixed bits can be used as flag bits, and the content of the non-data part can be written into the non-fixed bits. Specifically, the command part of the conformance message, that is, the non-data part, does not exceed 3DW. Correspondingly, for a conformance message, at most one command micro-packet is generated.
[0055] According to the data micro-packet specification in the target micro-packet specification, micro-packets of the corresponding specification are generated based on the data part of the message to be transmitted to obtain data micro-packets. Among them, the data part can refer to the data carried by the message to be transmitted. Exemplarily, the content of specific bits in the message to be transmitted can be identified as the data part of the message to be transmitted. Correspondingly, the content of the other bits except the specific bits is the non-data part of the message to be transmitted. Assuming that the data micro-packet specification in the target micro-packet specification is 16DW, then a 16DW-sized micro-packet is generated based on the data part of the message to be transmitted to obtain a data micro-packet. Specifically, the data part of the conformance message does not exceed 16DW. Correspondingly, for a conformance message, at most one data micro-packet is generated, that is, the size of the generated data micro-packet is fixed at 16DW. For the data part of the non-conformance message, the situation of 3 - 16DW may occur.
[0056] It should be noted that when splitting, if the non-data part / data part is less than the command micro-packet specification / data micro-packet specification, it can be filled to form a command micro-packet / data micro-packet that meets the command micro-packet specification / data micro-packet specification. Among them, filling can ensure the boundary alignment of data packets, facilitating parsing by the receiving party. Exemplarily, the non-data part / data part can be put in first, and then the remaining bits are filled with default characters, that is, the filled content is all after the non-data part / data part. The default character can be a blank character or a preset special character representing no function.
[0057] In the embodiment of the present invention, when the target micro-packet type in the micro-packet specification only includes the command micro-packet type, the micro-packet specification to-be-transmitted message is split into command micro-packets that meet the command micro-packet specification in the target micro-packet specification of the micro-packet specification. When the target micro-packet type in the micro-packet specification includes the command micro-packet type and the data micro-packet type, the non-data part of the micro-packet specification to-be-transmitted message is split into command micro-packets that meet the command micro-packet specification in the target micro-packet specification of the micro-packet specification, and the data part of the micro-packet specification to-be-transmitted message is split into data micro-packets that meet the data micro-packet specification in the target micro-packet specification of the micro-packet specification. In this way, splitting the command micro-packet according to the non-data part and splitting the data micro-packet according to the data part is equivalent to a more general abstraction, decoupling from the semantics of each transmission protocol. It makes it more appropriate for the actual application scenario.
[0058] Optionally, the embodiment of the present invention further includes the following steps:
[0059] Step S21, when the target micro-packet type only includes the command micro-packet type, set the value of the first flag bit in the command micro-packet to the first target value.
[0060] Step S22, when the target micro-packet type includes the command micro-packet type and the data micro-packet type, set the value of the first flag bit in the command micro-packet to the second target value; where the first target value is used to indicate that the command micro-packet is not accompanied by a data micro-packet, so as to instruct the receiving party to directly process after receiving the command micro-packet; the second target value is used to indicate that the command micro-packet is accompanied by a data micro-packet, so as to instruct the receiving party to process after receiving the command micro-packet and the data micro-packet accompanied by the command micro-packet.
[0061] In the embodiments of the present invention, the first flag bit may be a fixed bit in the command micro-packet, and the specific position of the first flag bit may be set as required. Exemplarily, for the command micro-packet in the 3DW specification, the first flag bit may be the 95th bit. For the command micro-packet in the 1DW specification, the first flag bit may be the 31st bit. The first flag bit may also be referred to as the Data bit. In this way, when encapsulating the content of the consistency message through the command micro-packet, it is equivalent to using 1-bit content to indicate whether the command micro-packet is accompanied by a data micro-packet. Here, the command micro-packet being accompanied by a data micro-packet means that the to-be-transmitted message used to split the command micro-packet is simultaneously split into data micro-packets, that is, the to-be-transmitted message used to split the command micro-packet includes a data part. The command micro-packet not being accompanied by a data micro-packet means that the to-be-transmitted message used to split the command micro-packet is only split into command micro-packets, 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 may be set as required. Exemplarily, the first target value may be 0, and the second target value may be 1.
[0062] Correspondingly, in the case where the target micro-packet type only includes the command micro-packet type, it indicates that the to-be-transmitted message does not include a data part, and only command micro-packets are obtained after splitting. Correspondingly, the subsequent receiving party does not need to wait for the data micro-packet, and the to-be-transmitted message can be obtained based on the command micro-packet. Therefore, the value of the first flag bit can be set to 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 indicates that the to-be-transmitted message includes a data part, and command micro-packets and data micro-packets are obtained after splitting. Correspondingly, the subsequent receiving party needs to wait for the data micro-packet, and the to-be-transmitted message can be obtained based on the command micro-packet and the accompanying micro-packets. Therefore, the value of the first flag bit can be set to the second target value.
[0063] In the embodiments of the present invention, after the to-be-transmitted message is split, only command micro-packets may be obtained, or command micro-packets and data micro-packets may be obtained. That is to say, for any consistency message, command micro-packets must exist, while data micro-packets may be sent by default. Therefore, by setting the first flag bit and correspondingly setting the specific value of the first flag bit according to the splitting situation, the first flag bit can represent whether the command micro-packet is accompanied by a data micro-packet, thereby facilitating the receiving party to 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, avoiding the problem that the receiving party starts to process without receiving the data micro-packet accompanied by the command micro-packet, resulting in the inability to obtain the to-be-transmitted message due to incomplete data.
[0064] Optionally, before transmitting the message to the receiving party based on the to-be-transmitted micro-packet, the embodiments of the present invention may further include the following steps:
[0065] Step S31: Compress the data micro-packets in the to-be-transmitted micro-packet based on the target compression algorithm, and replace the data micro-packets with the compressed data micro-packets.
[0066] Step S32: When replacing the data micro-packets with the compressed data micro-packets, set the value of the second flag bit in the command micro-packet to a third target value; the third target value is used to indicate that the data micro-packets accompanied by the command micro-packet are compressed, so as to instruct the receiving party to perform a decompression operation after receiving the data micro-packets.
[0067] In the embodiments of the present invention, for the data micro-packets obtained by splitting the consistency message, their contents are all the contents of the system-internal cache data blocks, and the length sizes are fixed. The contents of these data blocks have repetitiveness or certain composition rules (for example, there are consecutive "0" values or "1" values, or the content is a repetition of a certain data pattern, etc.). Therefore, a target compression algorithm can be introduced to compress the data micro-packets in the to-be-transmitted micro-packet, and replace the data micro-packets with the compressed data micro-packets.
[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 required. The third target value can also be set as required. Exemplarily, the third target value can be 1. Exemplarily, the bit field contents of the command micro-packets in the 3DW specification and the bit field contents of the command micro-packets in the 1DW specification can be as shown in Table 3 and Table 4 below:
[0069] bit 95 94 ... N:0 (N <= 93) content Data Cmpr ... non-data part
[0070] Table 3
[0071] bit 31 30 ... N:0 (N <= 29) content Data Cmpr ... non-data part
[0072] Table 4
[0073] For the command micro-packets in the 3DW specification, the second flag bit can be the 94th bit. For the command micro-packets in the 1DW specification, the second flag bit can be the 30th bit. The second flag bit can also be called the Cmpr bit, which is used to indicate whether the accompanied data micro-packets are compressed. In this way, it is equivalent to using 1 bit in the command micro-packet corresponding to the data micro-packet (the command micro-packet split from the same to-be-transmitted message as the data micro-packet) to indicate whether it is compressed. Correspondingly, when the receiving party parses the command micro-packet, it can determine whether the corresponding data micro-packet needs to be decompressed according to the second flag bit.
[0074] In an embodiment of the present invention, data packets in the to-be-transmitted micro-packets are compressed based on a target compression algorithm, and the data packets are replaced with the compressed data packets, thereby reducing the length of the data to be transmitted subsequently, reducing the bandwidth required for subsequent transmission, and improving the channel utilization rate. At the same time, when the data packets are replaced with the compressed data packets, the value of the second flag bit in the command packet is set to a third target value, so that the receiving party can know to perform decompression operations after receiving the data packets, avoiding problems caused by the receiving party not performing decompression and resulting in processing errors.
[0075] Optionally, the replacing the data packets with the compressed data packets may specifically include: when the data volume of the compressed data packets is less than the original data volume, replacing the data packets with the compressed data packets; the original data volume is the data volume before the data packets are compressed.
[0076] Among them, the data volume can represent the size of the data packets. For example, the length of the data packets can be used as the data volume. Specifically, the original data volume specifically represents the size before the data packets are compressed, and the data volume of the compressed data packets specifically represents the size of the compressed data packets. In actual application scenarios, compression will cause an uncertain change in the length of the data packets. Exemplarily, it is assumed that each data block unit is 16DW before compression, and the transmission length after compression by the compression algorithm may be any length from 3 to 16DW. That is to say, for each consistency message, the size of the corresponding data packets after compression is any length from 3 to 16DW. If the data volume of the compressed data packets is less than the original data volume, it means that compression can reduce the length of the data packets. Therefore, the operation of replacing the data packets with the compressed data packets can be performed. Correspondingly, if the data volume of the compressed data packets is not less than the original data volume, it means that compression cannot reduce the length of the data packets. Therefore, the operation of replacing the data packets with the compressed data packets is not performed. In this way, unnecessary replacement operations can be avoided, thereby saving processing resources. It should be noted that when the data packets are not replaced with the compressed data packets, the second flag bit can be set to a fifth target value. Among them, the fifth target value is used to indicate that the data packets accompanying the command packet are not compressed. Exemplarily, the fifth target value can be 0.
[0077] Optionally, the compressing the data packets in the to-be-transmitted micro-packets based on the target compression algorithm may specifically include:
[0078] Step S311: Select a data compression algorithm from a preset data compression algorithm as the target compression algorithm.
[0079] Step S312: Compress the data micro-packet based on the dedicated compression engine according to the target compression algorithm.
[0080] Correspondingly, the embodiment of the present invention may further include the following steps: Step S41: Set the value of the third flag bit in the command micro-packet to a fourth target value; the fourth target value is used to indicate that the data micro-packet accompanied by the command micro-packet is compressed by the target compression algorithm, so as to instruct the receiving party to perform a decompression operation using the decompression algorithm corresponding to the target compression algorithm.
[0081] In the embodiment of the present invention, the preset data compression algorithm may be a lossless compression algorithm, and the preset data compression algorithm can be selected as needed. Exemplarily, the preset data compression algorithm may include the BDI (Base-Delta-Immediate) compression algorithm and the FPC (Frequent-Pattern Compression) compression algorithm. Among them, the BDI compression algorithm can evenly divide the data micro-packet into multiple segments, and each segment subtracts a selected base value to obtain a delta for the purpose of compression. In a compressible scenario, the length of the delta is less than the length of the original data micro-packet. Correspondingly, the delta (representing the compressed data micro-packet) can be used to replace the original data micro-packet (referring to the uncompressed data micro-packet). The FPC compression algorithm can count the data patterns that often appear in the actual application scenario, and perform specific encoding on the data micro-packet for these data patterns for the purpose of 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. Or, select the preset data compression algorithm with the largest compression ratio as the target compression algorithm. Exemplarily, the data micro-packet can be compressed by each preset data compression algorithm first, and the compression ratio of each preset data compression algorithm can be determined based on the compression result. Then, the preset data compression algorithm with the largest compression ratio is used as the target compression algorithm. The dedicated compression engine can be a hardware component in the sender specifically used for compressing the data micro-packet. Specifically, the dedicated compression engine can run the target compression algorithm and perform a compression operation on the input data micro-packet. Correspondingly, the dedicated 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 the specific position of the third flag bit can be set as required. The fourth target value can be a preset value used to represent the target compression algorithm, and the preset values of different preset data compression algorithms are different. The number of bits of the third flag bit can be set according to the total number of preset data compression algorithms. Exemplarily, assuming there are 3 preset data compression algorithms, then the third flag bit can be 2 bits, and the preset values of these 3 preset data compression algorithms can be 00, 01, and 10 respectively. The third flag bit and the above-mentioned second flag bit can be collectively referred to as compression-related flag bits.
[0084] In an embodiment of the present invention, a data compression algorithm is selected from the preset data compression algorithms as the target compression algorithm, and the data micro packet is compressed according to the target compression algorithm based on the dedicated compression engine. Since the dedicated compression engine is specifically used to compress the data micro packet, to a certain extent, the compression speed can be ensured, the transmission delay caused by compression can be reduced, and the overhead of the compression operation on the transmission delay can be made within an acceptable range. At the same time, the value of the third flag bit in the command micro packet is set to the fourth target value, so that the receiving party can know which decompression algorithm to use for decompression operation after receiving the data micro packet, avoiding the problem that the receiving party makes a decompression error due to the mismatch of the decompression algorithm used.
[0085] Optionally, the above-mentioned message transmission to the receiving party based on the micro packet to be transmitted may specifically include:
[0086] Step 1041: Generate a data packet based on the micro packet to be transmitted to obtain a target data packet.
[0087] Step 1042: Send the target data packet to the receiving party.
[0088] In the embodiments of the present invention, the to-be-transmitted micro-packets obtained by splitting can be merged to form target data packets. Exemplarily, packet assembly can be performed according to the packet assembly rules specified by the used transmission protocol to obtain target data packets. For example, according to the packet size, the number of micro-packets, and the micro-packet type specified by the packet assembly rules, the to-be-transmitted micro-packets are correspondingly selected, and the target data packet is combined based on the selected to-be-transmitted micro-packets. Among them, the number and type of the selected to-be-transmitted micro-packets conform to the number of micro-packets and the micro-packet type specified by the packet assembly rules, and the total size of the selected to-be-transmitted micro-packets does not exceed the packet size specified by the packet assembly rules. In the embodiments of the present invention, the obtained to-be-transmitted micro-packets can access various transmission protocols. For example, 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, the to-be-transmitted micro-packets are packet-assembled into target data packets for point-to-point transmission.
[0089] Among them, the lengths of different target data packets can be the same or different, that is, the to-be-transmitted micro-packets of different lengths can be combined. A to-be-transmitted micro-packet can include only the to-be-transmitted micro-packets obtained by splitting the to-be-transmitted messages in the same transmission channel, or can include the to-be-transmitted micro-packets obtained by splitting the to-be-transmitted messages in different transmission channels. Among them, 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, during the packet assembly process, the placement order of the to-be-transmitted micro-packets corresponding to the same transmission channel is ensured to be the same as their generation order in the to-be-sent queue. Among them, the generation order can be the order of splitting the micro-packets. Since the source end and the destination end have a strict dependence on the order of the consistent messages on the same transmission channel, and during the transmission process, it is not necessary to parse what specific content the micro-packet has transmitted, that is, it is not necessary to process and process the information of the micro-packet. Therefore, in the embodiments of the present invention, the to-be-transmitted message is split into micro-packets, the to-be-transmitted micro-packets are packet-assembled, and the packet assembly is performed according to the generation order of the to-be-transmitted micro-packets to control the arrangement order of the to-be-transmitted micro-packets corresponding to the same transmission channel in the target data packet to match the generation order. In this way, the correct operation of both the sender and the receiver can be ensured, and the consistent messages at the receiver and the consistent messages at the sender for each transmission channel can be ensured to be the same.
[0090] Correspondingly, the embodiments of the present invention may further include the following steps:
[0091] Step 105: The receiving party splits the received target data packet into micro - packets to obtain target micro - packets.
[0092] Step 106: The receiving party processes the target micro - packets based on the flag bits of the command micro - packets in the target micro - packets.
[0093] In the embodiment of the present invention, the receiving party can parse the target data packet to obtain the included micro - packets. Specifically, the receiving party can extract the identifiers of the transmission channels to which the target micro - packets belong from the bits used to store the identifier of the affiliated transmission channel in the packet header information, and determine the target micro - packets with the same identifier of the transmission channel as the target micro - packets belonging to the same transmission channel. For different transmission channels, different queues to be processed can be set, that is, there is a one - to - one correspondence between the transmission channels and the queues to be processed in the receiving party. For the target micro - packets belonging to the same transmission channel carried by the target data packet, these target micro - packets can be written into the queue to be processed corresponding to the transmission channel to which these target micro - packets belong in sequence according to the arrangement order. Since the arrangement order is consistent with the generation order of the target micro - packets, in this way, when subsequent processing is based on the queue to be processed, the processing order of the receiving party and the sending party for the consistent messages on the same transmission channel is consistent. It should be noted that for the queues to be processed corresponding to each transmission channel, the receiving party can determine the represented consistent message according to the micro - packets stored in the queue to be processed, and correspondingly execute the represented consistent message, thereby realizing the cache consistency between the receiving party and the sending party. Since the message to be transmitted may consist only of command micro - packets or may consist of command micro - packets and data micro - packets. Therefore, the receiving party can process the target micro - packets based on the flag bits of the command micro - packets in the target micro - packets. Among them, the flag bits can include the above - mentioned first flag bit, second flag bit, and third flag bit. In this way, it can be ensured that the receiving party can complete the processing normally.
[0094] Optionally, the processing the target micro - packets based on the flag bits of the command micro - packets in the target micro - packets may specifically include:
[0095] Step 1061: When the value of the first flag bit in the command micro - packet is the first target value, directly process the command micro - packet.
[0096] Step 1062: When the value of the first flag bit in the command micro - packet is the second target value and the value of the second flag bit is the third target value, after receiving the data micro - packet accompanied by the command micro - packet, decompress the data micro - packet accompanied by the command micro - packet based on the target decompression algorithm, and process the decompressed data micro - packet and the command micro - packet; the target decompression algorithm is the decompression algorithm corresponding to the target compression algorithm represented by the value of the third flag bit in the command micro - packet.
[0097] In an embodiment of the present invention, for a 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 indicates that there is no accompanying data micro-packet. Accordingly, the command micro-packet in the to-be-processed queue can be directly processed. For example, the command micro-packets from the same to-be-transmitted message in the to-be-processed queue can be merged to obtain the to-be-transmitted message. If the value of the first flag bit in the command micro-packet is the second target value, it indicates that there is an accompanying data micro-packet. Accordingly, it is possible to wait for the accompanying data micro-packet to be written into the to-be-processed queue of the transmission channel. Accordingly, if the accompanying data micro-packet is written into the to-be-processed queue of the transmission channel, it can be determined that the data micro-packet accompanying the command micro-packet has been received. Accordingly, the command micro-packet and the data micro-packet can be converted into a to-be-transmitted message. Specifically, if the value of the second flag bit is the third target value, it indicates that the data micro-packet is compressed. Therefore, the data micro-packet accompanying the command micro-packet can be decompressed first based on the target decompression algorithm. Conversely, if the value of the second flag bit is not the third target value, it indicates that the data micro-packet is not compressed, so decompression may not be 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] Accordingly, if the data micropacket arrives at the corresponding pending queue of the transmission channel first, it needs to wait until the corresponding command micropacket is also received in the corresponding pending queue of the transmission channel. In the embodiments of the present invention, there are two cases for the micropackets generated by a message to be transmitted: there is only 1 command micropacket, or 1 command micropacket and 1 data micropacket. For the first micropacket written into the pending queue, if the first micropacket is a data micropacket, it can be determined that the data micropacket arrives first and needs to wait for the command micropacket from the same message. Specifically, the next command micropacket written into this pending queue can be determined as the command micropacket from the same message as this data micropacket, so as to obtain the command micropacket accompanied by the data micropacket and the data micropacket it accompanies. Accordingly, this command micropacket and the data micropacket it accompanies can be dequeued and restored to a coherent message. If the first micropacket is a command micropacket and the value of the first flag bit is the second target value, that is, this command micropacket is accompanied by a data micropacket, then the next data micropacket written into this pending queue can be determined as the data micropacket from the same message as this command micropacket, so as to obtain the command micropacket accompanied by the data micropacket and the data micropacket it accompanies. Accordingly, this command micropacket and the data micropacket it accompanies can be dequeued and restored to a coherent message. If the first micropacket is a command micropacket and the value of the first flag bit is the first target value, that is, this command micropacket is not accompanied by a data micropacket, then this command micropacket can be dequeued and restored to a coherent message. Further, for the subsequent newly enqueued micropackets, it can be determined whether this micropacket is a data micropacket, or a command micropacket with the value of the first flag bit being the second target value, or a command micropacket with the value of the first flag bit being the first target value, and then the corresponding processing can be performed with reference to the above processing method.
[0099] In the embodiments of the present invention, if the coherent message is directly packed and transmitted according to the point-to-point transmission protocol, a large overhead and bandwidth performance loss will be caused during the conversion process, and there is no compatibility and scalability between devices. In the embodiments of the present invention, the coherent message is first split into micropackets, and then combined based on the micropackets to obtain the target data packet. In this way, the coherent message can be conveniently converted into a point-to-point transmission data packet. Moreover, in the embodiments of the present invention, it is not necessary to modify the content of the message to be transmitted itself. Only the micropackets are used as the carrier to split the message to be transmitted into micropackets, and when assembling the packets, the micropackets are also combined to obtain the target data packet. In this way, it can be ensured that the cross-chip transmission method can support various coherent transmission protocols without modifying the transmission protocol, and has high generality, better compatibility and scalability.
[0100] An embodiment of the present invention further provides a message transmission device, which can be located at the sender in a point-to-point interconnection system. The message transmission device specifically includes a first transmission controller and a second transmission controller. The first transmission controller includes an acquisition component, a micro-packet generation component, a micro-packet enqueue controller, a channel interface corresponding to a transmission channel, a micro-packet queue memory, and a micro-packet dequeue controller. The second transmission controller includes a receiving component, a data packet generation component, and a sending component. The acquisition component is respectively connected to the channel interfaces corresponding to each transmission channel and the micro-packet generation component. The micro-packet generation component is connected to the micro-packet enqueue controller. The micro-packet enqueue controller is connected to the micro-packet queue memory. The micro-packet dequeue controller is respectively connected to the micro-packet queue memory and the receiving component.
[0101] The micro-packet queue memory includes a command queue memory and a data queue memory. The micro-packet enqueue controller includes a command micro-packet enqueue sub-controller and a data micro-packet enqueue sub-controller. The micro-packet generation component is respectively connected to the command micro-packet enqueue sub-controller and the data micro-packet enqueue sub-controller. The data micro-packet enqueue sub-controller specifically includes a dedicated compression engine and an enqueue unit. The dedicated compression engine is connected to the enqueue unit. The enqueue unit is connected to the data queue memory. The command micro-packet enqueue sub-controller is also connected to the dedicated compression engine. The receiving component is connected to the data packet generation component. The data packet generation component is connected to the sending component.
[0102] The acquisition component can implement step 101 above. The micro-packet generation component can be used to implement steps 102 to 103 above, and send the obtained micro-packets to be transmitted to the micro-packet enqueue controller. The micro-packet enqueue controller, the micro-packet dequeue controller, the micro-packet queue memory, and the second transmission controller can implement step 104 above. Specifically, the coherence messages generated by the network-on-chip can be input based on the channel interface corresponding to the transmission channel. Correspondingly, the acquisition component can determine the messages input through the channel interfaces corresponding to each transmission channel as the messages to be transmitted in each transmission channel. Among them, different transmission channels are used to transmit different messages. The coherence messages generated within the chip can be input through the channel interfaces corresponding to the corresponding transmission channels. 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 in the network-on-chip that needs to perform point-to-point cross-chip transmission. In an embodiment of the present invention, the coherence messages input through the channel interfaces corresponding to the transmission channels that need to perform cache coherence transmission can be obtained, and the messages to be transmitted in the transmission channels can be obtained.
[0103] The micro-packet generation component can sequentially send the data micro-packets in the generated micro-packets to be transmitted to a dedicated compression engine. After the dedicated compression engine processes the data micro-packets, it sends the data micro-packets to the enqueue unit. The enqueue unit combines the data micro-packets into the second element item in the data queue in the data queue memory and writes the second element item into the data queue. The micro-packet generation component sequentially sends the command micro-packets in the generated micro-packets to be transmitted to the command micro-packet enqueue sub-controller. The command micro-packet enqueue sub-controller combines the command micro-packets into the first element item in the command queue and writes the first element item into the command queue.
[0104] Among them, one element item in the micro-packet queue may include at least one micro-packet. The micro-packet dequeue controller dequeues the element item in the micro-packet queue memory to the receiving component. The data packet generation component obtains the micro-packets to be transmitted included in the element item dequeued to the receiving component and generates a data packet based on the micro-packets to be transmitted to obtain a target data packet. The sending component sends the target data packet to the receiving party.
[0105] The micro-packet dequeue controller may include a command micro-packet dequeue sub-controller and a data micro-packet dequeue sub-controller. The command micro-packet dequeue sub-controller is connected to the command queue memory and is used to dequeue the element item in the command queue in the command queue memory. The data micro-packet dequeue sub-controller is connected to the data queue memory and is used to dequeue the element item in the data queue in the data queue memory. In this way, by performing enqueue and dequeue operations on the micro-packet queue, after obtaining the target data packet by packetizing the micro-packets to be output in the dequeued element item, the packets to be transmitted in the transmission channel can be conveniently synchronized to the receiving party in the point-to-point interconnection.
[0106] Among them, the micro-packet queue memory includes a micro-packet queue for storing the micro-packets to be transmitted corresponding to each transmission channel. One transmission channel corresponds to at least one micro-packet queue, and the micro-packet queues corresponding to each transmission channel are only written with the micro-packets split from the packets to be transmitted in the transmission channel. The channel interface corresponding to the transmission channel and the micro-packet queue memory both belong to the category of the transmission channel.
[0107] In the embodiment of the present invention, the micro-packets to be transmitted obtained by splitting the packets to be transmitted may only include command micro-packets, or may include command micro-packets and data micro-packets. For any transmission channel, if the coherent packets transmitted by the transmission channel do not include a data part, that is, the micro-packets to be transmitted obtained by splitting the packets to be transmitted in the transmission channel only include command micro-packets, then only a command queue can be set in the command queue memory for the transmission channel. If the coherent packets transmitted by the transmission channel include a data part, that is, there are packets to be transmitted in the transmission channel that are split into command micro-packets and data micro-packets, then a command queue and a data queue can be set in the command queue memory and the data queue memory for the transmission channel.
[0108] In an embodiment of the present invention, one transmission channel corresponds to one channel interface. For example, there are 4 transmission channels: transmission channel A, transmission channel B, transmission channel C, and transmission channel D. The consistency messages transmitted by transmission channel A and transmission channel D do not include a data part. Taking the case where there are consistency messages including a data part in the consistency messages transmitted by transmission channel B and transmission channel D as an example, the channel interfaces included in the first transmission control may 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 multiple micro-packet queues corresponding to transmission channel A, transmission channel B, transmission channel C, and transmission channel D: command queue a corresponding to transmission channel A, command queue b1 and data queue b2 corresponding to transmission channel B, command queue c1 and data queue c2 corresponding to transmission channel C, and command queue d corresponding to transmission channel D.
[0109] Among them, the operation of setting the value of the first flag bit in the command micro-packet may be performed by the micro-packet generation component. Specifically, the first element item refers to the element item in the command queue in the command queue memory, and the second element item refers to the element item in the data queue in the data queue memory. The command micro-packet enqueue 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. Exemplarily, assuming that the to-be-transmitted micro-packet is obtained by splitting the to-be-transmitted message in transmission channel B, then the command micro-packet in the to-be-transmitted micro-packet can be written into the above command queue b1 in the command queue memory. Specifically, the command micro-packet enqueue sub-controller can combine multiple command micro-packets into one item to obtain a first element item, and perform an enqueue operation to write the first element item into the command queue in the command queue memory. Exemplarily, assuming that these multiple command micro-packets are: command micro-packet 1, command micro-packet 2, command micro-packet 3, and command micro-packet 4, then command micro-packet 1, command micro-packet 2, command micro-packet 3, and command micro-packet 4 can be concatenated to obtain a first element item, and then written into an element of the command queue to implement the enqueue operation.
[0110] Further, if the micro-packet to be transmitted further includes a data micro-packet, the data micro-packet enqueue sub-controller may further write the data micro-packet in the micro-packet to be transmitted into the data queue corresponding to the transmission channel to which the micro-packet to be transmitted belongs. Exemplarily, assume that the micro-packet to be transmitted is obtained by splitting the message to be transmitted in transmission channel B. Then, the micro-packet to be transmitted further includes a data micro-packet, and the first transmission control may write the data micro-packet in the micro-packet to be transmitted into the above-mentioned data queue b2 in the data queue memory. Specifically, the data micro-packet enqueue sub-controller may combine a plurality of data micro-packets into one item to obtain a second element item, and perform an enqueue operation to write the second element item into the data queue in the data queue memory. Exemplarily, assume that these data micro-packets are: data micro-packet 1 and data micro-packet 2. Then, data micro-packet 1 and data micro-packet 2 may be concatenated to obtain a second element item, and then written into an element of the data queue to implement the enqueue operation.
[0111] In the embodiment of the present invention, by separately providing a command queue memory and a data queue memory, and writing the command micro-packet and the data micro-packet in the micro-packet to be transmitted into the command queue and the data queue in the form of a first element item and a second element item respectively, it is possible to avoid mixing the command micro-packet and the data micro-packet, which is convenient for subsequent processing of the command micro-packet and the data micro-packet.
[0112] Optionally, in the embodiment of the present invention, the command micro-packet enqueue sub-controller is specifically configured to select adjacent generated command micro-packets from the command micro-packets as the command micro-packets to be merged according to the command queue width of the command queue; the total data width of the command micro-packets to be merged is not greater than the command queue width; perform merging on the command micro-packets to be merged to obtain a first element item; the data micro-packet enqueue sub-controller is specifically configured to select adjacent generated data micro-packets from the data micro-packets as the data micro-packets to be merged according to the data queue width of the data queue; the total data width of the data micro-packets to be merged is not greater than the data queue width; perform merging on the data micro-packets to be merged to obtain a second element item.
[0113] Among them, 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 command micro-packets to be merged may be the sum of the data widths of all the command micro-packets to be merged, and the total data width of the data micro-packets to be merged may be the sum of the data widths of all the data micro-packets to be merged. The data width of the micro-packet refers to the bit width occupied by the micro-packet, which may correspond to the length of the micro-packet.
[0114] Compared with the bit width occupied by command micro - packets, the command queue width is often larger. Compared with the bit width occupied by data micro - packets, the data queue width is often larger. Therefore, command micro - packets can be merged and written into the command queue in the command queue memory, and data micro - packets can be merged and written into the data queue in the data queue memory. The command queue and the data queue can be first - in - first - out queues (FIFO). During the process of splitting the packet to be transmitted, the micro - packet generation component will generate micro - packets in sequence. For any command micro - packet generated in sequence, the command micro - packets generated before and after this command micro - packet can be regarded as the command micro - packets generated adjacent to this command micro - packet.
[0115] The micro-packet generation component can send the generated command micro-packets to the command micro-packet enqueueing sub-controller. Specifically, the micro-packet generation component sequentially sends the generated command micro-packets to the command micro-packet enqueueing sub-controller responsible for enqueueing in the first transmission controller. Correspondingly, after receiving the command micro-packets, the command micro-packet enqueueing sub-controller can enqueue the command micro-packets. First, according to the command queue width of the command queue, the command micro-packets to be merged can be obtained from the received un-enqueued command micro-packets. Specifically, the command micro-packets can be sequentially selected from the un-enqueued command micro-packets in the receiving order (wherein the sequentially received command micro-packets are adjacent generated command micro-packets) until the total data width of the selected command micro-packets reaches the command queue width, or the difference obtained by subtracting the total data width from the command queue width is less than the data width of the next command micro-packet (at this time, there may still be unselected un-enqueued command micro-packets, but since the command queue width can no longer accommodate more command micro-packets, the selection can be ended), or all un-enqueued command micro-packets are selected (at this time, the difference obtained by subtracting the total data width from the command queue width may be greater than the data width of one command micro-packet, but since all un-enqueued command micro-packets have been selected, the selection can be ended to facilitate subsequent enqueueing operations and avoid waiting). Among them, the total data width of the selected command micro-packets represents the sum of the data widths of all currently selected command micro-packets. Correspondingly, the selected command micro-packets are the command micro-packets to be merged. Further, the command micro-packets to be merged can be merged to obtain a first element item. Among them, merging the command micro-packets to be merged can be to connect the sequentially obtained command micro-packets end to end in the received order. In this way, it is equivalent to writing the command micro-packets into the command queue in the generation order. Correspondingly, if there are more sent command micro-packets, then multiple command micro-packets can be obtained as the command micro-packets to be merged. Correspondingly, the obtained multiple command micro-packets can be merged into one first element item. When dequeuing later, these multiple command micro-packets can be dequeued together. If there are fewer sent command micro-packets, then only 1 command micro-packet may be obtained (for example, the current un-enqueued command micro-packets only include 1 command micro-packet), that is, the number of data micro-packets to be merged is 1. At this time, the obtained command micro-packet can be directly used as a first element item.
[0116] For any data micro-packet generated in sequence, the data micro-packets generated before and after this data micro-packet can be regarded as the data micro-packets generated adjacent to this data micro-packet. The micro-packet generation component sends the generated data micro-packet to the data micro-packet enqueue sub-controller. Specifically, the micro-packet generation component can send the generated data micro-packets to the data micro-packet enqueue sub-controller responsible for enqueueing in the first transmission controller in the order of generation. Correspondingly, after receiving the data micro-packet, the data micro-packet enqueue sub-controller can enqueue the data micro-packet. First, the data queue width of the data queue can be used to obtain the data micro-packets to be merged from the received un-enqueued data micro-packets. Specifically, the data micro-packets can be sequentially selected from the un-enqueued data micro-packets in the order of reception (where the sequentially received data micro-packets are the adjacent generated data micro-packets) until the total data width of the selected data micro-packets 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 unselected un-enqueued data micro-packets, but since the data queue width can no longer accommodate more data micro-packets, the selection can be ended), or all un-enqueued 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 one data micro-packet, but since all un-enqueued data micro-packets have been selected, the selection can be ended to facilitate the subsequent enqueue operation and avoid waiting). Among them, the total data width of the selected data micro-packets represents the sum of the data widths of all currently selected data micro-packets. Correspondingly, the selected data micro-packets are the data micro-packets to be merged. Further, the data micro-packets to be merged can be merged to obtain a first element item. Among them, merging the data micro-packets to be merged can be to connect the heads and tails of the sequentially obtained data micro-packets in the order of reception. In this way, it is equivalent to writing the data micro-packets into the data queue in the order of generation. Correspondingly, if there are more data micro-packets sent, then multiple data micro-packets can be obtained. Correspondingly, the multiple obtained data micro-packets can be merged into a second element item. When dequeuing later, these multiple data micro-packets can be dequeued together. If there are fewer data micro-packets sent, then only 1 data micro-packet may be obtained, that is, the number of data micro-packets to be merged is 1. At this time, the obtained data micro-packet can be directly used as a second element item.
[0117] In an embodiment of the present invention, by selecting command micro-packets with a total data width not greater than the command queue width, a first element item in the command queue is merged and generated. Also, by selecting data micro-packets with a total data width not greater than the data queue width, a second element item in the data queue is merged and generated. When subsequently transmitting packets to the receiver based on the element items in the micro-packet queue in the micro-packet queue memory, dequeueing the element items in the micro-packet queue is equivalent to sending the merged micro-packets in the same item as a longer micro-packet combination, which can improve the transmission efficiency and prevent the occurrence of path bottlenecks.
[0118] Optionally, in an embodiment of the present invention, the micro-packet generation component is specifically configured to sequentially send the generated command micro-packets to the command micro-packet enqueue sub-controller according to a first clock frequency, and sequentially send the generated data micro-packets to the data micro-packet enqueue sub-controller. Wherein, the first clock frequency is greater than the clock frequency used for dequeueing the first element item in the command queue in the command queue memory, and the first clock frequency is greater than the clock frequency used for dequeueing the second element item in the data queue in the data queue memory.
[0119] Among them, the first clock frequency can be set as required. The first clock frequency can correspond to the on-chip clock domain. The clock frequencies used for dequeueing the first element item and the second element item can correspond to the controller clock domain. The first clock frequency being greater than the clock frequency used for dequeueing the first element item in the command queue and greater than the clock frequency used for dequeueing the second element item in the data queue means that the command micro-packets and data micro-packets are sent to the command queue memory / data queue memory in the fast clock domain and are output to the second transmission controller in the slow clock domain. In this way, there can be sufficient command micro-packets and data micro-packets to be merged and written into the command queue memory / data queue memory. By merging the command micro-packets and data micro-packets and then writing them into the command queue memory / data queue memory, the clock domain conversion characteristics involved in enqueueing and dequeueing can be adapted, so that the data path bandwidth before and after the command queue memory remains basically the same, and the data path bandwidth before and after the data queue memory remains basically the same, thereby avoiding the occurrence of path bottlenecks.
[0120] Furthermore, a dedicated compression engine can be used to implement the above steps S31 to S32. Specifically, the operation of setting the second flag bit and the third flag bit can be executed by the command micro-packet enqueue sub-controller. The dedicated compression engine can also notify the command micro-packet enqueue sub-controller when replacing the data micro-packet with a compressed data micro-packet, so as to facilitate the execution of the operation of setting the second flag bit and the third flag bit by the command micro-packet enqueue sub-controller. In the embodiment of the present invention, when the data micro-packet enters the data queue in the data queue memory, it is first compressed by the dedicated compression engine and then enters the data queue. If the total data width of several adjacent compressed data micro-packets is not greater than the data queue width, these data micro-packets can be merged and stored in the same item of the data queue.
[0121] In the embodiment of the present invention, the first transmission controller can be the sending end in the coherent message transmission controller, and the second transmission controller can also be called the point-to-point transmission controller. The coherent message transmission controller and the point-to-point transmission controller are set on the same chip, and the coherent message transmission controller can also include a receiving end. Among them, the sending end can implement the functions that the first transmission controller can achieve. According to the general concept of the interconnection protocol, the second transmission controller can include the data link layer and the 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 arbiter. The command queue memory and the data queue memory corresponding to all transmission channels can dequeue the element items to the arbiter. The arbiter can perform priority control on the micro-packets in the command queue memory and the data queue memory corresponding to different transmission channels input to the arbiter according to a preset arbitration method to control the priority of packetizing the micro-packets. Among them, the higher the priority, the earlier the micro-packet is packetized into the target data packet.
[0122] Further, the receiving end can be used to receive target data packets sent by other chips, parse the target data packets according to the packet assembly information to obtain micro-packets on each transmission channel, obtain consistency messages on each transmission channel based on the micro-packets on each transmission channel, and send them back to the on-chip network of the local end. In the embodiments of the present invention, the message transmission device may further include a non-consistent transmission channel, and the embodiments of the present invention do not limit whether there is a non-consistent transmission channel. Among them, the non-consistent transmission channel can be used to transmit non-consistent messages. The non-consistent transmission channel can have the same structure as the above-mentioned consistent transmission channel, or can also have a different structure, and the embodiments of the present invention do not limit this. The embodiments of the present invention also provide a point-to-point interconnection device, which includes the above-mentioned message transmission device, and the point-to-point interconnection device performs micro-packet transmission through designated pins of the chip. Among them, the message transmission device can be located in the chip of the point-to-point interconnection device, and the chip can be integrated with multiple groups of pins. In the embodiments of the present invention, the point-to-point interconnection device can achieve the same technical effect as the message transmission device, which will not be elaborated here. Specifically, the micro-packet dequeue controller can dequeue the element items composed of micro-packets to the second transmission controller through the designated pins therein, so as to realize micro-packet transmission through the designated pins. Further, the point-to-point interconnection device may further include the above-mentioned receiving party, and the message transmission device in the point-to-point interconnection device and the receiving party can also perform message transmission through the interconnected pins. Optionally, the designated pins may include PCIE pins provided in the chip, and the number of the designated pins is one or more. Specifically, multiple groups of PCIE pins can be pre-integrated in the chip, and one or more of them can be used as the designated pins. By multiplexing the PCIE pins, all micro-packet transmissions can be realized. Or, independent pins can also be pre-set in the chip, and all micro-packets are transmitted through the independent pins. That is, in this implementation manner, the independent pins are only used to transmit micro-packets and are not used to transmit PCIE data.
[0123] In an embodiment of the invention, the acquisition component may be a data register or a data cache, the micro-packet generation component may be a data register or a data cache, and the acquisition component and the micro-packet generation component may be the same hardware entity. The command micro-packet enqueue sub-controller in the micro-packet enqueue controller may be a queue controller, the enqueue unit in the data micro-packet enqueue sub-controller is a queue controller, and the dedicated compression engine may be an arithmetic unit. Among them, the queue controller includes a control logic circuit and a control register. The micro-packet queue memory may be a register file or a Static Random-Access Memory (SRAM) structure, and the command queue memory and the data queue memory in the micro-packet queue memory may be different register files or SRAM structures respectively. The command micro-packet dequeue sub-controller and the data micro-packet dequeue sub-controller in the micro-packet dequeue controller may both be queue controllers, and the queue controller may include a control logic circuit and a control register. The receive register may be a data register, the data packet generation component may be a data register, the receive register and the data packet generation component may be the same hardware entity, and the sending component may be a control register or a sending controller.
[0124] Referring to Figure 2 , a block diagram of a message transmission device provided by an embodiment of the present invention is shown. As Figure 2 shown, the message transmission device specifically includes:
[0125] An acquisition module 201, configured to acquire, for any transmission channel of the sender, the message to be transmitted in the transmission channel;
[0126] A determination module 202, configured to determine, based on the preset message and micro-packet information correspondence relationship corresponding to the transmission channel, the micro-packet type and micro-packet specification corresponding to the message to be transmitted, and obtain a target micro-packet type and a target micro-packet specification;
[0127] A first splitting module 203, configured to split the message to be transmitted into micro-packets according to the target micro-packet type and the target micro-packet specification, and obtain micro-packets to be transmitted;
[0128] A transmission module 204, configured to perform message transmission to the receiver based on the micro-packets to be transmitted. Among them, the acquisition module 201, the determination module 202, the first splitting module 203, and the transmission module 204 are located at the sender.
[0129] Optionally, the first splitting module 203 is specifically configured to:
[0130] In the case where the target micro-packet type only includes the command micro-packet type, split the message to be transmitted into command micro-packets that meet the command micro-packet specification in the target micro-packet specification;
[0131] When the target micro-packet type includes a command micro-packet type and a data micro-packet type, the non-data part of the packet to be transmitted is split into command micro-packets that conform to the command micro-packet specification in the target micro-packet specification, and the data part of the packet to be transmitted is split into data micro-packets that conform to the data micro-packet specification in the target micro-packet specification.
[0132] Optionally, the first splitting module 203 is further specifically configured to:
[0133] When the target micro-packet type only includes a command micro-packet type, set the value of the first flag bit in the command micro-packet to a first target value;
[0134] When 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;
[0135] Wherein, 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 the receiving party 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, so as to instruct the receiving party to process after receiving the command micro-packet and the data micro-packet accompanied by the command micro-packet.
[0136] Optionally, the device further includes:
[0137] A compression module, configured to compress the data micro-packets in the micro-packets to be transmitted based on a target compression algorithm, and replace the data micro-packets with the compressed data micro-packets;
[0138] When the data micro-packets are replaced with the compressed data micro-packets, set 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-packets accompanied by the command micro-packet are compressed, so as to instruct the receiving party to perform a decompression operation after receiving the data micro-packets. Wherein, the compression module is located at the sending party.
[0139] Optionally, the compression module is specifically configured to:
[0140] Select a data compression algorithm from a preset data compression algorithm as the target compression algorithm;
[0141] Compress the data micro-packets according to the target compression algorithm based on a dedicated compression engine;
[0142] When the data volume of the compressed data micro-packets is less than the original data volume, replace the data micro-packets with the compressed data micro-packets; the original data volume is the data volume before the data micro-packets are compressed;
[0143] The device further includes: a setting module, configured to set the value of a third flag bit in the command micro-packet to a fourth target value; the fourth target value is used to indicate that the data micro-packet accompanying the command micro-packet is compressed by the target compression algorithm, so as to instruct the receiving party to perform a decompression operation using the decompression algorithm corresponding to the target compression algorithm. Wherein, the setting module is located at the sending party.
[0144] Optionally, the transmission channel includes a read request transmission channel, a read response transmission channel, a write request transmission channel, and a write response transmission channel; wherein, different transmission channels are used to transmit different packets.
[0145] Optionally, the transmission module is specifically configured to:
[0146] Generate a data packet based on the micro-packet to be transmitted to obtain a target data packet;
[0147] Send the target data packet to the receiving party;
[0148] The device 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-packet based on the flag bit of the command micro-packet in the target micro-packet. Wherein, the second splitting module and the processing module are located at the receiving party.
[0150] Optionally, the processing module is specifically configured to directly process the command micro-packet when the value of the first flag bit in the command micro-packet is the first target value;
[0151] When the value of the first flag bit in the command micro-packet is the second target value and the value of the second flag bit is the third target value, after receiving the data micro-packet accompanying the command micro-packet, decompress the data micro-packet accompanying the command micro-packet based on the target decompression algorithm, and process the decompressed data micro-packet and the command micro-packet; the target decompression algorithm is the decompression algorithm corresponding to the target compression algorithm represented by the value of the third flag bit in the command micro-packet.
[0152] In summary, for any transmission channel of the sender in the message transmission device provided by the embodiment of the present invention, the sender obtains the message to be transmitted in the transmission channel. Based on the preset message and micro-packet information correspondence relationship corresponding to the transmission channel, the micro-packet type and micro-packet specification corresponding to the message to be transmitted are determined, and the target micro-packet type and target micro-packet specification are obtained. According to the target micro-packet type and target micro-packet specification, the message to be transmitted is split into micro-packets to obtain the micro-packets to be transmitted. The sender performs message transmission to the receiver based on the micro-packets to be transmitted. In this way, by first splitting the message to be transmitted into micro-packets to be transmitted and performing message transmission to the receiver based on the micro-packets to be transmitted, the message transmission of the message to be transmitted is realized.
[0153] At the same time, since there is no need to modify the content of the message to be transmitted itself, but only to split the message to be transmitted into micro-packets and perform subsequent transmission in the form of micro-packets, in this way, the generality of the message transmission method is ensured.
[0154] Refer to Figure 3 , which is a schematic structural diagram of the electronic device provided by the embodiment of the present invention. As Figure 3 shown, the electronic device includes: 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 at least one executable instruction, and the executable instruction enables the processor to execute the message transmission method of the foregoing embodiment. The executable instructions can form a program.
[0155] The embodiment of the present invention provides a machine-readable medium, on which instructions are stored. When executed by one or more processors, the instructions enable the processors to execute the message transmission method of the foregoing embodiment. Each embodiment in this specification is described in a progressive manner. The key points of each embodiment are the differences from other embodiments. The same and similar parts among the embodiments can be referred to each other.
[0156] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take 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 code.
[0157] It should be noted that all actions of obtaining signals, information, or data in this application are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where it is located and obtaining the authorization given by the owner of the corresponding device.
[0158] Embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate a device for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or a device for implementing the functions specified in multiple blocks.
[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 device to work in a predictive manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or the functions specified in multiple blocks.
[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or the functions specified in multiple blocks.
[0161] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0162] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0163] The above has introduced in detail a message transmission method, a message transmission device, an electronic device and one or more machine-readable media provided by the present invention. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A message transmission method, characterized in that: The method comprises: For any transmission channel of the sender, the sender obtains the message to be transmitted in the transmission channel; The sender determines the micro-packet type and micro-packet specification corresponding to the message to be transmitted based on the correspondence between the preset message and the micro-packet information corresponding to the transmission channel, and obtains the target micro-packet type and target micro-packet specification; The sender splits the message to be transmitted into micro-packets according to the target micro-packet type and the target micro-packet specification to obtain micro-packets to be transmitted; The sender transmits a message to the receiver based on the micro-packet to be transmitted.
2. The method according to claim 1, characterized in that The step of splitting the message to be transmitted into micro-packets according to the target micro-packet type and the target micro-packet specification to obtain the micro-packets to be transmitted includes: In the case where the target micro-packet type only includes a command micro-packet type, splitting the message to be transmitted into command micro-packets that meet the command micro-packet specifications in the target micro-packet specifications; In the case where the target micro-packet type includes a command micro-packet type and a data micro-packet type, the non-data portion of the message to be transmitted is split into command micro-packets that comply with the command micro-packet specifications in the target micro-packet specifications, and the data portion of the message to be transmitted is split into data micro-packets that comply with the data micro-packet specifications in the target micro-packet specifications.
3. The method according to claim 2, characterized in that The method further comprises: In the case where the target micro-packet type only includes the command micro-packet type, setting the value of the first flag bit in the command micro-packet to a first target value; In the case where the target micro-packet type includes a command micro-packet type and a data micro-packet type, setting the value of the first flag bit in the command micro-packet to a second target value; Among them, the first target value is used to characterize that the command micro-packet is not accompanied by a data micro-packet, so as to instruct the receiving party to directly process the command micro-packet after receiving it; the second target value is used to characterize that the command micro-packet is accompanied by a data micro-packet, so as to instruct the receiving party to process the command micro-packet and the data micro-packet accompanying the command micro-packet after receiving it.
4. The method according to any one of claims 1 to 3, characterized in that: Before transmitting the message to the receiving party based on the micro-packet to be transmitted, the method further includes: Compressing the data micro-packet in the micro-packet to be transmitted based on a target compression algorithm, and replacing the data micro-packet with the compressed data micro-packet; When the data micro-packet is replaced by the compressed data micro-packet, the value of the second flag bit in the command micro-packet is set to a third target value; the third target value is used to indicate that the data micro-packet accompanying the command micro-packet has been compressed, so as to instruct the recipient to perform a decompression operation after receiving the data micro-packet.
5. The method according to claim 4, characterized in that The compressing the data micro-packet in the micro-packet to be transmitted based on the target compression algorithm includes: 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 dedicated compression engine; The replacing the data micro-packet with the compressed data micro-packet includes: when the amount of data in the compressed data micro-packet is less than the original amount of data, replacing the data micro-packet with the compressed data micro-packet; the original amount of data is the amount of data before the data micro-packet is compressed; The method also includes: setting the value of the third flag bit in the command micropacket to a fourth target value; the fourth target value is used to indicate that the data micropacket accompanying the command micropacket is compressed using the target compression algorithm, so as to instruct the recipient to use a decompression algorithm corresponding to the target compression algorithm to perform a decompression operation.
6. The method according to claim 1, characterized in that 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; Among them, different transmission channels are used to transmit different messages.
7. The method according to claim 1, characterized in that The transmitting of a message to a receiving party based on the micro-packet to be transmitted includes: Generate a data packet based on the micro-packet to be transmitted to obtain a target data packet; Sending the target data packet to the receiving party; The method further includes: the receiver splitting the received target data packet into micro-packets to obtain target micro-packets; The receiver processes the target micro-packet based on the flag bit of the command micro-packet in the target micro-packet.
8. The method according to claim 7, characterized in that The processing of the target micro-packet based on the flag bit of the command micro-packet in the target micro-packet includes: When the value of the first flag bit in the command micro-packet is the first target value, directly processing the command micro-packet; When the value of the first flag bit in the command micro-packet is the second target value and the value of the second flag bit is the third target value, after receiving the data micro-packet accompanying the command micro-packet, the data micro-packet accompanying 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 the target compression algorithm represented by the value of the third flag bit in the command micro-packet.
9. The method according to claim 6, characterized in that The read request transmission channel is used to transmit the first-level cache read failure and the first-level cache write failure; 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 first-level 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.
10. A message transmission device, characterized in that: The device comprises: An acquisition module located at the sender, used for acquiring a message to be transmitted in any transmission channel of the sender; A determination module located at the sender, used to determine the micro-packet type and micro-packet specification corresponding to the message to be transmitted based on the correspondence between the preset message and the micro-packet information corresponding to the transmission channel, and obtain the target micro-packet type and target micro-packet specification; A first splitting module located at the sender, used to split the message to be transmitted into micro-packets according to the target micro-packet type and the target micro-packet specification, to obtain micro-packets to be transmitted; The transmission module located at the sender is used to transmit a message to the receiver based on the micro-packet to be transmitted.
11. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store executable instructions, and the executable instructions enable the processor to execute the method according to any one of claims 1 to 9.
12. One or more machine-readable media, characterized in that Instructions are stored thereon, which, when executed by one or more processors, cause the processors to perform the method as claimed in any one of claims 1 to 9.
Citation Information
Patent Citations
Method for determining data fragments based on data transmission and related device
CN115314555A
IPsec protocol message encryption and decryption method based on chip scheme
CN115333859A
Data sending method, data response method, equipment and storage medium
CN115883461A
Data reading method for chip, chip, computer equipment and storage medium
CN117785043A
Multiprocessor system for maintaining cache coherency by checking the coherency in the order of the transactions being issued on the bus
US5530933A