CN114363246A - Many-core network-on-chip data transmission method, device, equipment and medium - Google Patents

Many-core network-on-chip data transmission method, device, equipment and medium Download PDF

Info

Publication number
CN114363246A
CN114363246A CN202011069092.0A CN202011069092A CN114363246A CN 114363246 A CN114363246 A CN 114363246A CN 202011069092 A CN202011069092 A CN 202011069092A CN 114363246 A CN114363246 A CN 114363246A
Authority
CN
China
Prior art keywords
data
sending
target
data packet
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011069092.0A
Other languages
Chinese (zh)
Inventor
王封
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202011069092.0A priority Critical patent/CN114363246A/en
Publication of CN114363246A publication Critical patent/CN114363246A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a many-core network-on-chip data transmission method, a device, equipment and a medium. The method comprises the following steps: receiving a data packet from a first direction; determining a target sending direction according to the packet header data of the data packet, and sending the data packet along the target sending direction; and if the sending mode is determined to be a continuous sending mode according to the header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction. The embodiment of the invention can reduce the overhead of transmitting the data packet header, improve the transmission efficiency and reduce the transmission cost.

Description

Many-core network-on-chip data transmission method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the field of artificial intelligence, the field of general processors or the field of high-performance computing, and particularly relates to a many-core network-on-chip data transmission method, device, equipment and medium.
Background
In recent years, with the rapid development of (AI) algorithm-related applications and technologies, demands for computing power and power efficiency have been increasing. The AI algorithm is typically run using a many-Core (Multi-Core) to increase the computation speed of the AI algorithm.
The cores are a set of cores that are connected together in a predetermined manner and have high-performance parallel processing capability, and the cores are large in number (thousands of cores in the future) and various in types. Currently, in many cores, a Network On Chip (NOC) communication mode is adopted to realize communication between the cores.
In the existing network on chip, the node adds the multicast flag bit in the packet header of the data packet, and sends the data packet to the node with the multicast flag bit matching. In the existing multicast mode, the number of bits of a packet header needs to be increased to increase the multicast destination address. Each core may multicast data to any other core, and then the header will add flag bits of all cores except itself, increase the number of bits in the header, and increase transmission resource consumption.
Disclosure of Invention
The embodiment of the invention provides a many-core network-on-chip data transmission method, a device, equipment and a medium, which can reduce the overhead of transmitting a data packet header, improve the transmission efficiency and reduce the transmission cost.
In a first aspect, an embodiment of the present invention provides a many-core network-on-chip data transmission method, which is applied to a first network node, and includes:
receiving a data packet from a first direction;
determining a target sending direction according to the packet header data of the data packet, and sending the data packet along the target sending direction;
and if the sending mode is determined to be a continuous sending mode according to the header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction.
In a second aspect, an embodiment of the present invention provides a many-core network-on-chip data transmission method, which is applied to a second network node, and includes:
receiving a data packet sent by a matched first processing unit, wherein the data packet comprises packet header data;
determining a target sending direction according to the packet 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 according to the packet header data of the data packet, the data received in the continuous sending mode and sent by the first processing unit are sent;
and 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.
In a third aspect, an embodiment of the present invention further provides a many-core network-on-chip data transmission apparatus, configured in a first network node, including:
a packet receiving module for receiving a packet from a first direction;
the data packet sending module is used for determining a target sending direction according to packet header data of the data packet and sending the data packet along the target sending direction;
and a data continuous sending module, configured to send, if it is determined that a sending mode is a continuous sending mode according to the header data of the data packet, the data from the first direction received in the continuous sending mode along the target sending direction.
In a fourth aspect, an embodiment of the present invention further provides a many-core network-on-chip data transmission apparatus, configured in a second network node, including:
the data packet receiving module is used for receiving a data packet sent by a matched first processing unit, wherein the data packet comprises packet header data;
the target sending direction determining module is used for determining a target sending direction according to the packet header data;
a data packet sending module, configured to send 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;
a data receiving module, configured to determine that a sending mode is a continuous sending mode according to packet header data of the data packet, and send data, which is received in the continuous sending mode and sent by the first processing unit, to the data receiving module;
and the data sending module is used for 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.
In a fifth aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for network-on-chip data transmission of many cores according to any of the embodiments of the present invention.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the network-on-chip data transmission method for many cores according to any of the embodiments of the present invention.
The embodiment of the invention only sends the data which is received subsequently and has the same sending direction with the data packet under the continuous sending mode after sending the data packet, and does not send the data of the packet head, thereby solving the problem that the bit number of the packet head is greatly increased and the consumption of transmission resources is increased because the flag bits of all receiving nodes are required to be added when the data packet is sent in the prior art, reducing the packet head of the data packet and only sending the data, reducing the data transmission quantity, reducing the transmission cost of the packet head, reducing the access times of a memory, reducing the power consumption, reducing the transmission cost and improving the transmission efficiency.
Drawings
Fig. 1a is a flowchart of a network-on-chip data transmission method for many cores according to a first embodiment of the present invention;
fig. 1b is a schematic diagram of a network-on-chip topology according to a first embodiment of the present invention;
FIG. 1c is a schematic diagram of a node structure according to a first embodiment of the present invention;
FIG. 1d is a diagram illustrating a data transmission process in the prior art;
fig. 1e is a schematic diagram of a data transmission process in the first embodiment of the present invention;
fig. 2a is a flowchart of a network-on-chip data transmission method for many cores according to a second embodiment of the present invention;
fig. 2b is a schematic diagram of identification information of a target transmission direction in the second embodiment of the present invention;
fig. 3a is a flowchart of a network-on-chip data transmission method for many cores according to a third embodiment of the present invention;
fig. 3b is a schematic diagram of an application scenario of data transmission in the third embodiment of the present invention;
fig. 3c is a schematic diagram of an application scenario of data transmission in the third embodiment of the present invention;
fig. 4 is a flowchart of a network-on-chip data transmission method for many cores according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a many-core network-on-chip data transmission apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a many-core network-on-chip data transmission apparatus according to a sixth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device in a seventh embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1a is a flowchart of a network-on-chip data transmission method for a many-core in an embodiment of the present invention, where this embodiment is applicable to a case where a network-on-chip is used for data transmission, and the method may be executed by a network-on-chip data transmission apparatus for a many-core provided in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device, and specifically applied to a first network node of a network-on-chip. As shown in fig. 1a, the method of the present embodiment includes:
s110, receiving a data packet from a first direction.
The data packets are for data transmitted at nodes in the network on chip. The data packet is a data unit for transmission, and generally, the data packet includes a packet header and a packet body, where the packet header is used to include control information and to provide information such as a transmission protocol and data identification information, and to indicate that the data packet is accurately sent to a receiving party, and the receiving party obtains data, and the packet body may refer to data that the network node needs to obtain. In any embodiment of the invention, the data is a packet.
S120, determining a target sending direction according to the packet header data of the data packet, and sending the data packet along the target sending direction.
The header data is used to determine the direction of transmission of the data packet. The header has a transmission direction recorded therein, and the transmission direction can be determined by extracting data from the header.
The number of target transmission directions may be plural. The target sending direction may include: and the sending direction corresponding to the adjacent network node or the sending direction corresponding to the matched processing unit. Sending a data packet in a target sending direction may refer to sending the data packet from a first network node to an adjacent network node or a matching processing unit.
The network on chip is composed of a plurality of nodes. Each node is connected to a corresponding processing unit, e.g. a Core. The core may be a processing unit including a storage unit, a calculation unit, a transmission control unit, and other specific functional units. Data received by the node may be sent to the core for processing. Each node is connected to at least one node, and the nodes can transmit data to the connected at least one node. Data to be transmitted refers to data transmitted between two nodes. The data to be transmitted may refer to data transmitted between a transmitting node and a receiving node, wherein the number of the receiving nodes is at least one.
The topology structure of the network on chip refers to the arrangement form of network nodes and link channels, and determines the port structure of the nodes in the network on chip. The topology structure may be a two-dimensional topology structure, and may include a ring, a Mesh (Mesh), or a tree.
Optionally, the network on chip is a two-dimensional network structure.
Wherein, the two-dimensional network structure can be composed of two lines in mutually perpendicular directions. The line of the first direction may be a horizontal line (a line parallel to the ground), and the line of the second direction may be a vertical line. Or neither the first direction nor the second direction is any one of a horizontal line and a vertical line. The specific setting may be performed according to actual situations, and the embodiment of the present invention is not particularly limited.
Illustratively, the two-dimensional grid is specifically shown in fig. 1b, and the network on chip includes a plurality of nodes (n), each node connecting to a corresponding core (C). In the two-dimensional grid topological structure, nodes are sequentially arranged in a two-dimensional grid shape along the X direction and the Y direction in a two-dimensional plane, and each node is connected with an adjacent node through a link channel in the X direction and the Y direction. The two-dimensional coordinate system can be established based on the two-dimensional grid, the address of the node is a two-dimensional coordinate in the two-dimensional grid, and the two-dimensional coordinate comprises a first direction coordinate x and a second direction coordinate y. 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, the symbol represents the propagation direction, and the transmission process of the data packet is the process that the absolute values of x and y are reduced or unchanged (always kept at 0). x and y may be arbitrarily set according to a relative position in the network on chip, which is not limited in the embodiment of the present invention.
By configuring the topological structure of the network-on-chip as a two-dimensional grid, the structure of the network-on-chip can be simplified, the mapping of a compiler is facilitated, the algorithm of a communication path in the network-on-chip is simplified, and the chip area of the network-on-chip is reduced, so that the cost of many cores is reduced.
For ease of understanding, the following is an exemplary illustration of a network on chip in a two-dimensional grid structure.
An exemplary node n5 structure of a network on chip that performs the network on chip data transfer method of many cores is shown in fig. 1 c. The queues are used for receiving data requests from other nodes n or cores c and storing data packets related to the data requests according to arbitration results, and one queue represents one virtual channel. The status register is used for controlling on and off, for example, for selecting which queue (b1, b2, b3 or b4, etc.) data in the queue for data transmission, that is, for gating a communication link between which virtual channel and which physical channel. The arbitration module is connected with queues of other nodes and queues of cores, and is used for arbitrating received data, determining the transmission sequence of the data, and indicating the queues to store the data according to the transmission sequence. In addition, the node structure may further include a route request module, the route request module is connected to the other node n or the core c, and one route request module is connected to an arbitration module, and the route request module is configured to receive a data request of the other connected node n or the core c, and send the data request to the arbitration module for arbitration.
The switching module is used to control data exchange, for example, a data packet may be sent to other node n or core c through the switching module. Illustratively, the queue may be a First-in First-out (FIFO) queue, where the FIFO queue does not classify the packets, and lets the packets enter the queue according to the sequence in which the packets arrive at the interface, and a best-effort forwarding mode is adopted, so that when transmission data sent by a node is congested, the data packets can be accurately sent according to the received time sequence, thereby implementing congestion management.
S130, if the sending mode is determined to be a continuous sending mode according to the header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction.
The continuous transmission mode may be that, when the first data packet is transmitted, the following data packets having the same transmission direction may be transmitted only with the packet body and without the packet header. The data in the first direction may be referred to as a packet.
The data from the first direction received in the continuous transmission mode is the same as the source direction and the target transmission direction of the data packets in the first direction. Optionally, the header associated with the data from the first direction received in the continuous transmission mode is the same as the header in the data packet in the first direction.
The packet body can be continuously sent according to the target sending direction of the adjacent previous packet body or the data packet through the continuous sending mode, and the packet head for repeatedly transmitting data to be sent can be saved.
Optionally, the data packet in the first direction includes a data packet sent by an adjacent network node, or a data packet sent by a processing unit matched with the first network node.
The first network node may comprise 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 main data node is the data packet sent by the processing unit matched with the main data node. The network on chip is composed of a plurality of nodes. Each node is connected with the matched processing unit. The processing unit may refer to a core. Data received by the node may be sent to a processing unit for processing. Each node is connected to at least one node, and the node can transmit data packets to the connected at least one node.
Optionally, the method for transmitting network-on-chip data of many cores further includes: recording the target sending direction; the transmitting the data from the first direction received in the continuous transmission mode along the target transmission direction includes: and when receiving the data from the first direction, acquiring the target sending direction, and sending the data along the target sending direction.
And recording a target transmission direction for transmitting the data directly along the target transmission direction when receiving the data from the same first direction without including the header.
By recording the target sending direction, and directly sending the data from the same first direction along the target sending direction after receiving the data, the transmission error in a continuous sending mode can be reduced, and the accuracy of data transmission is improved.
Optionally, the method for transmitting network-on-chip data of many cores further includes: and when the stop identification information is detected, stopping the continuous transmission mode and resetting the target transmission direction.
The stop identification information is used for determining whether the data is the last continuously transmitted data in the continuous transmission mode, and is also used for determining that the transmission mode of the next adjacent data packet is different from the transmission mode of the current data or data packet. The data packet or the data may be configured with stop identification information, and the stop identification information may be transmitted together with the data or the data packet. And resetting the target sending direction for the data packet transmitted subsequently to re-determine the target sending direction according to the packet header. The reset sending state information is also used for re-determining the sending mode of the next adjacent data packet according to the next arbitration, and improving the transmission accuracy of the next adjacent data packet.
The continuously transmitted data or data packet is the last one, which indicates that the sending mode of the next adjacent data packet is different from the sending mode of the current data or data packet, so that the packet header of the next adjacent data packet is different from the packet header of the current data or data packet.
The continuously transmitted data or data packet is not the last one, which indicates that the next data packet is transmitted in the same manner as the current data or data packet, so that the header of the next data packet is the same as the header of the current data or data packet, and the header of the previous packet or the header of the first data packet can be continuously used without retransmitting a new header.
When the stop identification information is detected, the last continuously transmitted data or data packet transmission in the continuous transmission mode is determined to be completed, the target transmission direction is reset, transmission errors caused by the fact that the target transmission direction is continuously used are reduced, and the data transmission accuracy is improved.
Optionally, the configuring, by the first network node, a status register matched with the first direction, where the status register includes identification information matched with each sending direction, and the recording the target sending direction includes: setting the identification information matched with the target sending direction to be 1, and setting the identification information of the non-target sending direction to be 0, wherein the acquiring the target sending direction comprises: and determining the sending direction with the identification information of 1 as the target sending direction.
The state register is also used for storing the identification information of the sending direction, sending the identification information of the sending direction and controlling the on-off of the channel corresponding to each sending direction. The identification information is used to correspond to the transmission direction and to determine the channel corresponding to the transmission direction that is switched on, i.e. in the switched-on channel, data packets or data can be transmitted in the transmission direction.
The identification information matched with the target sending direction is set to be 1, the identification information matched with the non-target sending direction is set to be 0, the target sending direction and the non-target sending direction can be distinguished quickly and simply through two numbers, the target sending direction can be determined quickly when data are sent subsequently, the obtaining efficiency of the target sending direction is improved, meanwhile, the distinguishing process of the target sending direction is simplified, and the accuracy of data transmission is improved.
Optionally, the determining, according to the header data of the data packet, that the sending mode is a continuous sending mode includes: acquiring continuous sending identification information matched with the data packet; and if the continuous sending identification information is determined to be the first continuous sending identification information, determining that the sending mode is the continuous sending mode.
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 for determining that the transmission mode is a discontinuous transmission mode. The first continuous transmission identification information is used for determining that the transmission mode is a continuous transmission mode. Optionally, if it is determined that the continuous transmission identification information is second continuous transmission identification information, determining that the transmission mode is a discontinuous transmission mode;
exemplarily, in the discontinuous transmission mode, receiving a data packet, determining a target transmission direction according to packet header data of the data packet, and transmitting the data packet along the target transmission direction; data from the first direction is received and discarded.
In the related art, data transmission between network-on-chip nodes or between nodes and cores is performed in units of data packets, either in a discontinuous transmission mode, as shown in fig. 1 d. Each transmission needs to carry packet header information, wherein the packet body comprises data to be sent.
In the method for transmitting network-on-chip data of many cores in the embodiment of the present invention, in the continuous transmission mode, only packet header information may be transmitted once, that is, a data packet is transmitted for the first time, and in subsequent transmission, only a packet body is transmitted without repeatedly transmitting a packet header, as shown in fig. 1e, so that the number of times of transmitting a packet header in a transmission process is reduced. The plurality of data that can be continuously transmitted are generally data with the same transmission mode, and exemplarily, data with the same information such as at least one of the transmission direction, the transmission destination, and the packet header are also the same as the data packet that is first transmitted in the continuous transmission process.
In the related art, a main data sending node adds information of a flag bit in a packet header of a data packet that the main data sending node needs to send, wherein the main data sending node is actually a first sending node, the flag bit is used for indicating specific destination nodes to which the data packet needs to be sent, then the main data sending node sends the data packet to an intermediate node connected to the main data sending node, and the intermediate node sends the data packet to the destination node directly or through other intermediate nodes. In the process, firstly, the data packet needs to add extra header bits, and the number of destination nodes is the same as that of the added flag bits. For example, in a many-core chip composed of one thousand processing units, each processing unit may send data to any other processing unit, so that the header will add the flag bits of all other processing units except the header itself, and the transmission cost of the header and the resources consumed by the header generation are large; secondly, the network node is provided with a storage area for storing addresses of all possible destination nodes to which the network node is transferred. For example, in a many-core composed of one thousand processing units, a certain network node transmits a received data packet to one hundred destination processing units, and the network node needs to store addresses of destination nodes corresponding to the one hundred processing units, respectively, which results in high storage cost and huge storage resource consumption of the network node; a plurality of network nodes exist in the whole many-core chip, and accordingly, storage resources are larger; thirdly, the network node needs to transmit extra packet header information, which brings extra transmission efficiency loss, and meanwhile, the network node needs to inquire the address of the transmitted destination node according to the transmission flag bit of the received data packet, and then repackages the address and the data to send out, thereby increasing extra inquiry and packaging power consumption; finally, when the data packet is transmitted to some destinations, the network node needs to take an additional path due to transmission, which inevitably reduces the routing efficiency, increases the data delivery time, and increases the power consumption consumed by data transmission.
In order to solve the above problems, when the sending modes are the same, the data packet is sent only during the first transmission, and only the received data is transmitted in the subsequent transmission process, and the packet header is not repeatedly sent, that is, only the first data packet has a long packet header, so that the transmission number of the packet header can be greatly reduced, the transmission cost of the packet header and the resources consumed by the generation of the packet header can be reduced, the storage resource consumption of the node address can be reduced, the transmission efficiency loss can be reduced, meanwhile, the query power consumption and the packaging power consumption of the multicast node can be reduced, the transmission steps can be reduced, the routing efficiency can be improved, the data delivery time can be reduced, and the power consumption consumed by data transmission can be reduced.
The embodiment of the invention can not send the packet header data any more by only sending the subsequently received data in the same sending direction as the data packet in the continuous sending mode after sending the data packet, thereby solving the problem that the bit number of the packet header is greatly increased and the consumption of transmission resources is increased because the flag bits of all receiving nodes are required to be added when the data packet is sent in the prior art, reducing the packet header of the data packet and only sending the data, reducing the data transmission amount, reducing the transmission cost of the packet header, reducing the access times of a memory, reducing the power consumption, reducing the transmission cost and improving the transmission efficiency.
Example two
Fig. 2a is a flowchart of a multi-core network-on-chip data transmission method according to a second embodiment of the present invention, which is embodied based on the foregoing embodiments. The method of the embodiment comprises the following steps:
s210, receiving a plurality of data packets from a first direction.
Non-exhaustive descriptions of embodiments of the present invention may be had with reference to the foregoing embodiments.
A plurality of data packets in a first direction are received. In the embodiment of the present invention, for a certain direction in the first network node, the direction-matched queue receives data packets from different directions, that is, data packets in a plurality of first directions.
The first direction refers to the direction in which data or data packets are received, and the transmit direction refers to the direction in which data or data packets are transmitted.
Illustratively, the node is connected with other nodes through physical channels, and each physical channel is correspondingly configured with one direction on the node, and the physical channel is matched with the queue, which can be understood as matching the queue with the direction. As shown in fig. 2b, the directions include: east, south, west, north and processing units. The direction of the queue matching west may include east, south, north, and processing units. In addition, the direction may also be set according to the structure of the network on chip, and thus, the embodiment of the present invention is not particularly limited. Further, the direction may be identified by a character string, e.g., E (east), S (south), W (west), N (north), and C (processing unit)
S220, determining a target sending direction according to the packet header data of the data packet.
S230, at least one data packet matched with the target sending direction is obtained.
In the same time period or at the same time, there are a plurality of data or data packets with different sources and the same sending direction. The at least one data packet with a matching destination transmission direction may refer to a plurality of data packets with the same transmission direction and different sources in the same time period or at the same time.
The source difference may refer to different ports receiving data or data packets, or different network nodes transmitting data or data packets to the first network node.
There may be at least one transmission direction for a packet. At least one target sending direction can be determined from the data packets, and for each target sending direction, the data packets required to be along the target sending direction are respectively acquired.
S240, arbitrating the transmission order of each matched data packet, and generating transmission direction arbitration information matched with the target transmission direction, where the transmission direction arbitration information includes the transmission order of each matched data packet in the target transmission direction.
The number of data packets along the same target transmission direction is multiple, and the data packets can be transmitted in sequence. The transmit direction arbitration information is used to determine the order of transmission of each data packet in each data packet to the same transmit direction in the matching target transmit direction, and is used to determine when to transmit each data packet to that transmit direction.
According to the sending direction arbitration information, the data packet in the first direction can be determined to be output to the matched target sending direction at a certain moment, and on the basis, the data in the first direction in the same mode can be continuously transmitted without transmitting the packet head, so that the transmission quantity of the packet head is reduced.
Optionally, the first network node is configured with a status register matching with the first direction, where the status register includes identification information matching with each sending direction, sets the identification information matching with the target sending direction to 1, sets the identification information of the non-target sending direction to 0, and determines the sending direction with the identification information of 1 as the target sending direction.
Illustratively, the status register as in fig. 1c stores the transmission directions as shown in fig. 2b and the identification information corresponding to each transmission direction. If the identification information corresponding to the sending direction is 1, the sending direction is determined to be the target sending direction, and the state register controls the communication link between the queue where the data packet and/or the data are located and the output channel corresponding to the target sending direction to be conducted, so that the switching module can take the data packet and/or the data out of the queue and output the data from the output channel corresponding to the target sending direction, and output the data from the target sending direction.
According to the sending direction arbitration information, it can be determined that the data packet can be output to the matched target sending direction at a certain time, and at this time, the identification information of the target sending direction in the status register is correspondingly modified. The subsequent network node may determine that the input channel corresponding to the data is conducted with the output channel corresponding to the target sending direction, so that the data sent in the same manner may be continuously transmitted on the basis, and the transmission number of the packet header is reduced without transmitting the packet header.
One data packet has a plurality of sending directions, and one sending direction corresponds to one virtual channel. The data packets can be transmitted to a plurality of sending directions simultaneously, or the data packets can be transmitted to one sending direction at the same time.
And S250, transmitting the data packet according to the transmitting direction arbitration information.
The transmission order of the data packets in the first direction is determined according to the transmission direction arbitration information, and the data packets in the first direction are transmitted at a time matching the transmission order.
Optionally, the sending the data packet according to the sending direction arbitration information includes: acquiring at least one queue; sequentially storing each matched data packet in the queue according to the transmitting direction arbitration information, wherein the queue is a first-in first-out queue; and sequentially sending the data packets in the queue, and sending the data packets when the data packets are in the sequence.
The queue is used for storing the received data packets and/or data and storing the 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 transmit direction arbitration information. Generally, when data transmission requests sent from multiple directions are received simultaneously, the processing sequence of each request needs to be arbitrated, and data to be sent matched in each direction are sequentially entered into a queue according to the priority in the arbitration result, and are sequentially responded.
The FIFO queue is used for outputting data in sequence according to an input sequence, namely the data which enters the FIFO queue first is popped from the FIFO queue and is sent to a target sending direction, so that the data packets are transmitted in sequence according to an arbitration result. And transmits the data packet of the first direction when the order of the data packet of the first direction is turned.
As in the foregoing example, the queue is configured to receive data requests from other nodes n or the processing unit c, arbitrate the received data requests, and sequentially place data to be transmitted of each data request into the queue according to the arbitration result and the transmission order.
By configuring the FIFO queue, sequentially caching the data packets according to the arbitration information of the sending direction, and sending the data packets according to the cached data when sending the data packets, the data packets can be accurately and sequentially output according to the order specified by the arbitration information of the sending direction, and the transmission accuracy of the data packets is improved.
S260, if the sending mode is determined to be a continuous sending mode according to the header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction.
Optionally, the queue includes a plurality of virtual channels, where a virtual channel may be a buffer, and the method further includes: determining a target virtual channel of a target data packet in a queue matched with a target sending direction; wherein, transmitting the data from the first direction received in the continuous transmission mode along the target transmission direction comprises: and storing target data into the target virtual channel, and sending the target data along the target sending direction, wherein the target data packet and the target data are data sent in the same first direction.
During the transmission of the data packets and/or data, the target virtual channel is actually sent to the adjacent network node or processing unit at the matching time period. Queues are configured for each direction, a plurality of virtual channels are configured in each queue, and the virtual channels are FIFO queues. A virtual channel may be understood as a plurality of sub-queues formed by dividing a queue.
And storing the data with the same transmission mode into the virtual channel where the data packet with the same transmission mode is located, so that the data can be directly transmitted after the data packet is transmitted subsequently. The destination data packet is transmitted in the same manner as the destination data, including the first direction of the destination data packet being the same as the first direction of the destination data, and the destination transmission direction of the destination data packet being the same as the destination transmission direction of the destination data.
And storing the target data packet into the target virtual channel in the matched queue, and storing the target data with the same sending mode into the target virtual channel when subsequently receiving the data. Usually, the plurality of target data are adjacent to the target data packet, i.e. there is no data and/or data packet with different transmission modes between the target data packet and the target data.
By configuring the queue, configuring the target virtual channel in the queue, inquiring the target virtual channel matched with the obtained target data packet, and storing the target data in the same transmission mode in the target virtual channel, the target data can be accurately and continuously transmitted after the target data packet is transmitted.
Illustratively, the arbitration algorithm may be referred to as a round robin priority algorithm. For example, for each output virtual channel, an initial priority is assigned to each input virtual channel that matches in advance, 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 with successful arbitration is reduced to the lowest, the relative order of the priorities of other input virtual channels is kept unchanged, and the like. For example, the first direction corresponding to the output virtual channel is east, and the sending direction corresponding to the input virtual channel includes south, north, west, and processing units. If the sending direction with the highest priority is west, establishing communication connection between the input virtual channel in the west direction and the output virtual channel in the east direction, or conducting a communication link between the input virtual channel in the west direction and the output virtual channel in the east direction, and outputting the data packet and the data received by the input virtual channel in the west direction through the output virtual channel in the east direction.
The transmission order of the data packet and/or the data output to each transmission direction can be accurately determined through an arbitration mode, the transmission control transmission mode of each data to be transmitted is increased, and the flexibility of the transmission control transmission mode is improved.
The data packet is transmitted, and the time or the time period for transmitting the data packet is actually determined according to the transmission direction arbitration information, and the data packet is transmitted at the time or the time period, and if the data is received, the data is transmitted at the time or the time period.
In the prior art, each sending direction of each data packet needs to be judged by arbitration. By adopting the many-core network-on-chip data transmission method provided by the embodiment of the invention, the data which does not need to send the packet header can be directly output according to the identification information of the target sending direction, and the judgment of whether the data can be output to the target sending direction or not in an arbitration mode is omitted, so that the arbitration frequency can be reduced, the arbitration power consumption is reduced, and the arbitration cost is reduced. The data of the header does not need to be transmitted, and the transmission mode is the same as that of the adjacent previous data or data packet.
In a specific example, the header of the node n0 is shown in table 1 below:
TABLE 1
Continuously transmitting identification information Transmitting persistent identification information
1 1
The continuous transmission identification information is used to identify whether the continuous transmission (burst) mode is used, and for example, the continuous transmission identification information may be represented by a preconfigured character string, which is not limited in the embodiment of the present invention. When the continuous sending identification information is 1, indicating that the sending mode comprises a burst mode; when the continuous transmission flag information is 0, it indicates that the transmission mode does not include the burst mode. In the burst mode, data packets in the same transmission mode do not need to send packet headers, transmit data in a packet body form, and do not need arbitration. And sending continuous identification information for identifying whether the data is the last data of the burst mode. For example, the sending persistent identification information may be represented by a pre-configured character string, and when the sending persistent identification information is 1, the data is represented as the last data of the burst mode; when the transmission duration identification information is 0, it indicates that the data is not the last data of the burst mode. In addition, stop identification information is added to the data, and if 1 is adopted, the data is the last data of the burst mode; if the data does not have the stop flag information, it indicates that the data is not the last data of the burst mode.
The embodiment of the invention records the target sending direction, sends the data along the target sending direction through the target sending direction of the pre-recorded data packet, omits judging whether the data can be output to the target sending direction by an arbitration mode, and can directly transmit the data to the target sending direction when the target sending direction of the data is the same as the sending mode of the adjacent previous data or data packet, such as the sending direction, so that the arbitration frequency can be reduced, the arbitration power consumption can be reduced, the arbitration cost can be reduced, and the data packet transmission efficiency can be improved.
EXAMPLE III
Fig. 3a is a flowchart of a network-on-chip data transmission method for many cores according to a third embodiment of the present invention, which is embodied on the basis of the foregoing embodiments. The method of the embodiment specifically includes:
s310, a data packet from a first direction is received.
Non-exhaustive descriptions of embodiments of the present invention may be had with reference to the foregoing embodiments.
S320, if it is determined that the packet header data includes multicast packet header data, determining a propagation direction of the processing unit matching to the first network node as a target sending direction.
The number of target transmission directions may be any integer greater than or equal to 0.
S330, if at least one propagation direction with relative displacement exists according to the multicast header data, determining each propagation direction as a target sending direction; wherein the relative displacement is used to characterize a propagation distance of the data packet in the propagation direction.
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, a flag bit in the header configuration information of the data packet. Optionally, when the flag bit is present or is 1, it may be understood that the data packet includes multicast header data, and when the flag bit is absent or is 0, it may be understood that the data packet does not include multicast header data. Illustratively, multicast header data is configured in the header of the data packet.
The first network node is a network node that receives a data packet. The processing unit matched with the network node is used for processing the data packet, for example, processing the packet body according to the packet header.
In the multicast mode, a network node receiving a data packet and data needs to transmit the data packet and data to the propagation direction of the processing unit, whereby the propagation direction of the processing unit is the target sending direction. Determining a propagation direction to the processing unit matched to the first network node as a target sending direction if it is determined that the header data includes multicast header data. Optionally, it is determined whether at least one propagation direction with a relative displacement exists according to the multicast header data, and if so, the at least one propagation direction is determined as a target sending direction.
The transmission mode may include a unicast mode or a multicast mode, etc. When the sending mode is the multicast mode, the packet header is configured with multicast packet header data, that is, the data packet includes multicast packet header data, which indicates that the data packet is sent to a plurality of network nodes in a multicast mode, so that the multicast packet header data can be prevented from being inquired in the non-multicast mode, the obtaining efficiency of the multicast packet header data is improved, and the power consumption is reduced.
It is to be understood that the network nodes of the network on chip may comprise at least one propagation direction, the number of propagation directions of each network node being related to the topology of the network on chip on which it is located and to the location of the network on chip. The number of propagation directions of the network nodes on the same network on chip may not be exactly the same.
The multicast header data may also be used to determine whether to continue forwarding the packet. Under the condition that the processing unit of the first network node receives the data packet, whether the data packet is continuously forwarded or not is judged, the data packet can be sent to the processing units matched with the plurality of network nodes on one multicast route, the condition that each network node needs to plan the multicast route to cause the data packet to repeatedly pass through the same node can be reduced, the number of data transmission steps can be reduced, and the data transmission efficiency is improved.
Wherein 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 nodes are arranged in the sending direction, which indicates the position of the first network node in the network on chip and the position of the network node in the network on chip.
The propagation direction of the relative displacement exists, and can be understood as a direction in which the data packet needs to be continuously 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 may be expressed in terms of the number of propagated network nodes. Illustratively, the relative displacement in the x propagation direction is 2, which can be understood as that the data packet needs to be forwarded to two network nodes along the x direction, and the two network nodes respectively forward the data packet to the processing units respectively matched with the data packet.
The multicast header data may include a flag corresponding to each propagation direction, for example, the propagation direction in which the flag is not 0 is a propagation direction in which a relative displacement exists, and the relative displacement is determined according to the multicast header data. The multiple propagation directions in the multicast header data may have different priorities, for example, the multiple propagation directions include a first priority and a second priority, where the first priority may correspond to one propagation direction, the second priority may correspond to multiple propagation directions, the propagation directions with different priorities, and the manner of determining whether there is a relative displacement may be different, which is not limited by the present disclosure.
Optionally, the multicast header data includes direction order information, where the direction order information is used to determine a priority of a propagation direction, and the target sending direction includes a first sending direction; wherein, if it is determined that at least one propagation direction having a relative displacement exists according to the multicast header data, and each of the propagation directions is determined as a target transmission direction, comprising: determining a first transmission direction with the highest priority according to the direction sequence information; and if the first propagation direction is determined to have relative displacement, determining the first propagation direction as the first sending direction.
The direction order information is used to determine the priority of the propagation direction, e.g., x direction first, then y direction; or first in the y direction and then in the x direction. The direction sequence information may be information configured in advance by a user, or default information in the network on chip, and the like, and may be adjusted as needed. The direction order information includes a plurality of propagation directions. Thus, all propagation directions can be acquired according to the direction order information, and the propagation direction with the highest priority is determined as the first propagation direction.
The direction order information includes, for example, all propagation directions, and the priority of each of the propagation directions. The order represented by the direction order information can be represented by priority, and the higher the priority is, the higher the order is; the lower the priority, the later the order.
Illustratively, if the direction order information is a first direction (x direction) followed by a second direction (y direction), i.e. the first direction has the highest priority and the second direction has the lowest priority, the first propagation direction is the first direction; if the direction order information is from the second direction to the first direction, i.e. the priority of the second direction is the highest and the priority of the first direction is the lowest, the first propagation direction is the second direction.
Illustratively, the x direction is a first propagation direction with highest priority, the relative displacement in this direction is 0, and the y direction and the z direction respectively have relative displacements, where the z direction has a higher priority, and then the z direction may be determined as the first propagation direction of the first network node.
The relative displacement is used to determine the direction in which the packet has not been moved, i.e. the direction in which the packet needs to be transmitted. The relative displacement is not 0, that is, not 0 relative displacement. The direction in which the packet has not moved is an indication that the packet needs to continue to be transmitted in that direction.
If there is a relative displacement in the first propagation direction, it indicates that the data packets need to be transmitted continuously along the first propagation direction, so that the first propagation direction can be determined as the first transmission direction.
As in the previous example, the topology of the network on chip is a two-dimensional mesh. In establishing a two-dimensional coordinate system based on the two-dimensional grid, the address of the node is a two-dimensional coordinate in the two-dimensional grid, and the two-dimensional coordinate comprises a first direction coordinate x and a second direction coordinate y. Taking the first network node as the origin of coordinates, the absolute values of x and y represent the relative displacement and the symbol represents the transmission direction. For each node, there are two propagation directions. Illustratively, if the direction order information is a first direction (x direction) followed by a second direction (y direction), the relative displacement associated with the direction order information is the relative displacement of the first direction; if the direction order information is from the second direction to the first direction, the relative displacement associated with the direction order information is the relative displacement in the second direction.
By configuring the direction sequence information and determining the first transmission direction, when the first transmission direction has relative displacement, the first transmission direction is determined, when a plurality of transmission directions exist, the first transmission direction can be accurately determined, and the accuracy of data packet transmission is improved.
Optionally, the multicast header data includes parallel direction information, where the parallel direction information is used to determine whether to send the data packet in a second propagation direction, where the second propagation direction is a propagation direction other than the first propagation direction, and the target sending direction includes a second sending direction; wherein, if it is determined that at least one propagation direction having a relative displacement exists according to the multicast header data, and each of the propagation directions is determined as a target transmission direction, comprising: determining concurrent identification information of the first network node according to the parallel direction information; and if the concurrent identification information is determined to be the first concurrent identification information, taking the second propagation direction as the second sending direction.
The parallel direction information is used to determine a transmission direction other than the first transmission direction, e.g. to determine a network node receiving the data packet other than the node of the first transmission direction. The parallel direction information may include information for each node on a transmission path in the first transmission direction that requires parallel transmission of data packets in addition to the first transmission direction. The parallel direction information corresponds to a direction, and of the number of all directions configured in the network-on-chip, parallel direction information may be configured in all directions except for a first sending direction determined by the direction order information, the parallel direction information corresponding to one direction except the first sending direction, and different parallel direction information corresponding to different directions.
The concurrent identification information is used for judging 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 a plurality of concurrent identification information, and each concurrent identification information may correspond to a different network node. The concurrency identification information is used for the first network node to judge whether the data packet needs to be transmitted to the direction corresponding to the parallel direction information in parallel or not. The concurrent identification information and the corresponding rule of the network node can be flexibly set. For example, each piece of concurrent identification information in the parallel direction information corresponds to each network node in the first transmission direction in sequence.
The concurrent identification information includes first concurrent identification information and second concurrent identification information. And if the concurrent identification information is the first concurrent identification information, indicating that the data packet needs to be transmitted in the direction corresponding to the concurrent identification information. And if the concurrent identification information is the second concurrent identification information, indicating that the data packet does not need to be transmitted in the direction corresponding to the concurrent identification information.
In some optional embodiments, each concurrent identification information in the parallel direction information corresponds to each network node having a node number according to an order.
For example, the character string 01100 with the y-direction information as the parallel direction information may be understood that the network nodes 1, 4, 5 do not need to transmit data packets in the y-direction, and the network nodes 2, 3 need to transmit data packets in the y-direction. As long as it can be determined whether the network node transmits the data packet in the second propagation direction according to the parallel direction information.
In some optional embodiments, the concurrent identity cumulative value may be configured to determine concurrent identity information corresponding to the first network node. And each piece of parallel direction information is configured with a matched concurrent identification accumulated value, and the concurrent identification accumulated value is accumulated along with the number of the nodes for transmitting the data packet. And a step value is configured at the same time, which can refer to a numerical value accumulated by the concurrent identifier accumulated value each time. And acquiring a concurrent identification accumulated value matched with the parallel direction information, inquiring the concurrent identification information matched with the concurrent identification accumulated value in the parallel direction information, and determining the concurrent identification information of the first network node in the direction matched with the parallel direction information. When the multicast header data is modified, a concurrency identification accumulated value matched with the parallel direction information is calculated and is added with the step value, and the original concurrency identification accumulated value is replaced to generate the multicast header data matched with the parallel direction information.
The concurrent identification accumulated value is used for determining concurrent identification information in the parallel direction information, and the order of the concurrent identification information is determined, so that the concurrent identification information is determined.
Illustratively, the parallel direction information is a character string 01100 in the y direction, the cumulative value of the concurrency flags is 1, and the current concurrency flag information is the first character, i.e., 0. The step value is 1, when the network node 1 transmits a data packet to the network node 2, the concurrency flag accumulated value is updated to 1+1 — 2, the concurrency flag accumulated value is 2 in the multicast packet header data received by the network node 2, and the concurrency flag information matched by the network node 2 is the second character, that is, 1. The initial value of the concurrency indication cumulative value may be 1, for example, the concurrency indication cumulative value of the master data node is 1.
The second sending direction is different from the first sending direction, and the second sending direction is used for transmitting the data packets in parallel. The number of second transmission directions is greater than or equal to 0. The sum of the number of the first sending directions and the number of the second sending directions is less than or equal to the number of all directions in the network on chip. Wherein the second transmission direction may be determined in parallel with the first transmission direction. For example, after the first sending direction is determined, it is determined whether the multicast header data includes the parallel direction information, and it is determined whether the second sending direction exists according to the parallel direction information. For another example, the determining manner of the first sending direction and the determining manner of the second sending direction are independent from each other and do not affect each other. The present invention may be set according to practical situations, and the embodiments of the present invention are not particularly limited. The first transmission direction may be determined in a manner as described with reference to the foregoing embodiments.
The direction order information determines a direction having the highest priority, i.e., a first transmission direction, and the parallel direction information determines directions other than the first transmission direction. The parallel direction information corresponds to the second transmission direction, and the number of the parallel direction information may be equal to the number of the second transmission directions. If the parallel direction information does not exist, only one first sending direction is determined, and if the relative displacement of the first sending direction is 0, the data packet is forwarded.
In some optional embodiments, the first network node has at least one second transmission direction and no first transmission direction. For example, if the x direction is the first propagation direction with the highest priority, the relative displacement in this direction is 0, and the y direction and the z direction are the second propagation directions, and have relative displacements, respectively, it can be determined that there are two second transmission directions for the first network node.
By acquiring the parallel direction information, the second sending direction in which the data packet needs to be sent currently can be determined, so that a plurality of target sending directions can be accurately determined, the accuracy of network-on-chip data transmission is improved, and meanwhile, data are transmitted in parallel, and the transmission efficiency of a multicast mode is improved.
S340, transmitting the data packet along the target transmission direction.
Optionally, the 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 matched with each target sending direction; and transmitting the data packet matched with each target transmission direction along each target transmission direction.
The multicast header data includes a 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, and 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, so that the multicast packet header data needs to be modified, and the target sending direction of the previous first network node is replaced by the target sending direction of the new first network node, so as 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 a data packet to a plurality of network nodes, and the target sending directions corresponding to each network node are different, so that the target sending directions corresponding to the network nodes can be respectively re-determined according to the target sending direction corresponding to each network node, that is, the multicast header data corresponding to each target sending direction is respectively re-determined.
Illustratively, the multicast header data may be duplicated into a plurality of pieces, and the number of the multicast header data is the same as the number of the target transmission directions. And correspondingly generating multicast header data matched with the target sending direction respectively for each target sending direction.
The target sending direction of the processing unit in the first network node may not modify the multicast header data, and the first network node directly forwards the data packet to the processing unit.
The data transmission method has the advantages that the multicast packet header data are modified according to different target transmission directions, matched data packets can be accurately generated according to the different target transmission directions, the modified data packets are transmitted along the respective matched target transmission methods, multicast transmission of the data packets is accurately achieved, the data packets are simultaneously transmitted to a plurality of network nodes on one multicast route, the situation that each network node needs to plan the multicast route, the data packets repeatedly pass through the same node can be avoided, the number of data transmission steps can be reduced, and the data transmission efficiency is improved.
Optionally, the modifying the multicast header data to generate a data packet matching the target sending direction includes: in the multicast packet header data, calculating the difference between the relative displacement matched with the first sending direction and a set step length, wherein the distance between the network node and the first network node is matched with the set step length; and in the multicast header data, replacing the relative displacement matched with the first sending direction with a difference value to generate a data packet matched with the first sending direction.
And taking the difference between the relative displacement matched with the first sending direction in the multicast header data and the set step length as a new relative displacement matched with the first sending direction. The step size is the distance of each transmission of the data packet, and is usually in terms of nodes, i.e. the step size represents the number of nodes that the data packet moves at one time. Optionally, the step length is set to 1, and may be specifically set as required. The first transmit direction matching relative displacement is replaced with a difference value indicating that the packet has traveled the distance of the set step size along the first transmit direction.
For example, if the relative displacement of the first transmission direction is 2 and the step size is set to 1, the new relative displacement is 2-1 — 1. Illustratively, the relative displacement is x-3 and y-2. If the direction sequence information is in the x direction and then in the y direction, the first network node sends the data packet to the nodes adjacent to the x direction, and the relative displacement is modified to be x-3-1-2, y-2, and actually the relative displacement matched with the target sending direction except the first sending direction is not changed; and if the direction sequence information is that the direction is the y direction first and then the x direction, the first network node sends the data packet to the nodes adjacent to the y direction, and the relative displacement is modified to be 3, and 2-1 is 1.
In the multicast mode, any node that needs to receive data may be used as a destination node, and a node that is farthest from the first network node of the main data is usually selected as the destination node. In addition, in the network on chip, the positions of the nodes may be adjusted, and optionally, data stored in the two nodes is exchanged to adjust the positions of the nodes. Therefore, in the multicast mode, the scattered network nodes can be concentrated in a set area, and can be transmitted to a plurality of directions in parallel on one transmission line, so that the mapping of a compiler is facilitated, the transmission of data packets is facilitated, the transmission steps of the data packets are reduced, and the transmission efficiency is improved.
In an alternative example, the topology of the network on chip is a two-dimensional grid, the step size is set to 1, and as shown in fig. 3b, the transmission line of the data packet is a transmission line only in the x direction. The data packet is sent to the core C1, the core C2 and the core C3 by the core C0, and the specific process is as follows: the core C0 sends data to the node n0, the node n0 sends data to the node n1, the node n2 and the node n3, and the corresponding node n sends data to the core C.
The header of the node n0 is shown in table 2 below:
TABLE 2
Figure BDA0002712951300000141
Wherein the transmission mode information is used to identify a multicast mode. For example, the sending mode information may be represented by a preconfigured character string, and the embodiment of the present invention is not limited in particular. When the sending mode information is 1, namely the data packet comprises multicast header data, the sending mode is a multicast mode; when the transmission model information is 0, that is, the data packet does not include the multicast header data, it indicates that the transmission mode is a non-multicast mode, for example, a unicast mode or a broadcast mode. The parallel direction information is used for judging whether the data packets are transmitted to other issues in parallel on the basis of the first communication path or not. d1, d2, d3 … … dn, etc., representing the relative displacement of the (i-1) th step (i is equal to 0 and less than or equal to n) in the parallel direction.
The direction order information is used for determining the sequence of the target sending direction of the data packet. The corresponding relation between the precedence order of each direction and the direction order information can be configured in advance according to all directions of the network on chip. For example, the network-on-chip is a two-dimensional grid, and the directions include an x direction and a y direction; when the direction order information is 1, the x direction is first and then the y direction is represented; when the direction order information is 0, it indicates that the y direction is first and then the x direction is last. As another example, the network-on-chip is a three-dimensional grid, with directions including an x-direction, a y-direction, and a z-direction. When the direction sequence information is 0, indicating that the direction sequence is in the x direction, the y direction and the z direction in sequence; when the direction sequence information is 1, the direction sequence is represented as an x direction, a z direction and a y direction; when the direction sequence information is 2, the indication direction sequence is the y direction, the x direction and the z direction in sequence; when the direction sequence information is 3, the indication direction sequence is the y direction, the z direction and the x direction in sequence; when the direction sequence information is 4, the direction sequence is represented as a z direction, an x direction and a y direction; when the direction order information is 5, the direction order is represented as a z direction, a y direction, and an x direction. In addition, there are other forms of topology results, and different corresponding relations can be configured correspondingly, which can be set according to actual situations, and the embodiment of the present invention is not limited specifically.
dx represents the relative displacement of the x-direction match; dy denotes the relative displacement of the y-direction match. dx and dy form a relative displacement, or relative displacement vector, etc. There may be a non-zero constant in dx and dy.
The direction order information in the multicast header data is 1, the relative displacement is dx equals to 3, and dy equals to 0. The relative displacement may also be represented as 30, and the corresponding relationship between 30 and the direction in the relative displacement matches the direction order information, that is, 3 represents the relative displacement corresponding to the direction with the top order in the direction order information, and 0 represents the relative displacement corresponding to the direction with the bottom order in the direction order information.
When the core C0 sends a data packet, the packet header of the data packet carries the relative displacement of the core C3 with respect to the core C0: (3, 0) and sends the data packet to the primary data first network node n 0. When the node n0 receives the data packet, the direction sequence information is 1, the direction of non-0 relative displacement matching is the x direction, and the first sending direction is determined to be the x direction. The relative displacement in the multicast header data of the header is modified from (3, 0) to (2, 0) according to the step size of 1, and then sent to the node n 1. After receiving the packet, the node n1 sends the packet to the core C1, where the first sending direction is x direction, changes the relative displacement in the multicast header data of the header from (2, 0) to (1, 0), and then sends the packet to the node n 2. When the node n2 receives the packet, it sends the packet to the core C2, where the first sending direction is x direction, changes the relative displacement in the multicast header data of the header from (1, 0) to (0, 0), and then sends the packet to the node n 3. Node n3 receives the packet, sends the packet to core C3 and finds that the relative displacement is (0, 0), indicating that there is no first direction of transmission and the multicast ends.
The method comprises the steps of indicating network nodes by modifying the relative displacement matched with the first sending direction in the relative displacement of multicast header data, re-determining the propagation distance according to the updated relative displacement, and continuously adjusting the multicast header data according to the transmission process of data packets, so that each first network node can accurately transmit the data packets to the next network node, and the transmission accuracy of the data packets is improved.
And updating the multicast header data in the data packet to form a new data packet matched with the target sending direction, and sending the new data packet to the matched network node in the target sending direction. Actually, the data packet is duplicated into a plurality of data packets, and the multicast header data in each data packet is updated to the multicast header data matched with the target sending direction, so as to form the data packet matched with the target sending direction, and the data packet is sent to the network node matched with the target sending direction.
Optionally, the modifying the multicast header data to generate a data packet matching the target sending direction includes: in the multicast packet header data, calculating the difference between the relative displacement matched with a second sending direction and a set step length, wherein the distance between the network node and the first network node is matched with the set step length, and the target sending direction is the second sending direction; in the multicast header data, the relative displacement matched with the first sending direction is set to zero, the second sending direction is determined as the propagation direction with the highest priority, the relative displacement matched with the second sending direction is replaced by a difference value, and a data packet matched with the second sending direction is generated.
The relative displacement includes relative displacements respectively matched with a plurality of target transmission directions. The modification of the relative displacement can be referred to the foregoing embodiments.
Illustratively, the parallel direction information is a character string 01100 in the y direction, and the concurrent identification information of the first network node is a first character, that is, 0. The first network node does not need to send data packets in the y-direction.
The first network node needs to transmit the data packet to an adjacent network node in the second sending direction, and the network node can judge the target sending direction of the data packet according to the multicast packet header data. The multicast header data received by the network node is different from the multicast header data received by the first network node.
It can be understood that, the network node adjacent to the first network node in the second sending direction is the same as the network node adjacent to the second network node in the first sending direction, and actually the first network node receives the parallel direction information for determining whether the first network node needs to transmit the data packet to the second sending direction, and if the parallel direction information received by the second network node is still used for determining whether the second network node needs to transmit the data packet to the first sending direction, the adjacent network node repeatedly receives the same data, so that the relative displacement matching the first sending direction is deleted, or set to 0, and the data is prevented from being repeatedly transmitted to the same node. Correspondingly, the relative displacement matched with the second transmission direction is updated to be the difference value between the relative displacement matched with the second transmission direction and the set step length. And updating the relative displacement matched with the other directions except the first transmission direction and the second transmission direction into the corresponding direction matched relative displacement in the target second relative displacement queue.
When the data packet is transmitted in the second transmission direction, the relative displacement in the first transmission direction is 0, and the direction needs to be switched to continue transmitting the data packet.
The relative displacement in the multicast packet header data is modified through the parallel direction information and the matched relative displacement, the data packet is transmitted to the second sending direction, the updated multicast packet header data can be sent to the adjacent network node in the second sending direction, the adjacent network node is indicated to accurately continue to transmit the data packet in the second sending direction, repeated sending to the same node can be avoided, and the transmission accuracy of the data packet in the second sending direction is improved. It should be understood that, when the neighboring network node in the second transmission direction receives the data packet, and determines that the second transmission direction is the first propagation direction with the highest priority according to the multicast header data, the neighboring network node may determine whether to forward the data packet to other second propagation directions according to the multicast header data.
In an alternative example, the topology of the network on chip is a two-dimensional grid, the step size is set to 1, and as shown in fig. 3C, the data packet is sent from the core C0 to the core C1, the core C2, the core C3, the core C5, the core C6, and the core C9, where the specific process is as follows: the core C0 sends data to the node n0, the node n0 sends data to the node n1, the node n2, the node n3, the node n5, the node n6 and the node n9, and the corresponding node n sends data to the core C. Wherein node n0 is the primary data first network node, and node n1, node n2, node n3, node n5, node n6 and node n9 may be the aforementioned destination nodes.
The header of the node n0 is shown in table 3 below:
TABLE 3
Figure BDA0002712951300000171
The direction order information in the multicast header data is 1, the relative displacement is dx equals to 3, and dy equals to 0.
When the core C0 sends a data packet, the packet header of the data packet carries the relative displacement of the core C3 with respect to the core C0: (3, 0), identifying the cumulative value as 1 and the parallel direction information, and sending the data packet to the main data first network node n 0. When the node n0 receives the data packet, the direction sequence information is 1, which can be understood as the x-axis direction and then the y-axis direction, and the direction matched with the non-0 relative displacement is the x-direction, and the first sending direction is determined to be the x-direction. Meanwhile, the cumulative value of the concurrent identifier is 1 or the node number is 0, so that it is determined that the current concurrent identifier information in the parallel direction information is the first bit (the concurrent identifier information is the node number +1 bit), that is, 0, indicating that the node n0 does not need to transmit the data packet in parallel, that is, the second sending direction is null. According to the step length of 1, the relative displacement in the multicast header data of the header is changed from (3, 0) to (2, 0), meanwhile, the concurrent identifier accumulation value accumulation 1 is changed to 2, the multicast header data is updated, and the modified multicast header data is used as the multicast header data matched in the x direction and then is sent to the node n 1.
After receiving the data packet, the node n1 sends the data packet to the core C1, at this time, the first sending direction is the x direction, and at the same time, the current concurrent identifier cumulative value is 2 or the node number is 1, thereby determining that the current concurrent identifier information in the parallel direction information is the second bit, that is, 1, indicating that the node n1 needs to simultaneously transmit the data packet in parallel in the y direction, that is, the second sending direction is the y direction. The multicast header data in the header is changed from (2, 0) to (1, 0), and the concurrent identifier accumulation value 1 is changed to 3, the multicast header data is updated, and the modified multicast header data is used as the multicast header data matched in the x direction and then sent to the node n 2. Accordingly, the second relative shift queue corresponding to the current concurrency identification information is d2, which is 2. Firstly, the relative displacement in the multicast header data of the header is changed from (2, 0) to (0, 0), then the difference value between the value of d2 and the step length 1 is calculated to be 1, and the difference value is determined as the relative displacement in the y direction in the relative displacement, so that the multicast header data is updated by changing the relative displacement from (2, 0) to (0, 1), and in addition, the corresponding parallel direction information in the non-x direction and the non-y direction does not exist, the parallel direction information and the concurrency identification accumulated value can be reset to be null, and the modified multicast header data is used as the multicast header data matched in the y direction and then sent to the node n 5.
After receiving the data packet, the node n2 sends the data packet to the core C2, at this time, the first sending direction is the x direction, and at the same time, the current concurrent identifier cumulative value is 3 or the node number is 2, so that it is determined that the current concurrent identifier information in the parallel direction information is the third bit, that is, 1, indicating that the node n2 needs to simultaneously transmit the data packet in parallel in the y direction, that is, the second sending direction is the y direction. The multicast header data in the header is changed from (1, 0) to (0, 0), and the concurrent identifier cumulative value 1 is changed to 4, the multicast header data is updated, and the modified multicast header data is used as the multicast header data matched in the x direction and then sent to the node n 3. Accordingly, the second relative shift queue corresponding to the current concurrency identification information is d3, i.e. 1. Firstly, the relative displacement in the multicast header data of the header is changed from (1, 0) to (0, 0), then the difference value between the value of d2 and the step length 1 is calculated, namely 0, and the difference value is determined as the relative displacement in the y direction in the relative displacement, so that the multicast header data is updated from (1, 0) to (0, 0), in addition, the corresponding parallel direction information in the non-x direction and the non-y direction does not exist, the parallel direction information and the concurrency identification accumulated value can be reset to be null, and the modified multicast header data is taken as the multicast header data matched in the y direction and then sent to the node n 6.
After receiving the packet, the node n3 sends the packet to the core C3, and the node n3 finds that the relative shift is (0, 0), indicating that there is no first sending direction. Meanwhile, the current concurrent identifier cumulative value is 4 or the node number is 3, so that the fourth position, that is, 0, of the current concurrent identifier information in the parallel direction information is determined, that is, the node n3 does not need to transmit the data packets in parallel in the y direction at the same time, that is, the second sending direction is empty. Both the first and second directions of transmission are null and node n3 stops continuing to transmit data.
After receiving the packet, the node n5 sends the packet to the core C5, where the relative displacement is (0, 1) and the first sending direction is the y direction. The parallel direction information in the packet header is null, and the cumulative value of the parallel identification is null, and there is no second sending direction. The multicast header data in the header is changed from (0, 1) to (0, 0), and the modified multicast header data is sent to the node n9 as the multicast header data matched in the y direction.
Node n9, upon receiving the packet, sends the packet to core C9, at which point the relative shift is (0, 0), indicating that there is no first direction to send. Meanwhile, the parallel direction information in the packet header is empty, and a second sending direction does not exist. Both the first and second directions of transmission are null and node n9 stops continuing to transmit data.
Node n6, upon receiving the packet, sends the packet to core C6, at which point the relative shift is (0, 0), indicating that there is no first direction to send. Meanwhile, the parallel direction information in the packet header is empty, and a second sending direction does not exist. Both the first and second directions of transmission are null and node n9 stops continuing to transmit data. And the multicast is finished.
It should be noted that, when a transmission direction transition occurs, there is no other direction at this time, and only the parallel direction information may be reset to null, and the accumulated value is not accumulated and is identified.
In some optional embodiments, there is a corresponding number for each node, and the parallel direction information may include a value corresponding to each node, for example, the 6 th bit in the parallel direction information corresponds to the node n6, and the node n6 may query the value of the 6 th bit in the parallel direction information when receiving the data packet, and determine whether the second sending direction exists according to the queried value. In this way, the determination of whether a node has a second transmission direction can be achieved in a simpler manner. As mentioned above, there may be multiple propagation directions, for example, M propagation directions, and M-1 parallel direction information may be set to determine whether to be the second transmission direction, respectively.
And S350, if the sending mode is determined to be a continuous sending mode according to the packet header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction.
The embodiment of the invention realizes the multicast of the data packet containing the multicast header data to the network node by sending the data packet to the matched processing unit for corresponding processing when detecting the target sending direction and when detecting that the data packet contains the multicast header data, and determines the propagation direction with relative displacement as the target sending direction, can accurately determine the target sending direction, improve the accuracy of network-on-chip data transmission, avoid configuring the flag bits of all target nodes in the packet header, can reduce the transmission cost of the packet header and the resources consumed by the generation of the packet header, reduce the storage resource consumption of the node address, reduce the loss of transmission efficiency, meanwhile, the inquiry power consumption and the packing power consumption of the multicast node are reduced, the transmission steps are reduced, the routing efficiency is improved, the data delivery time is shortened, and the power consumption consumed by data transmission is reduced.
Example four
Fig. 4 is a flowchart of a network-on-chip data transmission method for a many-core in a fourth embodiment of the present invention, where this embodiment is applicable to a case where a network-on-chip is used for data transmission, and the method may be executed by a network-on-chip data transmission apparatus for a many-core provided in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device, and specifically applied to a second network node of a network-on-chip. As shown in fig. 4, the method of the present embodiment includes:
s410, receiving a data packet sent by the matched first processing unit, wherein the data packet comprises packet header data.
Non-exhaustive descriptions of embodiments of the present invention may be had with reference to the foregoing embodiments.
The second network node is a primary data node. The second network node obtains the data packet from the processing unit and forwards the data packet to other network nodes. The processing unit is used for acquiring source data, using the source data as a packet body, generating multicast packet header data, forming a data packet and sending the data packet to a network node.
The second network node sends the data packet to the first network node in the foregoing embodiment, where the first network node is an intermediate node or a destination node.
The second network node corresponds to the first processing unit.
And S420, determining a target sending direction according to the packet header data.
S430, 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.
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.
S440, if the sending mode is determined to be the continuous sending mode according to the header data of the data packet, sending the data received in the continuous sending mode and sent by the first processing unit.
When data not including the header is received, the data is directly forwarded to the first network node.
S450, 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.
According to the embodiment of the invention, after the data packet is sent, only the subsequently received data in the same sending direction as the data packet is sent in the continuous sending mode, the data in the packet header is not sent any more, the packet header for sending the data packet can be reduced, only the data is sent, the data transmission amount can be reduced, the transmission cost of the packet header is reduced, the access times of a memory are reduced, the power consumption is reduced, the transmission cost is reduced, and the transmission efficiency is improved.
EXAMPLE five
Fig. 5 is a schematic diagram of a many-core network-on-chip data transmission apparatus according to a fifth embodiment of the present invention. The fifth embodiment is a corresponding apparatus for implementing the many-core network-on-chip data transmission method provided in the foregoing embodiments of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device, and specifically configured in a first network node.
A packet receiving module 510, configured to receive a packet from a first direction;
a data packet sending module 520, configured to determine a target sending direction according to packet header data of the data packet, and send the data packet along the target sending direction;
a data continuous sending module 530, configured to send, if it is determined that the sending mode is the continuous sending mode according to the packet header data of the data packet, the data from the first direction received in the continuous sending mode along the target sending direction.
The embodiment of the invention only sends the data which is received subsequently and has the same sending direction with the data packet under the continuous sending mode after sending the data packet, and does not send the data of the packet head, thereby solving the problem that the bit number of the packet head is greatly increased and the consumption of transmission resources is increased because the flag bits of all receiving nodes are required to be added when the data packet is sent in the prior art, reducing the packet head of the data packet and only sending the data, reducing the data transmission quantity, reducing the transmission cost of the packet head, reducing the access times of a memory, reducing the power consumption, reducing the transmission cost and improving the transmission efficiency.
Further, the data continuous sending module 530 is configured to: acquiring continuous sending identification information matched with the data packet; and if the continuous sending identification information is determined to be the first continuous sending identification information, determining that the sending mode is the continuous sending mode.
Further, the network-on-chip data transmission apparatus of the processing unit further includes: the target sending direction recording module is used for recording the target sending direction; the data continuous sending module 530 is configured to: and when receiving the data from the first direction, acquiring the target sending direction, and sending the data along the target sending direction.
Further, the network-on-chip data transmission apparatus of the processing unit further includes: and the continuous sending mode stopping module is used for stopping the continuous sending mode and resetting the target sending direction when the stop identification information is detected.
Further, the first network node is configured with a status register matching with the first direction, where the status register includes identification information matching with each sending direction, and the target sending direction recording module is configured to: setting the identification information of the target sending direction matching to 1, and setting the identification information of the non-target sending direction to 0, wherein the data continuous sending module 530 is configured to: and determining the sending direction with the identification information of 1 as the target sending direction.
Further, the data packet sending module 520 is configured to: acquiring at least one data packet matched with the target sending direction; arbitrating the sending sequence of each matched data packet to generate sending direction arbitration information matched with the target sending direction, wherein the sending direction arbitration information comprises the sending sequence of each matched data packet in the target sending direction; and transmitting the data packet according to the transmitting direction arbitration information.
Further, the data packet sending module 520 is configured to: acquiring at least one queue; sequentially storing each matched data packet in the queue according to the transmitting direction arbitration information, wherein the queue is a first-in first-out queue; and sequentially sending the data packets in the queue, and sending the data packets when the data packets are in the sequence.
Further, the queue includes a plurality of virtual channels, and the network-on-chip data transmission apparatus of the many-core processing unit further includes: the target virtual channel determining module is used for determining a target virtual channel of a target data packet in a target sending direction queue; wherein the data continuous sending module is configured to: and storing target data into the target virtual channel, and sending the target data along the target sending direction, wherein the target data packet and the target data are data sent in the same first direction.
Further, the data packet in the first direction includes a data packet sent by an adjacent network node or a data packet sent by a processing unit matched with the first network node.
Further, the data packet sending module 520 is configured to: if the packet header data is determined to comprise multicast packet header data, determining the propagation direction of the processing unit matched with the first network node as a target sending direction; if at least one propagation direction with relative displacement exists according to the multicast header data, and each propagation direction is determined as a target sending direction; wherein the relative displacement is used to characterize a propagation distance of the data packet in the propagation direction.
Further, the data packet sending module 520 is configured to: modifying the multicast packet header data in the data packet to form a data packet matched with each target sending direction; and transmitting the data packet matched with each target transmission direction along each target transmission direction.
Further, the multicast header data includes direction order information, the direction order information is used to determine a priority of a propagation direction, and the target sending direction includes a first sending direction; the data packet sending module 520 is configured to: determining a first transmission direction with the highest priority according to the direction sequence information; and if the first propagation direction is determined to have relative displacement, determining the first propagation direction as a first sending direction.
Further, the multicast header data includes parallel direction information, 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 a second sending direction, and the data packet sending module 520 is configured to: determining concurrent identification information of the first network node according to the parallel direction information; and if the concurrent identification information is determined to be the first concurrent identification information, taking the second propagation direction as the second sending direction.
The network-on-chip data transmission device of the many-core can execute any network-on-chip data transmission method of the many-core provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executed network-on-chip data transmission method of the many-core.
EXAMPLE six
Fig. 6 is a schematic diagram of a many-core network-on-chip data transmission apparatus according to a sixth embodiment of the present invention. A sixth embodiment is a corresponding apparatus for implementing the many-core network-on-chip data transmission method provided in the foregoing embodiments of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device, and specifically configured in a second network node.
A data packet receiving module 610, configured to receive a data packet sent by a matched first processing unit, where the data packet includes packet header data;
a target sending direction determining module 620, configured to determine a target sending direction according to the packet header data;
a data packet sending module 630, configured to send 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;
a data receiving module 640, configured to, if it is determined that a sending mode is a continuous sending mode according to packet header data of the data packet, send data, which is received in the continuous sending mode and sent by the first processing unit;
a data sending module 650, configured 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.
According to the embodiment of the invention, after the data packet is sent, only the subsequently received data in the same sending direction as the data packet is sent in the continuous sending mode, the data in the packet header is not sent any more, the packet header for sending the data packet can be reduced, only the data is sent, the data transmission amount can be reduced, the transmission cost of the packet header is reduced, the access times of a memory are reduced, the power consumption is reduced, the transmission cost is reduced, and the transmission efficiency is improved.
The network-on-chip data transmission device of the many-core can execute any network-on-chip data transmission method of the many-core provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executed network-on-chip data transmission method of the many-core.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of a computer device according to a seventh embodiment of the present invention. As shown in fig. 7, the computer apparatus includes a processor 71, a memory 72, an input device 73, and an output device 74; the number of the processors 71 in the computer device may be one or more, and one processor 71 is taken as an example in fig. 7; the processor 71, the memory 72, the input device 73 and the output device 74 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 7.
The memory 72 is a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the network-on-chip data transmission method of many cores in the embodiments of the present invention. The processor 71 executes various functional applications and data processing of the computer device by running software programs, instructions and modules stored in the memory 72, that is, the network-on-chip data transmission method of many cores is implemented.
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, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 72 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 72 may further include memory located remotely from the processor 71, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 73 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 74 may include an output device such as a display screen.
Example eight
An eighth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a multi-core network-on-chip data transmission method according to all embodiments of the present invention:
that is, the program when executed by the processor implements: receiving a data packet from a first direction; determining a target sending direction according to the packet header data of the data packet, and sending the data packet along the target sending direction; and if the sending mode is determined to be a continuous sending mode according to the header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction.
Alternatively, the program when executed by the processor implements: receiving a data packet sent by a matched first processing unit, wherein the data packet comprises packet header data; determining a target sending direction according to the packet 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 according to the packet header data of the data packet, the data received in the continuous sending mode and sent by the first processing unit are sent; and 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.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the 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 a WAN, or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (18)

1. A many-core network-on-chip data transmission method is applied to a first network node and comprises the following steps:
receiving a data packet from a first direction;
determining a target sending direction according to the packet header data of the data packet, and sending the data packet along the target sending direction;
and if the sending mode is determined to be a continuous sending mode according to the header data of the data packet, sending the data from the first direction received in the continuous sending mode along the target sending direction.
2. The method of claim 1, wherein the determining the transmission mode as a continuous transmission mode according to the header data of the data packet comprises:
acquiring continuous sending identification information matched with the data packet;
and if the continuous sending identification information is determined to be the first continuous sending identification information, determining that the sending mode is the continuous sending mode.
3. The method of claim 1, further comprising:
recording the target sending direction;
the transmitting the data from the first direction received in the continuous transmission mode along the target transmission direction includes:
and when receiving the data from the first direction, acquiring the target sending direction, and sending the data along the target sending direction.
4. The method of claim 1, further comprising:
and when the stop identification information is detected, stopping the continuous transmission mode and resetting the target transmission direction.
5. The method according to claim 3, wherein the first network node is configured with a status register matching the first direction, the status register comprising identification information matching each transmission direction;
wherein the recording the target transmission direction includes:
setting the identification information matched with the target sending direction to be 1, and setting the identification information of the non-target sending direction to be 0;
wherein the obtaining the target sending direction includes:
and determining the sending direction with the identification information of 1 as the target sending direction.
6. The method of claim 1, wherein the number of the first directions is plural, and wherein the transmitting the data packet in the target transmission direction comprises:
acquiring at least one data packet matched with the target sending direction;
arbitrating the sending sequence of each matched data packet to generate sending direction arbitration information matched with the target sending direction, wherein the sending direction arbitration information comprises the sending sequence of each matched data packet in the target sending direction;
and transmitting the data packet according to the transmitting direction arbitration information.
7. The method of claim 6, wherein said transmitting the data packet according to the transmit direction arbitration information comprises:
acquiring at least one queue;
sequentially storing each matched data packet in the queue according to the transmitting direction arbitration information, wherein the queue is a first-in first-out queue;
and sequentially transmitting the data packets in the queue, wherein the data packets are transmitted in the sequence of the data packets.
8. The method of claim 7, the queue comprising a plurality of virtual channels, the method further comprising:
determining a target virtual channel of a target data packet in a target sending direction queue;
wherein, transmitting the data from the first direction received in the continuous transmission mode along the target transmission direction comprises:
and storing target data into the target virtual channel, and sending the target data 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 of claim 1, wherein the data packets in the first direction comprise data packets sent by neighboring network nodes or data packets sent by a processing unit matched with the first network node.
10. The method according to any one of claims 1 to 9, wherein the determining a target transmission direction according to the header data comprises:
if the packet header data is determined to comprise multicast packet header data, determining the propagation direction of the processing unit matched with the first network node as a target sending direction;
if at least one propagation direction with relative displacement exists according to the multicast header data, and each propagation direction is determined as a target sending direction;
wherein the relative displacement is used to characterize a propagation distance of the data packet in the propagation direction.
11. The method of claim 10, wherein said transmitting the data packet along the target transmit direction comprises:
modifying the multicast packet header data in the data packet to form a data packet matched with each target sending direction;
and transmitting the data packet matched with each target transmission direction along each target transmission direction.
12. The method of claim 10, wherein the multicast header data comprises direction order information, wherein the direction order information is used to determine a priority of propagation directions, and wherein the target sending direction comprises a first sending direction;
wherein, if it is determined that at least one propagation direction having a relative displacement exists according to the multicast header data, and each of the propagation directions is determined as a target transmission direction, comprising:
determining a first transmission direction with the highest priority according to the direction sequence information;
and if the first propagation direction is determined to have relative displacement, determining the first propagation direction as the first sending direction.
13. The method of claim 12, wherein the multicast header data includes parallel direction information, 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 a second sending direction;
wherein, if it is determined that at least one propagation direction having a relative displacement exists according to the multicast header data, and each of the propagation directions is determined as a target transmission direction, comprising:
determining concurrent identification information of the first network node according to the parallel direction information;
and if the concurrent identification information is determined to be the first concurrent identification information, taking the second propagation direction as the second sending direction.
14. A many-core network-on-chip data transmission method is applied to a second network node and comprises the following steps:
receiving a data packet sent by a matched first processing unit, wherein the data packet comprises packet header data;
determining a target sending direction according to the packet 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 according to the packet header data of the data packet, the data received in the continuous sending mode and sent by the first processing unit are sent;
and 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.
15. A multi-core network-on-chip data transmission apparatus configured in a first network node, comprising:
a packet receiving module for receiving a packet from a first direction;
the data packet sending module is used for determining a target sending direction according to packet header data of the data packet and sending the data packet along the target sending direction;
and a data continuous sending module, configured to send, if it is determined that a sending mode is a continuous sending mode according to the header data of the data packet, the data from the first direction received in the continuous sending mode along the target sending direction.
16. A method for transmitting network-on-chip data of a plurality of cores, configured in a second network node, includes:
the data packet receiving module is used for receiving a data packet sent by a matched first processing unit, wherein the data packet comprises packet header data;
the target sending direction determining module is used for determining a target sending direction according to the packet header data;
a data packet sending module, configured to send 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;
a data receiving module, configured to determine that a sending mode is a continuous sending mode according to packet header data of the data packet, and send data, which is received in the continuous sending mode and sent by the first processing unit, to the data receiving module;
and the data sending module is used for 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.
17. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the network-on-chip data transmission method of a many-core as claimed in any of claims 1-14.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a network-on-chip data transmission method for many cores according to any of claims 1-14.
CN202011069092.0A 2020-09-30 2020-09-30 Many-core network-on-chip data transmission method, device, equipment and medium Pending CN114363246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011069092.0A CN114363246A (en) 2020-09-30 2020-09-30 Many-core network-on-chip data transmission method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011069092.0A CN114363246A (en) 2020-09-30 2020-09-30 Many-core network-on-chip data transmission method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114363246A true CN114363246A (en) 2022-04-15

Family

ID=81089804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011069092.0A Pending CN114363246A (en) 2020-09-30 2020-09-30 Many-core network-on-chip data transmission method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114363246A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968903A (en) * 2022-04-21 2022-08-30 清华大学 Many external control circuit of nuclear chip

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040052306A (en) * 2002-12-16 2004-06-23 한국전자통신연구원 Broadcasting switch using crossbar
CN101420372A (en) * 2008-10-16 2009-04-29 电子科技大学 On-chip network cache allocation method
CN103595627A (en) * 2013-11-28 2014-02-19 合肥工业大学 NoC router based on multicast dimension order routing algorithm and routing algorithm thereof
CN105007226A (en) * 2015-07-23 2015-10-28 合肥工业大学 Multicast router based on package and circuit switching technology and working mode thereof
CN105580377A (en) * 2013-09-27 2016-05-11 Lg电子株式会社 Apparatus for transmitting broadcast signals, apparatus for receiving broadcast signals, method for transmitting broadcast signals and method for receiving broadcast signals
CN106254254A (en) * 2016-09-19 2016-12-21 复旦大学 A kind of network-on-chip communication means based on Mesh topological structure
WO2018054201A1 (en) * 2016-09-20 2018-03-29 清华大学 Routing multicast method and system based on 2d mesh network
CN109408257A (en) * 2018-11-09 2019-03-01 北京灵汐科技有限公司 Data transmission method, device and electronic equipment for network-on-chip NOC
CN110620731A (en) * 2019-09-12 2019-12-27 中山大学 Routing device and routing method of network on chip
CN111382114A (en) * 2018-12-28 2020-07-07 北京灵汐科技有限公司 Data transmission method and device for network on chip and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040052306A (en) * 2002-12-16 2004-06-23 한국전자통신연구원 Broadcasting switch using crossbar
CN101420372A (en) * 2008-10-16 2009-04-29 电子科技大学 On-chip network cache allocation method
CN105580377A (en) * 2013-09-27 2016-05-11 Lg电子株式会社 Apparatus for transmitting broadcast signals, apparatus for receiving broadcast signals, method for transmitting broadcast signals and method for receiving broadcast signals
CN103595627A (en) * 2013-11-28 2014-02-19 合肥工业大学 NoC router based on multicast dimension order routing algorithm and routing algorithm thereof
CN105007226A (en) * 2015-07-23 2015-10-28 合肥工业大学 Multicast router based on package and circuit switching technology and working mode thereof
CN106254254A (en) * 2016-09-19 2016-12-21 复旦大学 A kind of network-on-chip communication means based on Mesh topological structure
WO2018054201A1 (en) * 2016-09-20 2018-03-29 清华大学 Routing multicast method and system based on 2d mesh network
CN109408257A (en) * 2018-11-09 2019-03-01 北京灵汐科技有限公司 Data transmission method, device and electronic equipment for network-on-chip NOC
CN111382114A (en) * 2018-12-28 2020-07-07 北京灵汐科技有限公司 Data transmission method and device for network on chip and electronic equipment
CN110620731A (en) * 2019-09-12 2019-12-27 中山大学 Routing device and routing method of network on chip

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
万玉鹏;吴宁;: "NoC路由单元的系统级设计", 苏州科技学院学报(工程技术版), no. 02, 15 June 2009 (2009-06-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968903A (en) * 2022-04-21 2022-08-30 清华大学 Many external control circuit of nuclear chip
CN114968903B (en) * 2022-04-21 2024-04-19 清华大学 External control circuit of many-core chip

Similar Documents

Publication Publication Date Title
US6393026B1 (en) Data packet processing system and method for a router
US8417778B2 (en) Collective acceleration unit tree flow control and retransmit
WO2020001393A1 (en) Method and network node for sending network performance parameter and calculating network performance
US7904590B2 (en) Routing information through a data processing system implementing a multi-tiered full-graph interconnect architecture
US7958182B2 (en) Providing full hardware support of collective operations in a multi-tiered full-graph interconnect architecture
CN112084027B (en) Network-on-chip data transmission method, device, network-on-chip, equipment and medium
US20080181115A1 (en) System for transmitting data within a network between nodes of the network and flow control process for transmitting the data
JPWO2011148583A1 (en) Bus control device and control device for outputting instructions to bus control device
CN105556916B (en) The information statistical method and device of network flow
CN104301238A (en) Message processing method, device and system
US10637739B2 (en) Network topology system and building method for topologies and routing tables thereof
CN108287729B (en) Data stream instruction mapping method
CN114500354B (en) Switch control method, device, control equipment and storage medium
CN114363246A (en) Many-core network-on-chip data transmission method, device, equipment and medium
CN111194090B (en) Edge calculation-oriented multi-strategy channel allocation method
CN114884893B (en) Forwarding and control definable cooperative traffic scheduling method and system
CN103999435B (en) For the apparatus and method of efficient network address translation and ALG process
CN109547352A (en) The dynamic allocation method and device of packet buffer queue
CN114363245B (en) Multi-core network-on-chip data transmission method, device, equipment and medium
CN113037635B (en) Multi-source assembling method and device for data block in ICN router
CN114079634B (en) Message forwarding method and device and computer readable storage medium
CN114285790A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN109450809B (en) Data center scheduling system and method
CN115720211B (en) Network-computing integrated inter-core router and data packet aggregation method
CN111917648B (en) Transmission optimization method for rearrangement of distributed machine learning data in data center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination