Data transmission methods, apparatus, electronic devices and readable storage media
By setting the output register and optimizing the arbitration logic in the on-chip network router, the problem of high data transmission latency in NoC is solved, achieving more efficient data transmission and resource utilization.
Patent Information
- Application Number
- CN202611088751.2
- 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
In existing technologies, Network on Chip (NoC) suffers from high data transmission latency due to the deep arbitration logic of the buffer during data transmission, making timing difficult to converge.
In routers for on-chip networks, by setting output registers, data blocks to be transmitted are stored in the output registers, and the target data blocks are determined based on routing information. This optimizes arbitration logic, reduces the logic of flit reading from the buffer during transmission on the critical path, increases buffer depth, and improves resource utilization.
It reduces data transmission latency, increases chip clock speed, reduces the possibility of interruptions, avoids head blocking issues, and improves resource utilization.
Smart Images

Figure CN123115013A_ABST
Abstract
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 arbitrate all data in the buffer together before outputting it. This approach involves deep arbitration logic, making timing difficult to converge, resulting in high data transmission latency. 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 high data transmission latency. 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; For any of the input buffers, based on the routing information corresponding to each of the data blocks contained in the input buffer, a data block to be transmitted is determined, an arbitration request corresponding to the input buffer is generated, and the data block to be transmitted is stored in at least one output register; different output registers correspond to different output terminals, and the routing information is used to characterize the output terminal corresponding to the data block; In response to the arbitration results corresponding to at least two of the arbitration requests, a target data block is determined from the data blocks to be transmitted stored in each of the output registers, and the target data block is transmitted to the 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 configured to, for any input buffer, determine the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer, generate an arbitration request corresponding to the input buffer, and store the data block to be transmitted in at least one output register; different output registers correspond to different output terminals, and the routing information is used to characterize the output terminal corresponding to the data block; The output module is configured to, in response to the arbitration result of the arbitration request corresponding to each of the input buffers, determine the target data block from the data blocks to be transmitted stored in each of the output registers, and transmit the target data block to the corresponding output terminal.
[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. In response to receiving a data block at any input terminal, the data block is stored in an input buffer corresponding to that input terminal. For any input buffer, based on routing information corresponding to each data block contained in the input buffer, a data block to be transmitted is determined, and an arbitration request corresponding to the input buffer is generated. The data block to be transmitted is then stored in at least one output register. Different output registers correspond to different output terminals, and the routing information characterizes the output terminal corresponding to the data block. In response to the arbitration result of the arbitration request corresponding to each input buffer, a target data block is determined from the data blocks to be transmitted stored in each output register, and the target data block is transmitted to the corresponding output terminal. Thus, by setting output registers, this embodiment of the invention can pre-store the data blocks to be transmitted participating in arbitration in the output registers, eliminating the logic of flit reading from the buffer during transmission on the critical path, reducing the critical path, increasing the buffer depth, increasing the chip's clock frequency, reducing data transmission latency, and thereby increasing the clock frequency. The buffer depth can be further increased to reduce the possibility of interruptions. Meanwhile, in this embodiment of the invention, data blocks corresponding to different outputs at the same input end all share a single storage unit (input buffer). The input buffer can store all flits with different output directions, and all buffer resources can be utilized. Utilizing all buffer resources can improve resource utilization and avoid waste. Furthermore, since the router in this embodiment of the invention includes at least two output ends, it can output multiple data blocks corresponding to different output ends at once, avoiding head blocking problems. 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 architecture of a router according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the architecture of the input buffer of a router according to an embodiment of the present invention; Figure 4 This is a schematic diagram of an input buffer architecture according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a data transmission device according to an embodiment of the present invention; Figure 6 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: For any of the input buffers, based on the routing information corresponding to each data block contained in the input buffer, determine the data block to be transmitted, generate an arbitration request corresponding to the input buffer, and store the data block to be transmitted in at least one output register; different output registers correspond to different output terminals, and the routing information is used to characterize the output terminal corresponding to the data block.
[0016] Step 103: In response to the arbitration result of the arbitration request corresponding to each of the input buffers, determine the target data block from the data blocks to be transmitted stored in each of the output registers, and transmit the target data block to the corresponding output terminal.
[0017] The embodiments of the present invention, relating to steps 101-103 above, can be applied to any router in any on-premises network. The router can be a basic component of 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. Optionally, the data block includes at least one of a data transmission unit and routing information of the data transmission unit.
[0018] The aforementioned data transmission unit can be the smallest effective data unit (flit) in NoC transmission. The aforementioned data block can also be called a data packet, which can be a flit, or other control information transmitted in the network, such as flit routing information. Correspondingly, the input buffer can store the data to be transmitted in 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; however, multiple input buffers can be deployed for one input terminal according to actual needs, and this embodiment of the invention does not impose any limitations on this.
[0019] The data block mentioned above can be transmitted by other routers. When the current router receives the data block through the 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. Optionally, in this embodiment of the invention, each router can perform data transmission operations according to a data transmission cycle, which can be a pre-set on-chip network.
[0020] Furthermore, within the current data transmission cycle, the data block to be transmitted can be determined based on the routing information corresponding to each data block contained in the input buffer, and an arbitration request corresponding to the input buffer can be generated. The aforementioned routing information can be used to characterize the output terminal corresponding to the data block.
[0021] Specifically, in this embodiment of the invention, a router buffer can be used to store the routing information of each data block. The routing information can represent the output end corresponding to the data block, that is, the output direction of the data block. For example, if the routing information corresponding to the W input end in the route buffer is 00001, it can be indicated that the flit in the input buffer corresponding to position 1 is output in the W direction, that is, the output end of this data block is the W end.
[0022] 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.
[0023] Furthermore, in step 102 above, the data blocks to be transmitted can be determined based on the routing information corresponding to each data block. The number of data blocks to be transmitted can be multiple, and one data block can be determined for each different output terminal. Specifically, for any output terminal, if the number of data blocks corresponding to that output terminal in the input buffer is 1, then this embodiment of the invention can directly determine that data block as the data block to be transmitted for that output terminal. Correspondingly, if the number of data blocks corresponding to that output terminal in the input buffer is greater than 1, then this embodiment of the invention can select one data block as the data block to be transmitted for that output terminal. Optionally, the selection method can be based on a first-in-first-out (FIFO) data block selection, or it can be based on the priority of each data block, selecting the data block with the highest priority as the data block to be transmitted for that output terminal.
[0024] Furthermore, embodiments of the present invention may also store the data block to be transmitted in at least one output register. These output registers may be pre-configured for each output terminal, and embodiments of the present invention do not impose any limitations on this.
[0025] One input buffer can generate an arbitration request. Specifically, the arbitration request indicates that there is at least one data block in the input buffer that needs to be transmitted to at least one output.
[0026] Accordingly, multiple input buffers can generate multiple arbitration requests. Arbitration can then be performed based on these requests, and the arbitration result can include which input buffer transmitted the data block in the current transmission cycle. Specifically, the arbitration can be performed using a preset arbitration algorithm, which is not limited in this embodiment of the invention. The arbitration algorithm can be a fixed priority or a polling priority algorithm, etc., and can be set according to actual needs; this embodiment of the invention does not impose any restrictions on this.
[0027] Accordingly, after obtaining the arbitration result, the target data block can be determined from each output register based on the arbitration result, and the target data block can be transmitted to the corresponding output terminal.
[0028] Specifically, the arbitration result can indicate which input buffer the data block will be transferred from. For example, if the arbitration result indicates that the data block will be transferred from input buffer A, then the data block to be transferred from input buffer A in the output register can be determined as the target data block.
[0029] Furthermore, in step 103 above, each target data block can be sent to a crossbar, and simultaneously, the output corresponding to each target data block can be sent to the crossbar. Accordingly, the crossbar can send each target data block to its corresponding output.
[0030] 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 requests participation in the output arbitration. While this method offers better timing, if the header flit is blocked, all subsequent data packets that can be sent will be blocked in the FIFO, severely impacting flit transmission efficiency and increasing system latency. Another approach involves arbitrating all flits in a buffer before outputting. However, this method is only suitable for smaller buffer depths. On one hand, smaller buffer depths buffer fewer flits, making them prone to interruptions and affecting transmission efficiency. On the other hand, having all flits participate in arbitration together results in a deep arbitration logic, making timing convergence difficult. Yet another approach involves buffering flits according to their output direction in multiple buffers. While this effectively eliminates header blocking, the large number of buffers results in a large area consumption. Furthermore, the uneven distribution of flits in the buffers leads to low buffer resource utilization and significant waste of buffer resources.
[0031] 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. In response to receiving a data block at any input terminal, the data block is stored in an input buffer corresponding to that input terminal. For any input buffer, based on routing information corresponding to each data block contained in the input buffer, a data block to be transmitted is determined, and an arbitration request corresponding to the input buffer is generated. The data block to be transmitted is then stored in at least one output register. Different output registers correspond to different output terminals, and the routing information characterizes the output terminal corresponding to the data block. In response to the arbitration result of the arbitration request corresponding to each input buffer, a target data block is determined from the data blocks to be transmitted stored in each output register, and the target data block is transmitted to the corresponding output terminal. Thus, by setting output registers, this embodiment of the invention can pre-store the data blocks to be transmitted participating in arbitration in the output registers, eliminating the logic of flit reading from the buffer during transmission on the critical path, reducing the critical path, increasing the buffer depth, increasing the chip's clock frequency, reducing data transmission latency, and thereby increasing the clock frequency. The buffer depth can be further increased to reduce the possibility of interruptions. Meanwhile, in this embodiment of the invention, data blocks corresponding to different outputs at the same input end all share a single storage unit (input buffer). The input buffer can store all flits with different output directions, and all buffer resources can be utilized. Utilizing all buffer resources can improve resource utilization and avoid waste. Furthermore, since the router in this embodiment of the invention includes at least two output ends, it can output multiple data blocks corresponding to different output ends at once, avoiding head blocking problems.
[0032] Optionally, the operation of determining the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer may specifically include, in this embodiment of the invention: S21. For any of the output terminals, based on the routing information corresponding to each of the data blocks contained in the input buffer, determine the data block corresponding to the output terminal in each of the data blocks as the data block to be determined.
[0033] S22. If the number of data blocks to be determined is not zero, determine the data block to be transmitted corresponding to the output terminal based on the storage order of each data block to be determined in the input buffer.
[0034] Specifically, embodiments of the present invention can determine the output direction of each flash in the input buffer based on the information stored in the route buffer, i.e., the routing information. Specifically, since the routing information can characterize the output end of each data block, embodiments of the present invention can determine the data block whose output end is characterized by the routing information as the data block to be determined based on the routing information of each data block.
[0035] Furthermore, when the number of data blocks to be determined is not zero, this embodiment of the invention can determine the data block to be transmitted corresponding to the output terminal based on the storage order of each data block to be determined in the input buffer. That is, this embodiment of the invention can determine the data block to be transmitted from the data blocks to be determined in a FIFO manner.
[0036] Optionally, in this embodiment of the invention, each output direction's flit prediction register (output register) can be configured with a separate read pointer to read the flits in the input buffer's data block buffer (flit buffer). Optionally, in this embodiment of the invention, the read pointers corresponding to each output end can be updated in each cycle. First, the flits whose output end is identified by the routing information can be filtered. Then, the pointer points to the first flit that arrives in the buffer according to its order of entry into the buffer; this first flit is the flit to be sent next. If the output direction in the route buffer is empty, the read pointer for that direction can point to the position pointed to by the write pointer, and the write pointer can be made to point to an empty position.
[0037] Based on this, embodiments of the present invention can directly determine the data block pointed to by the read pointer of the output terminal as the data block to be determined.
[0038] In this embodiment of the invention, the above method can determine the data blocks to be transmitted for each output end based on routing information, which can improve data transmission efficiency to a certain extent.
[0039] Optionally, in this embodiment of the invention, before determining the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer, the embodiment of the invention may further include: S31. Based on the routing flags stored in the routing buffer corresponding to the router, obtain the routing information corresponding to each data block.
[0040] After the above-described operation of determining the target data block from the data blocks to be transmitted stored in each of the output registers, the embodiments of the present invention may further include: S32. In the routing buffer, update the routing flag corresponding to the target data block.
[0041] Specifically, in this embodiment of the invention, routing information can be stored in a routing buffer. The routing buffer (routerbufer) stores the routing flags of each fraction in the fraction buffer, and the routing flags can indicate the output direction.
[0042] Furthermore, after determining the target data block, this embodiment of the invention can also update the routing flag corresponding to the target data block in the routing buffer. For example, based on the arbitration result, the route buffer corresponding to the position of the fly (i.e., the target data block) to be sent can be set to 0, and all zeros indicate that the fly in the buffer is invalid.
[0043] In this embodiment of the invention, routing information for each data block can be conveniently obtained through routing flags. Furthermore, by promptly updating the routing flags of data blocks identified as target blocks, the selection of subsequent data blocks to be transmitted can be avoided, ensuring the accuracy of data transmission.
[0044] Optionally, the routing buffer contains multiple sub-regions, different sub-regions correspond to different data blocks, any sub-region contains multiple sub-blocks, and different sub-blocks correspond to different output terminals; the operation of obtaining the routing information corresponding to each data block based on the routing flag stored in the routing buffer corresponding to the router may specifically include the following in this embodiment of the invention: The sub-area corresponding to each data block in the routing buffer is taken as the sub-area to be determined, the sub-block in each sub-area to be determined whose routing flag is the first preset flag is determined as the sub-block to be transmitted, and the output terminal corresponding to each sub-block to be transmitted is determined as the output terminal corresponding to each data block.
[0045] The aforementioned sub-region can be a storage area within a routing buffer, where one sub-region can store the routing flag of a data block. Furthermore, a sub-region can contain multiple sub-blocks, each corresponding to a different output terminal. Accordingly, the routing information corresponding to a sub-region can be determined using the routing flags of each sub-block within that sub-region. The aforementioned first preset flag can be 1 or 0, and can be set according to actual needs; this embodiment of the invention does not impose any limitations on this.
[0046] Accordingly, when obtaining the routing information corresponding to each data block, the embodiments of the present invention can take the sub-area corresponding to each data block in the routing buffer as the sub-area to be determined, and determine the sub-block in each sub-area to be determined whose routing flag is the first preset flag as the sub-block to be transmitted, and then determine the output terminal corresponding to each sub-block to be transmitted as the output terminal corresponding to each data block.
[0047] For example, if the route flag stored in the area corresponding to the W output end in the route buffer is 00001, it means that the flit in the flit buffer corresponding to the sub-block where route flag 1 is located is output in the W direction.
[0048] In this embodiment of the invention, the output terminal corresponding to each data block can be determined by the routing flags in the sub-area and sub-block using the above method.
[0049] Optionally, the operation of updating the routing flag corresponding to the target data block in the routing buffer described above may specifically include, in this embodiment of the invention: In the routing buffer, the routing flag of the sub-area corresponding to the target data block is updated to a second preset flag; the first preset flag is different from the second preset flag.
[0050] The second preset flag can be a different flag from the first preset flag, and can be a string or text, etc. For example, the first preset flag can be 1, and correspondingly, the second preset flag can be 0. Alternatively, the first preset flag can be 0, and the second preset flag can be 1. The first and second preset flags can be set according to actual needs, and this embodiment of the invention does not impose any restrictions on this.
[0051] For example, in embodiments of the present invention, the routing flags of the sub-area corresponding to the fly (i.e. the target data block) in the route buffer can be set to 0 based on the arbitration result, i.e. after the target data block is determined. All 0s indicate that the fly in the buffer is invalid.
[0052] In this embodiment of the invention, the routing flags of the output target data blocks can be updated in a timely manner through the above method, avoiding any impact on the determination of subsequent target data blocks and improving the accuracy of data transmission.
[0053] Optionally, after the above-described operation of storing the data block in the input buffer corresponding to the input terminal, the embodiments of the present invention may further include: The data block is stored in a target register; the target register is any of the output registers that does not store any data block to be transmitted.
[0054] It should be noted that, in this embodiment of the invention, when a new flit enters the input buffer, the flit can be written to the position pointed to by the write pointer in the flit buffer, and simultaneously, the flit can be written to the prediction register, i.e., the destination register, which has not yet been written to a valid flit. Here, a valid flit refers to the aforementioned data block to be transmitted.
[0055] This allows the flit to be placed in the output register, reducing the logic of reading the flit from the buffer. Furthermore, since each output direction's flit is placed in an independent register, multiple flits can be output at once without head blocking issues.
[0056] 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 requests participation in the output arbitration. While this method offers better timing, if the header flit is blocked, all subsequent data packets that can be sent will be blocked in the FIFO, severely impacting flit transmission efficiency and increasing system latency. Another approach involves arbitrating all flits in a buffer before outputting. However, this method is only suitable for smaller buffer depths. On one hand, smaller buffer depths buffer fewer flits, making them prone to interruptions and affecting transmission efficiency. On the other hand, having all flits participate in arbitration together results in a deep arbitration logic, making timing convergence difficult. Yet another approach involves buffering flits according to their output direction in multiple buffers. While this effectively eliminates header blocking, the large number of buffers results in a large area consumption. Furthermore, the uneven distribution of flits in the buffers leads to low buffer resource utilization and significant waste of buffer resources.
[0057] In this field, multi-core server scenarios are highly sensitive to system latency, often requiring minimizing the time flit spends on the transmission path to reduce network transmission delay. Simultaneously, with the increase in interconnect components, network traffic load increases, necessitating a network capacity to handle higher throughput. Connections between routes also require transmission time, necessitating that the timing logic between routes be as shallow as possible to allow for longer routing distances.
[0058] For example, Figure 2 This is a schematic diagram of the architecture of a router according to an embodiment of the present invention, such as... Figure 2 As shown, the router may include five input ports (E, W, N, S, P) and five output ports (E, W, N, S, P) (this embodiment can also be applied to routers with other numbers of input and output ports). The multi-port output input buffer in the dashed line can be a router component provided in this embodiment. This component can output 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 2The head flit in the middle flit buffer is blocked. Since the N and P read pointers can still read flits, normal output of flits in the N and P directions is guaranteed. Specifically, the input buffer can include a data block buffer and a routing buffer.
[0059] Furthermore, after determining the target data block corresponding to each output terminal, each target data block can be sent to a crossbar. Simultaneously, the output terminal corresponding to each target data block can also be sent to the crossbar. Accordingly, the crossbar can send each target data block to its corresponding output terminal.
[0060] pass Figure 2 The router architecture shown can eliminate head blocking by using multiple flit outputs in the input buffer. However... Figure 2 The critical path of the router architecture is: Arbitration Request Register Q starts -> output arbitration -> flit buffer read flit -> crossbar deflection flit -> route to the next route -> route calculation -> generate arbitration request -> Arbitration Request Register D.
[0061] Based on this, Figure 3 This is a schematic diagram of the input buffer architecture of a router according to an embodiment of the present invention, as shown below. Figure 3 As shown, the E-direction input buffer of a router with five input ports (E, W, N, S, P) and five output ports (E, W, N, S, P) is illustrated.
[0062] Specifically, when a flick buffer in an input buffer is not empty, the valid flicks pointed to by the read pointers in each output direction are written to the corresponding output flick prediction register (output register). When a new flick enters the input buffer, it is written to the position pointed to by the write pointer in the flick buffer, and also to the prediction registers of any flicks that have not yet been written to. The routing calculation results of the flicks are also written to the route buffer. After all flicks are written to their corresponding registers, an arbitration request is generated in the next cycle based on the information in the router buffer. Finally, based on the arbitration result, the flicks in the prediction registers are output, and the route buffer is updated, setting the corresponding output flick position to 0.
[0063] Figure 3The critical path from the middle route to the next route is: Arbitration Request Register Q starts -> Arbitration output -> Crossbar deflection flick -> Route to the next route -> Route calculation -> Generate arbitration request -> Arbitration Request Register D. It can be seen that... Figure 3 The router architecture shown can eliminate the time spent reading flits from the flit buffer on the critical path between routes. On one hand, it optimizes the timing of routes to the critical path, allowing for longer routing distances and enabling routes to meet timing requirements with fewer or no registers, thus reducing packet latency and increasing system clock speed. On the other hand, it decouples the flit buffer depth from the critical path timing, allowing for larger flit buffers in routes and reducing the risk of flow interruptions due to a full flit buffer.
[0064] Figure 4 This is a schematic diagram of an input buffer architecture according to an embodiment of the present invention, such as... Figure 4 As shown, it may include a data block buffer (flit buffer), a route buffer, a read pointer and a write pointer, and an output register.
[0065] Specifically, if at a certain moment the flit buffer already contains flits with output directions W, N, and N, and the output direction of the flit is recorded by the route buffer (1 indicates the output direction of that flit), since each output direction of this component has an independent read pointer, when the read pointer is valid (i.e., the buffer contains a flit to be output in the corresponding read pointer direction), it is possible to predict the next flit to be output in that output direction stored in the buffer. In other words, when the read pointers for each output direction are updated, if there is a flit in the buffer, the read pointer for that output direction will point to the flit to be sent in the next cycle. Therefore, it is determined which output direction flit will be sent in the next cycle for the flits in the buffer.
[0066] This situation corresponds to Figure 4 The output flit is in the W and N directions. Optionally, if a new flit is received at this time, after routing calculation, the output direction is S. If the predicted flit register (output register) in the S direction is written according to the routing calculation result, the timing is too deep. Therefore, in this embodiment of the invention, the flit can be written directly to the empty position of the prediction register and the flit buffer without relying on the routing calculation result. For example, the flit can be written to the S and P predicted flit registers.
[0067] Furthermore, although the flit is written to the predicted flit register in the direction that should not be sent, the arbitration request is derived from the route buffer and the new routing result. The direction of the flit that should not be sent will not generate an arbitration request; therefore, the flit will not be sent to the output direction that is not intended to be sent. The arbitration request generated in the input buffer generates an arbitration result through the output arbitration unit. In this embodiment of the invention, the route buffer can be updated according to the arbitration result. This embodiment of the invention can set the route buffer at the corresponding position of the flit (target data block) to be sent to 0; all zeros indicate that the flit in that buffer is invalid.
[0068] In summary, this embodiment of the invention can infer the output direction of a newly received flit in the buffer by reading the pointer and using arbitration request logic, and then place the flit in the output register to reduce the logic of reading flits from the buffer. Simultaneously, each output direction flit is placed in an independent register, allowing multiple flits to be output at once without head-blocking issues; all flits that can be sent in the buffer can be transmitted normally. Furthermore, the logic of reading flits from the buffer is no longer the critical path of routing, reducing the number of critical paths. The buffer depth can be further increased, reducing the possibility of interruptions. At the same time, all flits share a single storage unit, ensuring that all buffer resources can be utilized, improving resource utilization and preventing waste.
[0069] Figure 5 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 5 As shown, device 20 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 configured to, for any input buffer, determine the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer, generate an arbitration request corresponding to the input buffer, and store the data block to be transmitted in at least one output register; different output registers correspond to different output terminals, and the routing information is used to characterize the output terminal corresponding to the data block; The output module is configured to, in response to the arbitration result of the arbitration request corresponding to each of the input buffers, determine the target data block from the data blocks to be transmitted stored in each of the output registers, and transmit the target data block to the corresponding output terminal.
[0070] Optionally, the first determining module includes: The second determining submodule is used to determine, for any output terminal, the data block corresponding to the output terminal in each data block as the data block to be determined based on the routing information corresponding to each data block contained in the input buffer; The third determining submodule is used to determine the data block to be transmitted corresponding to the output end based on the storage order of each of the data blocks to be determined in the input buffer when the number of data blocks to be determined is not 0.
[0071] Optionally, the device further includes: The information acquisition module is used to acquire routing information corresponding to each data block based on the routing flags stored in the routing buffer corresponding to the router. The flag update module is used to update the routing flags corresponding to the target data block in the routing buffer.
[0072] Optionally, the routing buffer contains multiple sub-areas, different sub-areas correspond to different data blocks, any sub-area contains multiple sub-blocks, and different sub-blocks correspond to different output terminals; The information acquisition module is specifically used for: The sub-area corresponding to each data block in the routing buffer is taken as the sub-area to be determined, the sub-block in each sub-area to be determined whose routing flag is the first preset flag is determined as the sub-block to be transmitted, and the output terminal corresponding to each sub-block to be transmitted is determined as the output terminal corresponding to each data block.
[0073] Optionally, the flag update module is specifically used for: In the routing buffer, the routing flag of the sub-area corresponding to the target data block is updated to a second preset flag; the first preset flag is different from the second preset flag.
[0074] Optionally, the device further includes: A data storage module is used to store the data block into a target register; the target register is any of the output registers that does not store any data block to be transmitted.
[0075] Optionally, the data block includes at least one of a data transmission unit and routing information of the data transmission unit.
[0076] 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. In response to receiving a data block at any input terminal, the data block is stored in an input buffer corresponding to that input terminal. For any input buffer, based on routing information corresponding to each data block contained in the input buffer, a data block to be transmitted is determined, and an arbitration request corresponding to the input buffer is generated. The data block to be transmitted is then stored in at least one output register. Different output registers correspond to different output terminals, and the routing information characterizes the output terminal corresponding to the data block. In response to the arbitration result of the arbitration request corresponding to each input buffer, a target data block is determined from the data blocks to be transmitted stored in each output register, and the target data block is transmitted to the corresponding output terminal. Thus, by setting output registers, this embodiment of the invention can pre-store the data blocks to be transmitted participating in arbitration in the output registers. This eliminates the logic of flit reading from the buffer during transmission on the critical path, reducing the critical path, increasing the buffer depth, increasing the chip's clock frequency, reducing data transmission latency, and thereby increasing the clock frequency. The buffer depth can be further increased to reduce the possibility of interruptions. Meanwhile, in this embodiment of the invention, data blocks corresponding to different outputs at the same input end all share a single storage unit (input buffer). The input buffer can store all flits with different output directions, and all buffer resources can be utilized. Utilizing all buffer resources can improve resource utilization and avoid waste. Furthermore, since the router in this embodiment of the invention includes at least two output ends, it can output multiple data blocks corresponding to different output ends at once, avoiding head blocking problems.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] Reference Figure 6 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Figure 6 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.
[0082] It should be noted that the electronic devices in the embodiments of this application include mobile electronic devices and non-mobile electronic devices.
[0083] 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.
[0084] 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 6 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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)).
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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 in that, 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; For any of the input buffers, based on the routing information corresponding to each of the data blocks contained in the input buffer, a data block to be transmitted is determined, an arbitration request corresponding to the input buffer is generated, and the data block to be transmitted is stored in at least one output register; different output registers correspond to different output terminals, and the routing information is used to characterize the output terminal corresponding to the data block; In response to the arbitration result of the arbitration request corresponding to each of the input buffers, a target data block is determined from the data blocks to be transmitted stored in each of the output registers, and the target data block is transmitted to the corresponding output terminal.
2. The method according to claim 1, characterized in that, The step of determining the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer includes: For any of the output terminals, based on the routing information corresponding to each of the data blocks contained in the input buffer, the data block corresponding to the output terminal in each of the data blocks is determined as the data block to be determined; If the number of data blocks to be determined is not zero, the data block to be transmitted corresponding to the output terminal is determined based on the storage order of each data block to be determined in the input buffer.
3. The method according to claim 1, characterized in that, Before determining the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer, the method further includes: obtaining the routing information corresponding to each data block based on the routing flag stored in the routing buffer corresponding to the router; After determining the target data block from the data blocks to be transmitted stored in each of the output registers, the method further includes: In the routing buffer, the routing flag corresponding to the target data block is updated.
4. The method according to claim 3, characterized in that, The routing buffer contains multiple sub-areas, each sub-area corresponding to a different data block, and each sub-area contains multiple sub-blocks, each sub-block corresponding to a different output terminal; The step of obtaining routing information corresponding to each data block based on the routing flag stored in the routing buffer corresponding to the router includes: The sub-area corresponding to each data block in the routing buffer is taken as the sub-area to be determined, the sub-block in each sub-area to be determined whose routing flag is the first preset flag is determined as the sub-block to be transmitted, and the output terminal corresponding to each sub-block to be transmitted is determined as the output terminal corresponding to each data block.
5. The method according to claim 4, characterized in that, The step of updating the routing flag corresponding to the target data block in the routing buffer includes: In the routing buffer, the routing flag of the sub-area corresponding to the target data block is updated to a second preset flag; the first preset flag is different from the second preset flag.
6. The method according to any one of claims 1-5, characterized in that, After storing the data block into the input buffer corresponding to the input terminal, the method further includes: The data block is stored in a target register; the target register is any of the output registers that does not store any data block to be transmitted.
7. The method according to any one of claims 1-5, 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 into the input buffer corresponding to the input terminal; The first determining module is configured to, for any input buffer, determine the data block to be transmitted based on the routing information corresponding to each data block contained in the input buffer, generate an arbitration request corresponding to the input buffer, and store the data block to be transmitted in at least one output register; different output registers correspond to different output terminals, and the routing information is used to characterize the output terminal corresponding to the data block; The output module is configured to, in response to the arbitration result of the arbitration request corresponding to each of the input buffers, determine the target data block from the data blocks to be transmitted stored in each of the output registers, and transmit the target data block to the corresponding output terminal.
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.
