A ring-type network-on-chip architecture based on a central controller
By introducing a central controller and arbitration module into the ring on-chip network to sense and adjust the data transmission path, the problem of uneven communication distribution and traffic congestion between modules is solved, and timely transmission of data is realized and livelock is avoided.
Patent Information
- Application Number
- CN202111294858.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-11-03
Smart Images

Figure CN114020683B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network on chip, and in particular to a ring network on chip structure based on a central controller. Background Art
[0002] On-chip network is a technology widely used in multi-core processors today. In a SoC with multiple processor cores, different modules inside the chip need to communicate. The on-chip network is responsible for receiving data sent by the modules in the SoC and sending it to the modules that receive the data. The ring-shaped on-chip network has the advantages of small interconnect area and low power consumption while having high performance.
[0003] Since the ring-on-chip network transmits data in one direction or two directions, when the ring-on-chip network is transmitting data between different modules in the SoC, if a network node is transmitting data and the parent node of the network node is sending data to the node, the data of the parent node needs to wait, resulting in inevitable delays; if the network node at this level has been receiving data from the external module, the data sent by the parent network node may be kept waiting, so that when the modules in the SoC communicate with each other, some modules can always successfully send or receive data, while the data to be sent by some modules is always in a waiting state and is not sent, or waits for a long clock cycle to be sent, or the data to be sent to a certain module has been transmitted in the ring-on-chip network, and has not been passed to the target module, or waits too long to be sent to the target module, that is, the problem of uneven communication distribution between modules in the SoC is generated.
[0004] In the existing on-chip network technology, each node is independent of each other. A network node in the on-chip network cannot perceive the working conditions of other network nodes, and the length of time that data is transmitted in the on-chip network cannot be perceived by the on-chip network. As a result, some network nodes receive a large amount of data within a specific time, while some network nodes cannot receive data from external modules for a long time, or a data is not sent to an external module for a long time, which causes livelock and starvation of on-chip network nodes. Summary of the invention
[0005] The purpose of the present invention is to provide a ring-shaped network-on-chip structure based on a central controller to solve the problems of uneven distribution of communication probability between modules and traffic congestion in the existing ring-shaped network-on-chip technology.
[0006] In order to solve the above technical problems, the present invention provides a ring-shaped network-on-chip structure based on a central controller, comprising: Several network node networknode and a central controller Central Controller; among them,
[0007] Each network node networknode is connected to an external ExtModule module connected to the on-chip network, and each network node networknode and the ExtModule module connected to it can transmit data to each other;
[0008] Each network node networknode is connected to its adjacent network node networknode, and two adjacent network nodes networknode can transmit data to each other;
[0009] There is a connection relationship between each network node networknode and the central controller CentralControl, and each network node networknode and the central controller CentralControl can transmit data to each other.
[0010] Optionally, the network node networknode internally includes 5 sub-circuit modules, namely, Idmatch module, Arbiter module, FIFO module, direct_decd module and register reg; the Id match module is used to determine whether the transmission destination of the message of the network node networknode at this level is the ExtModule module external to the network node networknode at this level; the Arbiter module is used to arbitrate multiple input messages to one output message; the direct_decd module is used to select the use of a clockwise or counterclockwise path to transmit the message received from the ExtModule module; the register reg is used to cache the control signal sent from the central controller CentralControl.
[0011] Optionally, the Arbiter module has multiple input messages and one output message, and which input message is specifically selected for output depends on the control signal inside the Arbiter module and the control signal sent from the central controller CentralController.
[0012] Optionally, the central controller CentralControl internally includes a control unit controlunit and a storage unit memoryunit, the control unit controlunit performs information exchange with the network node networknode, and the storage unit memoryunit stores relevant information of the ExtModule module and message.
[0013] Optionally, when the network node networknode receives a message sent by the ExtModule module, the control unit controlunit extracts relevant information of the message and stores it in the storage unit memoryunit; when the network node networknode sends a message to the ExtModule module, the control unit controlunit rewrites the information of the message in the storage unit memoryunit.
[0014] Optionally, during operation, the control unit controlunit reads the message in the FIFO that will leave the FIFO module in the next clock cycle, and finds relevant information of the message in the storage unit memoryunit. The control unit controlunit gives a control signal by analyzing the relevant information of the message and the number of the ExtModule module connected to the network node networknode. The control signal passes through the register reg and is passed to the Arbiter module in the network node networknode at the next rising edge of the clock.
[0015] Optionally, the control unit control unit reads the message that the ExtModule module is sending to the network node networknode. If the message sent by the ExtModule module is not received by the network node networknode, the control unit control unit controls the credit_modu of the ExtModule module in the storage unit memoryunit to add 1. When credit_modu reaches a threshold, the control unit control unit sends a control signal to the Arbiter module in the network node networknode to set the priority of the message sent by the ExtModule module to the maximum. The priority of the message sent by the ExtModule module is restored only after credit_modu becomes 0.
[0016] Optionally, the control unit controlunit reads the content of the FIFO module in each network node networknode, and reads the relevant information of the ExtModule module through the network node networknode, determines whether the network node networknode is in a busy state based on the information, and calculates the number of busy network nodes networknode encountered by the message along the clockwise path and the number of busy network nodes networknode encountered along the counterclockwise path when any network node networknode sends a message to any network node networknode, and the control unit controlunit sends a control signal to the network node networknode, the content of the control signal is to select a path with fewer busy nodes to transmit the message, and the control signal is transmitted to the network node networknode through the register reg; after the next clock rising edge, the network node networknode receives the message of the ExtModule module, and the network node networknode selects a clockwise or counterclockwise path to transmit the message according to the control signal given by the register reg.
[0017] In the ring-shaped network-on-chip structure based on the central controller provided by the present invention, network nodes and a central controller are included, and data can be transmitted between network nodes and between the central controller and network nodes. The network node includes a data transmission circuit in two directions, and the interconnection of all network nodes forms two data transmission paths, clockwise and counterclockwise. When the central controller gives an invalid control signal to the network node, the network node controls the transmission of data by itself. When the central controller gives a valid control signal to the network node, the network node controls the data transmission according to the received control signal. The central controller realizes the overall perception of the network nodes and the data transmission status, and can intelligently adjust the traffic conditions of the ring-shaped network-on-chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the structure of a ring-shaped network on chip based on a central controller provided by the present invention;
[0019] Figure 2 It is a schematic diagram of the overall structure and connection relationship of the network node networknode;
[0020] Figure 3 It is a detailed connection structure diagram of the clockwise path circuit between the central controller Central Controller and the network node networknode;
[0021] Figure 4It is a schematic diagram of the storage unit structure of the FIFO module in the network node networknod;
[0022] Figure 5 This is a schematic diagram of the situation where the clockwise path of the network node networknode is congested;
[0023] Figure 6 Schematic diagram of congestion in the counterclockwise path of network node networknode. DETAILED DESCRIPTION
[0024] The following is a further detailed description of a ring-type network-on-chip structure based on a central controller proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer according to the following description and claims. It should be noted that the accompanying drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0025] Embodiment 1
[0026] The present invention provides a ring-shaped network-on-chip structure based on a central controller, such as Figure 1 As shown, it includes several networknodes and a Central Controller; each networknode is connected to the external ExtModule module connected to the on-chip network, and each networknode can transmit data to the ExtModule module connected to it; each networknode is connected to the adjacent networknode, and the two adjacent networknodes can transmit data to each other; each networknode is connected to the CentralController, and each networknode and the CentralController can transmit data to each other.
[0027] The working mechanism of the ring-on-chip network structure: networknode receives the message sent by ExtModule, recorded as message_2, such as Figure 2As shown, the direct_decd module in the networknode controls the transmission of message_2 clockwise or counterclockwise to the lower-level networknode. The direct_decd module stores message_2 in the FIFO module of the clockwise path or counterclockwise path; the networknode transmits message_2 to the next networknode in turn until message_2 is transmitted to the networknode connected to its end point, the ExtModule module. Figure 3 As shown, if the ready signal of the destination ExtModule module is valid at this time, networknode sends message_2 to the destination ExtModule module, otherwise, message_2 continues to be transmitted to the lower-level networknode in networknode.
[0028] like Figure 3 As shown, the Id match module receives the message sent by the upper networknode, and determines whether the target module of the message is the ExtModule module connected to the Id match module according to the content of the message. If so, and the ready signal of the ExtModule module is valid, the message is sent to the ExtModule module, otherwise the message is passed to the lower networknode.
[0029] like Figure 3 As shown in the figure, the function of the Arbiter module is to be responsible for arbitration. The Arbiter module receives three input messages, namely the message sent by the ExtModule module, the message sent by the upper networknode, and the message sent by the lower Idmatch module. The Arbiter module selects one of the input messages and outputs it to the FIFO module and the control unit in the Central Controller. The arbitration strategy of the Arbiter module depends on its internal control signals and the control signals transmitted to the Arbiter module by the control unit. That is, which input message the Arbiter module selects to output is jointly determined by the Arbiter module and the Central Controller.
[0030] like Figure 3As shown in the figure, the function of the FIFO module is to store messages. The FIFO module can store several messages. The specific number depends on the depth fomax of the FIFO module. When the storage space in the FIFO module is not exhausted, the ready signal output by the FIFO module to the Arbiter module is valid, otherwise the ready signal is invalid. When the ready signal of the FIFO module is valid, the message of the Arbiter module can be stored in the FIFO module. When the ready signal of the Id match module of the lower-level networknode connected to the FIFO module is valid, the message in the FIFO module leaves the FIFO module and enters the lower-level networknode.
[0031] The message that enters the FIFO module first will leave the FIFO module first. Figure 4 As shown, in the FIFO module, the message leaving the FIFO module in the current clock cycle is the storage space pointed to by the read pointer rdptr, and the message leaving the FIFO module in the next clock cycle is the storage space pointed to by the read pointer rdptr+1. The message input into the FIFO module in the current clock cycle is stored in the storage space pointed to by the write pointer wriptr, and the message input into the FIFO module in the next clock cycle is stored in the storage space pointed to by the write pointer wriptr+1, and so on. Whenever a message is stored into the FIFO module, the write pointer wrprt is incremented by 1, and whenever a message leaves the FIFO module, rdprt is incremented by 1. When wriptr and rdptr are incremented to the maximum value, if there are still messages entering or leaving the FIFO module, wriptr and rdptr will no longer be incremented by 1, but will switch back to the minimum value of 0. When wriptr is equal to rdptr after incrementing by 1 or returning to the minimum value, it means that the storage unit of the FIFO module is full, and the full signal is set to 1, as shown in Figure 3 shown.
[0032] The operation of the control unit when the networknode receives a message and the operation of the control unit when the message is sent to the ExtModule module: the control unit reads the information of the networknode. When the networknode receives a message from an ExtModule module, the control unit analyzes the information of the message (including the valid signal of the message being valid, the number of the ExtModule sending the message start_ID, the number of the ExtModule receiving the message end_ID, the token information credit_mes, the number of times the message passes through the ExtModule to be output hoop_num), and stores this information in the memory unit memory unit; when the networknode sends a message to the ExtModule module, that is, the message leaves the on-chip network structure, the control unit rewrites the valid information of the message in the memory unit memory unit (valid is the signal that the message is valid) and sets it to invalid (that is, valid=0).
[0033] Control unit controls networknode: For a network node, such as networknode_1, in the current clock cycle, the control unit reads the information of message[rdptr+1] from networknode_1. This information is the message to leave the FIFO module in the next clock cycle, and records this message as message_1. According to the read content of message_1, the control unit finds the token information credit_mes of message_1, the number of times the message passes through the ExtModule to be output hoop_num, and the ExtModule number end_ID of the receiving message in the memory unit. If the end_ID of message_1 is the ID of the ExtModule module connected to the current networknode, and the ready signal of the ExtModule module is valid at this time, the control unit does not modify the content in message_1. In the next clock cycle, message_1 leaves the FIFO module, and the Id match module determines that the end point of message_1 is the ExtModule module connected to the Id match module. If the ready signal of the ExtModule module is still valid at this time, the networknode passes message_1 to the ExtModule module, otherwise message_1 will be passed to the lower-level networknode (when the ready signal of the lower-level networknode is valid), otherwise the message stays in the FIFO module.
[0034] If the ready signal of the ExtModule module is valid at this time, and the hoop_num of message_1 is smaller than hoop_max, the control unit does not modify the content in message_1. If the ready signal of ExtModule_1 is valid in the next clock cycle, message_1 is received by the ExtModule module, otherwise message_1 continues to be transmitted to the lower-level networknode;
[0035] If the hoop_num of message_1 reaches hoop_max (the maximum number of times the message passes through the ExtModule to be output), the control unit gives the networknode a specific control signal stayin_node (stayin_node is a signal to set whether the message stays in the FIFO module of this network node, and is sent to the Arbiter module; stayin_node=1, stayin_node passes through the register reg, and is transmitted to the Arbiter module in the networknode after the next clock rising edge). After the Arbiter module detects that stayin_node is 1, the networknode controls message_1 to leave the FIFO module, pass through the lower-level Id match module and the current-level Arbiter module, and then enter the current-level FIFO module, that is, message_1 leaves the tail of the FIFO module (message[rdptr]) and then enters the head of the FIFO module (message[wrptr]). The advantage of not passing message_1 to the subsequent network nodes is that once the ExtModule module that is to receive message_1 is ready to receive the message (ready=1), message_1 only needs to wait until other messages in front of message_1 leave the FIFO module before message_1 can be received by the ExtModule module.
[0036] Operations related to the control unit and the ExtModule module: For an external ExtModule module, such as ExtModule_1, the network node it is connected to is recorded as networknode_1, and the arbiter inside networknode_1 is recorded as Arbiter_1. If the message sent by ExtModule_1 is always waiting, credit_modu+1 (credit_modu is the weight of ExtModule). When credit_modu reaches credit_modu_max, the control unit gives a valid control signal prio_ExtModule (prio_ExtModule=1) to networknode_1. prio_ExtModule is a signal for setting the priority of ExtModule and is sent to the Arbiter module. prio_ExtModule is transmitted to Arbiter_1 through register reg. After Arbiter_1 receives the signal of prio_ExtModule as 1 at the next rising edge of the clock, it sets the message sent by ExtModule_1 to the highest priority, that is, when there is competition, let the message sent by ExtModule pass through Arbiter_1 first, until credit_modu changes from credit_modu_max to 0. After ExtModule_1 sends a message into networknode_1, credit_modu decreases by 1. When credit_modu reaches 0, Arbiter_1 executes its own arbitration mechanism and is no longer controlled by the prio_ExtModule signal of the control unit.
[0037] Operations related to the control unit and networknode: For a networknode, such as networknode_2, when the FIFO module inside networknode_2 is full of messages, and the FIFO module of the network node's parent networknode_1 is also full of messages, and the ExtModule_2 connected to the networknode_2 is sending a message that requires multiple clock cycles to transmit, the control unit sets the busy (message busy flag) corresponding to networknode_2 in the memory unit to 1, indicating that networknode_2 will be busy in a short period of time. Within several clock cycles, the networknode_2 must arbitrate the messages sent by the parent network node and the external ExtModule module.
[0038] The control unit detects the status of each network node in each clock cycle, that is, detects the full signal of the FIFO module in each networknode, and the message transmitted by the ExtModule module connected to the networknode. Determine the starting point (start_ID) and end point (end_ID) of the message sent by the ExtModule module, and select a more idle path to transmit the message (that is, a path with fewer busy networknodes) by detecting the number of network nodes in the clockwise and counterclockwise paths between start_ID and end_ID. The control unit first transmits the control signal to the register reg, and then to the networknode at the next rising edge of the clock.
[0039] like Figure 5 As shown, network nodes node_6, node_7, node_8, node_9, node_13, node_15 (here node is Figure 1The clockwise transmission path of the network node (the abbreviation of the numbered network node) is busy (the circle filled with the oblique grid indicates that the clockwise path of the network node is busy). The control unit sends a direct signal (direct=11) to the direct_decd module in node_14. In the next clock cycle, node_4 controls the message sent to node_10 to be transmitted through the counterclockwise path. The control unit sends a direct signal to node_16 (the direct signal is a signal to set the message to be transmitted clockwise or counterclockwise, and is sent to the direct_decd module, direct=11), controlling node_16 to transmit the message to node_14 in the counterclockwise direction. Figure 6 As shown, the counterclockwise transmission paths of node_6, node_7, node_8, node_9, node_13, and node_15 are in a busy state (the circles filled with positive grids indicate that the counterclockwise paths of the network nodes are busy). The control unit sends a direct signal (direct=10) to the direct_decd module in node_4 to control the message sent by node_4 to node_10 to be transmitted through the clockwise path. The control unit sends a direct signal (direct=10) to the direct_decd module in node_14 to control the message sent by node_14 to node_16 to be transmitted through the clockwise path.
[0040] The beneficial effect of the present invention is that CentralControl is connected to all network nodes of the ring-shaped on-chip network, and the central controller can sense the working status of all networknodes, the transmission status of all messages and the working status of all ExtModule modules, and control the networknode through the control circuit of the networknode itself and the control circuit inside the central controller, and instantly adjust the transmission direction of the message and the priority of the ExtModule, thereby effectively avoiding congestion of the ring-shaped on-chip network during message transmission, the message sent by the ExtModule not being received by the networknode for a long time, and the message being transmitted for a long time without being received by the end point ExtModule.
[0041] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A ring-shaped network-on-chip structure based on a central controller, characterized in that: It includes several network nodes and a central controller. Each network node networknode is connected to an external ExtModule module connected to the on-chip network, and each network node networknode and the ExtModule module connected to it can transmit data to each other; Each network node networknode is connected to its adjacent network node networknode, and two adjacent network nodes networknode can transmit data to each other; Each network node is connected to the central controller, and data can be transmitted between the network node and the central controller. The network node networknode contains 5 sub-circuit modules, namely, Idmatch module, Arbiter module, FIFO module, direct_decd module and register reg; the Idmatch module is used to determine whether the transmission destination of the message of the network node networknode at this level is the ExtModule module external to the network node networknode at this level; the Arbiter module is used to arbitrate multiple input messages to one output message; the direct_decd module is used to select the clockwise or counterclockwise path to transmit the message received from the ExtModule module; the register reg is used to cache the control signal sent from the central controller Central Controller; The Arbiter module has multiple input messages and one output message. The specific selection of the input message for output depends on the control signal inside the Arbiter module and the control signal sent from the central controller. The central controller includes a control unit and a memory unit. The control unit exchanges information with the network node. The memory unit stores the relevant information of the ExtModule module and the message. When the network node networknode receives a message from the ExtModule module, the control unit control unit extracts the relevant information of the message and stores it in the memory unit memory unit; when the network node networknode sends a message to the ExtModule module, the control unit control unit rewrites the information of the message in the memory unit memory unit; During operation, the control unit control unit reads the message in the FIFO module that will leave the FIFO module in the next clock cycle, and finds the relevant information of the message in the memory unit memory unit. The control unit control unit analyzes the relevant information of the message and the number of the ExtModule module connected to the network node networknode, and gives a control signal. The control signal passes through the register reg and is transmitted to the Arbiter module in the network node networknode at the next clock rising edge. The control unit control unit reads the message that the ExtModule module is sending to the network node networknode. If the message sent by the ExtModule module is not received by the network node networknode, the control unit control unit controls the credit_modu of the ExtModule module in the memory unit to add 1. When the credit_modu reaches the threshold, the control unit control unit sends a control signal to the Arbiter module in the network node networknode to set the priority of the message sent by the ExtModule module to the maximum, and the priority of the message sent by the ExtModule module is restored only after the credit_modu becomes 0; The control unit control unit reads the content of the FIFO module in each network node networknode, and reads the relevant information of the ExtModule module through the network node networknode, determines whether the network node networknode is in a busy state based on the information, and calculates the number of busy network nodes networknode encountered by any network node networknode when the message goes along the clockwise path and the number of busy network nodes networknode encountered along the counterclockwise path when any network node networknode sends a message to any network node networknode, and the control signal sent by the control unit control unit to the network node networknode, the content of the control signal is to select a path with fewer busy nodes to transmit the message, and the control signal is transmitted to the network node networknode through the register reg; after the next clock rising edge, the network node networknode receives the message of the ExtModule module, and the network node networknode selects the clockwise or counterclockwise path to transmit the message according to the control signal given by the register reg.
