CN118233411A - Network on chip, route control method and storage medium - Google Patents

Network on chip, route control method and storage medium Download PDF

Info

Publication number
CN118233411A
CN118233411A CN202410511315.6A CN202410511315A CN118233411A CN 118233411 A CN118233411 A CN 118233411A CN 202410511315 A CN202410511315 A CN 202410511315A CN 118233411 A CN118233411 A CN 118233411A
Authority
CN
China
Prior art keywords
virtual channel
transmission direction
transmission
data packet
router
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
CN202410511315.6A
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.)
Shanghai Xinfeng Microelectronics Co ltd
Original Assignee
Shanghai Xinfeng Microelectronics 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 Shanghai Xinfeng Microelectronics Co ltd filed Critical Shanghai Xinfeng Microelectronics Co ltd
Priority to CN202410511315.6A priority Critical patent/CN118233411A/en
Publication of CN118233411A publication Critical patent/CN118233411A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure provides a network on chip, a routing control method, and a storage medium, wherein the network on chip includes: a plurality of routers. Each router includes: and an arbitration module. The arbitration module is connected with the router at the lower stage and is configured to receive and record the transmission direction and the transmission state of each virtual channel in the router, and determine a forwarding virtual channel among the plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel. In this way, the present disclosure can determine the forwarding virtual channel of the lower router in advance in the route calculation of the data packet by the current router, and the forwarding virtual channel is determined based on the transmission state of the virtual channel in the lower router. Therefore, congestion can be avoided in the process of transmitting the data packet to the lower-level router, and the forwarding efficiency of each router is improved; further, the throughput of the network on chip can be improved.

Description

Network on chip, route control method and storage medium
Technical Field
The present disclosure relates to the field of integrated circuits, and more particularly, to a network on chip, a routing control method, and a storage medium.
Background
Network On Chip (NOC) is an interconnect structure for integrated circuits, typically used for communication in multi-core systems. The network on chip typically includes elements such as routers (routers), processing units (Processing Element, PEs), memories (memories), and network interfaces (Network Interface, NI) and links (links). The processing unit may include a Central Processing Unit (CPU), a Graphics Processor (GPU), and the like. Under the condition that all processing units in the network-on-chip initiate random read-write access, a router generates a lot of competition when forwarding data, so that the data forwarding efficiency is low, and the throughput of the whole network-on-chip is reduced.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a network on chip, a routing control method, and a storage medium to improve throughput of the network on chip.
The disclosed embodiments provide a network on chip comprising: a plurality of routers; the routers are mutually connected in a communication way to form a grid network; each router transmits the received data packet to the lower-level router; each of the routers includes: a plurality of interfaces and arbitration modules; the interfaces are connected with the arbitration module; each of the interfaces includes: a plurality of virtual channels; the arbitration module is connected with the router at the lower level and is configured to receive the receiving address information of the data packet and determine a forwarding interface from a plurality of interfaces of the router at the lower level based on the receiving address information of the data packet; and receiving and recording the transmission direction and transmission state of each virtual channel in the router, and determining a forwarding virtual channel in a plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel.
In the above scheme, the data packet has a plurality of flits; the arbitration module is further configured to receive and record the number of flits transmitted in the current transmission direction of each virtual channel in the router, and judge whether the number of flits is greater than a set threshold; if the number of the flits is larger than the set threshold, transmission is paused, and the current transmission direction is recorded as a backup transmission direction.
In the above solution, the arbitration module is further configured to determine whether a transmission direction of the data packet is consistent with a transmission direction of the remaining virtual channels in the forwarding interface when the transmission state of any one of the virtual channels in the forwarding interface is empty; if the transmission direction of one virtual channel in the rest virtual channels is inconsistent with the transmission state of the data packet, selecting the virtual channel with the transmission state of all empty as the forwarding virtual channel.
In the above solution, the arbitration module is further configured to determine whether the transmission direction of the data packet is consistent with the transmission direction of the virtual channel when the transmission state of any one of the virtual channels in the forwarding interface is not full; and if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state being not full as the forwarding virtual channel.
In the above scheme, the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, including: the transmission direction of the data packet is consistent with the current transmission direction of the virtual channel; or the transmission direction of the data packet is consistent with the backup transmission direction of the virtual channel.
In the above solution, the arbitration module includes: a plurality of registers; each of the registers is configured to register the backup transmission direction of the corresponding virtual channel.
In the above solution, the network on chip further includes: a plurality of master devices and a plurality of slave devices; and each master device and each slave device are connected with a corresponding router through a corresponding interface.
The present disclosure also provides a network-on-chip route control method, including: acquiring receiving address information of a data packet, and determining a forwarding interface from a plurality of interfaces of a lower router based on the receiving address information of the data packet; wherein each of the interfaces comprises: a plurality of virtual channels; and receiving and recording the transmission direction and the transmission state of each virtual channel in the router, and determining a forwarding virtual channel in a plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel.
In the above solution, determining one forwarding virtual channel among the plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission status of each virtual channel includes: judging whether the transmission direction of the data packet is consistent with the transmission direction of the rest virtual channels in the forwarding interface or not under the condition that the transmission state of any one virtual channel in the forwarding interface is all empty; and if the transmission direction of one virtual channel in the remaining virtual channels is inconsistent with the transmission direction of the data packet, selecting the virtual channel with the transmission state of all empty as the forwarding virtual channel.
In the above solution, determining one forwarding virtual channel among the plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission status of each virtual channel further includes: judging whether the transmission direction of the data packet is consistent with the transmission direction of the virtual channel or not under the condition that the transmission state of any one of the virtual channels in the forwarding interface is not full; and if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state being non-full as the forwarding virtual channel.
The disclosed embodiments also provide a computer-readable storage medium having stored thereon a computer program or instructions that, when executed, cause a computer to perform a route control method according to the above-described aspects.
The disclosed embodiments provide a network on chip comprising: a plurality of routers; each router includes: and an arbitration module. The arbitration module is connected with the router at the lower level and is configured to receive the receiving address information of the data packet and determine a forwarding interface from a plurality of interfaces of the router at the lower level based on the receiving address information of the data packet; and receiving and recording the transmission direction and the transmission state of each virtual channel in the router, and determining a forwarding virtual channel in a plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel. In this way, in the route calculation process of the current router, the embodiment of the disclosure can determine the forwarding virtual channel of the data packet in the lower router based on the transmission direction and the transmission state of the virtual channel in the forwarding interface. That is, the present disclosure can determine a forwarding virtual channel of a lower router in advance in a routing calculation of a data packet by a current router, and the forwarding virtual channel is determined based on a transmission state of a virtual channel in the lower router. Therefore, the method and the device can avoid congestion in the process of transmitting the data packet to the lower-level router, and improve the forwarding efficiency of each router; further, the throughput of the network on chip can be improved.
Drawings
Fig. 1 is a schematic structural diagram of a network on chip provided in an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a router according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a router according to a second embodiment of the present disclosure;
fig. 4 is a schematic structural diagram III of a router according to an embodiment of the present disclosure;
Fig. 5 is a schematic diagram of network-on-chip throughput provided by an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of an arbitration module according to an embodiment of the disclosure;
Fig. 7 is a schematic flow chart of a route control method according to an embodiment of the disclosure;
fig. 8 is a second flowchart of a routing control method according to an embodiment of the present disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure are further elaborated below in conjunction with the drawings and the embodiments, and the described embodiments should not be construed as limiting the present disclosure, and all other embodiments obtained by those skilled in the art without making inventive efforts are within the scope of protection of the present disclosure.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
If a similar description of "first/second" appears in the application document, the following description is added, in which the terms "first/second/third" merely distinguish similar objects and do not represent a specific ordering of the objects, it being understood that "first/second/third" may, where allowed, interchange a specific order or precedence, to enable embodiments of the disclosure described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of the present disclosure only and is not intended to be limiting of the present disclosure.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Fig. 1 is an optional structural schematic diagram of an optional network-on-chip 100 provided in an embodiment of the present disclosure, and referring to fig. 1, the network-on-chip 100 includes a plurality of routers (R0 to R15 in fig. 1). Each router has access to a Master device (Master) and a Slave device (Slave). The master device may be the processing units (PE 0-PE 15 in FIG. 1), and the slave devices may be the memories (M0-M15 in FIG. 1). For example, the router R0 accesses the processing unit PE0 and the memory M0 through the network interface NI. A plurality of routers (R0 to R15 in fig. 1) are communicatively connected to each other to form a Mesh network (Mesh).
In the embodiment of the disclosure, referring to fig. 1, a plurality of routers (R0 to R15 in fig. 1) may communicatively connect a plurality of processing units (PE 0 to PE15 in fig. 1) and a plurality of memories (M0 to M15 in fig. 1) to each other; thus, the network on chip 100 may exchange data between any two processing units, or between any one processing unit and any one memory. For example, when the processing unit PE0 and the processing unit PE1 exchange data, the processing unit PE0 may form a data packet from the output data through the corresponding local interface NI by using an internally specified protocol or a standard protocol, and then forward the data packet to the processing unit PE1 through the routers R0 and R1.
FIGS. 2 and 3 are alternative structural schematic diagrams of routers, wherein FIG. 2 shows a connection structure of interfaces of routers and lower routers; fig. 3 shows the connection structure of the input port and the output port in the router. It should be noted that, the multiplexer Mux (multiplexer) In the input ports p0_in to p3_in In fig. 3 is configured to convert the received data into a plurality of output signals, and transmit the plurality of output signals to a plurality of corresponding virtual channels respectively; the multiplexer Mux in p0_out to p3_out is used to convert the data output from the plurality of virtual channels into one output signal.
In the disclosed embodiment, referring to fig. 1, each router includes a plurality of interfaces. For example, as shown in FIG. 2, router R5 may include 6 interfaces (P0-P5 in FIG. 2). P0 is a north interface, P1 is a west interface, P2 is an east interface, P3 is a south interface, and P4 and P5 are local interfaces. Each router transmits the received data packet to the lower level router. For example, routers R1, R4, R7, and R9 may each be a lower level router of router R5. The router R5 is connected with 4 adjacent routers R1, R4, R7 and R9 through interfaces P0-P3; further, the router R5 may transmit the received data packet to one of the routers R1, R4, R7, and R9. The router R5 is connected with the network interface NI through a local interface (P4-P5 in fig. 2) and is connected to the corresponding processing unit PE5 and the memory M5; further, the router R5 may exchange data with the processing unit PE5 and the memory M5 via the network interface NI.
In an embodiment of the present disclosure, each interface includes an input port and an output port. For example, as shown In FIG. 3, northbound interface P0 includes an input port P0_in and an output port P0_Out. In fig. 3, only the connection relationship between the input ports p0_in to p3_in and the output ports p0_out to p3_out of the interfaces p0 to P3 is shown, and the connection relationship between the output ports of the local interfaces p4 to P5 and the output ports p0_out to p3_out can be understood with reference to the input ports p0_in to p3_in.
In the disclosed embodiment, each interface includes a plurality of virtual channels (VC 0-VCn). The north interface P0, the west interface P1, the east interface P2 and the south interface P3 all comprise virtual channels which are arranged in the input ports, and the output ports are not provided with virtual channels. For example, as shown In FIG. 4, the input ports P0_In to P3_In each include two virtual channels (VC 0 and VC 1). It should be noted that the number of virtual channels in each interface may be greater than 2, which is not limited herein; the connection relationship of the virtual channel not shown to the output port can be understood with reference to the virtual channel VC0 shown.
In the embodiment of the disclosure, each interface in the router can perform data packet analysis and data caching. For example, in connection with fig. 2 and 3, the description will be given taking, as an example, that each of the input ports p0_in to p3_in includes two virtual channels (VC 0 and VC 1): the data packet may include a plurality of flits (flits), where the flit includes the receive address information of the data packet. After the data packet of the router R4 is transmitted to the router R5, the ingress port p1_in of the router R5 may parse the header flit of the data packet transmitted by the router R4, and parse the receiving address information of the data packet. The ingress port p1_in may also utilize virtual channel VC0 and/or virtual channel VC1 to buffer multiple flits In the packet transmitted by router R4.
In the embodiment of the disclosure, the input port of each interface in the router can initiate a transmission request to the output port of any one interface. For example, as shown In fig. 3, the ingress port p1_in of router R5 may send a transmission request to p0_out to p3_out. In the case that the forwarding interface corresponding to the packet transmitted by the router R5 is the western interface P1 of the router R6, the input port p1_in of the router R5 may send the transmission request to the output port p1_out thereof.
In the embodiment of the disclosure, each interface in the router may also transmit routing information to the upper level router. For example, as shown In fig. 3, the input ports p0_in to p3_in each include two virtual channels (VC 0 and VC 1), for example: the input port p1_in of the router R5 can monitor the transmission directions and the transmission states of the flits In the two virtual channels VC0 and VC1, and the number of flits transmitted In the current transmission direction by each virtual channel; and, the above-mentioned routing information is transmitted to the router R4. The transmission direction of the virtual channel may include east, west, south, and north. For example, the virtual channel VC0 In the input port p1_in may send a transmission request to the output port p0_out, where the transmission direction of the virtual channel VC0 In the input port p1_in is east. The transmission state of the virtual channel may include full empty and not full. For example, if the number of flits of the buffer memory of the virtual channel In the input port p1_in is 0, the transmission state of the virtual channel is completely empty; the number of flits of the buffer memory of the virtual channel In the input port p1_in is greater than 0 and does not exceed the maximum buffer memory, and the transmission state of the virtual channel is not full.
Fig. 4 is a schematic diagram showing a connection relationship between an optional arbitration module and an interface, and it should be noted that an arbitration module may be disposed at each of the output ports p0_out to p3_out in the router. Only the connection relationship between the output port p1_out of each router and the arbitration module 10 and the input ports p0_in to p3_in is illustrated In fig. 4, and the connection relationship between other output ports In the router and the input ports p0_in to p3_in and the arbitration module 10 can be understood by referring to the output port p1_out. The connection between the output ports of the local interfaces P4 to P5 and the output ports p1_out and the arbitration module 10 can be understood with reference to the input ports p0_in to p3_in.
In the disclosed embodiment, referring to fig. 4, each of the routers includes an arbitration module 10. The arbitration module 10 may calculate the transmission path of the data packet by a routing algorithm. The routing algorithm may be an XY dimensional order routing algorithm. For example, as shown in fig. 1, the router R5 is the origin (0, 0), the direction of the router r5→r7 is the positive X-axis direction, and the direction of the router r5→r1 is the positive Y-axis direction. The arbitration module 10 is configured to receive the received address information of the data packet, and determine a forwarding interface from among the interfaces of the lower router based on the received address information of the data packet. For example, if the received address information of the packet is the router R3 (2, 1), the arbitration module 10 calculates the transmission path of the packet based on the XY dimensional routing algorithm, and the transmission path of the packet may be R5 (0, 0) →r6 (1, 0) →r7 (2, 0) →r3 (2, 1). At this time, the router R5 uses the west interface P1 of the router R6 as a forwarding interface, the router R6 uses the west interface P1 of the router R7 as a forwarding interface, and the router R7 uses the south interface P3 of the router R3 as a forwarding interface.
It should be noted that, the routing algorithm of the arbitration module may also be an adaptive routing algorithm (Adaptive Routing Algorithm) or the like, which is not limited herein.
In the embodiment of the disclosure, referring to fig. 4, the arbitration module 10 is further configured to receive and record a transmission direction and a transmission status of each virtual channel in the router, and determine a forwarding virtual channel among the plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission status of each virtual channel. For example, as shown in fig. 1, the router R5 uses the west interface P1 of the router R6 as a forwarding interface, and the router R5 may receive the transmission directions and the transmission states of the virtual channels VC0 and VC1 in the west interface P1 of the router R6. Then, if the transmission direction of the virtual channel VC0 in the west interface P1 of the router R6 is east, the transmission state of the virtual channel VC0 is full null, and the transmission directions of the virtual channel VC1 and the virtual channel VC0 are different, the router R5 may transmit to the west interface P1 of the router R5 through the output port p1_out of the router R5, and cache the flit through the virtual channel VC 0. That is, in the route calculation process of the current router, the embodiment of the disclosure can allocate the virtual channel based on the transmission direction and the transmission state of the virtual channel in the forwarding interface, and determine the forwarding virtual channel of the data packet in the lower router.
Fig. 5 is a schematic diagram of modeling simulation results of a network on chip and related technologies provided by an embodiment of the present disclosure, and it should be noted that, in fig. 5, an injection rate is used to characterize a transmission amount of a data packet, and a throughput rate is used to characterize a routing efficiency of the network on chip. The related art in fig. 5 is consistent with the hardware architecture of the present disclosure, for example, a two-dimensional mesh network with 8×8 network on chip formed by routers, and the number of virtual channels in each interface is 2. The virtual channel allocation policy of the related art locks a virtual channel for a data packet, and all flits of the same data packet are continuously transmitted, so that interleaved transmission between flits of the same data packet is not allowed.
In the embodiment of the disclosure, referring to fig. 5, in the case that the data injection rate is greater than 20%, the throughput rate of the network on chip of the disclosure is improved by 30% -40% compared with the related art.
It can be understood that in the route calculation process of the current router, the embodiment of the disclosure can determine the forwarding virtual channel of the data packet in the lower router based on the transmission direction and the transmission state of the virtual channel in the forwarding interface. In this way, the present disclosure can determine the forwarding virtual channel of the lower router in advance in the route calculation of the data packet by the current router, and the forwarding virtual channel is determined based on the transmission state of the virtual channel in the lower router. Therefore, the method and the device can avoid congestion in the process of transmitting the data packet to the lower-level router, and improve the forwarding efficiency of each router; further, the throughput of the network on chip can be improved.
In some embodiments of the present disclosure, referring to fig. 4, the arbitration module 10 is further configured to record the number of flits transmitted in the current transmission direction for each virtual channel in the level router, and determine whether the number of flits is greater than a set threshold; if the number of flits is greater than the set threshold, transmission is paused, and the current transmission direction is recorded as the backup transmission direction.
Fig. 6 is a schematic structural diagram of an alternative arbitration module provided in an embodiment of the present disclosure.
In an embodiment of the present disclosure, referring to fig. 6, the arbitration module 10 may include a priority comparison sub-module 110, an interface arbitration sub-module 120, a priority matrix arbitration sub-module 130, and a virtual channel arbitration sub-module 140. The priority matrix arbitration sub-module 130 is connected to the interface arbitration sub-module 120, and is configured to receive a plurality of transmission request signals sent from an input port of the router, and transmit a priority comparison result of the plurality of transmission request signals to the interface arbitration sub-module 120. For example, as shown In fig. 4, each of the input ports p0_in to p3_in and the local interfaces (P4 and P5) may send a transmission request signal to the output port p1_out, that is, the output port p1_out corresponding to the arbitration module 10 may receive a plurality of transmission request signals. In this way, the arbitration module 10 needs to arbitrate the received multiple transmission request signals, determine according to the transmission priority of the data packet, and transmit the generated priority comparison result to the interface arbitration sub-module 120.
In the disclosed embodiment, referring to fig. 6, the interface arbitration sub-module 120 is connected to the priority matrix arbitration sub-module 130 and the virtual channel arbitration sub-module 140, respectively. The interface arbitration result output by the interface arbitration sub-module 120 may specify the input port. The interface arbitration sub-module 120 may also eliminate input ports that do not participate in routing, and generate corresponding interface arbitration results. For example, if the local interfaces P4 and P5 have no data packet with the east direction, the interface arbitration sub-module 120 may eliminate the local interfaces P4 and P5 during the interface arbitration. The interface arbitration sub-module 120 may then translate the interface arbitration result into a priority matrix for transmission to the priority matrix arbitration sub-module 130 and transmit the interface arbitration result to the virtual channel arbitration sub-module 140. The interface arbitration sub-module 120 outputs an interface selection signal according to the interface arbitration result. The interface selection signal is used for indicating that the data packet is at the output port of the current router and the data packet is at the forwarding interface of the lower-level router.
In the embodiment of the disclosure, referring to fig. 6, the virtual channel arbitration sub-module 140 may receive and record the routing information of the virtual channels VC0 and VC1 transmitted by the level router, and then determine the forwarding virtual channel of the data packet based on the routing information of the virtual channels VC0 and VC1 and the transmission direction of the data packet. The enable signal is used to characterize whether the corresponding output port of the arbitration module 10 receives the transmission request signal. The virtual channel selection signal is used for indicating that the forwarding virtual channel of the data packet is VC0 or VC1.
In the embodiment of the disclosure, referring to fig. 6, the virtual channel arbitration sub-module 140 may record the number of flits transmitted in the current transmission direction of each virtual channel in the level router, and determine whether the number of flits is greater than a set threshold. If the number of flits is greater than the set threshold, transmission is paused, and the current transmission direction is recorded as the backup transmission direction. That is, the virtual channel arbitration sub-module 140 may terminate the transmission process of a packet if the number of flits transmitted by the packet is greater than the transmission set threshold. In this way, the virtual channel can re-participate in the arbitration process of the virtual channel arbitration sub-module 140, and the data packet can also re-select the forwarding interface for transmission. Therefore, one data packet can be prevented from occupying one virtual channel for a long time, and congestion is avoided. Meanwhile, after interrupting the transmission of the data packet, the virtual channel arbitration sub-module 140 backs up the transmission direction of the data packet; in this way, in the subsequent data packet transmission process, if the transmission direction of the data packet is the same as the backup transmission direction, the data packet can continue to be transmitted through the virtual channel corresponding to the backup transmission direction; therefore, the embodiment of the disclosure does not need to establish a new transmission link, and improves the forwarding efficiency of the router.
In some embodiments of the present disclosure, referring to fig. 4, the arbitration module 10 is further configured to determine whether the transmission direction of the data packet is consistent with the transmission direction of the remaining virtual channels in the forwarding interface if the transmission state of any one virtual channel in the forwarding interface is all empty; if the transmission direction of one virtual channel in the remaining virtual channels is inconsistent with the transmission state of the data packet, selecting the virtual channel with the transmission state of all empty as a forwarding virtual channel.
In an embodiment of the present disclosure, referring to fig. 6, the virtual channel arbitration sub-module 140 may traverse multiple virtual channels in the forwarding interface to determine whether the transmission states of the multiple virtual channels are all empty. For example, the forwarding interface includes virtual channel VC0 and virtual channel VC1. The virtual channel arbitration sub-module 140 may first determine whether the transmission state of the virtual channel VC0 is all empty; then, if the transmission state of the virtual channel VC0 is not all empty, it is further determined whether the transmission state of the virtual channel VC0 is all empty. If the transmission direction of one virtual channel in the remaining virtual channels is inconsistent with the transmission direction of the data packet, selecting the virtual channel with the transmission state of full empty as a forwarding virtual channel. For example, the transmission state of the virtual channel VC0 is all null, and the transmission direction of the virtual channel VC1 is inconsistent with the transmission direction of the data packet, the data packet may be transmitted by using the virtual channel VC0, where the transmission direction of the virtual channel VC0 is the transmission direction of the data packet. In this way, multiple virtual channels of the same input port may be forwarded to multiple different output ports at the same time. Therefore, the number of forwarding directions of each input port is increased, and further, the forwarding efficiency of the router can be improved.
In embodiments of the present disclosure, referring to FIG. 3, each input port P0_In-P3_In may include 5 virtual channels (VC 0-VC 4). The 5 virtual channels can respectively receive data packets in different transmission directions. For example, 4 virtual lanes (VC 0-VC 3) may receive packets transmitted to the four directions east, west, south, and north, respectively, and virtual lane (VC 4) may receive packets from a processing unit or memory. In this way, one ingress port may receive packets in a plurality of different transmission directions, and packets in different forwarding directions of one ingress port may be forwarded simultaneously.
Under normal conditions, one input port cannot output data packets in 5 transmission directions (east, west, south, north and local) at the same time, and if 5 or more than 5 virtual channels are arranged in each input port and the 5 virtual channels respectively receive data packets in different directions, part of the virtual channels are idle, so that the utilization rate of the virtual channels is reduced, and hardware resources are wasted. However, if the number of virtual channels is less than 5, if the transmission directions of the continuous data packets in the plurality of data packets transmitted to the input ports are consistent, the virtual channels are occupied, so that the data packets in different forwarding directions of one input port cannot be forwarded at the same time, and the utilization rate of the virtual channels is reduced. For example, the ingress port is provided with 2 virtual channels (VC 0 and VC 1), and when 2 consecutive packets are forwarded to the same egress port, 2 packets occupy 2 virtual channels (VC 0 and VC 1), and the ingress port has only one forwarding direction. Therefore, in the arbitration process of the forwarding virtual channels, the embodiment of the disclosure takes whether the transmission direction of one virtual channel in the remaining virtual channels (the virtual channels except the forwarding virtual channel in the forwarding interface) is inconsistent with the transmission state of the data packet as a judging condition; in this way, the transmission direction of one virtual channel in the rest virtual channels of the forwarding interface is inconsistent with the transmission direction of the forwarding virtual channel. Therefore, under the condition that the number of virtual channels is smaller than 5, the data packets in different forwarding directions of each input port can be ensured to be forwarded simultaneously, and the forwarding efficiency of the router is improved.
In some embodiments of the present disclosure, referring to fig. 4, the arbitration module 10 is further configured to determine whether the transmission direction of the data packet is consistent with the transmission direction of the virtual channel if the transmission state of any one of the virtual channels in the forwarding interface is not full; and if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state of not being full as the forwarding virtual channel.
In the embodiment of the present disclosure, referring to fig. 6, in the case that none of the plurality of virtual channels in the forwarding interface is all empty, the virtual channel arbitration sub-module 140 may continuously traverse the plurality of virtual channels in the forwarding interface, and determine whether the transmission states of the plurality of virtual channels are not full. For example, the forwarding interface includes virtual channel VC0 and virtual channel VC1. In the case that neither virtual channel VC0 nor virtual channel VC1 is all empty, virtual channel arbitration sub-module 140 may determine whether the transmission state of virtual channel VC0 is not full; then, if the transmission state of the virtual channel VC0 is not non-full, it is determined whether the transmission state of the virtual channel VC0 is non-full. And if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state of not being full as the forwarding virtual channel. For example, the transmission state of the virtual channel VC0 is not full, and the transmission direction of the virtual channel VC0 is consistent with the transmission direction of the data packet, the data packet may be transmitted by using the virtual channel VC 0.
In some embodiments of the present disclosure, a transmission direction of a data packet is consistent with a transmission direction of a virtual channel, including: the transmission direction of the data packet is consistent with the current transmission direction of the virtual channel; or the transmission direction of the data packet is consistent with the backup transmission direction of the virtual channel.
In the embodiment of the disclosure, referring to fig. 4, the arbitration module 10 receives the transmission direction and the transmission status of the virtual channel of the lower router in real time. In the case where the data transmission amount (the number of flits) in one transmission direction is smaller than the set threshold, the transmission direction recorded by the arbitration module 10 is the current transmission direction of the virtual channel. In the case where the data transmission amount (the number of flits) in one transmission direction is larger than the set threshold, the virtual channel suspends that data transmission and records the current transmission direction as the backup transmission direction. The transmission direction of the data packet is consistent with the current transmission direction or the backup transmission direction of the virtual channel, and the transmission direction of the data packet can be considered to be consistent with the transmission direction of the virtual channel.
In some embodiments of the present disclosure, referring to fig. 6, the arbitration module 10 includes: a plurality of registers; each register is configured to register a backup transmission direction of a corresponding virtual channel.
In embodiments of the present disclosure, referring to fig. 6, a plurality of registers may be provided in the virtual channel arbitration sub-module 140. The virtual channel arbitration sub-module 140 receives the routing information of the virtual channels VC0 and VC1 of the lower router, and stores the transmission direction in the routing information in the corresponding register.
In some embodiments of the present disclosure, referring to fig. 1, the network on chip 100 further comprises: a plurality of master devices and a plurality of slave devices; each master device and each slave device are connected with a corresponding router through a corresponding interface.
In the embodiment of the disclosure, referring to fig. 1, the master device may be processing units (PE 0 to PE 13), and the slave devices may be memories (M0 to M13). Each router in the network on chip 100 accesses a corresponding processing unit and memory through a network interface NI.
Fig. 7 is a flow chart of an alternative route control method provided in an embodiment of the present disclosure, which may be used to operate the network-on-chip 100 described above, and which may be performed by a router in the network-on-chip, as will be described in connection with the steps shown in fig. 7.
S101, acquiring receiving address information of a data packet, and determining a forwarding interface from a plurality of interfaces of a lower router based on the receiving address information of the data packet; wherein each interface comprises: a plurality of virtual channels.
In the embodiment of the disclosure, referring to fig. 1, each router may obtain the receiving address information of the data packet. When a data packet enters any input port of the current router, the current router performs routing calculation on the current router to determine the transmission direction of the data packet in the current router based on the receiving address information of the data packet, and also performs routing calculation on the lower router to determine the transmission direction of the data packet by the lower router.
S102, receiving and recording the transmission direction and the transmission state of each virtual channel in the level router, and determining a forwarding virtual channel in a plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel.
In the embodiment of the disclosure, referring to fig. 1, each router may record, for a plurality of virtual channels of each transmission direction lower level router, its corresponding transmission direction. The transmission direction of the virtual channel defaults to invalid. Each router may also record the amount of data that each virtual channel in the level router passes in the same output direction. When the data quantity reaches a set threshold value, the router can set the transmission direction of the virtual channel record corresponding to the data quantity as invalid, and store the corresponding transmission direction in the backup record. The transmission direction of the virtual channel is invalid, which means that the virtual channel can participate in arbitration again. Therefore, after the data quantity reaches a preset threshold value, the transmission direction of the virtual channel is reset, so that the virtual channel of the lower router can be prevented from being occupied for a long time, and starvation is avoided. Meanwhile, carrying out backup recording on the transmission direction of the virtual channel; in this way, when the data packet transmitted subsequently has no new direction request, the data packet with the same transmission direction as the backup transmission direction is transmitted through the corresponding virtual channel as much as possible.
In some embodiments of the present disclosure, the route control method may be implemented through S201 shown in fig. 8, and the description will be continued with respect to the steps.
S201, judging whether the transmission direction of the data packet is consistent with the transmission direction of the rest virtual channels in the forwarding interface or not under the condition that the transmission state of any virtual channel in the forwarding interface is all empty; if the transmission direction of one virtual channel in the remaining virtual channels is inconsistent with the transmission direction of the data packet, selecting the virtual channel with the transmission state of full empty as a forwarding virtual channel.
In the embodiment of the disclosure, referring to fig. 5, taking an example that the forwarding interface includes two virtual channels VC0 and VC1 as an example, if the virtual channel VC0 is specified to be judged in preference to the virtual channel VC1, the arbitration module 10 in the router performs the allocation of the virtual channel according to the following steps:
The first step is to judge whether the transmission state of the virtual channel VC0 of the forwarding interface is full empty, if the transmission state of the virtual channel VC0 is full empty and the transmission direction of the data packet is different from the record of the virtual channel VC1, the transmission request of the data packet passes through, and the forwarding interface selects the virtual channel VC0 to transmit the data packet.
And a second step of judging whether the transmission state of the virtual channel VC1 is full empty, if the transmission state of the virtual channel VC0 is full empty and the transmission direction of the data packet is different from the record of the virtual channel VC0, the transmission request passes through, and a forwarding interface is selected to select the virtual channel VC1 to transmit the data packet.
In some embodiments of the present disclosure, after S201 is performed, a route control method may also be implemented through S202 shown in fig. 8, and the description will be continued with respect to each step.
S202, judging whether the transmission direction of a data packet is consistent with the transmission direction of a virtual channel or not under the condition that the transmission state of any virtual channel in a forwarding interface is not full; and if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state of non-full as a forwarding virtual channel.
In the embodiment of the disclosure, referring to fig. 5, describing that the forwarding interface includes two virtual channels VC0 and VC1, if the virtual channel VC0 is specified to be judged in preference to the virtual channel VC1, the arbitration module 10 in the router performs the allocation of the virtual channel according to the following steps:
The first step, judging whether the transmission state of the virtual channel VC0 is not full, if the transmission state of the virtual channel VC0 is not full, the transmission direction of the data packet is the same as the record of the virtual channel VC0, or the transmission direction of the data packet is the same as the backup transmission direction of the virtual channel VC0, and the record of the virtual channel VC0 is invalid, the transmission request passes through, and the forwarding interface may select the virtual channel VC0 to transmit the data packet.
And a second step of judging whether the transmission state of the virtual channel VC1 is not full, if the transmission state of the virtual channel VC1 is not full, the transmission direction of the data packet is the same as the record of the virtual channel VC1, or the transmission direction of the data packet is the same as the backup transmission direction of the virtual channel VC1, and the record of the virtual channel VC1 is invalid, the transmission request passes through, and the forwarding interface can select the virtual channel VC1 to transmit the data packet.
The present disclosure also provides a computer-readable storage medium having stored thereon a computer program or instructions which, when executed, cause a computer to perform the route control method of any of the embodiments described above. Further, the route control method may be performed by a router in the network on chip.
Note that the computer readable storage medium may be a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable programmable Read Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), a magnetic random access Memory (Ferromagnetic Random Access Memory, FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc-Read Only Memory (CD-ROM), or the like; but may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
The foregoing embodiment numbers of the present disclosure are merely for description and do not represent advantages or disadvantages of the embodiments. The methods disclosed in the several method embodiments provided in the present disclosure may be arbitrarily combined without collision to obtain a new method embodiment. The features disclosed in the several product embodiments provided in the present disclosure may be combined arbitrarily without conflict to obtain new product embodiments. The features disclosed in the several method or apparatus embodiments provided in the present disclosure may be arbitrarily combined without any conflict to obtain new method embodiments or apparatus embodiments.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure.

Claims (11)

1. A network on chip comprising: a plurality of routers; wherein,
The routers are mutually communicated and connected to form a grid network; each router transmits the received data packet to the lower-level router;
Each of the routers includes: a plurality of interfaces and arbitration modules; the interfaces are connected with the arbitration module; each of the interfaces includes: a plurality of virtual channels;
The arbitration module is connected with the router at the lower level and is configured to receive the receiving address information of the data packet and determine a forwarding interface from a plurality of interfaces of the router at the lower level based on the receiving address information of the data packet; and receiving and recording the transmission direction and transmission state of each virtual channel in the router, and determining a forwarding virtual channel in a plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel.
2. The network on chip of claim 1, wherein the data packet has a plurality of flits;
The arbitration module is further configured to receive and record the number of flits transmitted in the current transmission direction of each virtual channel in the router, and judge whether the number of flits is greater than a set threshold; if the number of the flits is larger than the set threshold, transmission is paused, and the current transmission direction is recorded as a backup transmission direction.
3. The network on chip of claim 2, wherein the network on chip is configured to,
The arbitration module is further configured to determine whether the transmission direction of the data packet is consistent with the transmission direction of the remaining virtual channels in the forwarding interface when the transmission state of any one of the virtual channels in the forwarding interface is empty; if the transmission direction of one virtual channel in the rest virtual channels is inconsistent with the transmission state of the data packet, selecting the virtual channel with the transmission state of all empty as the forwarding virtual channel.
4. The network on chip of claim 3, wherein the network on chip,
The arbitration module is further configured to determine whether the transmission direction of the data packet is consistent with the transmission direction of the virtual channel when the transmission state of any one of the virtual channels in the forwarding interface is not full; and if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state being not full as the forwarding virtual channel.
5. The network on chip of claim 4, wherein the direction of transmission of the data packet coincides with the direction of transmission of the virtual channel, comprising:
the transmission direction of the data packet is consistent with the current transmission direction of the virtual channel; or alternatively
The transmission direction of the data packet is consistent with the backup transmission direction of the virtual channel.
6. The network on chip of claim 2, wherein the arbitration module comprises: a plurality of registers; each of the registers is configured to register the backup transmission direction of the corresponding virtual channel.
7. The network on chip of claim 1, further comprising: a plurality of master devices and a plurality of slave devices; wherein,
Each master device and each slave device are connected with a corresponding router through a corresponding interface.
8. A method of route control, comprising:
acquiring receiving address information of a data packet, and determining a forwarding interface from a plurality of interfaces of a lower router based on the receiving address information of the data packet; wherein each of the interfaces comprises: a plurality of virtual channels;
And receiving and recording the transmission direction and the transmission state of each virtual channel in the router, and determining a forwarding virtual channel in a plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each virtual channel.
9. The route control method according to claim 8, wherein determining one of the forwarding virtual channels at the plurality of virtual channels of the forwarding interface based on the transmission direction and the transmission state of each of the virtual channels comprises:
Judging whether the transmission direction of the data packet is consistent with the transmission direction of the rest virtual channels in the forwarding interface or not under the condition that the transmission state of any one virtual channel in the forwarding interface is all empty;
And if the transmission direction of one virtual channel in the remaining virtual channels is inconsistent with the transmission direction of the data packet, selecting the virtual channel with the transmission state of all empty as the forwarding virtual channel.
10. The route control method according to claim 9, wherein one of the forwarding virtual channels is determined at a plurality of the virtual channels of the forwarding interface based on the transmission direction and the transmission state of each of the virtual channels, further comprising:
judging whether the transmission direction of the data packet is consistent with the transmission direction of the virtual channel or not under the condition that the transmission state of any one of the virtual channels in the forwarding interface is not full;
And if the transmission direction of the data packet is consistent with the transmission direction of the virtual channel, selecting the virtual channel with the transmission state being non-full as the forwarding virtual channel.
11. A computer-readable storage medium, on which a computer program or instructions is stored, characterized in that the computer program or instructions, when executed, cause a computer to perform the route control method according to any one of claims 8 to 10.
CN202410511315.6A 2024-04-25 2024-04-25 Network on chip, route control method and storage medium Pending CN118233411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410511315.6A CN118233411A (en) 2024-04-25 2024-04-25 Network on chip, route control method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410511315.6A CN118233411A (en) 2024-04-25 2024-04-25 Network on chip, route control method and storage medium

Publications (1)

Publication Number Publication Date
CN118233411A true CN118233411A (en) 2024-06-21

Family

ID=91509216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410511315.6A Pending CN118233411A (en) 2024-04-25 2024-04-25 Network on chip, route control method and storage medium

Country Status (1)

Country Link
CN (1) CN118233411A (en)

Similar Documents

Publication Publication Date Title
US8234435B2 (en) Relay device
US9426099B2 (en) Router, method for controlling router, and program
Kumary et al. A 4.6 Tbits/s 3.6 GHz single-cycle NoC router with a novel switch allocator in 65nm CMOS
US7940788B2 (en) System for transmitting data within a network between nodes of the network and flow control process for transmitting the data
US7769893B2 (en) Integrated circuit and method for establishing transactions
Leroy et al. Spatial division multiplexing: a novel approach for guaranteed throughput on NoCs
CN112152932B (en) Network-on-chip routing control method, network-on-chip router and readable storage medium
US20070047444A1 (en) Method for managing a plurality of virtual links shared on a communication line and network implementing the method
Daneshtalab et al. Memory-efficient on-chip network with adaptive interfaces
CN103348640A (en) Relay device
US8228930B1 (en) Interconnection network router arrangements and methods therefor
Stunkel et al. The SP2 communication subsystem
CN105306382B (en) It is a kind of without caching NOC data processing method and NOC electronic component
Xiang Deadlock-free adaptive routing in meshes with fault-tolerance ability based on channel overlapping
Daneshtalab et al. CARS: Congestion-aware request scheduler for network interfaces in NoC-based manycore systems
Silla et al. On the use of virtual channels in networks of workstations with irregular topology
Mazloumi et al. A hybrid packet/circuit-switched router to accelerate memory access in NoC-based chip multiprocessors
CN118233411A (en) Network on chip, route control method and storage medium
CN111858096B (en) Directory-based method and system for monitoring reading of cache at shortest distance
Lee et al. Adaptive routing scheme for NoC communication architecture
CN115665041B (en) Network-on-chip structure, data transmission method, electronic device, and storage medium
Salah et al. Design of a 2d mesh-torus router for network on chip
WO2006048826A1 (en) Integrated circuit and method for data transfer in a network on chip environment
Rahmani et al. Exploring a low-cost and power-efficient hybridization technique for 3D NoC-bus hybrid architecture using LastZ-based routing algorithms
Escobar et al. Performance evaluation of a Network on a Chip router using SystemC and TLM 2.0

Legal Events

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