Data packet generation module, data packet analysis module, method, chip and device
By splitting protocol layer data packets into uniformly sized data segments and generating link layer data packets, the problem of poor flexibility caused by the fixed size of link layer data packets is solved, and efficient data transmission is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HYGON INFORMATION TECH CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, the fixed size of data packets at the link layer in communication between chip components results in poor flexibility in the packaging of data packets at the protocol layer, limiting the combination of different types of data packets, leading to high latency and poor scalability.
By splitting protocol layer packets into uniformly sized data fragments and generating link layer packets accordingly, each payload field carries a data fragment, thus achieving alignment between protocol layer packets and link layer packets and supporting the packaging of any type and number of protocol layer packets.
It improves the flexibility and efficiency of packet packaging at the link layer, reduces data transmission latency, and ensures efficient packet transmission.
Smart Images

Figure CN122496471A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chips, and in particular to a data packet generation module, a data packet parsing module, a method, a chip, and a device. Background Technology
[0002] In communication between two chip chips, the protocol stack is logically divided into three layers: protocol layer, link layer and physical layer. The chip chip, as the sending end, will package multiple different types of protocol layer data packets (such as request packets and response packets) into a link layer data packet of fixed size. Different types of protocol layer data packets usually have different sizes. In related technologies, fixed-size link layer packets can be represented using combinations of fields of varying sizes. For example, a 512-bit link layer packet can be considered a combination of four 128-bit fields, eight 64-bit fields, or two 128-bit fields plus four 64-bit fields. During packetization, these technologies place multiple different types of protocol layer packets into fixed fields of the link layer packet according to their possible length combinations. However, the packetization operation of related technologies must be carried out in accordance with the combination forms supported by the link layer data packets, which results in certain limitations on the type and size of protocol layer data packets during packetization, and poor packetization flexibility. Summary of the Invention
[0003] This application provides a data packet generation module, a data packet parsing module, a method, a chip, and a device. By aligning protocol layer data packets and link layer data packets, this application improves the flexibility of packaging protocol layer data packets into link layer data packets.
[0004] According to one aspect of this application, a data packet generation module is provided, located in a chip chip, the data packet generation module being used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
[0005] According to one aspect of this application, a data packet parsing module is provided, located in a chip, the data packet parsing module being used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
[0006] According to one aspect of this application, a data packet generation method is provided, executed by a data packet generation module in a chip, the method comprising: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
[0007] According to one aspect of this application, a data packet parsing method is provided, executed by a data packet parsing module in a chip, the method comprising: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
[0008] According to one aspect of this application, a chip chip is provided, the chip chip including a data packet generation module, the data packet generation module being configured to: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
[0009] According to one aspect of this application, a chip chip is provided, the chip chip including a data packet parsing module, the data packet parsing module being used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
[0010] According to one aspect of this application, a chip is provided, the chip comprising a chip chip, the chip chip including a data packet generation module, the data packet generation module being configured to: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
[0011] According to one aspect of this application, a chip is provided, the chip comprising a chip chip, the chip chip including a data packet parsing module, the data packet parsing module being used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
[0012] According to one aspect of this application, a computing device is provided, the computing device including a chip, the chip including a data packet generation module, the data packet generation module being configured to: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
[0013] According to one aspect of this application, a computing device is provided, the computing device including a chip, the chip including a data packet parsing module, the data packet parsing module being used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
[0014] The beneficial effects of the technical solutions provided in this application include at least the following:
[0015] In this embodiment, each protocol layer data packet read by the data packet generation module is divided into an integer number of data segments. The size of each data segment is equal to the size of an integer number of payload fields in a first link layer data packet. That is, this embodiment divides the protocol layer data packets and the first link layer data packets with a uniform granularity, thereby achieving alignment between the protocol layer data packets and the first link layer data packets. For any type and any number of protocol layer data packets, they can be divided into a uniform granularity and written into the first link layer data packets. This embodiment improves the flexibility of packaging protocol layer data packets into link layer data packets. In addition, in this embodiment, multiple types of protocol layer data packets are written into the first link layer data packet in a bubble-free manner (bubble-free means that each valid payload field in the first link layer data packet is loaded with data), so that the first link layer data packet can pack as many protocol layer data packets as possible. Therefore, this embodiment improves the packing efficiency and thus reduces the data transmission latency. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of a communication architecture between two chip particles provided in one embodiment of this application.
[0018] Figure 2 This is a schematic diagram of a data packet generation module provided in one embodiment of this application.
[0019] Figure 3 This is a schematic diagram of a communication architecture between two chip particles provided in another embodiment of this application.
[0020] Figure 4 This is a schematic diagram of a data packet parsing module provided in one embodiment of this application.
[0021] Figure 5 This is a flowchart of a data packet generation method provided in one embodiment of this application.
[0022] Figure 6 This is a flowchart of a data packet parsing method provided in one embodiment of this application.
[0023] Figure 7 This is a structural block diagram of a chip provided in one embodiment of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0025] First, some terms used in the embodiments of this application will be introduced: Chiplet packaging technology is a modular design approach that breaks down a large chip into multiple smaller dies and then combines them into a system-on-a-chip (SoC). This involves separating the functional modules integrated on a single chip within a SoC, such as the CPU (Central Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processor), NPU (Neural Processing Unit), and ISP (Image Signal Processor), into independent dies, and then using packaging technology to combine these dies into a complete SoC.
[0026] Communication between different chip components is required, and the protocol stack required for this communication is logically divided into three layers: the protocol layer, the data link layer, and the physical layer. The protocol layer is the logical layer that processes data according to the transmission protocol used within the chip component; the data link layer is the logical layer that concatenates various types of protocol layer data packets into data link layer packets through certain compression and packetization methods; and the physical layer is the logical layer that propagates data link layer packets serially or in parallel on physical SerDes (serializers / deserializers).
[0027] In related technologies, when two chip chips communicate, the chip chip acting as the sender will package protocol layer data packets into link layer data packets in the following manner: Related technologies represent fixed-size link layer packets using multiple combinations of different lengths. For example, when the size of a link layer packet is 512 bits, it can be considered as a combination of 4 128-bit fields, 8 64-bit fields, or 2 128-bit fields plus 4 64-bit fields (any combination will appear in actual design). During packetization, protocol layer packets of different types and lengths are inserted into fixed positions in the buffer used to store link layer packets according to the possible combinations.
[0028] However, because the fixed-position packaging method requires packaging according to the combination form supported by the link layer data packets, there are certain limitations on the scene mode and packet length when packaging. In some scene modes, different packet types cannot be arbitrarily combined for packaging, resulting in higher latency and poor scalability.
[0029] Based on this, this application will provide a protocol layer packetization method for chip-level communication scenarios, which improves the flexibility and packetization efficiency when packetizing protocol layer data packets into link layer data packets.
[0030] Figure 1 This application illustrates a schematic diagram of an architecture for interconnecting and communicating between two chip particles, provided in an exemplary embodiment. Figure 1 Chip particle 110 and chip particle 120 are shown.
[0031] The chip 110 includes a network-on-chip (NOC) 111, a conversion module 112, and a serializer / deserializer 113; the network-on-chip 111 and the conversion module 112 can transmit protocol layer data packets bidirectionally, and the conversion module 112 and the serializer / deserializer 113 can transmit link layer data packets bidirectionally. For example, the on-chip network 111 is a hardware system that interconnects multiple processing units (such as caches, memory controllers, etc.) within the chip chip 110 through a network-like architecture. For example, the conversion module 112 includes a packet generation module and a packet parsing module. The packet generation module packages protocol layer packets into link layer packets. Specifically, the packet generation module packages multiple types of protocol layer packets into the same link layer packet. The packet parsing module unpacks the link layer packets into protocol layer packets. Specifically, the packet parsing module parses multiple types of protocol layer packets from the same link layer packet. The serializer / deserializer 113 is used for bidirectional conversion between link layer packets and physical layer packets. Specifically, the serializer / deserializer 113 obtains physical layer packets by performing serialization operations on link layer packets and deserialization operations on physical layer packets.
[0032] The chip 120 includes an on-chip network 121, a conversion module 122, and a serializer / deserializer 123; the functions of the on-chip network 121, the conversion module 122, and the serializer / deserializer 123 are similar to those of the on-chip network 111, the conversion module 112, and the serializer / deserializer 113 described above.
[0033] When two chip chips communicate, the serializer / deserializer 113 of chip chip 110 can transmit physical layer data packets bidirectionally with the serializer / deserializer 113 in chip chip 120.
[0034] In this application embodiment, a method for "packaging protocol layer data packets into link layer data packets" is provided for the data packet generation module, and correspondingly, a method for "parsing link layer data packets into protocol layer data packets" is provided for the data packet parsing module, so as to improve the flexibility of packing and unpacking.
[0035] Figure 2 This application illustrates a data packet generation module 210 provided in an exemplary embodiment. The data packet generation module 210 can be located in... Figure 1 The conversion module 112 can also be located in the conversion module 122; the data packet generation module 210 is a hardware module used to package protocol layer data packets into link layer data packets.
[0036] like Figure 2 As shown, the packet generation module 210 will read multiple protocol layer packets, which include multiple types of protocol layer packets; Figure 2 The example uses only M protocol layer data packets; Protocol layer data packets are data packets processed by the chip chip using a protocol layer format; the protocol layer is also called the transaction layer. Alternatively, protocol layer data packets are data packets encapsulated by the chip chip based on a transport protocol. Optionally, multiple types of protocol layer data packets include at least two of the following: request packets, response packets, snoop packets, and data transmission packets (dat). Optionally, different types of protocol layer data packets have different sizes; for example, a request packet is 128 bits in size, and a data transmission packet is 512 bits in size. For example, the packet generation module 210 selects protocol layer packets from each of the multiple candidate packet queues to obtain multiple protocol layer packets, with each candidate packet queue used to store protocol layer packets of the same type.
[0037] Optionally, the packet generation module 210 can select the same number of protocol layer packets from each of the multiple candidate packet queues to obtain multiple protocol layer packets. For example, the packet generation module 210 can select n protocol layer packets from each candidate packet queue, where n is a positive integer. Alternatively, the packet generation module 210 can select different numbers of protocol layer packets from each of the multiple candidate packet queues to obtain multiple protocol layer packets. For example, the packet generation module 210 can read protocol layer packets from the next candidate packet queue only after reading all the protocol layer packets from one candidate packet queue. In this case, the number of protocol layer packets read from each candidate packet queue depends on the number of protocol layer packets stored in each candidate packet queue. Therefore, the packet generation module 210 can read different numbers of protocol layer packets from each of the multiple candidate packet queues.
[0038] In this application embodiment, the type of protocol layer data packets read by the data packet generation module 210 is not limited, nor is the number of protocol layer data packets read in each type. For any type and any number of protocol layer data packets read, this application will split them into data fragments of uniform size and then write them into the first link layer data packets in a more uniform and regular manner.
[0039] Optionally, the packet generation module 210 can select protocol layer packets that meet the packing conditions from each of the multiple candidate packet queues to obtain multiple protocol layer packets. The packing conditions refer to the conditions that allow packets to be written into the link layer packets, such as conditions set based on the sending timing, hardware readiness, etc.
[0040] like Figure 2 As shown, the packet generation module 210 splits each protocol layer packet in multiple protocol layer packets into an integer number of data segments to obtain multiple data segments; each data segment in the multiple data segments has the same size, such as 32 bits, 16 bits, etc.; a first link layer packet is generated based on the multiple data segments, such that each of the integer number of payload fields in the first link layer packet carries a data segment, and the size of each payload field is equal to the size of a data segment; Figure 2 In the scenario shown, there are N data segments, and these N data segments can be written into the N payload fields of the first link layer data packet. It should be noted that in some scenarios, the first link layer data packet may not be able to completely store multiple data segments. In this case, the second link layer data packet will continue to store the remaining data segments of the multiple data segments, which will be described in detail below.
[0041] Optionally, the size of the data segment is a preset value, such as 32 bits or 64 bits. The size of the data segment can be divided by the size of the payload area in the first link layer data packet. Optionally, the data packet generation module 210 determines a first value based on the fixed size of the payload area in the link layer data packet, and then divides each protocol layer data packet into an integer number of data segments according to the first value. The first value is the size of a data segment. The first value is a value that can be divided by the size of the payload area in a link layer data packet. The payload area is the area obtained by concatenating an integer number of payload fields. In other words, the payload area in the first link layer data packet can be described as a combination of multiple payload fields, and the size of each payload field is the first value.
[0042] For example, if the payload area of a link layer data packet has a fixed size of 512 bits, the data packet generation module 210 determines the first value to be 32 bits (512 is an integer multiple of 32), and thus splits each protocol layer data packet into 32-bit segments. Optionally, if the size of a protocol layer data packet is not an integer multiple of the first value, zeros will be padded into the data segments. For example, if a protocol layer data packet is 120 bits in size and the first value is 32 bits, then the protocol layer data packet will be split into 4 data segments, and the content of the last data segment will be padded with zeros.
[0043] In one embodiment, data segments belonging to the same protocol layer data packet in the first link layer data packet are aggregated and distributed. For example, the data packet generation module 210 writes each data segment from the multiple data segments into the first link layer data packet according to its corresponding protocol layer data packet, so that the integer number of data segments in the first link layer data packet are distributed according to different protocol layer data packets. For instance, the first four data segments belong to protocol layer data packet A, and the last three data segments belong to protocol layer data packet B. In this case, the distribution of data segments in the first link layer data packet according to protocol layer data packets is beneficial for recording the distribution of protocol layer data packets in the first link layer data packet, and thus facilitates the parsing of each protocol layer data packet from the first link layer data packet.
[0044] In one embodiment, data fragments belonging to the same type of protocol layer data packet in the first link layer data packet are aggregated and distributed. For example, the data packet generation module writes each data fragment from multiple data fragments into the first link layer data packet according to the type of its corresponding protocol layer data packet, such that the first link layer data packet has an integer number of data fragments partitioned according to the type of protocol layer data packet. In this case, distributing data fragments in the first link layer data packet according to the type of protocol layer data packet facilitates the classification of each protocol layer data packet after parsing it from the first link layer data packet.
[0045] Optionally, the packet generation module does not distinguish between type priorities, but only writes each data fragment from multiple data fragments into the first link layer packet according to the type of the protocol layer packet to which it belongs.
[0046] Optionally, the data packet generation module writes data packets with higher type priority to the protocol layer data packets in the first link layer data packet according to priority rules, and writes data packets with lower type priority to the protocol layer data packets in the first link layer data packet later, so that the integer number of data packets in the first link layer data packet are partitioned according to the type of protocol layer data packets.
[0047] At this point, the priority of protocol layer data packets will be distinguished. High-priority protocol layer data packets will be written to the first link layer data packets first, and low-priority protocol layer data packets will be written to the first link layer data packets later. The order in which data fragments are written is determined by priority rules, which can be combined with other conditions. That is, the priority rules for different packets are not fixed, which improves the flexibility during packetization.
[0048] Optionally, the priority rules include fair rotation priority rules or weighted rotation priority rules; The fair rotation priority rule refers to the rule that among multiple protocol layer packet types in multiple data segments, the x-th type has the highest priority. The x-th type is the type that the current segment rotates through multiple segments. For example, in X protocol layer packet types, the (x-1)-th segment will rotate to the (x-1)-th type. In the (x-1)-th segment, the (x-1)-th type has the highest priority, followed by the x-th type, and so on, until the (x-2)-th type, which rotates back, has the lowest priority. Then, the x-th segment will rotate to the x-th type. In the x-th segment, the x-th type has the highest priority, followed by the (x+1)-th type, and so on, until the (x-1)-th type, which rotates back, has the lowest priority. In this case, the fair rotation priority rule ensures that each type takes turns being the highest priority type, guaranteeing fairness among the types.
[0049] The weighted round-robin priority rule refers to the rule that among multiple protocol layer packet types in multiple data segments, the higher-weight type has higher priority than the lower-weight type. For example, in the current batch, different weights can be generated for different types using a weight calculation method. In different batches, using the same weight calculation method, different weight distributions can be generated compared to other batches, and the priority order of different batches is not fixed. Optionally, the weight calculation method can be based on the number of protocol layer packets contained in a protocol layer packet type, the generation time, the protocol layer packet size, etc. In this embodiment, since the priority is not fixed and the types and number of data segments that can participate in packaging each time are different, data segments of different types from different batches can be written to any position in the link layer packet.
[0050] In one embodiment, the packet generation module 210 writes multiple data fragments sequentially into the payload field of the first link layer packet. For example, the packet generation module 210 writes multiple data fragments first into the high-bit payload field and then into the low-bit payload field; or the packet generation module 210 writes multiple data fragments first into the low-bit payload field and then into the high-bit payload field.
[0051] In one embodiment, the packet generation module 210 writes multiple data fragments one by one into the first link layer packet; for example, after writing the i-th data fragment into the i-th payload field, the packet generation module 210 writes the (i+1)-th data fragment into the (i+1)-th payload field; optionally, the packet generation module 210 may also write a batch of data fragments from multiple data fragments into the first link layer packet at once.
[0052] In summary, in this embodiment, each protocol layer data packet read by the data packet generation module is divided into an integer number of data segments. The size of each data segment is equal to the size of an integer number of payload fields in a first link layer data packet. That is, this embodiment divides the protocol layer data packets and the first link layer data packets with a uniform granularity, thereby achieving alignment between the protocol layer data packets and the first link layer data packets. For any type and any number of protocol layer data packets, they can be divided into a uniform granularity and written into the first link layer data packets. This embodiment improves the flexibility of packaging protocol layer data packets into link layer data packets. In addition, in this embodiment, multiple types of protocol layer data packets are written into the first link layer data packet in a bubble-free manner (bubble-free means that each payload field in the first link layer data packet is loaded with data), so that the first link layer data packet can pack as many protocol layer data packets as possible. Therefore, this embodiment improves the packing efficiency and thus reduces the data transmission latency.
[0053] In another scenario, multiple data segments may not be able to fill the first link layer data packet. In this case, there will be bubbles in the first link layer data packet. The bubbles are located after the last data segment, rather than between two data segments. If the downstream module can receive the incomplete first link layer data packet, it will send the first link layer data packet to the downstream module without waiting for the next round of protocol layer data packets.
[0054] In some embodiments, the size of multiple protocol layer data packets read by the data packet generation module may differ due to the presence of compression operations. Compression operations reduce the original protocol layer data packets to smaller sizes, such as compressing 64 bits into 32 bits.
[0055] like Figure 3 As shown, Figure 3 A communication architecture is illustrated, with chip 110 as the transmitter and chip 120 as the receiver. For example, ... Figure 3 As shown in part (A), the on-chip network 111 in chip 110 transmits protocol layer data packets to the compression module 1121 in conversion module 112. The compression module 1121 compresses the protocol layer data packets and sends them to the data packet generation module 1122. The data packet generation module 1122 packages the protocol layer data packets into link layer data packets and then sends them to the serializer / deserializer 113. The serializer / deserializer 113 performs a serialization operation to obtain physical layer data packets and sends the physical layer data packets to the serializer / deserializer 123 in chip 120. like Figure 3 As shown in section (B), the serializer / deserializer 123 performs a deserialization operation on the physical layer data packets to obtain link layer data packets. Then, it sends the link layer data packets to the data packet parsing module 1222 in the conversion module 122. The data packet parsing module 1222 parses the link layer data packets to obtain protocol layer data packets and sends the protocol layer data packets to the decompression module 1221. The decompression module 1221 performs a decompression operation on the protocol layer data packets, such as restoring a 32-bit protocol layer data packet to a 64-bit protocol layer data packet. After that, the decompression module 1221 sends the decompressed protocol layer data packets to the on-chip network 121.
[0056] It is understood that the data packet generation method provided in this application will be combined with compression operations to enable the storage of as many protocol layer data packets as possible in the same link layer data packet, thereby improving data transmission efficiency.
[0057] based on Figure 2The packet generation module 210 shown optionally includes a control field in the first link layer packet. The control field stores first control information at the data fragment granularity. The first control information is used to indicate the position and size of the protocol layer packets stored in the first link layer packet.
[0058] The control field is a field used to store packet description information. Optionally, the control field is a field used to describe the placement of protocol layer packets stored in the first link layer packet; optionally, the placement includes position information and size information. Optionally, the control field can be located in the header, middle, or end of the first link layer packet, and this embodiment of the application is not limited in this respect.
[0059] Optionally, the size of the control field is the same as the size of one payload field. Optionally, the size of the data segment is a value that can be divided by the size of the first link layer packet. For example, if the size of the first link layer packet is fixed at 512 bits, then the size of the data segment is determined to be 32 bits. The first link layer packet includes 16 fields, one of which is a control field, and the remaining 15 fields are payload fields.
[0060] Optionally, the first control information uses data segments as the information granularity, meaning that the first control information, by recording the information of each data segment, indicates the position and size of the protocol layer data packets stored in the first link layer data packet. Optionally, each data segment occupies the same amount of data in the first control information, such as one bit; optionally, different data segments occupy different amounts of data in the first control information. For example, a data segment with zero padding occupies less data than a data segment without zero padding. For instance, for a data segment with zero padding, the size information and the information of the protocol layer data packet to which it belongs will be recorded, but the position information of the data segment in the protocol layer data packet does not need to be recorded, because zero padding naturally means that the data segment is the last data segment of the protocol layer data packet. For a data segment without zero padding, the size information, the information of the protocol layer data packet to which it belongs, and the position information of the data segment in the protocol layer data packet must be recorded.
[0061] In one embodiment, if the first control information includes P valid bits, the P bits correspond to P data segments in the first link layer data packet; For the i-th bit in P bits, if the i-th bit has the first value, it means that the data segment corresponding to the i-th bit and the data segment corresponding to the (i+1)-th bit belong to the same protocol layer data packet; if the i-th bit has the second value, it means that the data segment corresponding to the i-th bit is the last data segment of the current protocol layer data packet. Where P and i are both positive integers, and i is less than P.
[0062] For example, taking a data fragment / payload field size of 32 bits as an example, assuming the first link layer packet has a bit width of 512 bits, that is, 16 32-bit fields, where the first 32-bit field is the control field and the remaining 15 32-bit fields are the payload fields, if a protocol layer packet that can be divided into 4 data fragments and a protocol layer packet that can be divided into 2 data fragments are packaged together, the first control information is 000000000_01_0111, where 1 indicates that the current data fragment and the next data fragment belong to the same protocol layer packet, and 0 indicates that it is the end of the current protocol layer packet, or it is empty. Similarly, if a req protocol layer packet that can be divided into 4 data fragments, a prb (physical resource block) protocol layer packet that can be divided into 4 data fragments, and an rsp protocol layer packet that can be divided into 2 data fragments are packaged together, the first control information is 00000_01_0111_0111.
[0063] Optionally, the P data segments in the first link layer data packet can be sorted from high to low or from low to high, and this application does not impose any restrictions.
[0064] The control information representation method provided in this embodiment enables the data packet generation method of this application to support protocol layer data packets of any type and length, because according to the above control information representation method, all protocol layer data packets can be parsed out again. Furthermore, the above control information representation method can represent the location and size information of all protocol layer data packets with fewer bits, improving data transmission efficiency and saving data transmission resources.
[0065] In another embodiment, the first control information describes the protocol layer data packet to which each data segment belongs, in order from high bit to low bit in the payload area. For example, it records that the i-th data segment belongs to protocol layer data packet 0, the (i+1)-th data segment belongs to protocol layer data packet 0, the (i+2)-th data segment belongs to protocol layer data packet 1, and so on, so as to clearly and accurately record the position and size information of each protocol layer data packet in the first link layer data packet.
[0066] based on Figure 2 The packet generation module 210 shown optionally includes multiple data fragments that are remaining data fragments that were not written into the first link layer packet; The packet generation module 210 is also used to write the remaining data fragments into the second link layer packet. If the packet generation module 210 acquires a large number of protocol layer packets at once, exceeding the load capacity of the first link layer packet, the load will be carried over by the second link layer packet.
[0067] It is worth noting that in the above method, the data packet generation module 210 supports the sharing of the same protocol layer data packet by multiple link layer data packets. The smallest granularity of the segmentation is the data fragment. That is, for a protocol layer data packet, there may be a data fragment a carried by the first link layer data packet, while its data fragment b is carried by the second link layer data packet. The same protocol layer data packet will be segmented at the granularity of data fragments.
[0068] For example, suppose the first link layer packet includes 15 payload fields, there are two req protocol layer packets that can be divided into 4 data segments, and one dat protocol layer packet that can be divided into 16 data segments. The req protocol layer packet is placed first, so only the first 7 data segments of the dat protocol layer packet can be placed. The last 9 data segments cannot be placed on the first link layer packet. Therefore, the last 9 data segments of the dat protocol layer packet need to be placed on the next link packet. The first control information of the first link layer packet is described as 1111111_0111_0111, and the second control information of the second link layer packet is described as 000000_011111111.
[0069] In one embodiment, the remaining data fragments include partial data fragments of the first protocol layer data packets; The packet generation module 210 is also used to write partial data fragments into the second link layer packet with the highest priority. That is, the packet generation module 210 will promptly write any unfinished data fragments from the first protocol layer packet into the second link layer packet to ensure that the first protocol layer packet can be generated continuously during parsing.
[0070] Optionally, the priority of the write position in the first link layer data packet and the second link layer data packet is the same. For example, the low bit takes precedence over the high bit. That is, the data segment written to the link layer data packet earlier will be stored in the low bit, and the data segment written to the link layer data packet later will be stored in the high bit.
[0071] In one embodiment, if the second link layer data packet is not filled with the remaining data fragments of the current frame; The data packet generation module 210 is also used to send the second link layer data packet to the downstream module when the downstream module can receive the second link layer data packet; The packet generation module 210 is also used to continue storing the protocol layer packet for the next clock cycle using the second link layer packet when the downstream module cannot receive the second link layer packet.
[0072] Downstream modules refer to hardware modules located logically downstream of the data packet generation module 210 within the chip, such as... Figure 3 The serializer / deserializer 113 in the middle. For example, due to bandwidth limitations, hardware enablement status, packet collisions, etc., the downstream module may not be able to receive the second link layer data packet packaged in the current frame. In this case, the second link layer data packet will be used to continue storing the protocol layer data packet of the next frame, so as to ensure that the second link layer data packet can package as many protocol layer data packets as possible, improve packaging efficiency and save data transmission resources.
[0073] In one embodiment, the second link layer data packet is filled with the remaining data fragments of the current capture; The data packet generation module 210 is also used to send the second link layer data packet to the buffer when the downstream module cannot receive the second link layer data packet.
[0074] A buffer is a hardware module within a chip used to cache data packets, such as memory or cache. Optionally, the buffer is used to store link-layer data packets that have been filled but cannot be received by the downstream module. Logically, the buffer is located between the data packet generation module 210 and the downstream module. For example, if the downstream module can receive second link-layer data packets, it will read the second link-layer data packets from the buffer.
[0075] By setting up a buffer, the independence of the data packet generation action of the data packet generation module 210 and the data packet reception action of the downstream module is ensured. Based on the buffer, the timing of the generation and reception of link layer data packets can be aligned, ensuring the continuity of the transmission of link layer data packets between upstream and downstream.
[0076] Figure 4 This application illustrates a data packet parsing module 410 provided in an exemplary embodiment. The data packet parsing module 410 may be located in... Figure 1 The conversion module 112 can also be located in the conversion module 122; the data packet parsing module 410 is a hardware module used to parse link layer data packets into protocol layer data packets.
[0077] like Figure 4 As shown, the packet parsing module 410 will receive the first link layer packet, which includes multiple payload fields; Figure 4 For example, a first-layer data packet includes N payload fields.
[0078] For example, the size of the first link layer data packet is fixed, such as 512 bits. Multiple payload fields in the first link layer data packet are consecutive and concatenated to form a payload region. Each payload field has the same size, such as 32 bits. Optionally, the size of the payload field is a preset value, which can be divided by the size of the payload region in the first link layer data packet.
[0079] The packet parsing module 410 parses multiple data fragments from multiple payload fields, where the size of each payload field is equal to the size of one data fragment. Figure 4 The following example illustrates how the packet parsing module 410 parses N data fragments. For instance, the packet parsing module 410 completely parses the data carried by each payload field, obtaining a data fragment. Optionally, the packet parsing module 410 parses multiple payload fields sequentially, such as parsing from high bits to low bits (or from low bits to high bits).
[0080] Optionally, the packet parsing module 410 parses the payload fields one by one, or parses the payload fields in batches to obtain multiple data fragments. Optionally, the packet parsing module 410 can choose between parsing one by one or parsing in batches, depending on its own performance.
[0081] For example, the multiple data fragments parsed by the packet parsing module 410 are distributed according to the protocol layer data packets, that is, data fragments belonging to the same protocol layer data packets will be distributed continuously; optionally, the multiple data fragments parsed by the packet parsing module 410 are distributed according to the type of protocol layer data packets, that is, data fragments belonging to the same protocol layer data packet type will be distributed continuously.
[0082] The packet parsing module 410 combines multiple data fragments according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data fragments; Figure 4 The packet parsing module 410 combines N data fragments according to their respective protocol layer packets to obtain M protocol layer packets for example. The packet parsing module 410 sends multiple protocol layer packets to the corresponding packet queues according to their types. Different packet queues are used to store different types of protocol layer packets.
[0083] Optionally, the types of protocol layer data packets include request packets, response packets, snooping packets, and data transmission packets. Different types of protocol layer data packets will be stored in different packet queues. Different types of protocol layer data packets have different sizes. Optionally, for multiple protocol layer data packets, the data packet parsing module 410 sends the same number of different types of protocol layer data packets to the corresponding packet queues at once; alternatively, for multiple protocol layer data packets, the data packet parsing module 410 sends different numbers of different types of protocol layer data packets to the corresponding packet queues at once. For example, during a transmission process, the data packet parsing module 410 selects one type of protocol layer data packet after selecting another type of protocol layer data packet. Since the number of different types of protocol layer data packets in the multiple protocol layer data packets is different, this achieves the goal of sending different numbers of different types of protocol layer data packets to the corresponding packet queues at once.
[0084] In summary, in this embodiment, the data fragments read from multiple payload fields by the data packet parsing module are recombined into protocol layer data packets. The size of each data fragment is equal to the size of a payload field. That is, this embodiment divides protocol layer data packets and first link layer data packets with a uniform granularity, thereby achieving alignment between protocol layer data packets and first link layer data packets. Based on the parsed data fragments, they can be recombined into any type and any number of protocol layer data packets. This embodiment improves the flexibility of parsing protocol layer data packets from link layer data packets.
[0085] based on Figure 4 The packet parsing module 410 shown includes a control field in the first link layer packet; The packet parsing module 410 is also used to read first control information from the control field. The first control information is in data fragments as the information granularity. The first control information is used to indicate the location and size of the protocol layer packets stored in the first link layer packet. The data packet parsing module 410 is used to combine multiple data fragments according to the first control information to obtain multiple protocol layer data packets.
[0086] The control field is used to store packet description information. Optionally, the control field is used to describe the placement of protocol layer packets stored in the first link layer packet; optionally, the placement includes position information and size information. Optionally, the control field can be located in the header of the first link layer packet (e.g., ...). Figure 4 The embodiments of this application do not limit the position of the middle or the end of the text.
[0087] Optionally, the size of the control field is the same as the size of a payload field. The first control information uses data segments as the information granularity, meaning that by recording information for each data segment, the first control information indicates the location and size of the protocol layer data packets stored in the first link layer data packet. Optionally, each data segment occupies the same amount of data in the first control information, such as one bit.
[0088] In one embodiment, if the first control information includes P valid bits, the P bits correspond to P data segments in the first link layer data packet; For the i-th bit in P bits, if the i-th bit has the first value, it means that the data segment corresponding to the i-th bit and the data segment corresponding to the (i+1)-th bit belong to the same protocol layer data packet; if the i-th bit has the second value, it means that the data segment corresponding to the i-th bit is the last data segment of the current protocol layer data packet. Where P and i are both positive integers, and i is less than P.
[0089] Based on the control information representation method provided in this embodiment, all protocol layer data packets in the first link layer data packet can be parsed. Furthermore, the above control information representation method can use fewer bits to represent the position and size information of all protocol layer data packets, thereby improving the parsing efficiency of control information and thus improving the parsing efficiency of protocol layer data packets.
[0090] Figure 5 This application illustrates a data packet generation method provided in an exemplary embodiment, exemplified by a data packet generation module in a chip chip. The method includes: Step 520: Read multiple protocol layer data packets. These multiple protocol layer data packets include multiple types of protocol layer data packets. The protocol layer data packets are data packets obtained by the chip chip using the protocol layer format. Protocol layer data packets are data packets processed by the chip chips using a protocol layer format. For example, the data packet generation module selects protocol layer data packets from each of multiple candidate packet queues to obtain multiple protocol layer data packets, with each candidate packet queue used to store protocol layer data packets of the same type.
[0091] Optionally, the packet generation module selects the same number of protocol layer packets from each of the multiple candidate packet queues to obtain multiple protocol layer packets.
[0092] Step 540: Split each protocol layer data packet in the multiple protocol layer data packets into an integer number of data fragments to obtain multiple data fragments, each of the multiple data fragments having the same size; Optionally, the size of the data segment is a preset value, such as 32 bits or 64 bits, and the size of the data segment can be divided by the size of the payload area in the first link layer data packet; Optionally, the data packet generation module will determine the first value based on the fixed size of the payload area in the link layer data packet, and then divide each protocol layer data packet into an integer number of data segments according to the first value, where the first value is the size of a data segment; The first value is a value that can be divided by the size of the payload area in a link layer data packet.
[0093] Step 560: Generate a first link layer data packet based on multiple data fragments, such that each of the integer number of payload fields in the first link layer data packet carries a data fragment, and the size of each payload field is equal to the size of a data fragment.
[0094] For example, data fragments belonging to the same protocol layer in the first link layer data packet will be aggregated and distributed; for example, data fragments belonging to the same type of protocol layer data packet in the first link layer data packet will be aggregated and distributed; for example, the data packet generation module writes multiple data fragments sequentially into the payload field of the first link layer data packet. For example, the data packet generation module writes multiple data fragments one by one into the first link layer data packet; optionally, the data packet generation module may also write a batch of data fragments from multiple data fragments into the first link layer data packet at once.
[0095] In summary, in this embodiment, each protocol layer data packet read by the data packet generation module is divided into an integer number of data segments. The size of each data segment is equal to the size of an integer number of payload fields in a first link layer data packet. That is, this embodiment divides the protocol layer data packets and the first link layer data packets with a uniform granularity, thereby achieving alignment between the protocol layer data packets and the first link layer data packets. For any type and any number of protocol layer data packets, they can be divided into a uniform granularity and written into the first link layer data packets. This embodiment improves the flexibility of packaging protocol layer data packets into link layer data packets. In addition, in this embodiment, multiple types of protocol layer data packets are written into the first link layer data packet in a bubble-free manner (bubble-free means that each payload field in the first link layer data packet is loaded with data), so that the first link layer data packet can pack as many protocol layer data packets as possible. Therefore, this embodiment improves the packing efficiency and thus reduces the data transmission latency.
[0096] For more information on packet generation methods, please refer to the above introduction to the "Packet Generation Module".
[0097] Figure 6This application illustrates a data packet parsing method provided in an exemplary embodiment, exemplified by a data packet parsing module in a chip. The method includes: Step 620: Receive a first link layer data packet, which includes multiple payload fields; For example, the size of the first link layer data packet is fixed, such as 512 bits. Multiple payload fields in the first link layer data packet are consecutive and concatenated to form a payload region. Each payload field has the same size, such as 32 bits. Optionally, the size of the payload field is a preset value, which can be divided by the size of the payload region in the first link layer data packet.
[0098] Step 640: Parse multiple data segments from multiple load fields. Each load field has the same size, and the size of each load field is equal to the size of a data segment. For example, the packet parsing module completely parses the data carried by each payload field to obtain a data fragment. Optionally, the packet parsing module parses multiple payload fields sequentially, from high bits to low bits (or from low bits to high bits).
[0099] Optionally, the packet parsing module parses the payload fields one by one, or in batches, to obtain multiple data fragments. For example, the multiple data fragments parsed by the packet parsing module are distributed according to the protocol layer data packets, meaning data fragments belonging to the same protocol layer data packet will be distributed consecutively; alternatively, the multiple data fragments parsed by the packet parsing module are distributed according to the type of protocol layer data packets, meaning data fragments belonging to the same protocol layer data packet type will be distributed consecutively.
[0100] Step 660: Combine multiple data fragments according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data fragments; Step 680: Send multiple protocol layer data packets to the corresponding packet queues according to their types. Different packet queues are used to store different types of protocol layer data packets.
[0101] Optionally, the types of protocol layer packets include request packets, response packets, snooping packets, and data transmission packets. Different types of protocol layer packets will be stored in different packet queues. Different types of protocol layer packets have different sizes. Optionally, for multiple protocol layer packets, the packet parsing module sends the same number of different types of protocol layer packets to the corresponding packet queues at once; alternatively, for multiple protocol layer packets, the packet parsing module sends different numbers of different types of protocol layer packets to the corresponding packet queues at once. For example, during a transmission process, the packet parsing module selects protocol layer packets of the same type first, and then selects another type of protocol layer packet.
[0102] In summary, in this embodiment, the data fragments read from multiple payload fields by the data packet parsing module are recombined into protocol layer data packets. The size of each data fragment is equal to the size of a payload field. That is, this embodiment divides protocol layer data packets and first link layer data packets with a uniform granularity, thereby achieving alignment between protocol layer data packets and first link layer data packets. Based on the parsed data fragments, they can be recombined into any type and any number of protocol layer data packets. This embodiment improves the flexibility of parsing protocol layer data packets from link layer data packets.
[0103] For more information on packet parsing methods, please refer to the above introduction to the "Packet Parsing Module".
[0104] This application provides a chip chip, which may optionally be a CPU chip, GPU chip, DSP chip, etc.; the chip chip includes a data packet generation module, which is used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets. Protocol layer data packets are data packets obtained by the chip chip using the protocol layer format. Each protocol layer packet in multiple protocol layer packets is split into an integer number of data segments, resulting in multiple data segments, each of which has the same size; The first link layer data packet is generated based on multiple data fragments, such that each of the integer payload fields in the first link layer data packet carries a data fragment, and the size of each payload field is equal to the size of a data fragment.
[0105] For more information about this chip, please refer to the above description of the "data packet generation module".
[0106] This application provides a chip chip, which includes a data packet parsing module. The data packet parsing module is used for: Receive first-link-layer data packets, which include multiple payload fields; Multiple data segments are parsed from multiple load fields, where each load field has the same size and the size of each load field is equal to the size of a data segment. Multiple data fragments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet containing an integer number of data fragments; Multiple protocol layer data packets are sent to the corresponding packet queues according to their types. Different packet queues are used to store different types of protocol layer data packets.
[0107] For more information about this chip, please refer to the above description of the "data packet parsing module".
[0108] This application provides a chip, which includes a chip chip, and the chip chip includes a data packet generation module, the data packet generation module being used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets. Protocol layer data packets are data packets obtained by the chip chip using the protocol layer format. Each protocol layer packet in multiple protocol layer packets is split into an integer number of data segments, resulting in multiple data segments, each of which has the same size; The first link layer data packet is generated based on multiple data fragments, such that each of the integer payload fields in the first link layer data packet carries a data fragment, and the size of each payload field is equal to the size of a data fragment.
[0109] For more information about this chip, please refer to the above description of the "data packet generation module".
[0110] This application provides a chip, which includes a chip chip, and the chip chip includes a data packet parsing module. The data packet parsing module is used for: Receive first-link-layer data packets, which include multiple payload fields; Multiple data segments are parsed from multiple load fields, where each load field has the same size and the size of each load field is equal to the size of a data segment. Multiple data fragments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet containing an integer number of data fragments; Multiple protocol layer data packets are sent to the corresponding packet queues according to their types. Different packet queues are used to store different types of protocol layer data packets.
[0111] For more information about this chip, please refer to the above description of the "Packet Parsing Module".
[0112] Figure 7 A structural block diagram of a chip 710 provided in an exemplary embodiment of this application is shown. Chip 710 includes a first chip 701 and a second chip 702, which are physically connected. The first chip 701 includes a data packet generation module 7011 and / or a data packet parsing module 7012 provided in embodiments of this application; and / or, the second chip 702 includes a data packet generation module 7021 and / or a data packet parsing module 7022 provided in embodiments of this application.
[0113] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on chip 710. Chip 710 may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0114] This application provides a computing device, which includes a chip chip, and the chip chip includes a data packet generation module, which is used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets. Protocol layer data packets are data packets obtained by the chip chip using the protocol layer format. Each protocol layer packet in multiple protocol layer packets is split into an integer number of data segments, resulting in multiple data segments, each of which has the same size; The first link layer data packet is generated based on multiple data fragments, such that each of the integer payload fields in the first link layer data packet carries a data fragment, and the size of each payload field is equal to the size of a data fragment.
[0115] For more information about this computing device, please refer to the above description of the "data packet generation module".
[0116] This application provides a computing device, which includes a chip chip, and the chip chip includes a data packet parsing module, the data packet parsing module being used for: Receive first-link-layer data packets, which include multiple payload fields; Multiple data segments are parsed from multiple load fields, where each load field has the same size and the size of each load field is equal to the size of a data segment. Multiple data fragments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet containing an integer number of data fragments; Multiple protocol layer data packets are sent to the corresponding packet queues according to their types. Different packet queues are used to store different types of protocol layer data packets.
[0117] For more information about this computing device, please refer to the above description of the "Packet Parsing Module".
[0118] Optionally, the computing device can be a portable mobile terminal, such as a smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop, or desktop computer. The computing device 700 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names. Optionally, the computing device can also be a server.
[0119] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0120] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0121] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A data packet generation module, characterized in that, Located within the chip, the data packet generation module is used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
2. The data packet generation module according to claim 1, characterized in that, The first link layer data packet also includes a control field, which stores first control information with the data fragment as the information granularity. The first control information is used to indicate the position and size of the protocol layer data packets stored in the first link layer data packet.
3. The data packet generation module according to claim 2, characterized in that, The first control information includes P valid bits, which correspond to P data segments in the first link layer data packet; For the i-th bit among the P bits, if the value of the i-th bit is the first value, it means that the data segment corresponding to the i-th bit and the data segment corresponding to the (i+1)-th bit belong to the same protocol layer data packet; if the value of the i-th bit is the second value, it means that the data segment corresponding to the i-th bit is the last data segment of the current protocol layer data packet. Where P and i are both positive integers, and i is less than P.
4. The data packet generation module according to any one of claims 1 to 3, characterized in that, The multiple data segments contain remaining data segments that were not written into the first link layer data packet; The data packet generation module is also used to write the remaining data fragments into the second link layer data packet.
5. The data packet generation module according to claim 4, wherein the remaining data fragments include partial data fragments of the first protocol layer data packet; The data packet generation module is further configured to write the partial data fragments into the second link layer data packet with the highest priority.
6. The data packet generation module according to claim 4, characterized in that, The second link layer data packet is not filled with the remaining data fragments captured in the current snapshot; The data packet generation module is further configured to send the second link layer data packet to the downstream module when the downstream module is capable of receiving the second link layer data packet; The data packet generation module is also used to continue storing the protocol layer data packet for the next clock cycle using the second link layer data packet when the downstream module cannot receive the second link layer data packet.
7. The data packet generation module according to claim 4, characterized in that, The second link layer data packet is filled with the remaining data fragments captured in the current snapshot; The data packet generation module is also used to send the second link layer data packet to the buffer when the downstream module cannot receive the second link layer data packet.
8. The data packet generation module according to any one of claims 1 to 3, characterized in that, The data packet generation module is used to write each data segment from the plurality of data segments into the first link layer data packet according to the type of the protocol layer data packet to which it belongs, so that the first link layer data packet has an integer number of data segments partitioned according to the type of the protocol layer data packet.
9. The data packet generation module according to claim 8, characterized in that, The data packet generation module is configured to, according to priority rules, first write data fragments of higher priority type to the protocol layer data packet among the plurality of data fragments into the first link layer data packet, and then write data fragments of lower priority type to the protocol layer data packet among the plurality of data fragments into the first link layer data packet, so that the integer number of data fragments in the first link layer data packet are partitioned according to the type of the protocol layer data packet.
10. The data packet generation module according to claim 9, characterized in that, The priority rules include fair rotation priority rules or weighted rotation priority rules; The fair rotation priority rule refers to the fact that among the multiple protocol layer data packet types of the multiple data segments, the xth type has the highest priority, and the xth type is the type that the current session rotates to in multiple sessions; The weighted round-robin priority rule refers to the rule that among the multiple protocol layer data packet types that the multiple data segments have, the priority of the higher weight type is higher than the priority of the lower weight type.
11. A data packet parsing module, characterized in that, Located within the chip, the data packet parsing module is used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
12. The data packet parsing module according to claim 11, characterized in that, The first link layer data packet includes control fields; The data packet parsing module is further configured to read first control information from the control field, wherein the first control information is based on the data fragment as the information granularity, and the first control information is used to indicate the location and size of the protocol layer data packets stored in the first link layer data packet; The data packet parsing module is used to combine the multiple data fragments according to the first control information to obtain the multiple protocol layer data packets.
13. A data packet generation method, characterized in that, The method, executed by a data packet generation module in the chip, includes: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
14. A data packet parsing method, characterized in that, The method, executed by a packet parsing module within the chip, includes: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
15. A chip particle, characterized in that, The chip includes a data packet generation module, which is used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
16. A chip particle, characterized in that, The chip chip includes a data packet parsing module, which is used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
17. A chip, characterized in that, The chip includes a chip chip, and the chip chip includes a data packet generation module, the data packet generation module being used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
18. A chip, characterized in that, The chip includes a chip particle, and the chip particle includes a data packet parsing module, the data packet parsing module being used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.
19. A computing device, characterized in that, The computing device includes a chip, and the chip includes a data packet generation module, the data packet generation module being used for: Read multiple protocol layer data packets, which include multiple types of protocol layer data packets, and the protocol layer data packets are data packets obtained by the chip chip using a protocol layer format; Each protocol layer data packet in the plurality of protocol layer data packets is split into an integer number of data segments to obtain a plurality of data segments, wherein each of the plurality of data segments is of the same size; A first link-layer data packet is generated based on the plurality of data fragments, such that each of the integer number of payload fields in the first link-layer data packet carries a data fragment, and the size of each payload field is equal to the size of one of the data fragments.
20. A computing device, characterized in that, The computing device includes a chip, and the chip includes a data packet parsing module, the data packet parsing module being used for: Receive a first link layer data packet, the first link layer data packet including multiple payload fields; Multiple data segments are parsed from the plurality of load fields, wherein each load field has the same size and the size of each load field is equal to the size of a data segment; The multiple data segments are combined according to their respective protocol layer data packets to obtain multiple protocol layer data packets, each protocol layer data packet including an integer number of data segments; The multiple protocol layer data packets are sent to the corresponding packet queues according to their types, and different packet queues are used to store different types of protocol layer data packets.