Data transmission methods, apparatus, electronic devices and readable storage media

By setting up multiple input and output ports in the router and utilizing priority matrix and read/write pointer mechanisms, the problems of low data transmission efficiency and head blocking in on-chip networks are solved, achieving efficient data transmission.

CN123123280APending Publication Date: 2026-11-17BEIJING INSTITUTE OF OPEN SOURCE CHIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611087957.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, data transmission efficiency in on-chip networks is poor, and head blocking problems are prone to occur.

Method used

A data transmission method is adopted, which sets up multiple input and output terminals in the router and uses a priority matrix and read/write pointer mechanism to determine the target data block for each output terminal during the data transmission cycle and output it, thereby avoiding head blocking.

Benefits of technology

This improves data transmission efficiency, avoids head-blocking issues, and ensures that data blocks arrive at the destination node in order.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123280A_ABST
    Figure CN123123280A_ABST
Patent Text Reader

Abstract

This invention provides a data transmission method, apparatus, electronic device, and readable storage medium. The applied router includes at least two input ports and at least two output ports. The method includes: in response to receiving a data block at any of the input ports, storing the data block in an input buffer corresponding to the input port; within the current data transmission cycle, determining a corresponding target data block for each output port from the data blocks contained in each of the input buffers; and outputting each target data block to its corresponding output port. This improves data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of on-chip network technology, and in particular to a data transmission method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the development of integrated circuits, network on chip (NoC) is often used in chips to transmit data between modules.

[0003] Correspondingly, when transmitting data, the router in a NoC arbitrates multiple data entries in the buffer before outputting the arbitrated data to the next node. However, related technologies often use a first-in-first-out (FIFO) approach for input buffers, where the first arriving data is stored and the data at the head of the queue participates in the arbitration. This approach is prone to head-blocking, resulting in poor data transmission efficiency. Summary of the Invention

[0004] The purpose of this invention is to provide a data transmission method, apparatus, electronic device, and readable storage medium to solve the problem of poor data transmission efficiency. The specific technical solution is as follows: In a first aspect of the present invention, a data transmission method is provided, the method being applied to any router in an on-chip network, the router including at least two input ports and at least two output ports; the method includes: In response to receiving a data block at any of the input terminals, the data block is stored in the input buffer corresponding to the input terminal; Within the current data transmission cycle, a corresponding target data block is determined for each output terminal from the data blocks contained in each input buffer; Each of the target data blocks is output to its corresponding output terminal.

[0005] In a second aspect of the invention, a data transmission apparatus is also provided, which is applied to any router in an on-chip network, the router including at least two input ports and at least two output ports; the apparatus includes: The storage module is configured to, in response to receiving a data block at any of the input terminals, store the data block into the input buffer corresponding to the input terminal; The first determining module is used to determine a corresponding target data block for each output terminal from the data blocks contained in each input buffer during the current data transmission cycle. The output module is used to output each of the target data blocks to their respective output terminals.

[0006] In a third aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the method described in the first aspect above.

[0007] In a fourth aspect of the invention, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0008] In a fifth aspect of the invention, a computer program product comprising instructions is also provided, which, when run on a computer, causes the computer to perform the method described in the first aspect above.

[0009] The data transmission method provided in this embodiment of the invention utilizes a router comprising at least two input terminals and at least two output terminals. Upon receiving a data block at any of the input terminals, the data block is stored in the input buffer corresponding to that input terminal. Within the current data transmission cycle, a corresponding target data block is determined for each output terminal from the data blocks contained in each of the input buffers. Each target data block is then output to its corresponding output terminal. Thus, this embodiment of the invention, using a router with multiple output terminals, can determine the target data blocks to be output for multiple output terminals within a single data transmission cycle, enabling the output of multiple data blocks at once, avoiding head-blocking problems, and improving data transmission efficiency. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0011] Figure 1 This is a flowchart illustrating the steps of a data transmission method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the state of the priority matrix provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a priority matrix update provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a data block storage provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a read / write pointer update provided in an embodiment of the present invention; Figure 6This is a schematic diagram of a router component provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of another router component provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a data transmission device according to an embodiment of the present invention; Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, the first object can be one or more. Furthermore, the term "and / or" in the specification and claims is used to describe 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, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In embodiments of this invention, the term "multiple" refers to two or more, and other quantifiers are similar.

[0014] Figure 1 This is a flowchart illustrating the steps of a data transmission method according to an embodiment of the present invention. This method can be applied to any router in an on-chip network, and the router may include at least two input ports and at least two output ports. Figure 1 As shown, the method may include: Step 101: In response to receiving a data block at any of the input terminals, store the data block in the input buffer corresponding to the input terminal.

[0015] Step 102: Within the current data transmission cycle, determine a corresponding target data block for each output terminal from the data blocks contained in each input buffer.

[0016] Step 103: Output each of the target data blocks to its corresponding output terminal.

[0017] Regarding steps 101-103 above, this embodiment of the invention can be applied to any router in any on-premises network. The router can be a basic component in a NoC (No. 1 Network) used for data storage and transmission. The input port can be a port on the router for receiving data transmitted from other routers, and the output port can be a port on the router for outputting data. Specifically, the router can include at least two input ports and at least two output ports. Specifically, different input ports can correspond to different input directions of the router, and correspondingly, different output ports can correspond to different output directions of the router. The aforementioned data block can also be called a data packet, which can be a NoC data transmission unit, that is, the smallest unit of effective data transmission (flit). Of course, it can also be control information that needs to be stored, such as the routing information of the flit. This embodiment of the invention does not limit this. Correspondingly, the data to be transmitted can be stored in the input buffer in units of data blocks. The aforementioned input buffer can be a functional area in the hardware where data blocks are temporarily stored. One input terminal can correspond to one input buffer. Of course, multiple input buffers can be deployed for one input terminal according to actual needs. This embodiment of the invention does not limit this.

[0018] The data blocks mentioned above can be transmitted by other routers. When the current router receives a data block through any input terminal, it can store the data block in the input buffer corresponding to that input terminal. Specifically, the storage method can be First In First Out (FIFO), or it can be based on the priority of different empty slots in the input buffer: selecting the higher-priority empty slot for storage. Specifically, the priority represents the output priority of the empty slot; the higher the priority, the earlier the data in that empty slot will be output. The aforementioned data transmission cycle can be pre-set by the on-chip network, and each router can perform data transmission operations according to this data transmission cycle.

[0019] Furthermore, within the current data transmission cycle, a target data block can be determined for each output terminal from the data blocks contained in each input buffer. Then, each target data block can be output to its corresponding output terminal for data transmission. The output directions for different data blocks can be different. Specifically, in this embodiment of the invention, a preset routing algorithm can be used to determine the routing direction of each data block. This routing algorithm characterizes the transmission rules of data blocks in the on-chip network, and the transmission direction of the data block can be determined through the routing algorithm. Accordingly, the output end corresponding to the data block can be determined by the routing direction obtained from the routing calculation results in this embodiment of the invention.

[0020] Furthermore, in step 102 above, target data blocks can be determined for each output terminal based on the output terminal corresponding to each data block. Specifically, for any output terminal, if the number of data blocks corresponding to that output terminal contained in all input buffers is 1, then this embodiment of the invention can directly determine that data block as the target data block for that output terminal. Correspondingly, if the number of data blocks corresponding to that output terminal contained in all input buffers is greater than 1, then this embodiment of the invention can arbitrate from multiple data blocks based on a preset arbitration algorithm, and determine the arbitrated data block as the target data block for that output terminal. The arbitration algorithm can be a fixed priority or a round-robin priority, etc., and can be set according to actual needs; this embodiment of the invention does not impose any restrictions on this.

[0021] Further, step 103 above can involve sending each target data block to a crossbar, and simultaneously sending the output corresponding to each target data block to the crossbar. Correspondingly, the crossbar can send each target data block to its respective output. Specifically, the crossbar can include multiple multiplexers (MUX). Accordingly, the arbitration result can be sent to the select (sel) terminal of the crossbar, and each flit can be sent to the input terminal of the crossbar, thereby enabling the crossbar to determine the target data block based on the arbitration result received at the select terminal and output the target data block.

[0022] It should be noted that in related technologies, one approach uses a header flit output method within a FIFO. This means that only the header flit of a data packet in the FIFO requests participation in output arbitration. If the header flit is blocked, all subsequent flits will also be blocked in the FIFO. This is especially problematic in network topologies, where the probability of header blocking increases, impacting transmission latency. Header blocking refers to a situation where a data packet, unable to proceed for some reason, blocks subsequent data packets that could otherwise proceed. Another approach involves buffering flits in a ping-pong order, with two buffers simultaneously requesting output arbitration. This method only probabilistically reduces the probability of header blocking, and the large number of flits participating in arbitration in one output direction makes chip timing difficult to converge. Yet another approach buffers flits separately in different output directions. While this effectively eliminates header blocking, the large number of buffers results in a large area consumption. Furthermore, the low buffer utilization also leads to a significant waste of buffer resources.

[0023] The data transmission method provided in this embodiment of the invention utilizes a router comprising at least two input terminals and at least two output terminals. Upon receiving a data block at any of the input terminals, the data block is stored in the input buffer corresponding to that input terminal. Within the current data transmission cycle, a corresponding target data block is determined for each output terminal from the data blocks contained in each input buffer. Each target data block is then output to its corresponding output terminal. Thus, this embodiment of the invention, using a router with multiple output terminals, can determine the target data blocks to be output for multiple output terminals within a single data transmission cycle, enabling the output of multiple data blocks at once. This avoids head-blocking problems and improves data transmission efficiency. Optionally, any of the input buffers contains multiple data bits, and one data bit is used to store one data block; after determining a corresponding target data block for each of the output terminals as described above, the embodiments of the present invention may further include: For any of the target data blocks, the input buffer corresponding to the target data block is used as the buffer to be updated, and the priority matrix corresponding to the buffer to be updated is updated.

[0024] The priority matrix has an order consistent with the number of data bits contained in the input buffer. The initial state of the priority matrix is ​​as follows: the upper triangular elements are the first preset value, the lower triangular elements are the second preset value, and the diagonal elements are either the first preset value or the second preset value. The number of target elements in each row of the priority matrix is ​​positively correlated with the priority of the corresponding data bit. The target element is a matrix element with a value of the second preset value.

[0025] The priority matrix mentioned above can also be called the age matrix. For example, Figure 2 This is a schematic diagram of the priority matrix provided in an embodiment of the present invention. The initial state of the age matrix is ​​as follows: Figure 2 As shown, the size of the age matrix is ​​related to the depth of the flit buffer. For example, if the flit buffer depth is 5, the matrix size is 5×5. The initial values ​​of the matrix are all 1s in the upper triangle and all 0s in the lower triangle. The values ​​of the diagonals can be all 0s or all 1s; this embodiment of the invention does not impose any restrictions on this. Each row of the matrix corresponds to a slot in the input buffer. The more 0s in a row of the matrix, the older the age of that slot, and the higher the priority. Therefore, the priority is initially from low to high. Accordingly, the first preset value can be 1, and the second preset value can be 0.

[0026] Furthermore, the number of target elements in each row of the priority matrix is ​​positively correlated with the priority of the corresponding data bit; that is, the more target elements there are, the higher the priority of the corresponding data bit in that row.

[0027] Furthermore, one row of the priority matrix mentioned above corresponds to one data bit in the input buffer. For example, using... Figure 2 For example, rows 1 to 5 of the matrix from bottom to top can correspond to data bits 1 to 5 from right to left in the input buffer. Of course, other correspondence methods can also be used, and can be set according to actual needs. This embodiment of the invention does not limit this.

[0028] Furthermore, the operation of storing the data block in the input buffer corresponding to the input terminal in step 101 above can be based on the priority matrix of the input buffer. The priority of each data bit can be determined based on the priority matrix, and the data bit with the highest priority and which is empty can be selected and the data block can be stored in the data bit.

[0029] Furthermore, after each target data block is determined, the priority matrix corresponding to the input buffer containing the target data block can be updated. Specifically, since the target data block is output, its corresponding data bits can be released to the new data block. At this time, the priority of the data bits containing the target data block can be updated to the lowest priority.

[0030] In this embodiment of the invention, by setting the priority matrix, the priority of each data bit can be easily determined, which facilitates the management of the storage and output order of data blocks and provides a basis for order preservation.

[0031] Optionally, the operation of updating the priority matrix corresponding to the buffer to be updated described above may specifically include, in this embodiment of the invention: In the priority matrix, the matrix row corresponding to the target data block is updated to the first preset value, and the matrix column corresponding to the target data block is updated to the second preset value.

[0032] Specifically, the above update operation may be to update the matrix rows corresponding to the target data block to a first preset value and update the matrix columns corresponding to the target data block to a second preset value.

[0033] Furthermore, since an input buffer can simultaneously output flits corresponding to different directions, in this case, embodiments of the present invention can perform different update operations based on the number of target data blocks corresponding to the buffer to be updated.

[0034] For example, Figure 3 This is a schematic diagram of a priority matrix update provided in an embodiment of the present invention, as shown below. Figure 3 The first line shows a scenario where there is only one target data block in the buffer to be updated, which is the case where a flit wins the arbitration, as shown below. Figure 3 As shown, the data block (flit) buffer is used to store the arbitration status of each data block. A 1 indicates that the data bit containing the target data block has won the arbitration, meaning the data block corresponding to that bit has won. Conversely, a 0 indicates that the data block will not be output. Figure 3 As shown in the first row, the arbitration result is 00100, indicating that flit in the third data block won the arbitration. In this embodiment of the invention, the third row of the age matrix can be set to 1 and the third column can be set to 0. Accordingly, the priority of each data block in the input buffer is sorted from high to low from rows 1, 2, 3, 4, 5 to rows 1, 2, 4, 5, 3.

[0035] Another example is, such as Figure 3 The second row shows the case where multiple flits win the arbitration. The arbitration result from right to left is 11100, indicating that the first, second, and third slots from right to left are the flits that win the arbitration. The age matrix row and column update method is the same as when a flit wins the arbitration. In this embodiment of the invention, the first row and column, the second row and column, and the third row and column can be updated sequentially from right to left (completed within one cycle). Correspondingly, the priority of each data block in the input buffer changes from 1, 2, 4, 5, 3 to 4, 5, 1, 2, 3.

[0036] In this embodiment of the invention, through the above update operation, the priority of each data block in the priority matrix can be updated in a timely manner based on the target data block, ensuring that the storage order of the data blocks is consistent with the output order. The oldest flit in the same output direction in the output buffer area is used to maintain the order and avoid the flit out-of-order problem.

[0037] Optionally, the operation of storing the data block into the input buffer corresponding to the input terminal, as described above, may specifically include, in this embodiment of the invention: S21. Based on the target element currently contained in the priority matrix of the input buffer corresponding to the input terminal, select data bits with a priority no lower than other data bits from the empty data bits of the input buffer as target data bits.

[0038] S22. Store the data block in the target data bit.

[0039] The target data bit mentioned above can be a null data bit with the highest priority. Specifically, in this embodiment of the invention, a write pointer can be used to implement the above storage operation. Accordingly, the write pointer can be updated to the target data bit.

[0040] Specifically, in this embodiment of the invention, the priority of each data bit in the input buffer can be determined first according to the current priority matrix, and the data bits can be sorted according to their priority. Then, the empty data bit with the highest priority can be selected.

[0041] Furthermore, the aforementioned flit buffer may also include a data identifier, which is used to indicate whether the data bit is an empty data bit.

[0042] For example, Figure 4 This is a schematic diagram of a data block storage provided in an embodiment of the present invention, such as... Figure 4 As shown, according to the priority represented by the age matrix, the priority from high to low is row 1, 2, 4, 5, and 3. Correspondingly, the data identifier of each data bit in the data block buffer from right to left is 00011, indicating that the 3rd and 4th data bits are empty data bits, and the priority of the 4th data bit is higher than that of the 3rd bit. Therefore, in this embodiment of the invention, the 4th data bit can be determined as the target data bit, that is, the write pointer is pointed to the 4th data bit.

[0043] In this way, the highest priority empty data bit can be selected through the priority matrix to store the received data block.

[0044] Optionally, the operation of determining a corresponding target data block for each output terminal from the data blocks contained in each input buffer can specifically include, in this embodiment of the invention: If an input buffer to be arbitrated exists at any of the output terminals, a target input buffer is determined for the output terminal from the corresponding input buffer to be arbitrated; the input buffer to be arbitrated is at least one input buffer corresponding to the output terminal.

[0045] From the data bits of the target input buffer that are not empty and which correspond to the data bits of the output terminal, select data bits with a priority not lower than other data bits as data bits to be output, and determine the data block contained in the data bits to be output as the target data block.

[0046] The aforementioned input buffer to be arbitrated refers to at least one input buffer corresponding to the output terminal, that is, an input buffer containing at least one data block whose output direction is towards that output terminal. It is understandable that if an input buffer contains data with an output direction pointing towards that output terminal, that input buffer needs to participate in the arbitration.

[0047] Specifically, in the case where there is only one input buffer to be arbitrated, the embodiments of the present invention can directly determine the input buffer to be arbitrated as the target input buffer.

[0048] In another scenario, when there are at least two input buffers to be arbitrated, embodiments of the present invention can arbitrate based on a preset arbitration algorithm to obtain the target input buffer.

[0049] Furthermore, in this embodiment of the invention, the target data block can be determined based on the data block in the target input buffer whose output direction is the output end.

[0050] Specifically, if the target input buffer contains only one data block with the output direction of that output terminal, it can be directly identified as the target data block. Conversely, if the number of data blocks corresponding to that output terminal in the target input buffer is greater than one, the data block with the highest priority can be selected as the target data block.

[0051] Optionally, embodiments of the present invention may specifically include: If no data block to be arbitrated exists at any of the output terminals, the data block corresponding to the output terminal is determined from the data blocks contained in each of the input buffers as the target data block of the output terminal; the data block to be arbitrated is at least two data blocks corresponding to the output terminal contained in the input buffers.

[0052] Specifically, if there is no data block to be arbitrated at the output end, it indicates that the number of data blocks corresponding to the output end in the current router is no more than 1. In this case, the data block corresponding to the output end can be directly identified as the target data block.

[0053] For example, Figure 5 This is a schematic diagram of a read / write pointer update provided in an embodiment of the present invention, as shown below. Figure 5As shown, the route buffer stores the output direction of each data block in the input buffer, which is determined based on the routing information of each data block. 1 indicates the output direction is the current direction, and 0 indicates the output direction is not the current direction. Figure 5 Taking the W-direction output indication as an example, its routing indication from right to left is 10100, indicating that the output direction of its first and third data blocks is the W direction, while the output direction of other data blocks is not the W direction.

[0054] Furthermore, based on the information in the route buffer, the output direction of the 1st and 3rd data blocks from right to left in the current input buffer is W, and the output direction of the 2nd and 4th data blocks is N. Therefore, a read request in the N direction is 01010, and a read request in the W direction is 10100. Simultaneously, based on the age matrix, the priority order from high to low is rows 1, 2, 4, 5, and 3, corresponding to data blocks 1, 2, 4, 5, and 3 respectively. In this case, the read pointer in the W direction can be updated to the 1st data block, and the read pointer in the N direction can be updated to the 2nd data block. That is, the 1st data block is designated as the target data block for the W output, and the 2nd data block is designated as the target data block for the N output.

[0055] Furthermore, such as Figure 5 As shown, if there are no flits to be output in the P and S directions (the output indicators in the S and P directions are all 0), then the P and S read pointers can be directly updated to the write pointer positions.

[0056] Optionally, in this embodiment of the invention, an input buffer can be configured with multiple read pointers, each corresponding to a different output terminal. Correspondingly, the read pointer can serve as the selection terminal of the MUX, used to select a flit output from the input buffer. Unlike a typical FIFO, which has only one read pointer and one MUX, this solution can configure multiple read pointers, i.e., multiple parallel MUXs. Each different read pointer is a sel terminal, and by simultaneously opening multiple sel terminals in different directions, multiple flits in different directions can be output.

[0057] In this embodiment of the invention, the above method can solve the head blocking problem while updating the output logic through the priority matrix. Each time, the oldest flit in the same output direction in the output buffer area is used to solve the flit out-of-order problem, so that the order in which the flits arrive at the destination node is the same as the order when they start from the source node.

[0058] It should be noted that in related technologies, multi-core server scenarios are highly sensitive to system latency, requiring a reduction in the dwell time of flits on the transmission path to minimize network transmission latency. Furthermore, as the scale of cores and communication networks increases, the network needs to handle greater throughput. Simultaneously, with the increase in the number of flits in the network, the probability of head blocking surges, necessitating a solution with lower overhead and better timing.

[0059] Figure 6 This is a schematic diagram of a router component provided in an embodiment of the present invention, as shown below. Figure 6 As shown, this component can be applied to the input buffers in the E, W, N, and P directions of an on-chip network router. Assume a router in the network is in the following state at a certain moment: the E-direction input buffer contains flits destined for W, N, S, and P outputs; the N-direction input buffer contains flits destined for W and S outputs; and the other direction input buffers are empty. At this time, the header flits in the E and N-direction input buffers both need to be sent to the W direction, thus requiring competition for W-direction output resources. The flit that loses arbitration continues to be buffered, waiting for subsequent output resources. Generally, the header flit and subsequent flits of the direction that loses arbitration continue to be buffered, and only the header flit of the direction that succeeds in arbitration can be output. With the above component, all different output direction flits contained in the input buffer can participate in arbitration, and the successfully arbitrated flit can be output. As shown in the figure, the N and P output flits in the E-direction input buffer and the S output flit in the N-direction input buffer can be output normally.

[0060] Figure 7 This is a schematic diagram of another router component provided in an embodiment of the present invention, such as... Figure 7 As shown in the figure above, this is a router architecture with five input ports (E, W, N, S, P) and five output ports (E, W, N, S, P). (This embodiment of the invention can also be applied to routers with other numbers of input and output ports). The multi-port input buffer component shown in the dashed line is a router component provided in this embodiment of the invention. This component outputs multiple flits in different output directions from the flit buffer at once, and even if the first flit in the buffer is blocked, subsequent flits in the buffer can still be transmitted normally. For example, if... Figure 7 The head flit in the middle flit buffer is blocked. However, since the N and P read pointers can still read the flit, the normal output of the flit in the N and P directions is guaranteed.

[0061] After a `flit` enters the input buffer, it is stored in an empty space in the `flit` buffer indicated by the write pointer. The `flit` routing calculation result is represented as a vector, corresponding to the depth of the `flit` buffer. A direction output indicator is used to indicate the output direction of the `flit`. For example, a position of 1 in the W direction output indicator in the routing buffer indicates that the output direction of the corresponding `flit` is W.

[0062] Furthermore, multiple read pointers can be set to output the target data block, and the read pointers can be updated based on the priority matrix.

[0063] For example, based on the output direction of the flit in the flit buffer (the output direction is recorded in the route buffer), a read request corresponding to the read pointer is generated (e.g., the W read request corresponds to the value of the output indicator in the W direction). The positions of the flit buffers pointed to by the W and N pointers are determined according to the priority of the age matrix. Since there are no flits to be output in the P and S directions (the output indicators in the S and P directions are all 0), the P and S read pointers are updated to the positions of the write pointers.

[0064] The 1 in the Route buffer indicates the output direction of the flit stored in the flit buffer. There is only one output resource in one output direction, so there are multiple W output directions in the flit buffer, and only one flit can be sent out at a time.

[0065] The specific process is as follows: multiple flits with different output directions in an input buffer are arbitrated with flits to be output in other input buffers. If the arbitration is won, the flit pointed to by the read pointer in this cycle is output, and the route buffer and age matrix are updated. In the next cycle, the read pointer is updated to point to the next flit to be output in that direction. If there is no flit to be output in that direction, it points to the position of the write pointer.

[0066] Write pointer to indicate position, for example Figure 5 The W read request, or output indication in the W direction, has two positions with a 1, meaning there are two flits in the W output direction. Based on the position of the W read request 1, the position in the age matrix with the most 0s in the corresponding row is the position pointed to by the read pointer. If the bottom row with the most 0s is among the positions with a 1, then the W read pointer points to the position corresponding to the bottom row of the age matrix.

[0067] Figure 8 This is a schematic diagram of a data transmission device according to an embodiment of the present invention. The device is applied to any router in an on-chip network, and the router includes at least two input ports and at least two output ports; as shown below. Figure 8 As shown, device 20 includes: Storage module 201 is configured to store the data block into the input buffer corresponding to any input terminal in response to receiving a data block at any of the input terminals; The first determining module 202 is used to determine a corresponding target data block for each output terminal from the data blocks contained in each input buffer during the current data transmission cycle. The output module 203 is used to output each of the target data blocks to their respective output terminals.

[0068] Optionally, any of the input buffers includes multiple data bits, one of the data bits being used to store one of the data blocks; the apparatus further includes: The update module is used to update the priority matrix corresponding to any target data block after the first determining module determines a corresponding target data block for each of the output terminals. The priority matrix has an order consistent with the number of data bits contained in the input buffer. The initial state of the priority matrix is ​​as follows: the upper triangular elements are the first preset value, the lower triangular elements are the second preset value, and the diagonal elements are either the first preset value or the second preset value. The number of target elements in each row of the priority matrix is ​​positively correlated with the priority of the corresponding data bit. The target element is a matrix element with a value of the second preset value.

[0069] Optionally, the update module is specifically used for: In the priority matrix, the matrix row corresponding to the target data block is updated to the first preset value, and the matrix column corresponding to the target data block is updated to the second preset value.

[0070] Optionally, the storage module includes: The selection submodule is used to select data bits with a priority no lower than other data bits from the empty data bits of the input buffer based on the target element currently contained in the priority matrix of the input buffer corresponding to the input terminal, and to select them as target data bits. The storage submodule is used to store the data block into the target data bit.

[0071] Optionally, the selection submodule is specifically used for: If an input buffer to be arbitrated exists at any of the output terminals, a target input buffer is determined for the output terminal from the corresponding input buffer to be arbitrated; the input buffer to be arbitrated is at least one input buffer corresponding to the output terminal. From the data bits of the target input buffer that are not empty and which correspond to the data bits of the output terminal, select data bits with a priority not lower than other data bits as data bits to be output, and determine the data block contained in the data bits to be output as the target data block.

[0072] Optionally, the device further includes: The second determining module is used to determine the data block corresponding to the output terminal from the data blocks contained in each of the input buffers as the target data block of the output terminal when there is no data block to be arbitrated at any of the output terminals; the data block to be arbitrated is at least two data blocks corresponding to the output terminal contained in the input buffers.

[0073] Optionally, the data block includes at least one of a data transmission unit and routing information of the data transmission unit.

[0074] In summary, the data transmission apparatus provided in this embodiment of the invention utilizes a router comprising at least two input terminals and at least two output terminals. Upon receiving a data block at any of the input terminals, the data block is stored in the input buffer corresponding to that input terminal. Within the current data transmission cycle, a corresponding target data block is determined for each output terminal from the data blocks contained in each input buffer. Each target data block is then output to its corresponding output terminal. Thus, this embodiment of the invention, using a router with multiple output terminals, can determine the target data blocks to be output for multiple output terminals within a single data transmission cycle, enabling the output of multiple data blocks at once. This avoids head-blocking problems and improves data transmission efficiency.

[0075] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0076] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0077] Regarding the request processing apparatus in the above embodiments, the specific manner in which each module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0078] This invention also provides an electronic device, including: a processor and a memory for storing processor-executable instructions, wherein the processor is configured to execute the above-described data transmission method.

[0079] Reference Figure 9This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Figure 9 As shown, the electronic device includes: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface communicate with each other through the communication bus. The memory is used to store at least one executable instruction, which causes the processor to execute the data transmission method of the aforementioned embodiment.

[0080] It should be noted that the electronic devices in the embodiments of this application include mobile electronic devices and non-mobile electronic devices.

[0081] The processor can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field Programmable Gate Array), or other programmable devices, transistor logic devices, hardware components, or any combination thereof. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.

[0082] The communication bus may include a path for transmitting information between the memory and the communication interface. The communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.

[0083] The memory may be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it may be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disk Read Only), magnetic tape, floppy disk and optical data storage devices, etc.

[0084] This invention also provides a non-transitory computer-readable storage medium that, when instructions in the storage medium are executed by a processor of an electronic device (server or terminal), enables the processor to perform... Figure 1 The data transmission method shown.

[0085] This invention also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform... Figure 1 The data transmission method shown.

[0086] This application also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described data transmission method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0087] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0088] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0089] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)).

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

[0091] These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing terminal device to operate in a predictive manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0093] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0094] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0095] It should be noted that the various data-related processes in the embodiments of this application are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.

[0096] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0097] The present invention has provided a detailed description of a data transmission method, apparatus, electronic device, and readable storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A data transmission method, characterized by, The method is applied to any router in an on-chip network, the router including at least two input ports and at least two output ports; the method includes: In response to receiving a data block at any of the input terminals, the data block is stored in the input buffer corresponding to the input terminal; Within the current data transmission cycle, a corresponding target data block is determined for each output terminal from the data blocks contained in each input buffer; Each of the target data blocks is output to its corresponding output terminal.

2. The method according to claim 1, characterized in that, Each of the input buffers contains multiple data bits, and one data bit is used to store one data block; after determining a corresponding target data block for each of the output terminals, the method further includes: For any of the target data blocks, the input buffer corresponding to the target data block is used as the buffer to be updated, and the priority matrix corresponding to the buffer to be updated is updated. The priority matrix has an order consistent with the number of data bits contained in the input buffer. The initial state of the priority matrix is ​​as follows: the upper triangular elements are the first preset value, the lower triangular elements are the second preset value, and the diagonal elements are either the first preset value or the second preset value. The number of target elements in each row of the priority matrix is ​​positively correlated with the priority of the corresponding data bit. The target element is a matrix element with a value of the second preset value.

3. The method according to claim 2, characterized in that, Updating the priority matrix corresponding to the buffer to be updated includes: In the priority matrix, the matrix row corresponding to the target data block is updated to the first preset value, and the matrix column corresponding to the target data block is updated to the second preset value.

4. The method according to claim 3, characterized in that, The step of storing the data block into the input buffer corresponding to the input terminal includes: Based on the target element currently contained in the priority matrix of the input buffer corresponding to the input terminal, select data bits with a priority no lower than other data bits from the empty data bits of the input buffer as target data bits; The data block is stored in the target data location.

5. The method according to claim 3, characterized in that, The step of determining a corresponding target data block for each output terminal from the data blocks contained in each of the input buffers includes: If an input buffer to be arbitrated exists at any of the output terminals, a target input buffer is determined for the output terminal from the corresponding input buffer to be arbitrated; the input buffer to be arbitrated is at least one input buffer corresponding to the output terminal. From the data bits of the target input buffer that are not empty and which correspond to the data bits of the output terminal, select data bits with a priority not lower than other data bits as data bits to be output, and determine the data block contained in the data bits to be output as the target data block.

6. The method according to claim 5, characterized in that, The method further includes: If no data block to be arbitrated exists at any of the output terminals, the data block corresponding to the output terminal is determined from the data blocks contained in each of the input buffers as the target data block of the output terminal; the data block to be arbitrated is at least two data blocks corresponding to the output terminal contained in the input buffers.

7. The method according to any one of claims 1 to 6, characterized in that, The data block includes at least one of a data transmission unit and routing information of the data transmission unit.

8. A data transmission device, characterized in that, The device is applied to any router in an on-chip network, the router including at least two input ports and at least two output ports; the device includes: The storage module is configured to, in response to receiving a data block at any of the input terminals, store the data block in the input buffer corresponding to the input terminal; The first determining module is used to determine a corresponding target data block for each output terminal from the data blocks contained in each input buffer during the current data transmission cycle. The output module is used to output each of the target data blocks to their respective output terminals.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.