TriBA-cNoC deadlock prevention method based on message transfer
By adopting message classification and virtual transmission channel structure in TriBA-cNoC, combined with Hamiltonian ring characteristics and transposal mechanism, the problem of communication deadlock in the multi-core processor is solved, deadlock prevention and communication performance optimization is achieved, and processing is improved Availability and reliability of the device.
Patent Information
- Application Number
- CN202410817238.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-22
AI Technical Summary
In the on-chip network of multi-core processors, communication deadlocks are due to system deadlocks caused by resource sharing and buffer competition, which leads to the processor being unable to be used normally, and the existing technology is difficult to effectively prevent and solve the deadlock problem.
Using TriBA-cNoC deadlock prevention method based on message reblocking, by classifying message and data transmission, using Hamiltonian ring characteristics and virtual transmission channel structure, various types of message transmission are implemented synchronously and rotated to avoid competition among storage and forwarding buffers and Shared channel conflicts, introduce a reinstatement mechanism to dynamically adjust the buffer size.
It effectively prevents the occurrence of communication deadlocks, optimizes the communication performance between cores, improves the availability and reliability of multi-core processors, and is suitable for the optimization of communication performance of multi-core processors.
Smart Images

Figure CN119011510A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a communication deadlock prevention method based on message transfer for TriBA-cNoC, belonging to the technical field of communication deadlock of many-core network on chip. Background Art
[0002] Deadlock refers to a deadlock state in which multiple processes (two or more) or concurrent hardware modules in a computing system are stuck when competing for resources. Each process is in a state of waiting to obtain resources to continue execution, but without external intervention, the system cannot get out of this state by itself, causing the computing system to deadlock.
[0003] The necessary conditions for deadlock to occur include:
[0004] 1. Mutual exclusion: Each resource can only be used by one process at a time.
[0005] 2. Request and hold: When a process is blocked due to requesting resources, it still keeps the obtained resources from being released.
[0006] 3. Non-preemptible: The resources obtained by the process cannot be preempted or released by other processes before they are used up.
[0007] 4. Circular waiting: A circular waiting resource relationship is formed between several processes, with each process connected head to tail.
[0008] The above conditions together cause the process to be stuck in a permanent state and unable to continue execution. Because of the resource competition conflicts between each other, deadlocks are caused in the computing system. Therefore, studying potential deadlock prevention mechanisms to eliminate deadlocks is crucial for designing reliable and efficient computing systems.
[0009] The Network on Chip (NoC) used by many-core processors is forced to adopt various sharing strategies (such as sharing of physical transmission channels) due to limited hardware resources. Communication between nodes in NoC usually adopts the store-and-forward method, so there is also sharing of buffers in communication data transmission. In principle, resource sharing will lead to competition. When arbitration of competition is unfavorable, it will lead to conflicts and communication deadlocks.
[0010] Deadlock-free mechanism is crucial to the availability and reliability of multi-core processors. In a system without a corresponding deadlock-solving mechanism, once a deadlock occurs, the processor will become unusable. Therefore, deadlock-free is the primary technical issue that all multi-core processors must solve.
[0011] Currently, there are three common methods to solve deadlock: deadlock prevention, deadlock avoidance, and deadlock detection.
[0012] 1. Deadlock prevention. If the necessary conditions that lead to deadlock can be broken, the computing system can avoid deadlock. Therefore, by adopting specific technical means to eliminate one or more of the above necessary conditions in the system, deadlock can be effectively prevented. This method is called deadlock prevention. For example, the order of resource requests is strictly specified to ensure that no circular dependency is formed between different requesters. For example, the classic turning model and odd-even turning model used in the 2D-Mesh structure break the circular dependency by limiting specific turns.
[0013] 2. Deadlock avoidance. At runtime, although the system may have these necessary conditions, avoiding the system from falling into a deadlock state in some way is called deadlock avoidance. For example, by using additional virtual channels as escape channels and adopting bubble flow control technology to control the number of buffer resources, potential circular dependencies in the system can be eliminated to avoid deadlock.
[0014] 3. Deadlock detection. Deadlock detection refers to the process in which a computing system automatically identifies and confirms the existence of a deadlock during operation, and takes measures to resolve the deadlock (such as resource preemption and process termination) to restore the system to normal operation. Summary of the invention
[0015] The purpose of the present invention is to address the defects and shortcomings of the prior art, to break the necessary conditions that lead to deadlock, to prevent the computing system from falling into a deadlock state, and to effectively solve the technical problem that deadlock occurs in TriBA-cNoC nodes of the many-core architecture due to shared storage forwarding buffers and shared physical transmission channels. A TriBA-cNoC deadlock prevention method based on message forwarding is creatively proposed.
[0016] TriBA-NoC (Triplet-Based Architecture) is a multi-core architecture, including the communication sub-network TriBA-cNoC and the memory sub-network TriBA-mNoC. This architecture inherits the advantages of multiple advanced multi-core architectures such as tiling, modularization, object-oriented mechanism and PIM.
[0017] The Hamiltonian properties in TriBA-cNoC are closely related to this approach. The TriBA-cNoC topology is named TC F , whose plane diagram is shown as Figure 1 As shown, the number of nodes is 3 F , F is called the level number of the topology (TC F With a clear hierarchy). TC F The Hamiltonian property of a refers to its Hamiltonian path and Hamiltonian cycle, referred to as H-path and H-cycle.
[0018] H-path: There is a path between two vertices of a graph, and this path passes through each node of the graph once and only once. This path is called a Hamiltonian path, such as Figure 2 shown.
[0019] H-Ring: TC F There exists a Hamiltonian cycle in , that is, a closed H-path that passes through each vertex once and only once, such as Figure 2 shown.
[0020] First, the technical terms involved in the method of the present invention are explained:
[0021] 1. Ports and interconnection edge names of TriBA-cNoC nodes
[0022] The nodes of TriBA-cNoC are all located on the H-ring. According to the properties of the directed edges they connect, the three output ports, three input ports, and various edges of the nodes are named as follows:
[0023] Basic group: In TC F In the example, every three nodes are fully interconnected to form a super node, and then according to TC F The topological node connection rule interconnects the super nodes, which are called basic groups. Figure 1 In, TC 3 The three nodes x2x11, x2x13, and x2x12 constitute a basic group.
[0024] Hamiltonian edge (H-edge): two edges on the Hamiltonian cycle that enter the basic group. Figure 3 As shown, all edges are marked by thick solid lines.
[0025] Non-Hamiltonian edge (NH-edge): An edge in the basic group that does not lie on a Hamiltonian cycle. Figure 3 All edges marked by thick dashed lines.
[0026] Cross-group edge: An edge connecting two nodes belonging to two basic groups, where the edge crosses another basic group. Figure 3 a and 3c, the edges 123→132, 231→213, and 312→321 in cVCF.
[0027] HPin: Hamiltonian input port, connected to the Hamiltonian input edge. cHPin is the Hamiltonian entry in cVCF, and aHPin is the Hamiltonian input port in aVCF.
[0028] NPin: Non-Hamiltonian input port, connected to non-Hamiltonian input edges. cNPin is the non-Hamiltonian entry in cVCF, and aNPin is the non-Hamiltonian input port in aVCF.
[0029] HPout: Hamiltonian output port, connected to the Hamiltonian output edge. cHPout is the Hamiltonian output port in cVCF, and aHPout is the Hamiltonian output port in aVCF.
[0030] NPout: Non-Hamiltonian output port, connected to non-Hamiltonian output edges. cNPout is the Hamiltonian output port in cVCF, and aNPout is the Hamiltonian output port in aVCF.
[0031] LPin: Local injection, the port through which the local kernel injects messages into the router. Relative to the router, this port is the input port.
[0032] Figure 3 In the example, the node with the same status as node a is called the basic group entry node (e.g. Figure 3 The nodes with the same status as node c are called basic group exit nodes (relative to cVCF), referred to as exit nodes, such as f, i, etc. The nodes with the same status as node b are called basic group intermediate nodes (relative to cVCF), referred to as intermediate nodes, such as e, h, etc.
[0033] 2. Cutting-edge interception
[0034] The tip node has a two-way channel for TriBA-cNoC to interact with the outside world, but the tip node itself does not provide hard-wired logic for relay routing for interaction requests with the outside world, although it can complete relay routing for internal communication.
[0035] For external input, no matter which node of TriBA-CMPs (multiprocessor with TriBA-NoC as on-chip network) the message ends at, at the architecture level, the message will be intercepted by the leading node itself and handed over to the specific message processing module of the local kernel for processing, and then injected into TriBA-CMPs as an internal message of TriBA-CMPs to complete subsequent communication.
[0036] The output of TriBA-cNoC to the outside world will also be intercepted by the cutting-edge vertex, processed by the specific message processing module of the local kernel, and then output to the output port to the outside world.
[0037] The above-mentioned method of handling internal and external communication of TriBA-cNoC is called Apex-Based Interception (ABI). Without this mechanism of interception, the internal communication of TriBA-cNoC may be blocked by many continuous messages outside the chip and cannot work effectively. Without providing a means of intercepting the output of internal messages of TriBA-cNoC to the outside, TriBA-cNoC may also be used maliciously in principle.
[0038] It should be noted that the tip interception mechanism means that when processing the relay forwarding routing within the tip node, there is no need to consider the interference of external message injection.
[0039] 3. Forwarding priority
[0040] Refers to the relay-first forwarding strategy (RF) of relay routing forwarding. Figure 4 As shown, for relative fairness, the original priority forwarding adopts the following principles:
[0041] When a message to be forwarded appears, if the local kernel has a message waiting to be injected (inserted), the message will be sent first (because its sending time or sending point is earlier than the received message to be forwarded), and the forwarded message to be sent is buffered in the to-be-sent buffer of this kernel, and then the message to be forwarded will be forwarded first; when the message to be forwarded and the kernel inserted message appear at the same time, the message to be forwarded is forwarded to the target port first, and the kernel inserted message can only be sent after being buffered in the to-be-sent buffer.
[0042] 4. Operations First
[0043] Priority is the order of priority of message forwarding. Priority 0 has the highest priority, priority 1 has the second highest priority, priority 2 has the third highest priority, and priority 3 has the lowest priority. "Forward xxx according to the priority order, and forward yyy according to the priority order" means that when xxx is valid, xxx is forwarded first; when xxx is an empty signal, yyy is forwarded; and the general concept of priority is usually unrelated to whether the signal is empty or not. If xxx has a high forwarding priority, it will be forwarded first regardless of whether xxx is an empty signal or not. Figure 5 As shown, after 4 signals with different priorities are input, the transfer arbitration module judges whether the signal is empty in order according to the priority, and makes a selection according to the following algorithm:
[0044] IF (priority 0 corresponds to input signal is not empty) output the signal;
[0045] ELSE
[0046] IF (priority 1 corresponds to input signal is not empty) output the signal;
[0047] IF (the input signal corresponding to priority 2 is not empty) outputs the signal;
[0048] ELSE
[0049] IF (priority 3 corresponding to input signal is not empty) output the signal;
[0050] ELSE outputs an empty signal flag;
[0051] 5. Message transfer
[0052] Message forwarding is referred to as forwarding. TriBA-cNoC consists of nodes with a connection degree of 3. Without considering local injection, unless a "coordinated sending mechanism" can be found to make the number of messages forwarded from the other two input ports received by any output port at any time less than the number of messages sent by the output port at that moment, the number of messages to be sent in the output port will accumulate more and more, that is, the buffer size required by the output port will become larger and larger. This "mechanism" is difficult to implement with hardware alone.
[0053] From another perspective, even if Figure 3 As shown, a logical ring is formed and the core interconnection channels are time-multiplexed in a synchronous manner to prevent the emergence of mutual dependence, but there are still problems. For example, for point 133, at a certain moment, forwarding 132→133→311 (132→133 may come from 123→132) is implemented, which may compete with forwarding 131→133→311 for channel 133→311. It is difficult to prevent 131→133→311, unless 113→131→133 is prevented at 131. The only way is to add a buffer at 131 to temporarily buffer the message from 113 to 133, because this buffer may have been occupied. This also involves the problem of dynamically increasing the size of the buffer.
[0054] Obviously, it is inevitable to be able to dynamically increase the size of the buffer. For messages that cannot be buffered (so that they can be sent at a later time) because the buffer is occupied, they are temporarily written into a special buffer with a variable size for temporary storage. This process is called re-injection. The re-injection buffer (Message Send Buffer, MsgSndBuf) is logically a queue (such as Figure 5 As shown in Figure 1, at the sensitive moment, the queue head data (message), the two input port input messages corresponding to the output port, and the four messages injected by the local kernel are selected as the immediate forwarding message according to the priority order. The unselected ones are forwarded to the local kernel, and the queue is maintained by the local kernel specific message processing function.
[0055] After the introduction of redirection, although it may seem that the response speed of message sending is reduced, this is not necessarily the case. First, if the message redirection buffer of an output port is empty, one of the messages it currently receives will be forwarded immediately (the other will be redirected). After the message data enters the routing calculation pipeline, the message that has just been redirected should be able to be output from the redirection buffer. At the next moment, the buffer output or the message input at that time will be selected to continue sending. Therefore, overall, the message sending will not be delayed, that is, Figure 5 The transfer mechanism can hide the transmission speed loss caused by message transfer; secondly, if the storage and forwarding buffer is not empty, it will at least ensure that there are messages to be forwarded at that time, and will not delay the message forwarding bandwidth.
[0056] 6. Sending and forwarding messages
[0057] The message transmission process within the NoC node can be considered to consist of two processes: "sending" and "forwarding".
[0058] in:
[0059] Sending means reading the message from the node output port buffer and placing it on the physical channel connected to the adjacent communication target node until the message is transmitted to the input port of the adjacent node.
[0060] Forwarding is the process of receiving a message from an input port. After the forwarding right arbitration (transfer), the message that obtains the forwarding right enters the corresponding routing calculation pipeline for routing calculation and output, and then is written into the applicable buffer (SndBuf_1 or SndBuf_2) for temporary storage and waiting to be sent. Messages that do not obtain the forwarding right are sent to the local kernel (written to LPiin) and enter the transfer queue for temporary storage.
[0061] The technical principle of this method to achieve deadlock prevention is as follows:
[0062] A TriBA-cNoC deadlock prevention method based on message transfer divides messages and data transmission into several categories according to the NoC topology characteristics and the characteristics and properties of the transmission path, and then implements each type of message (data transmission) synchronously and in turn.
[0063] First, within each type of message (data transmission), since the two messages (data transmission) on the transmission trajectory (on a certain path of NoC) cannot form a storage and forwarding buffer contention (because when the subsequent message requisitions the front buffer, the front message happens to release the buffer it occupies due to synchronization reasons), competition between messages of the same type is avoided, preventing deadlock caused by storage and forwarding buffer sharing.
[0064] Second, since each type of message (data transmission) is synchronously and alternately implemented, the time for each type of message to occupy the shared physical channel is different, thus preventing communication deadlock caused by shared channel conflicts. This mechanism is equivalent to the virtual channel mechanism.
[0065] Third, when a certain type of message (data transmission) is implemented, due to changes in the transmission trajectory, individual messages may change from type to another type X. However, the transmission buffer of type X may not be idle to receive new messages converted from this type (i.e., exchanges between message classes). To this end, by introducing the above-mentioned "transfer" mechanism, once storage and forwarding buffer competition occurs, the transfer mechanism can be used to avoid conflicts, thereby resolving interaction conflicts between message classes.
[0066] This method is implemented by the following technical solution, including the following steps:
[0067] Step 1: Classify the messages and data transmission in TriBA-cNoC.
[0068] All messages or data transmissions on TriBA-cNoC are divided into two categories: TYPE_I and TYPE_II. The specific classification rules are as follows:
[0069] The characteristics of TYPE_I are: all H-edges and cross-group edge identifiers can logically form messages or data transmission along the Hamiltonian loop. Figure 6 As shown, any message (data transmission) on the transmission path a→b→c→d→e→f→g→h→i→j→k→l→m.
[0070] The characteristics of TYPE_II are: all messages or data transmissions marked by NH-edges can logically detour along the Hamiltonian cycle. Figure 6 As shown, any message (data transmission) of the transmission path a→c→d→f→g→i→j→l→m.
[0071] The messages and data transmissions corresponding to the cross-group edges are classified as TYPE_I. Since TriBA-cNoC adopts the shortest path routing strategy (SPR), the output edge connected to the HPout at the end point of the cross-group edge is exclusively used by the cross-group edge. For example, at node h of the cVCF, the data transmission represented by the edge h→i can only come from a→h or the local kernel injection of node h.
[0072] Step 2: Set up the virtual transmission channels and operation timing in TriBA-cNoC.
[0073] According to the above message classification method, the virtual channel structure diagram that conforms to the message classification method is as follows: Figure 7 As shown, the figure replaces the topological diagram with double lines (such as Figure 1 and Figure 3 b) The single-line edge (the edge that identifies the physical channel) and the double-line edge respectively identify two virtual channels, where the output ports of all nodes on one virtual channel are bound to the buffer SndBuf_1, and the output ports of all nodes on the other virtual channel are bound to the buffer SndBuf_2.
[0074] Specifically, the operation timing of the buffers corresponding to the two virtual channels is as follows:
[0075] Phase_1: All messages in SndBuf_1 are sent; in parallel, all messages (including local injections) received by the node input port that are forwarded to the output port are forwarded for arbitration, and the messages that are forwarded are forwarded (written to SndBuf_1). Therefore, the result of the combined effect of sending and forwarding is that all messages in SndBuf_1 are transmitted along the corresponding virtual channel. In this process, messages that do not have the right to be forwarded are marked and sent to the local kernel (written to LPiin), and enter the forwarding queue buffer for transmission at an appropriate time.
[0076] Phase_2: All messages in SndBuf_2 are sent; in parallel, all messages (including local injections) received by the node input port that are applied to be forwarded to the output port are forwarded for arbitration, and the messages that are awarded the right to forward are forwarded (written to SndBuf_2). Therefore, the result of the combined effect of sending and forwarding is that all messages in SndBuf_2 are transmitted along the corresponding virtual channel. Note that in this process, messages that do not have the right to forward are marked and sent to the local kernel (written to LPiin), and enter the forwarding queue buffer for transmission at an appropriate time.
[0077] Step 3: Specify the usage and timing of different port buffers.
[0078] First, the general rules for the use of different output port buffers are given:
[0079] Buffer of output node port HPout: SndBuf_1 of this port is used to buffer TYPE_I messages forwarded from HPin or previously transferred messages (TYPE_I type); SndBuf_2 of this port is used to buffer TYPE_II messages input by NPin (buffered after type conversion to TYPE_I). When multiple messages apply to forward HPout, but SndBuf_1 and SndBuf_2 are both occupied, these messages applying to be forwarded are sent to the local kernel (i.e. written to LPiin) and enter the transfer queue buffer;
[0080] Buffer of the basic group entry node NPout: The two buffers of this port are used for buffering TYPE_II messages. The difference is that the sending and forwarding operations in Phase_1 are for SndBuf_1, while the sending and forwarding operations in Phase_2 are for SndBuf_2.
[0081] Buffer of the starting point NPout of the cross-group edge: The port buffer SndBuf_1 is generally used to buffer the TYPE_I message input by the reverse Hamiltonian cycle (cVCF and aVCF are reverse Hamiltonian cycles). The port SndBuf_2 buffer is generally used to buffer the TYPE_I message input caused by the same Hamiltonian cycle. When multiple inputs apply to forward the NPout, the right to use the buffer is transferred and arbitrated.
[0082] The operation timing of the above buffer is specified as follows:
[0083] During Phase_1, all operations on the output port buffer SndBuf_1 are implemented;
[0084] All operations on the output port buffer SndBuf_2 are implemented during Phase_2.
[0085] Beneficial Effects
[0086] Compared with the prior art, the present invention has the following advantages:
[0087] 1. This method can not only prevent TriBA-cNoC communication deadlock, but also intuitively optimize communication performance by combining the Hamiltonian cycle characteristics presented by the TriBA-cNoC topology.
[0088] 2. Optimizing the inter-core communication performance of the many-core processor usually requires combining the application characteristics based on the many-core architecture (i.e., the NoC used). The method of the present invention is universal in preventing deadlocks. When optimizing the communication performance of TriBA-cNoC, only constraining the distributed application to be directed acyclic can achieve good results. Therefore, the scope of application of the present invention exceeds the general anti-deadlock method.
[0089] This method provides a solution and important guarantee for the availability and reliability of multi-core / many-core processors based on TriBA-cNoC. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 For F layer (3 F Node) Topology of TriBA-cNoC TC F Schematic diagram of
[0091] Figure 2Hamiltonian paths and Hamiltonian cycles in TriBA-cNoC.
[0092] Figure 3 The Hamiltonian cycle structure and virtual Hamiltonian cycle flow in TriBA-cNoC (taking 27-node TriBA-cNoC as an example, Figure 3 (c) There is data interaction between the upper and lower graphs cVCF and aVCF), where each edge identifies both the physical channel and the data transmission direction on the physical channel;
[0093] Figure 4 It is a priority forwarding mechanism for messages (note: after the introduction of the transfer mechanism, the order in which any message to be forwarded (including locally injected messages) is sent is roughly reflected in the transfer mechanism of the transfer sending buffer);
[0094] Figure 5 Send queue location and top-level structure diagram for transfer;
[0095] Figure 6 Schematic diagram of message / transmission classification in TriBA-cNoC (taking 27-node TriBA-cNoC as an example);
[0096] Figure 7 It is a logical channel and its message transmission situation, where the present invention sets two virtual channels for TriBA-cNoC, and message transmission is assigned to different virtual channels at many shared physical channels. The dotted edge in the figure also identifies TYPE_II type message and data transmission, and the implementation edge also identifies TYPE_I type message and data transmission; DETAILED DESCRIPTION
[0097] To facilitate understanding of the present invention, the present invention is applied to a specific embodiment to prevent communication deadlock, thereby forming an accurate and detailed description of the present invention. Obviously, the described embodiments are only used for more detailed and specific descriptions, and should not be understood as limiting the present invention in any form. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without making creative work beyond the ideas and provisions of the present invention belong to the scope of protection of the present invention.
[0098] Example
[0099] For any scale of TriBA-cNoC network-on-chip (NoC), message classification is performed on the NoC when communication performance optimization is not required;
[0100] Step 2: Set the virtual transmission channel method in TriBA-cNoC and set the virtual channel of the NoC;
[0101] Step 3: Specify the usage and timing of different port buffers. Formulate the usage details of the output port HPout and NPout buffers SndBuf_1 and SndBuf_2.
[0102] The detailed rules for using the buffer of the output port HPout (the usage method and timing of the HPout buffer, applicable to HPout in both cVCF and aVCF) include:
[0103] 1. Basic group entry nodes. For example: nodes a, d, g of cVCF and nodes i', f', c' of aVCF.
[0104] Phase_1 operations include:
[0105] Send: Send TYPE_I message in SndBuf_1 to the intermediate nodes (b, e, h and g', e', b', etc.);
[0106] Forward: forward the TYPE_I message from HPin to SndBuf_1. Under the constraints of the forwarding priority strategy, the TYPE_I message can be injected into SndBuf_1 locally at an appropriate time.
[0107] Tip: The forwarded message comes from the output port buffer SndBuf_1 of the adjacent node (i.e., the basic group exit nodes z, c, f and j', g', d', etc.). This period realizes the forwarding of TYPE_I type messages in the adjacent node buffer SndBuf_1 such as z→a→b.
[0108] Phase_2 operations include:
[0109] Send: Send TYPE_I message in SndBuf_2 to the intermediate nodes (b, e, h and h', e', b', etc.).
[0110] Forward: forward the TYPE_II message from HPin to SndBuf_2 and change the message type to TYPE_I. Under the constraints of the forwarding priority strategy, TYPE_I messages can be injected into SndBuf_2 in a timely manner.
[0111] Tip: The forwarding operation may belong to heterogeneous message interaction, that is, the transmission of the TYPE_II message class marked by the dotted edge to the TYPE_I message class marked by the solid edge, so the original message TYPE_II becomes TYPE_I.
[0112] 2. The starting points of the cross-group edges, for example, nodes b and k of cVCF and nodes h′ and n′ of aVCF.
[0113] Phase_1 operations include:
[0114] Send: Send TYPE_I message in SndBuf_1 to the exit node (c, g′, etc.).
[0115] Forward: forward the TYPE_I message from NPin to SndBuf_1. Under the constraints of the forwarding priority strategy, the TYPE_I message can be injected into SndBuf_1 locally at an appropriate time.
[0116] Tip: The forwarding operation is the reverse transmission of the message (h′→b′→c and b→h→g′, etc.), so the TYPE_I message in SndBuf_1 of NPout from the cross-group neighbor core (h′, b, etc.)
[0117] Phase_2 operations include:
[0118] Send: Send the TYPE_I message in SndBuf_2 to the exit node (c, g′, etc.).
[0119] Forward: forward the TYPE_I message from NPin to SndBuf_2. Under the constraints of the forwarding priority strategy, the TYPE_I message can be injected into SndBuf_2 locally at an appropriate time.
[0120] Tip: The forwarding operation is the reverse transmission of the message (h′→b′→c and b′→h′→g, etc.), which comes from the TYPE_I message in SndBuf_2 of the cross-group neighbor core (h′, b, etc.) NPout.
[0121] 3. Tip nodes: For example, nodes e, p, q in cVCF and nodes e′, p′, q′ in aVCF.
[0122] Phase_1 operations include:
[0123] Send: Send TYPE_I message in SndBuf_1 to the egress node (f, d′, etc.).
[0124] Forwarding: No message forwarding, but TYPE_I messages can be injected into SndBuf_1 locally at the appropriate time.
[0125] Tip: The reason for no message forwarding is tip interception.
[0126] Phase_2 operations include:
[0127] Send: Send the TYPE_I message in SndBuf_2 to the egress node (f, d′, etc.).
[0128] Forwarding: No message forwarding, but TYPE_I messages can be injected into SndBuf_2 locally at the appropriate time.
[0129] Tip: The reason for no message forwarding is tip interception.
[0130] 4. End points of cross-group edges, such as nodes h and n in cVCF and nodes b′ and k′ in aVCF.
[0131] Phase_1 operations include:
[0132] Send: Send the TYPE_I message in SndBuf_1 to the exit node (i, a′, etc.).
[0133] Forward: Forward the TYPE_I message from NPin to SndBuf_1. Under the forwarding priority constraint, the TYPE_I message can be injected into SndBuf_1 locally at an appropriate time.
[0134] Hint: Due to the SPR constraint, the transmissions g→h→i and c′→b′→a′ do not exist, so NPin is exclusively used by the messages (data transmissions) corresponding to the cross-group edges.
[0135] Phase_2 operations include:
[0136] Send: Send the TYPE_I message in SndBuf_2 to the exit node (i, a′, etc.).
[0137] Forward: Forward the TYPE_I message from NPin to SndBuf_2. Under the forwarding priority constraint, the TYPE_I message can be injected into SndBuf_2 locally at an appropriate time.
[0138] Hint: Due to the SPR constraint, the transmissions g→h→i and c′→b′→a′ do not exist, so NPin is exclusively used by the messages (data transmissions) corresponding to the cross-group edges.
[0139] 5. Basic group exit nodes, such as nodes c, f, i of cVCF and nodes g′, d′, a′ of aVCF.
[0140] Phase_1 operations include:
[0141] Send: Send TYPE_I message in SndBuf_1 to adjacent basic group entry nodes (d, g, j and f′, c′, z′, etc.).
[0142] Forward: forward the TYPE_I message from HPin to SndBuf_1. Under the forwarding priority constraint, the TYPE_I message can be injected into SndBuf_1 locally at an appropriate time.
[0143] Tip: None.
[0144] Phase_2 operations include:
[0145] Send: Send the TYPE_I message in SndBuf_2 to the adjacent basic group entry nodes (d, g, j and f′, c′, z′, etc.).
[0146] Forwarding: Transfer TYPE_II messages from NPin and TYPE_I messages from HPin to SndBuf_2 (TYPE_II is changed to TYPE_I). Those who obtain the forwarding right forward the messages (i.e. write them into SndBuf_2), and those who do not obtain the forwarding right send them to the local kernel after marking them (i.e. write them into LPiin). Under the constraints of the forwarding priority strategy, TYPE_I messages can be injected into SndBuf_2 at the appropriate time.
[0147] Tip: The purpose of changing the message type in the forwarding operation is to coordinate with the forwarding operation of the NPout period Phase_2 at the entry nodes of the basic group (a, d, g and i', f', c', etc.). In the forwarding arbitration, the message from NPin has the highest priority, the message from HPin has the second highest priority, and the local injection message has the lowest priority.
[0148] Detailed rules for the use of the buffer at the output port NPout (the use and timing rules for the HPout buffer apply to both NPout in cVCF and aVCF). Figure 7 shown.
[0149] 1. Basic group entry nodes, such as nodes a, d, g of cVCF and nodes i', f', c' of aVCF.
[0150] Phase_1 operations include:
[0151] Send: Send TYPE_II message in SndBuf_1 to the exit nodes (c, f, g′, d′, etc.) in the same basic group.
[0152] Forward: Forward the TYPE_I message from HPin to SndBuf_1 and change its type to TYPE_II. Inject the TYPE_II message into SndBuf_1 locally under the forward priority constraint.
[0153] Tip: The forwarding operation with this output port as the target belongs to heterogeneous message interaction, that is, the transmission of TYPE_I messages (such as z→a and a′→z′, etc.) marked by both dotted edges and solid double-line edges to TYPE_II messages (a→c and c′→a′, etc.) marked by dotted edges. Therefore, the message type changes from TYPE_I message to TYPE_II.
[0154] Phase_2 operations include:
[0155] Send: Send TYPE_II message in SndBuf_2 to the exit nodes (c, f, i and g′, d′, a′, etc.) in the same basic group.
[0156] Forward: Forward the TYPE_I message from HPin to SndBuf_2 and change its type to TYPE_II. Inject the TYPE_II message into SndBuf_2 locally under the forward priority constraint.
[0157] Tip: The forwarding operation with this output port as the target belongs to heterogeneous message interaction, that is, the transmission of TYPE_I messages (such as z→a and a′→z′, etc.) marked by both dotted and solid edges to TYPE_II messages (a→c and c′→a′, etc.) marked by dotted edges. Therefore, the message type changes from TYPE_I to TYPE_II.
[0158] 2. The starting point of the cross-group edge, such as the node k of cVCF and the nodes h′, n′ of aVCF.
[0159] Phase_1 operations include:
[0160] Send: Send the TYPE_I message in SndBuf_1 to the cross-group edge endpoint (h and b′, etc.).
[0161] Forwarding: Inject TYPE_I messages from cHPin (e.g. forwarding a→b→h and i′→h′→b′) and TYPE_I messages from aHPin (e.g. forwarding c→b→h and g′→h′→b′) to SndBuf_1. Those who obtain the forwarding right forward (i.e. write to SndBuf_1), and those who do not obtain the forwarding right send them to the local kernel after marking (i.e. write to LPiin). Under the forwarding priority constraint, TYPE_I messages can be injected into the local kernel of SndBuf_1 at an appropriate time.
[0162] Tip: This node may experience the worst forwarding situation, including the previous redirected message, two input port messages, and local injection message applying for forwarding at the same time.
[0163] Phase_2 operations include:
[0164] Send: Send the TYPE_I message in SndBuf_2 to the exit node (h, b′, etc.).
[0165] Forwarding: To SndBuf_2, TYPE_I messages from cHPin (e.g. forwarding a→b→h and i′→h′→b′) and TYPE_I messages from aHPin (e.g. forwarding c→b→h and g′→h′→b′), those who obtain the forwarding right forward (i.e. write to SndBuf_2), and those who do not obtain the forwarding right mark and send to the local kernel. Under the forwarding priority constraint, TYPE_I messages can be injected into the local SndBuf_1 at an appropriate time.
[0166] Tip: This node may experience the worst forwarding situation, including the previous redirected message, two input port messages, and local injection message applying for forwarding at the same time.
[0167] 3. Tip nodes: For example, node e of cVCF and node e′ of aVCF.
[0168] Phase_1 Operation
[0169] Send: Send TYPE_I message in SndBuf_1 to the outside world.
[0170] Forwarding: Due to the advanced interception (ABI), there is no forwarding. However, TYPE_I messages can be injected into SndBuf_1 locally at the appropriate time.
[0171] Tip: None.
[0172] Phase_2 operations include:
[0173] Send: Send TYPE_I message in SndBuf_2 to the outside world.
[0174] Forwarding: Due to the advanced interception (ABI), there is no forwarding. However, TYPE_I messages can be injected into SndBuf_2 locally at the appropriate time.
[0175] Tip: None.
[0176] Cross-group edge endpoint.
[0177] For example, node h of cVCF and node b′ of aVCF.
[0178] Operation: No NPout here.
[0179] Tip: The end point of the cross-group edge in cVCF (aVCF) is the starting point of the cross-group edge in aVCF (cVCF). The corresponding sending and forwarding operation regulations are as mentioned above.
[0180] 4. Basic group exit nodes, such as nodes c, f, i of cVCF and nodes g′, d′, a′ of aVCF.
[0181] Operation: No NPout here.
[0182] Tip: The basic group egress node in cVCF (aVCF) is the basic group ingress node in aVCF (cVCF). The corresponding sending and forwarding operation regulations are as above.
[0183] After implementing the anti-deadlock method of the present invention on a specified TriBA-cNoC, simulation of GEM5 proves that the present invention is effective.
[0184] For any given scale of TriBA-cNoC network-on-chip (NoC), when optimizing communication performance, first follow the above steps. When performing distributed task mapping, try to ensure that the communication trajectory between nodes meets the common directed acyclic requirements. This reduces the number of forwarding messages to these nodes and improves communication performance.
Claims
1. A TriBA-cNoC deadlock prevention method based on message transfer, characterized in that: Divide messages and data transmission into several categories, and then implement each type of message synchronously and in turn; Step 1: Classify the messages and data transmission in TriBA-cNoC; All messages or data transmissions on TriBA-cNoC are divided into two categories: TYPE_I and TYPE_II. The classification rules are as follows: The characteristics of TYPE_I are: all Hamiltonian edges H- and cross-group edge identifiers can logically form messages or data transmission along the Hamiltonian surround; The characteristics of TYPE_II are: all messages or data transmissions that are not NH-identified by Hamiltonian edges and can logically detour along the Hamiltonian cycle; The messages and data transmission corresponding to the cross-group edge are classified as TYPE_I type, and the output edge connected to the Hamiltonian output port HPout at the end point of the cross-group edge is exclusively used by the cross-group edge; Step 2: Set up the virtual transmission channels and operation timing in TriBA-cNoC; According to the above message classification method, in the virtual channel structure that conforms to the message classification method, the double-line edge identifies two virtual channels respectively, wherein the output ports of all nodes on one virtual channel are bound to the buffer SndBuf_1, and the output ports of all nodes on the other virtual channel are bound to the buffer SndBuf_2; Step 3: Specify the usage and timing of different port buffers; The general rules for using different output port buffers include: Buffer of output node port HPout: SndBuf_1 of this port is used to buffer TYPE_I messages forwarded from Hamiltonian input port HPin or messages that have been transferred in the past, i.e., TYPE_I type; SndBuf_2 of this port is used to buffer TYPE_II messages input from non-Hamiltonian input port NPin, and the type is converted to TYPE_I before buffering; when there are multiple messages applying to forward HPout, but SndBuf_1 and SndBuf_2 are both occupied, these messages applying to be forwarded are sent to the local kernel, i.e., written to the local injection LPiin, and enter the transfer queue buffer; Buffer of the basic group entry node NPout: The two buffers of this port are used for buffering TYPE_II messages. The difference is that the sending and forwarding operations in Phase_1 are for SndBuf_1, and the sending and forwarding operations in Phase_2 are for SndBuf_2. The buffer of the starting point NPout of the cross-group edge: the port buffer SndBuf_1 is used to buffer the TYPE_I message input by the reverse Hamiltonian cycle circulation, and the SndBuf_2 buffer is used to buffer the TYPE_I message input caused by the same Hamiltonian cycle; when multiple inputs apply to forward the NPout, the right to use the buffer is arbitrated; The operation timing of the above buffer is specified as follows: During Phase_1, all operations on the output port buffer SndBuf_1 are implemented; All operations on the output port buffer SndBuf_2 are implemented during Phase_2.
2. A TriBA-cNoC deadlock prevention method based on message transfer as claimed in claim 1, characterized in that: In step 2, the operation timing of the buffers corresponding to the two virtual channels is as follows: Phase_1: All messages in SndBuf_1 are sent. In parallel, all messages received by the node input port and requested to be forwarded to the output port are arbitrated, and the messages that are awarded the right to be forwarded are forwarded, i.e., written into SndBuf_1. The result of the combined action of sending and forwarding is that all messages in SndBuf_1 are transmitted along the corresponding virtual channel. During this process, messages that do not obtain the right to forward are marked and sent to the local kernel, that is, written into LPi, and enter the forwarding queue buffer for transmission at an appropriate time. Phase_2: All messages in SndBuf_2 are sent. In parallel, all messages received by the node input port and applied to be forwarded to the output port are subject to transfer arbitration, and the messages with the right to forward are forwarded, that is, written into SndBuf_2. The result of the combined effect of sending and forwarding is that all messages in SndBuf_2 are transmitted along the corresponding virtual channel. In this process, messages that do not have the right to forward are marked and sent to the local kernel, that is, written into LPi, and enter the transfer queue buffer for transmission at an appropriate time.
3. A TriBA-cNoC deadlock prevention method based on message transfer as claimed in claim 1, characterized in that: The buffer usage details of the output port HPout include the basic group entry node: Phase_1 operations include: Send: Send TYPE_I message in SndBuf_1 to the intermediate node; Forwarding: forward the TYPE_I message from HPin to SndBuf_1; under the constraints of the forwarding priority policy, the TYPE_I message can be injected into SndBuf_1 locally at an appropriate time; Tip: The forwarded message comes from the output port buffer SndBuf_1 of the adjacent node; during this period, the forwarding of the TYPE_I type message in the adjacent node buffer SndBuf_1 is realized; Phase_2 operations include: Send: Send TYPE_I message in SndBuf_2 to the intermediate node; Forwarding: forward the TYPE_II message from HPin to SndBuf_2 and change the message type to TYPE_I; under the constraints of the forwarding priority strategy, the TYPE_I message can be injected into SndBuf_2 in a timely manner; Tip: The forwarding operation may belong to heterogeneous message interaction, that is, the transmission of the TYPE_II message class marked by the dotted edge to the TYPE_I message class marked by the solid edge, so the original message TYPE_II becomes TYPE_I.
4. A TriBA-cNoC deadlock prevention method based on message transfer as claimed in claim 1, characterized in that: Buffer usage details for output port HPout, including the starting point of the cross-group edge: Phase_1 operations include: Send: Send TYPE_I message in SndBuf_1 to the egress node; Forwarding: forward the TYPE_I message from NPin to SndBuf_1; under the constraints of the forwarding priority policy, the TYPE_I message can be injected into SndBuf_1 locally at the appropriate time; Tip: The forwarding operation is the reverse transmission of the message, so the TYPE_I message in SndBuf_1 from the cross-group neighbor core NPout; Phase_2 operations include: Send: Send TYPE_I message in SndBuf_2 to the egress node; Forwarding: forward the TYPE_I message from NPin to SndBuf_2; under the constraints of the forwarding priority policy, the TYPE_I message can be injected into SndBuf_2 locally at the right time; Tip: The forwarding operation is the reverse transmission of the message, which comes from the TYPE_I message in SndBuf_2 of the cross-group neighbor core NPout.
5. A TriBA-cNoC deadlock prevention method based on message transfer as claimed in claim 1, characterized in that: Buffer usage details for the output port HPout, including the tip node: Phase_1 operations include: Send: Send TYPE_I message in SndBuf_1 to the egress node; Forwarding: No message forwarding, but TYPE_I message can be injected into SndBuf_1 locally at the appropriate time; Tip: The reason for no message forwarding is tip interception; Phase_2 operations include: Send: Send TYPE_I message in SndBuf_2 to the egress node; Forwarding: No message forwarding, but TYPE_I message can be injected into SndBuf_2 locally at the appropriate time; Tip: The reason for no message forwarding is tip interception.
6. A TriBA-cNoC deadlock prevention method based on message transfer as claimed in claim 1, characterized in that: Buffer usage details for output port HPout, including the endpoints of cross-group edges: Phase_1 operations include: Send: Send TYPE_I message in SndBuf_1 to the egress node; Forwarding: forwarding TYPE_I messages from NPin to SndBuf_1; under the forwarding priority constraint, TYPE_I messages can be injected into SndBuf_1 locally at the appropriate time; Tip: NPin is exclusive to the message corresponding to the cross-group edge; Phase_2 operations include: Send: Send TYPE_I message in SndBuf_2 to the egress node; Forwarding: forwarding TYPE_I messages from NPin to SndBuf_2; under the forwarding priority constraint, TYPE_I messages can be injected into SndBuf_2 locally at the appropriate time; Tip: NPin is exclusive to the messages corresponding to the cross-group edges.
7. A TriBA-cNoC deadlock prevention method based on message transfer as claimed in claim 1, characterized in that: Buffer usage details of the output port HPout, including the basic group exit node: Phase_1 operations include: Send: Send TYPE_I message in SndBuf_1 to the adjacent basic group entry node; Forwarding: forwarding TYPE_I messages from HPin to SndBuf_1; under the forwarding priority constraint, TYPE_I messages can be injected into SndBuf_1 locally at the right time; Tips: None; Phase_2 operations include: Send: Send the TYPE_I message in SndBuf_2 to the adjacent basic group entry node; Forwarding: Transfer TYPE_II messages from NPin and TYPE_I messages from HPin to SndBuf_2, where TYPE_II is changed to TYPE_I. The one who obtains the forwarding right implements the forwarding, i.e. writes it into SndBuf_2. The one who does not obtain the forwarding right marks it and sends it to the local kernel, i.e. writes it into LPinn. Under the constraint of the forwarding priority strategy, the TYPE_I message can be injected into SndBuf_2 in a timely manner. Tip: The purpose of changing the message type in the forwarding operation is to coordinate with the forwarding operation of Phase_2 in the NPout period at the entry node of the basic group; in the transfer arbitration, the message from NPin has the highest priority, the message from HPin has the second priority, and the local injection message has the lowest priority.
