Many-core on-chip network data transmission method, device, equipment and medium
By adopting the continuous transmission mode in the on-chip network, the data packet header is only sent during the first transmission, and the packet header is not sent for subsequent data. The target sending direction record is used to solve the problem of increasing the number of packet header digits in the existing technology and achieve a more efficient Data transfer.
Patent Information
- Application Number
- CN202011069092.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-09-30
AI Technical Summary
During data transmission in existing on-chip networks, the number of header bits needs to be increased to achieve multicast, which results in increased transmission resource consumption, increased memory access times, and increased power consumption.
By only sending the data packet header once in the continuous sending mode, subsequent data will no longer send the packet header, only the data itself is sent, and the target sending direction record is used to reduce transmission errors and improve transmission efficiency.
It reduces the number of packet header transmissions and the number of memory accesses, reduces transmission costs and power consumption, and improves the efficiency of data transmission.
Smart Images

Figure CN114363246B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of artificial intelligence, general-purpose processors, or high-performance computing, and in particular to a multi-core on-chip network data transmission method, device, equipment, and medium. Background Art
[0002] In recent years, with the rapid development of applications and technologies related to Artificial Intelligence (AI) algorithms, the requirements for computing power and power efficiency have been increasing. Multi-core is usually used to run AI algorithms to improve the computing speed of AI algorithms.
[0003] Many-core is a collection of cores with high-performance parallel processing capabilities, which are connected together in a preset way with a large number (tens of thousands in the future) and multiple types of cores. Currently, in many-core, the network on chip (NOC) communication method is used to realize the communication between cores.
[0004] In the existing on-chip network, nodes send data packets to nodes that match the multicast flag by adding a multicast flag in the packet header. In the existing multicast method, the data packet needs to increase the number of header bits to increase the multicast destination address. Each core may multicast data to any other core, so the header will increase the flag bits of all cores except itself, increase the number of header bits, and increase the transmission resource consumption. Summary of the invention
[0005] The embodiments of the present invention provide a multi-core on-chip network data transmission method, device, equipment and medium, which can reduce the transmission data packet header overhead, improve transmission efficiency and reduce transmission cost.
[0006] In a first aspect, an embodiment of the present invention provides a multi-core on-chip network data transmission method, which is applied in a first network node and includes:
[0007] receiving a data packet from a first direction;
[0008] Determine a target sending direction according to the header data of the data packet, and send the data packet along the target sending direction;
[0009] If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data received from the first direction in the continuous sending mode is sent along the target sending direction.
[0010] In a second aspect, an embodiment of the present invention provides a multi-core on-chip network data transmission method, which is applied in a second network node and includes:
[0011] receiving a data packet sent by a matching first processing unit, wherein the data packet includes packet header data;
[0012] Determine the target sending direction according to the packet header data;
[0013] Sending the data packet to the first network node along the target sending direction, so that the first network node sends the data packet to the second processing unit when receiving the data packet;
[0014] If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data sent by the first processing unit received in the continuous sending mode;
[0015] The data is sent to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data.
[0016] In a third aspect, an embodiment of the present invention further provides a multi-core on-chip network data transmission device, which is configured in a first network node and includes:
[0017] A data packet receiving module, used for receiving a data packet from a first direction;
[0018] A data packet sending module, used to determine a target sending direction according to the header data of the data packet, and send the data packet along the target sending direction;
[0019] The data continuous sending module is used to send the data from the first direction received in the continuous sending mode along the target sending direction if the sending mode is determined to be the continuous sending mode according to the header data of the data packet.
[0020] In a fourth aspect, an embodiment of the present invention further provides a multi-core on-chip network data transmission device, which is configured in a second network node and includes:
[0021] A data packet receiving module, used for receiving a data packet sent by a matching first processing unit, wherein the data packet includes header data;
[0022] A target sending direction determination module, used to determine the target sending direction according to the packet header data;
[0023] a data packet sending module, configured to send the data packet to the first network node along the target sending direction, so that the first network node sends the data packet to the second processing unit when receiving the data packet;
[0024] a data receiving module, configured to receive the data sent by the first processing unit in the continuous sending mode if the sending mode is determined to be the continuous sending mode according to the header data of the data packet;
[0025] The data sending module is used to send the data to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data.
[0026] In a fifth aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the on-chip network data transmission method for multiple cores as described in any one of the embodiments of the present invention is implemented.
[0027] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-core on-chip network data transmission method as described in any one of the embodiments of the present invention.
[0028] The embodiment of the present invention solves the problem in the prior art that when sending a data packet, the flag bits of all receiving nodes need to be added, which greatly increases the number of bits in the packet header and leads to increased consumption of transmission resources. The packet header of the sent data packet can be reduced, and only the data itself is sent, which can reduce the amount of transmitted data, reduce the transmission cost of the packet header, reduce the number of memory accesses, reduce power consumption, reduce transmission costs, and improve transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1a It is a flow chart of a multi-core on-chip network data transmission method in Embodiment 1 of the present invention;
[0030] Figure 1b is a schematic diagram of a network on chip topology structure in Embodiment 1 of the present invention;
[0031] Figure 1c is a schematic diagram of a node structure in Embodiment 1 of the present invention;
[0032] Figure 1d It is a schematic diagram of a data transmission process in the prior art;
[0033] Figure 1e is a schematic diagram of a data transmission process in Embodiment 1 of the present invention;
[0034] Figure 2a It is a flow chart of a multi-core on-chip network data transmission method in Embodiment 2 of the present invention;
[0035] Figure 2b This is a schematic diagram of identification information of a target sending direction in Embodiment 2 of the present invention;
[0036] Figure 3a It is a flow chart of a multi-core on-chip network data transmission method in Embodiment 3 of the present invention;
[0037] Figure 3b is a schematic diagram of an application scenario of data transmission in Embodiment 3 of the present invention;
[0038] Figure 3c is a schematic diagram of an application scenario of data transmission in Embodiment 3 of the present invention;
[0039] Figure 4 is a flow chart of a multi-core on-chip network data transmission method in Embodiment 4 of the present invention;
[0040] Figure 5 It is a structural schematic diagram of a multi-core on-chip network data transmission device in Embodiment 5 of the present invention;
[0041] Figure 6 It is a structural schematic diagram of a multi-core on-chip network data transmission device in Embodiment 6 of the present invention;
[0042] Figure 7 It is a structural diagram of a computer device in Embodiment 7 of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0044] Embodiment 1
[0045] Figure 1a This is a flowchart of a multi-core on-chip network data transmission method in the first embodiment of the present invention. This embodiment is applicable to the case of using an on-chip network for data transmission. The method can be executed by the multi-core on-chip network data transmission device provided by the embodiment of the present invention. The device can be implemented in software and / or hardware and can generally be integrated into a computer device, specifically in the first network node of the on-chip network. Figure 1a As shown, the method of this embodiment includes:
[0046] S110, receiving a data packet from a first direction.
[0047] Data packets are used to transmit data between nodes in an on-chip network. Data packets are data units for transmission. Usually, data packets include a packet header and a packet body. The packet header is used to include control information, to provide information such as transmission protocol and data identification information, and to indicate that the data packet is accurately sent to the receiver and the receiver obtains the data. The packet body may refer to the data that the network node needs to obtain. In any embodiment of the present invention, data refers to the packet body.
[0048] S120, determining a target sending direction according to the header data of the data packet, and sending the data packet along the target sending direction.
[0049] The packet header data is used to determine the sending direction of the data packet. The sending direction is recorded in the packet header, and the sending direction can be determined by extracting data from the packet header.
[0050] The number of target sending directions may be multiple. The target sending direction may include: a sending direction corresponding to an adjacent network node or a sending direction corresponding to a matching processing unit. Sending a data packet along the target sending direction may mean sending the data packet from the first network node to an adjacent network node or a matching processing unit.
[0051] The on-chip network is composed of multiple nodes. Each node is connected to a corresponding processing unit (e.g., core). The core may be a processing unit including specific functional units such as a storage unit, a computing unit, and a transmission control unit. The data received by the node may be sent to the core for processing. At the same time, each node is connected to at least one node, and the node may transmit data to at least one connected node. The data to be sent refers to data transmitted between two nodes. The data to be sent may refer to data transmitted between a sending node and a receiving node, wherein the number of receiving nodes is at least one.
[0052] The topology of the on-chip network refers to the arrangement of network nodes and link channels, which determines the port structure of the nodes in the on-chip network. The topology can be a two-dimensional topology, including a ring, mesh or tree.
[0053] Optionally, the on-chip network has a two-dimensional network structure.
[0054] The two-dimensional network structure may be composed of two lines in perpendicular directions. The line in the first direction may be a horizontal line (a line parallel to the ground), and the line in the second direction may be a vertical line. Alternatively, the first direction and the second direction are neither horizontal nor vertical. The configuration may be based on actual conditions, and the embodiments of the present invention do not impose any specific restrictions on this.
[0055] For example, the two-dimensional grid is as follows: Figure 1bAs shown, the network on chip includes multiple nodes (n), and each node is connected to a corresponding core (C). In the two-dimensional grid topology, the nodes and are arranged in a two-dimensional grid in the two-dimensional plane in turn along the X direction and the Y direction, and each node is connected to the adjacent nodes through the link channel in the X direction and the Y direction. Among them, a two-dimensional coordinate system can be established based on the two-dimensional grid, and the address of the node is the two-dimensional coordinate in the two-dimensional grid, and the two-dimensional coordinate includes a first direction coordinate x and a second direction coordinate y. Among them, the absolute values of x and y are respectively greater than or equal to 0, the absolute values of x and y represent the propagation distance, and the symbol represents the propagation direction. The transmission process of the data packet is the process in which the absolute values of x and y decrease or remain unchanged (always remain 0). x and y can be set arbitrarily according to the relative position in the network on chip, and the embodiment of the present invention does not limit this.
[0056] By configuring the topology of the on-chip network as a two-dimensional grid, the structure of the on-chip network can be simplified, compiler mapping can be facilitated, the algorithm of the communication path in the on-chip network can be simplified, and the chip area of the on-chip network can be reduced, thereby reducing the cost of many cores.
[0057] For ease of understanding, a two-dimensional grid structured network on chip is used as an example below.
[0058] Exemplarily, the structure of node n5 of the on-chip network that executes the on-chip network data transmission method of many cores is as follows: Figure 1c As shown. The queue is used to receive data requests from other nodes n or cores c, and store data packets associated with the data requests according to the arbitration results. One queue represents a virtual channel. The status register is used to control the on-off, for example, to select which queue (b1, b2, b3 or b4, etc.) the data in for data transmission, that is, to select which virtual channel and which physical channel the communication link is connected to. The arbitration module is connected to the queues of other nodes and the queues of the core. The arbitration module is used to arbitrate the received data, determine the transmission order of the data, and instruct the queue to store the data in the transmission order. In addition, the node structure may also include a routing request module, which is connected to other nodes n or cores c, and a routing request module is connected to an arbitration module. The routing request module is used to receive data requests from other connected nodes n or cores c and send them to the arbitration module for arbitration.
[0059] The switching module is used to control data exchange. For example, a data packet can be sent to other nodes n or cores c through the switching module. Exemplarily, the queue can refer to a first-in first-out queue (FIFO). The FIFO queue does not classify messages, but allows messages to enter the queue in the order in which they arrive at the interface, and adopts a best-effort forwarding mode, so that when the transmission data sent by the node is congested, the data packet can be sent accurately according to the received timing, thereby achieving congestion management.
[0060] S130: If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data received from the first direction in the continuous sending mode is sent along the target sending direction.
[0061] The continuous transmission mode may mean that, when the first data packet is transmitted, the subsequent data packets in the same direction may only transmit the packet body without transmitting the packet header. The data in the first direction may refer to the packet body.
[0062] The data received from the first direction in the continuous transmission mode has the same source direction and target transmission direction as the data packet in the first direction. Optionally, the packet header associated with the data received from the first direction in the continuous transmission mode is the same as the packet header in the data packet in the first direction.
[0063] The continuous sending mode can be used to continuously send a packet body in the target sending direction of the adjacent previous packet body or data packet, thereby saving the need to repeatedly transmit the packet header of the data to be sent.
[0064] Optionally, the data packets in the first direction include data packets sent by an adjacent network node, or data packets sent by a processing unit matching the first network node.
[0065] The first network node may include an intermediate node, a destination node or a master data node. The data packet received by the intermediate node or the destination node is a data packet sent by an adjacent network node. The data packet received by the master data node is a data packet sent by a processing unit matched with the master data node. The network on chip is composed of multiple nodes. Each node is respectively connected to a matching processing unit. The processing unit may be a core. The data received by the node may be sent to the processing unit for processing. At the same time, each node is connected to at least one node, and the node may transmit a data packet to at least one connected node.
[0066] Optionally, the multi-core on-chip network data transmission method further includes: recording the target sending direction; sending the data from the first direction received in the continuous sending mode along the target sending direction, including: when receiving the data from the first direction, obtaining the target sending direction, and sending the data along the target sending direction.
[0067] The target sending direction is recorded so as to directly send the data along the target sending direction when data not including the packet header is received from the same first direction.
[0068] By recording the target sending direction and directly sending data along the target sending direction upon receiving data from the same first direction, transmission errors in the continuous sending mode can be reduced and the accuracy of data transmission can be improved.
[0069] Optionally, the multi-core on-chip network data transmission method further includes: when stop identification information is detected, stopping the continuous sending mode and resetting the target sending direction.
[0070] The stop identification information is used to determine whether the data is the last data to be continuously transmitted in the continuous transmission mode. The stop identification information is also used to determine whether the transmission mode of the adjacent next data packet is different from the transmission mode of the current data or data packet. Among them, the data packet or data can be configured with stop identification information, and the stop identification information can be sent together with the data or data packet. Resetting the target transmission direction is used for the data packet to be subsequently transmitted to redetermine the target transmission direction according to the packet header. Resetting the transmission status information is also used to redetermine the transmission mode of the adjacent next data packet according to the next arbitration, thereby improving the transmission accuracy of the adjacent next data packet.
[0071] The continuously transmitted data or data packet is the last one, indicating that the sending method of the next adjacent data packet is different from the sending method of the current data or data packet, so that the header of the next adjacent data packet is different from the header of the current data or data packet. At this time, the transmission of the last continuously sent data is completed, and a new header needs to be resent to instruct the network node to correctly transmit the next adjacent data packet.
[0072] The continuously transmitted data or data packet is not the last one, indicating that the sending method of the next adjacent data is the same as that of the current data or data packet, so that the header of the next adjacent data packet is the same as that of the current data or data packet, and the previous header or the header of the first data packet can be continuously used without resending a new header.
[0073] When the stop identification information is detected, it is determined that the last continuously sent data or data packet in the continuous sending mode has been transmitted, and the target sending direction is reset, thereby reducing transmission errors caused by continuing to use the target sending direction and improving data transmission accuracy.
[0074] Optionally, the first network node is configured with a status register matching the first direction, the status register including identification information matching each sending direction, wherein recording the target sending direction includes: setting the identification information matching the target sending direction to 1, and setting the identification information of the non-target sending direction to 0, wherein obtaining the target sending direction includes: determining the sending direction with identification information of 1 as the target sending direction.
[0075] The status register is also used to store the identification information of the sending direction and control the opening and closing of the channels corresponding to each sending direction. The identification information is used to correspond to the sending direction and determine the channel corresponding to the turned-on sending direction, that is, the data packet or data can be transmitted along the sending direction in the turned-on channel.
[0076] The identification information of the target sending direction match is set to 1, and the identification information of the non-target sending direction match is set to 0. The target sending direction and the non-target sending direction can be quickly and easily distinguished through two numbers, which is conducive to quickly determining the target sending direction when sending data later, improving the efficiency of obtaining the target sending direction, and at the same time simplifying the process of distinguishing the target sending direction and improving the accuracy of data transmission.
[0077] Optionally, determining the sending mode as a continuous sending mode based on the header data of the data packet includes: obtaining continuous sending identification information that matches the data packet; if the continuous sending identification information is determined to be first continuous sending identification information, determining the sending mode to be a continuous sending mode.
[0078] The continuous transmission identification information is used to determine whether the transmission mode is a continuous transmission mode. The second continuous transmission identification information is used to determine whether the transmission mode is a discontinuous transmission mode. The first continuous transmission identification information is used to determine whether the transmission mode is a continuous transmission mode. Optionally, if it is determined that the continuous transmission identification information is the second continuous transmission identification information, the transmission mode is determined to be a discontinuous transmission mode;
[0079] Exemplarily, in the discontinuous transmission mode, a data packet is received, a target transmission direction is determined based on the header data of the data packet, and the data packet is sent along the target transmission direction; and data received from the first direction is discarded.
[0080] In the related art or in the discontinuous transmission mode, data transmission between nodes of the on-chip network, or data transmission between a node and a core is transmitted in units of data packets, such as Figure 1d Each transmission needs to carry packet header information, where the packet body includes the data to be sent.
[0081] In the multi-core on-chip network data transmission method according to the embodiment of the present invention, in the continuous transmission mode, the packet header information may be transmitted only once, that is, the data packet is transmitted for the first time, and in subsequent transmissions, only the packet body is transmitted without repeatedly sending the packet header, such as Figure 1e As shown, the number of times the packet header is sent during the transmission process is reduced. Among them, the multiple data that can be transmitted continuously are usually data with the same transmission method, exemplarily, data with the same transmission direction, transmission destination, and packet header information, and the same transmission method as the first data packet transmitted during the continuous transmission process.
[0082] In the related art, the main data sending node adds flag information to the header of the data packet it needs to send, wherein the main data sending node is actually the first sending node, and the flag is used to indicate which specific destination nodes the data packet needs to be sent to, and then the main data sending node sends the data packet to the intermediate node connected to itself, and the intermediate node sends the data packet to the destination node directly or through other intermediate nodes. In this process, firstly, the data packet needs to increase the number of additional header bits, and the number of destination nodes is the same as the number of added flag bits. For example, in a multi-core chip composed of one thousand processing units, each processing unit may send data to any other processing unit, then the header will increase the flag bits of all other processing units except itself, and the header transmission cost and the resources consumed by the header generation are relatively large; secondly, the network node is configured with a storage area for storing the addresses of all possible destination nodes to which this network node may transmit. For example, in a many-core chip consisting of one thousand processing units, a network node transmits the received data packet to one hundred destination processing units. The network node needs to store the addresses of the destination nodes corresponding to the one hundred processing units, resulting in high storage costs and huge consumption of storage resources for the network node. In the entire many-core chip, there are multiple network nodes, and correspondingly, the storage resources are even larger. Thirdly, the network node needs to transmit additional packet header information, which will bring additional transmission efficiency loss. At the same time, the network node needs to query the address of the destination node to be transmitted according to the transmission flag of the received data packet, and then repackage the address and data and send it out, thereby increasing the additional query and packaging power consumption. Finally, the network node is the additional path that needs to be taken when the data packet is transmitted to certain destinations, which will greatly reduce the routing efficiency, increase the time for data delivery, and increase the power consumption consumed by data transmission.
[0083] In order to solve the above problems, when the sending mode is the same, only the data packet is sent at the first transmission, and only the received data is transmitted in the subsequent transmission process, and the packet header is no longer sent repeatedly, that is, only the first data packet has a long packet header. This can greatly reduce the number of packet header transmissions, reduce the packet header transmission cost and the resources consumed by the packet header generation, reduce the storage resource consumption of the node address, and reduce the loss of transmission efficiency. At the same time, it reduces the query power consumption and packaging power consumption of the multicast node, reduces the number of transmission steps, improves the routing efficiency, reduces the data delivery time, and reduces the power consumption consumed by data transmission.
[0084] The embodiment of the present invention, after sending a data packet, only sends the data subsequently received in the same sending direction as the data packet in a continuous sending mode, and no longer needs to send the packet header data, thereby solving the problem in the prior art that when sending a data packet, the flag bits of all receiving nodes need to be added, which greatly increases the number of bits in the packet header and leads to increased transmission resource consumption. The packet header of the sent data packet can be reduced, and only the data itself is sent, which can reduce the amount of transmitted data, reduce the transmission cost of the packet header, reduce the number of memory accesses, reduce power consumption, reduce transmission costs, and improve transmission efficiency.
[0085] Embodiment 2
[0086] Figure 2a This is a flow chart of a multi-core on-chip network data transmission method in Embodiment 2 of the present invention. This embodiment is specific based on the above embodiment. The method of this embodiment includes:
[0087] S210, receiving a data packet from a first direction, where the number of the first directions is multiple.
[0088] For details not described in detail in the embodiments of the present invention, reference may be made to the aforementioned embodiments.
[0089] Receiving multiple data packets in the first direction. In the embodiment of the present invention, for a certain direction in the first network node, a queue matching the direction will receive data packets from different directions, that is, multiple data packets in the first direction.
[0090] The first direction refers to the direction in which data or data packets are received, and the transmission direction refers to the direction in which data or data packets are sent.
[0091] For example, a node is connected to other nodes through a physical channel. On the node, each physical channel is configured with a direction. Since the physical channel matches the queue, it can be understood that the queue matches the direction. Figure 2bAs shown, the directions include: east, south, west, north, and processing unit. The directions of the queue matching the west may include east, south, north, and processing unit. In addition, the direction may be set according to the structure of the network on chip, and this is not specifically limited in the embodiment of the present invention. In addition, the direction may be identified by a string, for example, E (east), S (south), W (west), N (north), and C (processing unit).
[0092] S220, determining a target sending direction according to the header data of the data packet.
[0093] S230, obtaining at least one data packet that matches the target sending direction.
[0094] In the same time period or at the same time, there are multiple data or data packets with different sources and the same sending direction. The at least one data packet with a target sending direction matching may refer to multiple data packets with different sources and the same sending direction in the same time period or at the same time.
[0095] The different sources may refer to different ports receiving the data or data packets, or different network nodes sending the data or data packets to the first network node.
[0096] A data packet may have at least one sending direction, from which at least one target sending direction may be determined, and for each target sending direction, data packets that need to be sent along the target sending direction may be obtained respectively.
[0097] S240, arbitrating the sending order of each of the matched data packets to generate sending direction arbitration information matching the target sending direction, wherein the sending direction arbitration information includes the sending order of each of the matched data packets in the target sending direction.
[0098] There are multiple data packets along the same target transmission direction, which can be sent in sequence. The transmission direction arbitration information is used to determine the transmission order of each data packet in the matching target transmission direction among the data packets sent to the same transmission direction, and is used to determine when to transmit each data packet to the transmission direction.
[0099] According to the sending direction arbitration information, it can be determined that at a certain moment the data packet in the first direction can be output to the matching target sending direction. On this basis, the data in the first direction can be continuously transmitted in the same manner, while the packet header is not transmitted, thereby reducing the number of packet header transmissions.
[0100] Optionally, the first network node is configured with a status register matching the first direction, the status register including identification information matching each sending direction, the identification information matching the target sending direction is set to 1, the identification information matching the non-target sending direction is set to 0, and the sending direction with identification information being 1 is determined as the target sending direction.
[0101] For example, Figure 1c The status register in the Figure 2b The sending direction and the identification information corresponding to each sending direction are shown. If the identification information corresponding to the sending direction is 1, the sending direction is determined to be the target sending direction, and it is indicated that the status register controls the communication link between the queue where the data packet and / or data is located and the output channel corresponding to the target sending direction, so that the switching module can take the data packet and / or data out of the queue and output it from the output channel corresponding to the target sending direction to achieve output from the target sending direction.
[0102] According to the transmission direction arbitration information, it can be determined that at a certain moment, the data packet can be output to the matching target transmission direction. At this time, the identification information of the target transmission direction in the corresponding modification status register is changed. The subsequent network node can determine that at this time, the input channel corresponding to the data is connected to the output channel corresponding to the matching target transmission direction. Therefore, on this basis, the data sent in the same way can be continuously transmitted without transmitting the packet header, thereby reducing the number of packet header transmissions.
[0103] A data packet has multiple sending directions, and one sending direction corresponds to one virtual channel. Data packets can be transmitted to multiple sending directions at the same time, or they can be transmitted to one sending direction at the same time.
[0104] S250: Send the data packet according to the sending direction arbitration information.
[0105] The sending order of the data packets in the first direction is determined according to the sending direction arbitration information, and the data packets in the first direction are sent at a time matching the sending order.
[0106] Optionally, sending the data packet according to the sending direction arbitration information includes: acquiring at least one queue; storing each of the matching data packets in the queue in sequence according to the sending direction arbitration information, the queue being a first-in-first-out queue; sending the data packets in the queue in sequence, and sending the data packets in the order of the data packets.
[0107] The queue is used to store received data packets and / or data, as well as to store sent data packets and / or data. The order in which the data packets and / or data to be sent in the queue are stored matches the arbitration information of the sending direction. Usually, when data transmission requests sent from multiple directions are received at the same time, it is necessary to arbitrate the processing order of each request, and according to the priority in the arbitration result, the matching data to be sent in each direction are put into the queue in turn, and responded to in turn.
[0108] The FIFO queue is used to output data in sequence according to the input order, that is, the data that enters the FIFO queue first is popped out of the FIFO queue first and sent to the target sending direction, so as to realize the transmission of each data packet in sequence according to the arbitration result. When it is the turn of the data packet in the first direction, the data packet in the first direction is sent.
[0109] As in the previous example, the queue is used to receive data requests from other nodes n or processing units c, arbitrate multiple received data requests, and put the to-be-sent data to be transmitted of each data request into the queue in the order of transmission according to the arbitration result.
[0110] By configuring the FIFO queue, data packets are cached in sequence according to the sending direction arbitration information, and when sending data packets, the data packets are sent according to the cached data. Each data packet can be output in sequence according to the order specified by the sending direction arbitration information, thereby improving the accuracy of data packet transmission.
[0111] S260: If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data received from the first direction in the continuous sending mode is sent along the target sending direction.
[0112] Optionally, the queue includes multiple virtual channels, wherein the virtual channel may be a buffer, and the method further includes: determining a target virtual channel in the queue that matches the target data packet in the target sending direction; wherein the data from the first direction received in the continuous sending mode is sent along the target sending direction, comprising: storing the target data in the target virtual channel and sending it along the target sending direction, wherein the target data packet and the target data are data sent in the same first direction.
[0113] In the process of data packet and / or data transmission, the target virtual channel is actually sent to the adjacent network node or processing unit in the matching time period. A queue is configured for each direction, and multiple virtual channels are configured in each queue. The virtual channel is a FIFO queue. The virtual channel can be understood as a queue divided into multiple sub-queues.
[0114] The data of the same transmission mode is stored in the virtual channel where the data packet of the same transmission mode is located, so that the data can be directly transmitted after the data packet is subsequently transmitted. The transmission mode of the target data packet is the same as the transmission mode of the target data, including that the first direction of the target data packet is the same as the first direction of the target data, and the target transmission direction of the target data packet is the same as the target transmission direction of the target data.
[0115] The target data packet is stored in the target virtual channel in the matching queue, and when receiving data subsequently, the target data with the same transmission mode is also stored in the target virtual channel. Usually, multiple target data are adjacent to the target data packet, that is, there is no data and / or data packet with different transmission modes between the target data packet and the target data.
[0116] By configuring a queue, configuring a target virtual channel in the queue, querying and obtaining a target virtual channel that matches a target data packet, and storing target data in the same sending mode in the target virtual channel, the target data can be accurately and continuously sent after the target data packet is sent.
[0117] Exemplarily, the arbitration algorithm may refer to a polling priority algorithm. For example, for each output virtual channel, an initial priority is pre-assigned to each matching input virtual channel, and an input virtual channel with the highest priority is selected from the input virtual channels with transmission requests for subsequent routing processing. The priority of the input virtual channel that successfully arbitrates is reduced to the lowest, and the relative order of the priorities of other input virtual channels remains unchanged, and so on. For example, the first direction corresponding to the output virtual channel is east, and the sending directions corresponding to the input virtual channel include south, north, west and processing unit. Among them, the sending direction with the highest priority is west, then a communication connection is established between the input virtual channel in the west direction and the output virtual channel in the east direction, or, a communication link is connected between the input virtual channel in the west direction and the output virtual channel in the east direction, and the data packets and data received by the input virtual channel in the west direction are output through the output virtual channel in the east direction.
[0118] The arbitration method can accurately determine the order in which data packets and / or data are output to each transmission direction, increase the transmission control transmission mode of each data to be sent, and improve the flexibility of the transmission control transmission mode.
[0119] Sending a data packet actually determines the time or time period for transmitting the data packet according to the sending direction arbitration information, and transmits the data packet at that time or time period. If data is received, the data is transmitted at that time or time period.
[0120] In the prior art, each sending direction of each data packet needs to be arbitrated. With the multi-core on-chip network data transmission method of the embodiment of the present invention, data that does not need to send a packet header can be directly output according to the identification information of the target sending direction, and the arbitration method is omitted to determine whether it can be output to the target sending direction, which can reduce the number of arbitrations, reduce arbitration power consumption, and reduce arbitration costs. Among them, data that does not need to send a packet header is sent in the same way as the adjacent previous data or data packet.
[0121] In a specific example, the packet header of node n0 is shown in Table 1 below:
[0122] Table 1
[0123] Continuously send identification information Send persistent identification information … 1 1 …
[0124] Among them, the continuous transmission identification information is used to identify whether it is a continuous transmission (burst) mode. Exemplarily, the continuous transmission identification information can be represented by a pre-configured string, and the embodiment of the present invention does not impose specific restrictions on this. When the continuous transmission identification information is 1, it indicates that the transmission mode includes the burst mode; when the continuous transmission identification information is 0, it indicates that the transmission mode does not include the burst mode. In the burst mode, data packets with the same transmission mode do not need to send a packet header, and transmit data in the form of a packet body, and no arbitration is required. The continuous transmission identification information is used to identify whether the data is the last data in the burst mode. Exemplarily, the continuous transmission identification information can be represented by a pre-configured string. When the continuous transmission identification information is 1, it indicates that the data is the last data in the burst mode; when the continuous transmission identification information is 0, it indicates that the data is not the last data in the burst mode. In addition, the data is attached with stop identification information, such as 1, which indicates that the data is the last data in the burst mode; if the data does not have stop identification information, it indicates that the data is not the last data in the burst mode.
[0125] The embodiment of the present invention records the target sending direction and sends the data along the target sending direction through the pre-recorded target sending direction of the data packet, omitting the arbitration method to determine whether the data can be output in the target sending direction. When the target sending direction of the data is the same as the sending method of the adjacent previous data or data packet, such as the sending direction, the data can be directly transmitted in the target sending direction, which can reduce the number of arbitration times, reduce arbitration power consumption, reduce arbitration costs, and improve data packet transmission efficiency.
[0126] Embodiment 3
[0127] Figure 3aThis is a flow chart of a multi-core on-chip network data transmission method in Embodiment 3 of the present invention. This embodiment is specific based on the above embodiment. The method of this embodiment specifically includes:
[0128] S310, receiving a data packet from a first direction.
[0129] For details not described in detail in the embodiments of the present invention, reference may be made to the aforementioned embodiments.
[0130] S320: If it is determined that the packet header data includes multicast packet header data, a propagation direction toward a processing unit matched with the first network node is determined as a target sending direction.
[0131] The number of target sending directions can be any integer greater than or equal to 0.
[0132] S330: If, based on the multicast packet header data, it is determined that there is at least one propagation direction with a relative displacement, each of the propagation directions is determined as a target sending direction; wherein the relative displacement is used to characterize the propagation distance of the data packet in the propagation direction.
[0133] The multicast header data is used to transmit the data packet in a multicast manner. The multicast header data may have various forms. For example, the multicast header data may be configured in the header of the data packet. For example, it may be a flag bit in the header configuration information of the data packet. Optionally, when the flag bit exists or is 1, it may be understood that the data packet includes the multicast header data. When the flag bit does not exist or is 0, it may be understood that the data packet does not include the multicast header data. Exemplarily, the multicast header data is configured in the header of the data packet.
[0134] The first network node is a network node that receives a data packet. The processing unit matched with the network node is used to process the data packet, for example, to process the packet body according to the packet header.
[0135] In the multicast mode, the network node receiving the data packet and the data needs to transmit the data packet and the data to the propagation direction of the processing unit, and thus the propagation direction of the processing unit is the target sending direction. If it is determined that the packet header data includes multicast packet header data, the propagation direction of the processing unit matched to the first network node is determined as the target sending direction. Optionally, it is determined whether there is at least one propagation direction with relative displacement according to the multicast packet header data, and if so, the at least one propagation direction is determined as the target sending direction.
[0136] The sending mode may include unicast mode or multicast mode, etc. When the sending mode is multicast mode, the packet header is configured with multicast packet header data, that is, the data packet includes multicast packet header data, indicating that the data packet is sent to multiple network nodes in a multicast manner, which can avoid querying the multicast packet header data in a non-multicast mode, improve the efficiency of obtaining the multicast packet header data, and reduce power consumption.
[0137] It should be understood that a network node of an on-chip network may include at least one propagation direction, and the number of propagation directions of each network node is related to the topological structure of the on-chip network and the location of the on-chip network. The number of propagation directions of each network node on the same on-chip network may not be exactly the same.
[0138] The multicast packet header data can also be used to determine whether to continue forwarding the data packet. When the processing unit of the first network node receives the data packet, it is determined whether to continue forwarding the data packet, so that the data packet can be sent to the matching processing units of multiple network nodes on a multicast route, which can reduce the need for each network node to plan a multicast route, resulting in the situation where the data packet repeatedly passes through the same node, thereby reducing the number of steps for data transmission and improving data transmission efficiency.
[0139] The sending direction is used to determine the network node that receives the data packet. The sending direction may refer to the direction in which the data packet is transmitted. The first network node and the network node are arranged in the sending direction, indicating that the first network node and the network node are arranged in the on-chip network according to the position of the first network node in the on-chip network.
[0140] Among them, the propagation direction with relative displacement can be understood as the direction in which the data packet needs to be forwarded to other network nodes. The relative displacement is used to characterize the propagation distance of the data packet in the propagation direction. The propagation distance can be represented by the number of propagating network nodes. Exemplarily, the relative displacement in the x propagation direction is 2, which can be understood as the data packet needs to be forwarded to two network nodes along the x direction, and the two network nodes forward the data packet to their respective matching processing units.
[0141] The multicast packet header data may include a flag bit corresponding to each propagation direction, for example, a propagation direction whose flag bit is not 0 is a propagation direction in which a relative displacement exists, and the relative displacement is determined according to the multicast packet header data. The multiple propagation directions in the multicast packet header data may have different priorities, for example, including a first priority and a second priority, wherein the first priority may correspond to one propagation direction, and the second priority may correspond to multiple propagation directions. The propagation directions of different priorities may have different ways of judging whether there is a relative displacement, and the present disclosure does not limit this.
[0142] Optionally, the multicast packet header data includes directional order information, and the directional order information is used to determine the priority of the propagation direction, and the target sending direction includes a first sending direction; wherein, if it is determined according to the multicast packet header data that there is at least one propagation direction with a relative displacement, and each of the propagation directions is determined as the target sending direction, including: determining the first propagation direction with the highest priority according to the directional order information; if it is determined that there is a relative displacement in the first propagation direction, determining the first propagation direction as the first sending direction.
[0143] The direction order information is used to determine the priority of the propagation direction, for example, the x direction first, then the y direction; or the y direction first, then the x direction. The direction order information can be information pre-configured by the user, or default information in the on-chip network, etc., and can be adjusted as needed. The direction order information includes multiple propagation directions. Therefore, all propagation directions can be obtained according to the direction order information, and the propagation direction with the highest priority can be determined as the first propagation direction.
[0144] For example, the directional order information includes all propagation directions and the priority of each of the propagation directions. The order represented by the directional order information can be represented by priority, where the higher the priority, the higher the order; and the lower the priority, the lower the order.
[0145] Exemplarily, if the directional order information is the first direction (x direction) first and the second direction (y direction), that is, the first direction has the highest priority and the second direction has the lowest priority, then the first propagation direction is the first direction; if the directional order information is the second direction first and the first direction second, that is, the second direction has the highest priority and the first direction has the lowest priority, then the first propagation direction is the second direction.
[0146] Exemplarily, the x direction is the first propagation direction with the highest priority, and the relative displacement in this direction is 0. The y direction and the z direction have relative displacements respectively, among which the z direction has a higher priority, so the z direction can be determined as the first propagation direction of the first network node.
[0147] Relative displacement is used to determine the direction in which the data packet has not yet moved, that is, to determine the direction in which the data packet needs to continue to be transmitted. The relative displacement is not 0, that is, non-zero relative displacement. The direction in which the data packet has not yet moved indicates that the data packet needs to continue to be transmitted in that direction.
[0148] If there is a relative displacement in the first propagation direction, it indicates that the data packet needs to continue to be sent along the first propagation direction, so the first propagation direction can be determined as the first sending direction.
[0149] As in the previous example, the topological structure of the on-chip network is a two-dimensional grid. In the two-dimensional coordinate system established based on the two-dimensional grid, the address of the node is the two-dimensional coordinate in the two-dimensional grid, and the two-dimensional coordinate includes the first direction coordinate x and the second direction coordinate y. Taking the first network node as the coordinate origin, the absolute values of x and y represent the relative displacement, and the sign represents the sending direction. For each node, there are two propagation directions. Exemplarily, if the directional order information is the first direction (x direction) first and the second direction (y direction), the relative displacement associated with the directional order information is the relative displacement in the first direction; if the directional order information is the second direction first and the first direction, the relative displacement associated with the directional order information is the relative displacement in the second direction.
[0150] By configuring the direction order information and determining a first propagation direction, when there is a relative displacement in the first propagation direction, the first sending direction is determined. When there are multiple propagation directions, the first sending direction can be accurately determined, thereby improving the accuracy of data packet transmission.
[0151] Optionally, the multicast packet header data includes parallel direction information, and the parallel direction information is used to determine whether to send the data packet in a second propagation direction, the second propagation direction is a propagation direction other than the first propagation direction, and the target sending direction includes the second sending direction; wherein, if, according to the multicast packet header data, it is determined that there is at least one propagation direction with a relative displacement, and each of the propagation directions is determined as the target sending direction, including: determining the concurrent identification information of the first network node according to the parallel direction information; if it is determined that the concurrent identification information is the first concurrent identification information, then using the second propagation direction as the second sending direction.
[0152] The parallel direction information is used to determine the sending direction other than the first sending direction, for example, to determine the network node that receives the data packet other than the node of the first sending direction. The parallel direction information may include information on the transmission path in the first sending direction for each node that needs to transmit the data packet in parallel other than the first sending direction. The parallel direction information corresponds to the direction. Among the number of all directions configured in the on-chip network, except for the first sending direction determined by the direction order information, the remaining directions can be configured with parallel direction information. The parallel direction information corresponds to a direction other than the first sending direction, and different parallel direction information corresponds to different directions.
[0153] The concurrent identification information is used to determine whether the first network node needs to transmit the data packet in parallel to the propagation direction corresponding to the parallel direction information. The parallel direction information includes multiple concurrent identification information, and each concurrent identification information can correspond to a different network node. The concurrent identification information is used by the first network node to determine whether it is necessary to transmit the data packet in parallel to the direction corresponding to the parallel direction information. Among them, the corresponding rules between the concurrent identification information and the network nodes can be flexibly set. For example, each concurrent identification information in the parallel direction information corresponds to each network node in the first sending direction in sequence.
[0154] The concurrency identification information includes first concurrency identification information and second concurrency identification information. If the concurrency identification information is the first concurrency identification information, it indicates that a data packet needs to be transmitted in the direction corresponding to the concurrency identification information. If the concurrency identification information is the second concurrency identification information, it indicates that a data packet does not need to be transmitted in the direction corresponding to the concurrency identification information.
[0155] In some optional embodiments, each piece of concurrent identification information in the parallel direction information corresponds to each network node having a node number in sequence.
[0156] For example, the string 01100 of the parallel direction information for the y direction can be understood as network nodes 1, 4, 5 do not need to transmit data packets along the y direction, but network nodes 2, 3 need to transmit data packets along the y direction. It is sufficient as long as it can be determined whether the network node transmits data packets in the second propagation direction according to the parallel direction information.
[0157] In some optional embodiments, a concurrent identification cumulative value may be configured to determine the concurrent identification information corresponding to the first network node. Each parallel direction information is configured with a matching concurrent identification cumulative value, and the concurrent identification cumulative value is accumulated with the number of nodes transmitting the data packet. A step value is also configured, which may refer to the value of the concurrent identification cumulative value accumulated each time. Obtain the concurrent identification cumulative value that matches the parallel direction information, and query the concurrent identification information that matches the concurrent identification cumulative value in the parallel direction information to determine the concurrent identification information of the first network node in the direction that matches the parallel direction information. When modifying the multicast packet header data, calculate a concurrent identification cumulative value that matches the parallel direction information, and the sum of the step value, and replace the original concurrent identification cumulative value to generate multicast packet header data that matches the parallel direction information.
[0158] The concurrent identification cumulative value is used to determine the concurrent identification information in the parallel direction information, and is used to determine the order of the concurrent identification information, thereby determining the concurrent identification information.
[0159] Exemplarily, the parallel direction information is the string 01100 in the y direction, the concurrent identification cumulative value is 1, and the current concurrent identification information is the first character, that is, 0. The step value is 1, and when network node 1 transmits a data packet to network node 2, the concurrent identification cumulative value is updated to 1+1=2. In the multicast packet header data received by network node 2, the concurrent identification cumulative value is 2, and the concurrent identification information matched by network node 2 is the second character, that is, 1. Among them, the initial value of the concurrent identification cumulative value can be 1, for example, the concurrent identification cumulative value of the master data node is 1.
[0160] The second sending direction is different from the first sending direction, and the second sending direction is used to transmit data packets in parallel. The number of second sending directions is greater than or equal to 0. The sum of the number of first sending directions and the number of second sending directions is less than or equal to the number of all directions in the on-chip network. Among them, the second sending direction can be determined in parallel with the first sending direction. For example, after the first sending direction is determined, it is determined whether the multicast packet header data includes parallel direction information, and whether there is a second sending direction based on the parallel direction information. For another example, the method for determining the first sending direction and the method for determining the second sending direction are independent of each other and do not affect each other. It can be set according to actual conditions, and the embodiments of the present invention do not impose specific restrictions on this. The method for determining the first sending direction can refer to the description of the aforementioned embodiment.
[0161] The direction order information determines the direction with the highest priority, that is, the first sending direction, and the parallel direction information determines the directions other than the first sending direction. The parallel direction information corresponds to the second sending direction, and the number of parallel direction information can be equal to the number of second sending directions. If there is no parallel direction information, it is determined that there is only one first sending direction, and if the relative displacement of the first sending direction is 0, the forwarding of the data packet is terminated.
[0162] In some optional embodiments, the first network node has at least one second transmission direction and no first transmission direction. For example, the x direction is the first transmission direction with the highest priority, the relative displacement in this direction is 0, the y direction and the z direction are the second transmission directions, and each has a relative displacement, then it can be determined that the first network node has two second transmission directions.
[0163] By acquiring parallel direction information, the second sending direction in which the data packet currently needs to be sent can be determined, so that multiple target sending directions can be accurately determined, the accuracy of on-chip network data transmission can be improved, and data can be transmitted in parallel at the same time to improve the transmission efficiency of the multicast mode.
[0164] S340, sending the data packet along the target sending direction.
[0165] Optionally, sending the data packet along the target sending direction includes: modifying the multicast packet header data in the data packet to form a data packet matching each of the target sending directions; and sending the data packet matching each of the target sending directions along each of the target sending directions.
[0166] The multicast packet header data includes the target sending direction of the current first network node. When the first network node sends the data to be transmitted to the network node, the network node becomes a new first network node. At this time, the target sending direction of the new first network node is different from the target sending direction of the previous first network node. Therefore, it is necessary to modify the multicast packet header data and replace the target sending direction of the previous first network node with the target sending direction of the new first network node to improve the accuracy of the target sending direction of the new first network node. In the multicast mode, the first network node needs to transmit data packets to multiple network nodes, and the target sending direction corresponding to each network node is different. Therefore, the target sending direction corresponding to each network node can be re-determined according to the target sending direction corresponding to each network node, that is, the multicast packet header data corresponding to each target sending direction can be re-determined.
[0167] Exemplarily, the multicast packet header data may be copied into multiple pieces, the number of which is the same as the number of target sending directions. For each target sending direction, multicast packet header data matching the target sending direction is generated respectively.
[0168] The target sending direction of the processing unit in the first network node may not modify the multicast packet header data, and the first network node directly forwards the data packet to the processing unit.
[0169] By modifying the multicast packet header data for different target sending directions, matching data packets can be accurately generated for different target sending directions, so that the modified data packets can be sent along the respective matching target sending methods, thereby accurately realizing the multicast sending of data packets and realizing the sending of data packets to multiple network nodes on a multicast route at the same time, which can avoid the need for each network node to plan a multicast route, resulting in the situation where the data packet repeatedly passes through the same node, thereby reducing the number of data transmission steps and improving data transmission efficiency.
[0170] Optionally, the multicast packet header data is modified to generate a data packet matching the target sending direction, including: in the multicast packet header data, calculating the difference between the relative displacement matching the first sending direction and a set step size, and matching the distance between the network node and the first network node with the set step size; in the multicast packet header data, replacing the relative displacement matching the first sending direction with the difference to generate a data packet matching the first sending direction.
[0171] The difference between the relative displacement of the first transmission direction match in the multicast packet header data and the set step size is used as the new relative displacement of the first transmission direction match. The step size is the distance that the data packet is transmitted each time, usually in nodes, that is, the step size represents the number of nodes that the data packet moves at one time. Optionally, the step size is set to 1, which can be set as needed. The relative displacement of the first transmission direction match is replaced by the difference, indicating that the data packet has propagated the set step size along the first transmission direction.
[0172] For example, the relative displacement of the first transmission direction is 2, and the step size is set to 1, then the new relative displacement is 2-1=1. Exemplarily, the relative displacement is x=3, y=2. If the direction order information is x direction first and y direction second, the first network node sends the data packet to the adjacent node in the x direction, and the relative displacement is modified to x=3-1=2, y=2. In fact, the relative displacement of the target transmission direction other than the first transmission direction does not change; if the direction order information is y direction first and x direction second, the first network node sends the data packet to the adjacent node in the y direction, and the relative displacement is modified to x=3, y=2-1=1.
[0173] Among them, in the multicast mode, any node that needs to receive data can be used as the destination node, and the node with the farthest relative distance from the first network node of the main data is usually selected as the destination node. In addition, in the on-chip network, the position of the node can be adjusted, and optionally, the data stored in the two nodes can be exchanged to achieve the position adjustment of the node. Therefore, in the multicast mode, the scattered network nodes can be concentrated in a set area, and can be transmitted in parallel in multiple directions on a transmission line, which is convenient for the compiler mapping, thereby facilitating the transmission of data packets, reducing the number of transmission steps of data packets, and improving transmission efficiency.
[0174] In an optional example, the topology of the on-chip network is a two-dimensional grid, and the step size is set to 1, such as Figure 3b As shown in the figure, the data packet transmission line is a transmission line with only x direction. The data packet is sent from core C0 to core C1, core C2 and core C3. The specific process is: core C0 sends data to node n0, node n0 sends data to node n1, node n2 and node n3, and the corresponding node n sends data to core C.
[0175] The packet header of node n0 is shown in Table 2 below:
[0176] Table 2
[0177]
[0178] Among them, the sending mode information is used to identify the multicast mode. Exemplarily, the sending mode information can be represented by a pre-configured character string, and the embodiment of the present invention does not impose specific restrictions on this. When the sending mode information is 1, that is, the data packet includes multicast header data, it indicates that the sending mode is a multicast mode; when the sending mode information is 0, that is, the data packet does not include multicast header data, it indicates that the sending mode is a non-multicast mode, such as a unicast mode or a broadcast mode. The parallel direction information is used to determine whether to transmit data packets to other distributions in parallel on the basis of the first communication path. d1, d2, d3...dn, etc., represent the relative displacement of the i-1th (i is equal to 0 and less than or equal to n) step in the parallel direction.
[0179] The direction order information is used to determine the order of the target sending directions of the data packets. The correspondence between the order of each direction and the direction order information can be pre-configured according to all directions of the on-chip network. For example, the on-chip network is a two-dimensional grid, and the directions include the x direction and the y direction; when the direction order information is 1, it means the x direction comes first and the y direction comes second; when the direction order information is 0, it means the y direction comes first and the x direction comes second. For another example, the on-chip network is a three-dimensional grid, and the directions include the x direction, the y direction, and the z direction. When the direction order information is 0, it indicates that the direction order is x direction, y direction and z direction in sequence; when the direction order information is 1, it indicates that the direction order is x direction, z direction and y direction in sequence; when the direction order information is 2, it indicates that the direction order is y direction, x direction and z direction in sequence; when the direction order information is 3, it indicates that the direction order is y direction, z direction and x direction in sequence; when the direction order information is 4, it indicates that the direction order is z direction, x direction and y direction in sequence; when the direction order information is 5, it indicates that the direction order is z direction, y direction and x direction in sequence. In addition, there are other forms of topological results, corresponding to different configurations, which can be set according to actual conditions, and the embodiments of the present invention do not make specific restrictions on this.
[0180] dx represents the relative displacement of the match in the x direction; dy represents the relative displacement of the match in the y direction. dx and dy form a relative displacement, or a relative displacement vector, etc. One of dx and dy can have a non-zero constant.
[0181] The direction order information in the multicast packet header data is 1, and the relative displacement is dx=3, dy=0. The relative displacement can also be expressed as 30, and the correspondence between 30 and the direction in the relative displacement matches the direction order information, that is, 3 represents the relative displacement corresponding to the first direction in the direction order information, and 0 represents the relative displacement corresponding to the last direction in the direction order information. In addition, there are other representation methods, which are not specifically limited in the embodiments of the present invention.
[0182] When core C0 sends a data packet, the header of the data packet carries the relative displacement of core C3 relative to core C0: (3, 0), and the data packet is sent to the primary data first network node n0. When node n0 receives the data packet, the direction order information is 1, and the direction of the non-zero relative displacement match is the x direction, and the first sending direction is determined to be the x direction. According to the step size of 1, the relative displacement in the multicast header data of the packet header is changed from (3, 0) to (2, 0), and then sent to node n1. After node n1 receives the data packet, it will send the data packet to core C1. At this time, the first sending direction is the x direction, and the relative displacement in the multicast header data of the packet header is changed from (2, 0) to (1, 0), and then sent to node n2. Node n2 receives the data packet and sends the data packet to core C2. At this time, the first sending direction is the x direction, and the relative displacement in the multicast header data of the packet header is changed from (1, 0) to (0, 0), and then sent to node n3. Node n3 receives the data packet, sends it to core C3, and finds that the relative displacement is (0, 0), indicating that the first sending direction does not exist and the multicast ends.
[0183] By modifying the relative displacement of the first sending direction in the relative displacement of the multicast packet header data to instruct the network nodes, the propagation distance is re-determined according to the updated relative displacement, so that the multicast packet header data is continuously adjusted according to the transmission process of the data packet to ensure that each first network node can accurately transmit the data packet to the next network node, thereby improving the transmission accuracy of the data packet.
[0184] The multicast header data in the data packet is updated to form a new data packet that matches the target sending direction, and is sent to the matching network node in the target sending direction. In fact, the data packet is copied into multiple packets, and the multicast header data in each data packet is updated to the multicast header data that matches the target sending direction, forming a data packet that matches the target sending direction, and is sent to the network node that matches the target sending direction.
[0185] Optionally, the multicast packet header data is modified to generate a data packet matching the target sending direction, including: in the multicast packet header data, calculating the difference between the relative displacement matching the second sending direction and a set step size, the distance between the network node and the first network node matches the set step size, and the target sending direction is the second sending direction; in the multicast packet header data, the relative displacement matching the first sending direction is set to zero, the second sending direction is determined as the propagation direction with the highest priority, and the relative displacement matching the second sending direction is replaced by the difference to generate a data packet matching the second sending direction.
[0186] The relative displacement includes relative displacements respectively matched by multiple target sending directions. The modification method of the relative displacement can refer to the above-mentioned embodiment.
[0187] Exemplarily, the parallel direction information is a character string 01100 in the y direction, and the concurrency identification information of the first network node is the first character, that is, 0. The first network node does not need to send a data packet in the y direction.
[0188] The first network node needs to transmit the data packet to an adjacent network node in the second transmission direction, and the network node determines the target transmission direction of the data packet according to the multicast packet header data, wherein the multicast packet header data received by the network node is different from the multicast packet header data received by the first network node.
[0189] It can be understood that the adjacent network nodes of the first network node in the second sending direction are the same as the adjacent network nodes of the second network node in the first sending direction. In fact, the first network node receives the parallel direction information for determining whether the first network node needs to transmit a data packet to the second sending direction. If the parallel direction information received by the second network node is still used to determine whether the second network node needs to transmit a data packet to the first sending direction, at this time, the adjacent network node repeatedly receives the same data, thereby deleting the relative displacement matched in the first sending direction, or setting it to 0 to avoid repeatedly transmitting data to the same node. Accordingly, the relative displacement matched in the second sending direction is updated to the difference between the relative displacement matched in the second sending direction and the set step size. The relative displacements matched in other directions except the first sending direction and the second sending direction are updated to the relative displacements matched in the corresponding directions in the target second relative displacement queue.
[0190] Transmitting the data packet in the second transmission direction is equivalent to the relative displacement in the first transmission direction being 0, and the direction needs to be changed to continue transmitting the data packet.
[0191] By using parallel direction information and matching relative displacement, the relative displacement in the multicast header data is modified, and the data packet is transmitted in the second sending direction. The updated multicast header data can be sent to the adjacent network nodes in the second sending direction, instructing the adjacent network nodes to accurately continue to transmit the data packet in the second sending direction, which can avoid repeated transmission to the same node and improve the transmission accuracy of the data packet in the second sending direction. It should be understood that the adjacent network nodes in the second sending direction receive the data packet, determine the second sending direction as the first propagation direction with the highest priority according to the multicast header data, and the adjacent network nodes can determine whether to forward the data packet to other second propagation directions according to the multicast header data.
[0192] In an optional example, the topology of the on-chip network is a two-dimensional grid, and the step size is set to 1, such as Figure 3cAs shown, the data packet is sent from core C0 to core C1, core C2, core C3, core C5, core C6 and core C9, and the specific process is: core C0 sends data to node n0, node n0 sends data to node n1, node n2, node n3, node n5, node n6 and node n9, and the corresponding node n sends data to core C. Among them, node n0 is the first network node of the primary data, and node n1, node n2, node n3, node n5, node n6 and node n9 can be the aforementioned destination nodes.
[0193] The packet header of node n0 is shown in Table 3 below:
[0194] Table 3
[0195]
[0196] The direction order information in the multicast packet header data is 1, and the relative displacement is dx=3, dy=0.
[0197] When core C0 sends a data packet, the header of the data packet carries the relative displacement of core C3 relative to core C0: (3, 0), the cumulative value of the concurrent identifier is 1, and the parallel direction information, and the data packet is sent to the first network node n0 of the primary data. When node n0 receives the data packet, the direction order information is 1, which can be understood as the x-axis first and then the y-axis direction. The direction of the non-zero relative displacement match is the x-direction, and the first sending direction is determined to be the x-direction. At the same time, the cumulative value of the concurrent identifier is 1 or the node number is 0, so that the current concurrent identifier information in the parallel direction information is determined to be the first bit (the concurrent identifier information is the node number + 1 bit), that is, 0, indicating that node n0 does not need to transmit the data packet in parallel, that is, the second sending direction is empty. According to the step size of 1, the relative displacement in the multicast header data of the header is modified from (3, 0) to (2, 0), and the cumulative value of the concurrent identifier is modified from 1 to 2, the multicast header data is updated, and the modified multicast header data is used as the multicast header data matching the x-direction, and then sent to node n1.
[0198] After receiving the data packet, node n1 will send the data packet to core C1. At this time, the first sending direction is the x direction. At the same time, the current concurrent identification cumulative value is 2 or the node number is 1, so that the current concurrent identification information in the parallel direction information is determined to be the second bit, that is, 1, indicating that node n1 needs to transmit the data packet in parallel in the y direction at the same time, that is, the second sending direction is the y direction. Change the relative displacement in the multicast header data of the packet header from (2, 0) to (1, 0), and at the same time, the cumulative value of the concurrent identification is modified from 1 to 3, update the multicast header data, and use the modified multicast header data as the multicast header data matching the x direction, and then send it to node n2. Correspondingly, the second relative displacement queue corresponding to the current concurrent identification information is d2, that is, 2. First, the relative displacement in the multicast header data of the packet header is changed from (2, 0) to (0, 0), and then the difference between the value of d2 and the step size 1 is calculated, which is 1, and is determined as the relative displacement in the y direction in the relative displacement, so that the relative displacement is changed from (2, 0) to (0, 1) to update the multicast header data. In addition, there is no corresponding parallel direction information for non-x directions and non-y directions. The parallel direction information and the cumulative value of the concurrent identifier can be reset to empty, and the modified multicast header data is used as the multicast header data matching the y direction, and then sent to node n5.
[0199] After receiving the data packet, node n2 will send the data packet to core C2. At this time, the first sending direction is the x direction. At the same time, the current concurrent identification cumulative value is 3 or the node number is 2, so that the current concurrent identification information in the parallel direction information is determined to be the third bit, that is, 1, indicating that node n2 needs to transmit the data packet in parallel in the y direction at the same time, that is, the second sending direction is the y direction. Change the relative displacement in the multicast header data of the packet header from (1, 0) to (0, 0), and at the same time, the concurrent identification cumulative value is added by 1 and modified to 4, update the multicast header data, and use the modified multicast header data as the multicast header data matching the x direction, and then send it to node n3. Correspondingly, the second relative displacement queue corresponding to the current concurrent identification information is d3, that is, 1. First, the relative displacement in the multicast packet header data of the packet header is changed from (1, 0) to (0, 0), and then the difference between the value of d2 and the step size 1 is calculated, which is 0, and determined as the relative displacement in the y direction in the relative displacement, so that the relative displacement is changed from (1, 0) to (0, 0) to update the multicast packet header data. In addition, there is no corresponding parallel direction information for non-x directions and non-y directions. The parallel direction information and the cumulative value of the concurrent identifier can be reset to empty, and the modified multicast packet header data is used as the multicast packet header data matching the y direction, and then sent to node n6.
[0200] After receiving the data packet, node n3 sends the data packet to core C3. Node n3 finds that the relative displacement is (0, 0), indicating that the first transmission direction does not exist. At the same time, the current concurrent identification cumulative value is 4 or the node number is 3, so it is determined that the current concurrent identification information in the parallel direction information is the fourth bit, that is, 0, indicating that node n3 does not need to transmit data packets in parallel in the y direction at the same time, that is, the second transmission direction is empty. Both the first transmission direction and the second transmission direction are empty, and node n3 stops transmitting data.
[0201] After receiving the data packet, node n5 will send the data packet to core C5. At this time, the relative displacement is (0, 1) and the first sending direction is the y direction. The parallel direction information in the packet header is empty, and the cumulative value of the concurrent flag is empty. There is no second sending direction. The relative displacement in the multicast header data of the packet header is changed from (0, 1) to (0, 0), and the modified multicast header data is used as the multicast header data matching the y direction, and then sent to node n9.
[0202] After receiving the data packet, node n9 sends the data packet to core C9. At this time, the relative displacement is (0, 0), indicating that the first sending direction does not exist. At the same time, the parallel direction information in the packet header is empty, and the second sending direction does not exist. Both the first sending direction and the second sending direction are empty, and node n9 stops transmitting data.
[0203] After receiving the data packet, node n6 sends the data packet to core C6. At this time, the relative displacement is (0, 0), indicating that the first sending direction does not exist. At the same time, the parallel direction information in the packet header is empty, and the second sending direction does not exist. Both the first sending direction and the second sending direction are empty, and node n9 stops transmitting data. The multicast ends.
[0204] It should be noted that when the transmission direction changes, there is no other direction at this time, and only the parallel direction information can be reset to empty, and the concurrency flag cumulative value is no longer accumulated.
[0205] In some optional embodiments, each node has a corresponding number, and the parallel direction information may include a value corresponding to each node. For example, the 6th bit in the parallel direction information corresponds to node n6. When node n6 receives a data packet, it can query the value of the 6th bit in the parallel direction information, and determine whether there is a second sending direction based on the queried value. In this way, it is possible to determine whether the node has a second sending direction in a relatively simple manner. As mentioned above, there may be multiple propagation directions, for example, including M propagation directions, and M-1 parallel direction information can be set to respectively determine whether it is the second sending direction.
[0206] S350: If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data received from the first direction in the continuous sending mode is sent along the target sending direction.
[0207] The embodiment of the present invention can, when detecting the target sending direction and when detecting that the data packet includes multicast header data, send the data packet to a matching processing unit for corresponding processing, thereby multicasting the data packet including the multicast header data to the network node, and determining the propagation direction with relative displacement as the target sending direction. The target sending direction can be accurately determined, the accuracy of on-chip network data transmission can be improved, and the configuration of flag bits of all destination nodes in the packet header can be avoided. The packet header transmission cost and the resources consumed by the packet header generation can be reduced, the storage resource consumption of the node address can be reduced, and the transmission efficiency loss can be reduced. At the same time, the query power consumption and packaging power consumption of the multicast node are reduced, the number of transmission steps is reduced, the routing efficiency is improved, the data delivery time is reduced, and the power consumption consumed by data transmission is reduced.
[0208] Embodiment 4
[0209] Figure 4 This is a flowchart of a multi-core on-chip network data transmission method in Embodiment 4 of the present invention. This embodiment is applicable to the case of using an on-chip network for data transmission. The method can be executed by a multi-core on-chip network data transmission device provided by an embodiment of the present invention. The device can be implemented in software and / or hardware and can generally be integrated into a computer device, specifically in the second network node of the on-chip network. Figure 4 As shown, the method of this embodiment includes:
[0210] S410, receiving a data packet sent by a matching first processing unit, where the data packet includes header data.
[0211] For details not described in detail in the embodiments of the present invention, reference may be made to the aforementioned embodiments.
[0212] The second network node is a primary data node. The second network node obtains a data packet from the processing unit and forwards it to other network nodes. The processing unit is used to obtain source data and use it as a packet body, and to generate multicast header data to form a data packet and send it to the network node.
[0213] The second network node sends the data packet to the first network node in the aforementioned embodiment. In this case, the first network node is an intermediate node or a destination node.
[0214] The second network node corresponds to the first processing unit.
[0215] S420: Determine a target sending direction according to the packet header data.
[0216] S430: Send the data packet to the first network node along the target sending direction, so that the first network node sends the data packet to the second processing unit when receiving the data packet.
[0217] The first network node corresponds to the second processing unit. Since the second processing unit and the first processing unit cannot communicate directly, the first processing unit sends the data packet to the second processing unit through the second network node and the first network node.
[0218] S440: If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data sent by the first processing unit received in the continuous sending mode is sent.
[0219] When data not including a packet header is received, the data is directly forwarded to the first network node.
[0220] S450: Send the data to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data.
[0221] The embodiment of the present invention can reduce the header of the sent data packet by only sending the data in the same sending direction as the data packet in the continuous sending mode after sending the data packet, and no longer sending the header data. Only the data itself is sent, which can reduce the amount of transmitted data, reduce the transmission cost of the header, reduce the number of memory accesses, reduce power consumption, reduce transmission costs, and improve transmission efficiency.
[0222] Embodiment 5
[0223] Figure 5 Schematic diagram of a multi-core on-chip network data transmission device in Embodiment 5 of the present invention. Embodiment 5 is a corresponding device for implementing the multi-core on-chip network data transmission method provided in the above embodiments of the present invention, which can be implemented in software and / or hardware, and can generally be integrated into a computer device, specifically configured in a first network node.
[0224] The data packet receiving module 510 is used to receive data packets from a first direction;
[0225] The data packet sending module 520 is used to determine a target sending direction according to the header data of the data packet, and send the data packet along the target sending direction;
[0226] The data continuous sending module 530 is used to send the data from the first direction received in the continuous sending mode along the target sending direction if the sending mode is determined to be the continuous sending mode according to the header data of the data packet.
[0227] The embodiment of the present invention solves the problem in the prior art that when sending a data packet, the flag bits of all receiving nodes need to be added, which greatly increases the number of bits in the packet header and leads to increased consumption of transmission resources. The packet header of the sent data packet can be reduced, and only the data itself is sent, which can reduce the amount of transmitted data, reduce the transmission cost of the packet header, reduce the number of memory accesses, reduce power consumption, reduce transmission costs, and improve transmission efficiency.
[0228] Furthermore, the data continuous sending module 530 is used to: obtain continuous sending identification information matched by the data packet; if it is determined that the continuous sending identification information is the first continuous sending identification information, determine that the sending mode is the continuous sending mode.
[0229] Furthermore, the on-chip network data transmission device of the multiple processing units also includes: a target sending direction recording module, used to record the target sending direction; the data continuous sending module 530 is used to: when receiving data from the first direction, obtain the target sending direction and send the data along the target sending direction.
[0230] Furthermore, the on-chip network data transmission device of the plurality of processing units further includes: a continuous transmission mode stopping module, which is used to stop the continuous transmission mode and reset the target transmission direction when the stop identification information is detected.
[0231] Furthermore, the first network node is configured with a status register matching the first direction, and the status register includes identification information matching each sending direction, wherein the target sending direction recording module is used to: set the identification information matching the target sending direction to 1, and set the identification information of the non-target sending direction to 0, wherein the data continuous sending module 530 is used to: determine the sending direction with identification information of 1 as the target sending direction.
[0232] Furthermore, the data packet sending module 520 is used to: obtain at least one data packet that matches the target sending direction; arbitrate the sending order of each of the matched data packets to generate sending direction arbitration information that matches the target sending direction, the sending direction arbitration information including the sending order of each of the matched data packets in the target sending direction; and send the data packet according to the sending direction arbitration information.
[0233] Furthermore, the data packet sending module 520 is used to: obtain at least one queue; store each matching data packet in the queue in sequence according to the sending direction arbitration information, and the queue is a first-in-first-out queue; send the data packets in the queue in sequence, and send the data packets in the order of the data packets.
[0234] Furthermore, the queue includes multiple virtual channels, and the on-chip network data transmission device of the many-core processing unit also includes: a target virtual channel determination module, used to determine the target virtual channel of the target data packet in the target sending direction queue; wherein the data continuous sending module is used to: store the target data in the target virtual channel and send it along the target sending direction, wherein the target data packet and the target data are data sent in the same first direction.
[0235] Furthermore, the data packets in the first direction include data packets sent by adjacent network nodes, or data packets sent by a processing unit matching the first network node.
[0236] Furthermore, the data packet sending module 520 is used to: if it is determined that the packet header data includes multicast packet header data, then the propagation direction of the processing unit matched to the first network node is determined as the target sending direction; if it is determined based on the multicast packet header data that there is at least one propagation direction with a relative displacement, then each of the propagation directions is determined as the target sending direction; wherein the relative displacement is used to characterize the propagation distance of the data packet in the propagation direction.
[0237] Furthermore, the data packet sending module 520 is used to: modify the multicast packet header data in the data packet to form a data packet matching each of the target sending directions; and send the data packets matching each of the target sending directions along each of the target sending directions.
[0238] Furthermore, the multicast packet header data includes direction order information, and the direction order information is used to determine the priority of the propagation direction, and the target sending direction includes a first sending direction; the data packet sending module 520 is used to: determine the first propagation direction with the highest priority according to the direction order information; if it is determined that there is a relative displacement in the first propagation direction, then determine the first propagation direction as the first sending direction.
[0239] Furthermore, the multicast packet header data includes parallel direction information, and the parallel direction information is used to determine whether to send the data packet in a second propagation direction, the second propagation direction is a propagation direction other than the first propagation direction, the target sending direction includes the second sending direction, and the data packet sending module 520 is used to: determine the concurrent identification information of the first network node according to the parallel direction information; if it is determined that the concurrent identification information is the first concurrent identification information, then use the second propagation direction as the second sending direction.
[0240] The above-mentioned multi-core on-chip network data transmission device can execute any multi-core on-chip network data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the executed multi-core on-chip network data transmission method.
[0241] Embodiment 6
[0242] Figure 6 Schematic diagram of a multi-core on-chip network data transmission device in Embodiment 6 of the present invention. Embodiment 6 is a corresponding device for implementing the multi-core on-chip network data transmission method provided in the above embodiments of the present invention, which can be implemented in software and / or hardware, and can generally be integrated into a computer device, specifically configured in the second network node.
[0243] The data packet receiving module 610 is used to receive a data packet sent by a matching first processing unit, wherein the data packet includes header data;
[0244] A target sending direction determining module 620, configured to determine a target sending direction according to the packet header data;
[0245] The data packet sending module 630 is used to send the data packet to the first network node along the target sending direction, so that the first network node sends the data packet to the second processing unit when receiving the data packet;
[0246] The data receiving module 640 is configured to receive the data sent by the first processing unit in the continuous sending mode if the sending mode is determined to be the continuous sending mode according to the header data of the data packet;
[0247] The data sending module 650 is used to send the data to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data.
[0248] The embodiment of the present invention can reduce the header of the sent data packet by only sending the data in the same sending direction as the data packet in the continuous sending mode after sending the data packet, and no longer sending the header data. Only the data itself is sent, which can reduce the amount of transmitted data, reduce the transmission cost of the header, reduce the number of memory accesses, reduce power consumption, reduce transmission costs, and improve transmission efficiency.
[0249] The above-mentioned multi-core on-chip network data transmission device can execute any multi-core on-chip network data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the executed multi-core on-chip network data transmission method.
[0250] Embodiment 7
[0251] Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment 7 of the present invention. Figure 7 As shown, the computer device includes a processor 71, a memory 72, an input device 73 and an output device 74; the number of processors 71 in the computer device can be one or more. Figure 7 A processor 71 is taken as an example; the processor 71, memory 72, input device 73 and output device 74 in the computer device can be connected by a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0252] The memory 72 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the multi-core on-chip network data transmission method in the embodiment of the present invention. The processor 71 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 72, that is, realizing the above-mentioned multi-core on-chip network data transmission method.
[0253] The memory 72 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 72 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 72 may further include a memory remotely arranged relative to the processor 71, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0254] The input device 73 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 74 may include output devices such as a display screen.
[0255] Embodiment 8
[0256] Embodiment 8 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the on-chip network data transmission method of the multi-core provided in all the embodiments of the present invention is implemented:
[0257] That is, when the program is executed by the processor, it implements: receiving a data packet from a first direction; determining a target sending direction based on the packet header data of the data packet, and sending the data packet along the target sending direction; if the sending mode is determined to be a continuous sending mode based on the packet header data of the data packet, the data from the first direction received in the continuous sending mode is sent along the target sending direction.
[0258] Alternatively, when the program is executed by a processor, it is implemented as follows: receiving a data packet sent by a matching first processing unit, the data packet including header data; determining a target sending direction based on the header data; sending the data packet to a first network node along the target sending direction, so that the first network node sends the data packet to a second processing unit when receiving the data packet; if the sending mode is determined to be a continuous sending mode based on the header data of the data packet, then receiving the data sent by the first processing unit in the continuous sending mode; sending the data to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data.
[0259] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a RAM, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0260] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0261] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0262] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a LAN or WAN, or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0263] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A multi-core on-chip network data transmission method, characterized in that: The application is in a first network node, comprising: receiving a data packet from a first direction; Determine a target sending direction according to the header data of the data packet, and send the data packet along the target sending direction; If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data received from the first direction in the continuous sending mode is sent along the target sending direction; the data only includes a packet body; In which, the continuous sending mode is determined according to the continuous sending identification information of the data packet, and when the sending mode is the continuous sending mode, only the first data packet includes a packet header, and the first network node stores the address of a destination node, and the destination node is the node for receiving data corresponding to the continuous sending mode.
2. The method according to claim 1, characterized in that: The step of determining, according to the header data of the data packet, that the sending mode is a continuous sending mode comprises: Obtaining continuous sending identification information matched by the data packet; If it is determined that the continuous transmission identification information is the first continuous transmission identification information, the transmission mode is determined to be the continuous transmission mode.
3. The method according to claim 1, characterized in that Also includes: Recording the target sending direction; The step of sending the data received from the first direction in the continuous sending mode along the target sending direction includes: When receiving the data from the first direction, the target sending direction is acquired, and the data is sent along the target sending direction.
4. The method according to claim 1, characterized in that: Also includes: When the stop identification information is detected, the continuous sending mode is stopped and the target sending direction is reset.
5. The method according to claim 3, characterized in that: The first network node is configured with a status register matching the first direction, the status register including identification information matching each sending direction; Wherein, recording the target sending direction includes: The identification information of the target sending direction is set to 1, and the identification information of the non-target sending direction is set to 0; Wherein, obtaining the target sending direction includes: The sending direction with identification information 1 is determined as the target sending direction.
6. The method according to claim 1, characterized in that The number of the first directions is multiple, and sending the data packet along the target sending direction includes: Acquire at least one data packet matching the target sending direction; Arbitrating the sending order of each data packet in at least one data packet matched by the target sending direction, generating sending direction arbitration information matched by the target sending direction, wherein the sending direction arbitration information includes the sending order of each data packet in at least one data packet matched by the target sending direction in the target sending direction; The respective data packets are sent according to the sending direction arbitration information.
7. The method according to claim 6, characterized in that The sending of each data packet according to the sending direction arbitration information includes: Get at least one queue; According to the sending direction arbitration information, each data packet is sequentially stored in the queue, and the queue is a first-in-first-out queue; The data packets in the queue are sent sequentially, wherein the data packets are sent in the order of the data packets.
8. The method according to claim 7, wherein the queue comprises a plurality of virtual channels, the method further comprising: Determine a target virtual channel of a target data packet in a target sending direction queue; The step of sending the data received from the first direction in the continuous sending mode along the target sending direction includes: The target data is stored in the target virtual channel and sent along the target sending direction, wherein the target data packet and the target data are data sent in the same first direction.
9. The method according to claim 1, characterized in that: The data packets in the first direction include data packets sent by an adjacent network node, or data packets sent by a processing unit matching the first network node.
10. The method according to any one of claims 1 to 9, characterized in that: The step of determining a target sending direction according to the header data of the data packet comprises: If it is determined that the packet header data includes multicast packet header data, determining a propagation direction toward a processing unit matched to the first network node as a target sending direction; If, according to the multicast packet header data, it is determined that there is at least one propagation direction with a relative displacement, and each of the propagation directions is determined as a target sending direction; The relative displacement is used to characterize the propagation distance of the data packet in the propagation direction.
11. The method according to claim 10, characterized in that The sending of the data packet along the target sending direction comprises: Modifying the multicast packet header data in the data packet to form a data packet matching each of the target sending directions; Data packets matching each target sending direction are sent along each target sending direction.
12. The method according to claim 10, characterized in that The multicast packet header data includes direction order information, the direction order information is used to determine the priority of the propagation direction, and the target sending direction includes a first sending direction; Wherein, if it is determined according to the multicast packet header data that there is at least one propagation direction with a relative displacement, and each of the propagation directions is determined as a target sending direction, it includes: Determine a first propagation direction with the highest priority according to the direction order information; If it is determined that there is a relative displacement in the first propagation direction, the first propagation direction is determined as the first sending direction.
13. The method according to claim 12, characterized in that The multicast packet header data includes parallel direction information, and the parallel direction information is used to determine whether to send the data packet in a second propagation direction, the second propagation direction is a propagation direction other than the first propagation direction, and the target sending direction includes the second sending direction; Wherein, if it is determined according to the multicast packet header data that there is at least one propagation direction with a relative displacement, and each of the propagation directions is determined as a target sending direction, it includes: Determining, according to the parallel direction information, concurrent identification information of the first network node; If it is determined that the concurrent identification information is the first concurrent identification information, the second propagation direction is used as the second sending direction.
14. A multi-core on-chip network data transmission method, characterized in that: The application is in the second network node, comprising: receiving a data packet sent by a matching first processing unit, wherein the data packet includes packet header data; Determine the target sending direction according to the packet header data; Sending the data packet to the first network node along the target sending direction, so that the first network node sends the data packet to the second processing unit when receiving the data packet; If the sending mode is determined to be a continuous sending mode according to the header data of the data packet, the data sent by the first processing unit received in the continuous sending mode is sent to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data; the data only includes a packet body; In which, the continuous sending mode is determined according to the continuous sending identification information of the data packet, and when the sending mode is the continuous sending mode, only the first data packet includes a packet header, and the first network node stores the address of a destination node, and the destination node is the node for receiving data corresponding to the continuous sending mode.
15. A multi-core on-chip network data transmission device, characterized in that: The method is configured in the first network node and includes: A data packet receiving module, used for receiving a data packet from a first direction; A data packet sending module, used to determine a target sending direction according to the header data of the data packet, and send the data packet along the target sending direction; A data continuous sending module, configured to send the data received from the first direction in the continuous sending mode along the target sending direction if the sending mode is determined to be the continuous sending mode according to the header data of the data packet; the data only includes a packet body; In which, the continuous sending mode is determined according to the continuous sending identification information of the data packet, and when the sending mode is the continuous sending mode, only the first data packet includes a packet header, and the first network node stores the address of a destination node, and the destination node is the node for receiving data corresponding to the continuous sending mode.
16. A multi-core network-on-chip data transmission device, characterized in that: The method is configured in the second network node and includes: A data packet receiving module, used for receiving a data packet sent by a matching first processing unit, wherein the data packet includes header data; A target sending direction determination module, used to determine the target sending direction according to the packet header data; a data packet sending module, configured to send the data packet to the first network node along the target sending direction, so that the first network node sends the data packet to the second processing unit when receiving the data packet; a data receiving module, configured to, if it is determined according to the header data of the data packet that the sending mode is a continuous sending mode, send the data sent by the first processing unit received in the continuous sending mode to the first network node along the target sending direction, so that the first network node sends the data to the second processing unit when receiving the data; the data only includes a packet body; In which, the continuous sending mode is determined according to the continuous sending identification information of the data packet, and when the sending mode is the continuous sending mode, only the first data packet includes a packet header, and the first network node stores the address of a destination node, and the destination node is the node for receiving data corresponding to the continuous sending mode.
17. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the on-chip network data transmission method for many cores as described in any one of claims 1 to 14 is implemented.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the on-chip network data transmission method for many cores as described in any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Network-on-chip digital router and its parallel data transmission method
CN101141261A
On-chip network cache allocation method
CN101420372A
Efficient data stream transmission communication structure suitable for on chip network and operating method thereof
CN102158403A
NoC router based on multicast dimension order routing algorithm and routing algorithm thereof
CN103595627A
Multicast router based on package and circuit switching technology and working mode thereof
CN105007226A
