Network-on-chip and distributed cache method

By employing a tree structure and distributed directory dynamic routing decision in the on-chip network, the data packet transmission path is optimized, the path redundancy problem caused by multi-core concurrent access requests is solved, and the data interaction efficiency and resource utilization are improved.

CN121397008BActive Publication Date: 2026-03-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing on-chip networks, the fixed routing algorithm is relatively simple. When faced with concurrent access requests from multiple cores, this leads to increased redundancy and invalid transmission of data packets, which reduces data interaction efficiency and resource utilization.

Method used

The system employs a tree-structured communication link and a distributed directory, making dynamic routing decisions through routing nodes. It combines access control with shared and exclusive nodes to optimize data packet transmission paths and update status information in real time to achieve efficient write permission changes.

Benefits of technology

It effectively shortens the data packet transmission path, improves the data interaction efficiency and resource utilization of the on-chip network, and ensures the efficient completion of write permission changes and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121397008B_ABST
    Figure CN121397008B_ABST
Patent Text Reader

Abstract

The application provides an on-chip network and a distributed cache method, which can be applied to the technical field of computers. The on-chip network comprises a plurality of communication nodes, the plurality of communication nodes form a communication link with a tree structure based on the topological characteristics of the on-chip network; the plurality of communication nodes comprise: a shared node, which has read-only permission for a data block accessed by sharing in the on-chip network; an exclusive node, which has write permission for the data block; and a routing node configured to: in response to a write permission change request initiated by the shared node to the exclusive node, make a routing decision on a received data packet based on state information in a distributed directory and position information of other shared nodes associated with the data block and the communication link, determine at least one target communication direction for transmitting the data packet, and complete the change of the write permission.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a network-on-chip and a distributed cache method. BACKGROUND

[0002] As a core interconnection architecture, the network-on-chip realizes data interaction among multiple nodes by establishing communication links among nodes. In the related art, data transmission only forwards data packets according to coordinates of communication nodes and a fixed routing algorithm.

[0003] In the process of implementing the present application, it is found that at least the following problems exist in the related art: Because the fixed routing algorithm is relatively single, when facing multiple concurrent access requests, it is easy to cause redundant data packet transmission paths and increase invalid transmission, thereby reducing the data interaction efficiency and resource utilization of the network-on-chip. SUMMARY

[0004] In view of the above problems, the present application provides a network-on-chip, a chip, a distributed cache method, equipment, a medium and a product.

[0005] According to a first aspect of the present application, a network-on-chip is provided, the network-on-chip comprising a plurality of communication nodes, the plurality of communication nodes forming a communication link having a tree structure based on a topology characteristic of the network-on-chip; wherein the plurality of communication nodes comprise: a shared node having read-only permission for a data block sharedly accessed in the network-on-chip; an exclusive node having write permission for the data block; a plurality of routing nodes each maintaining a distributed directory for recording state information of a data packet related to a request for the data block in each communication direction of the routing node during processing of the request; and the routing node is configured to: in response to a write permission change request initiated by the shared node to the exclusive node, make a routing decision on the received data packet based on the state information in the distributed directory, position information of other shared nodes associated with the data block, and the communication link, to determine at least one target communication direction for transmitting the data packet, so as to complete the change of the write permission.

[0006] A second aspect of the present application provides a chip, characterized in that the chip is integrated with the network-on-chip.

[0007] The third aspect of the present application provides a distributed cache method based on a network on chip, characterized in that the network on chip comprises a plurality of communication nodes, and the plurality of communication nodes form a communication link with a tree structure based on a topological characteristic of the network on chip; wherein the plurality of communication nodes comprise: a shared node having read-only permission for a data block accessed by sharing in the network on chip; an exclusive node having write permission for the data block; and a plurality of routing nodes each maintaining a distributed directory for recording state information of a data packet related to a request in each communication direction of the routing node during processing of the request for the data block; the method is executed by the routing node and comprises: in response to a write permission change request initiated by the shared node to the exclusive node, making a routing decision for the received data packet based on the state information in the distributed directory, position information of other shared nodes associated with the data block, and the communication link, determining at least one target communication direction for transmitting the data packet to complete the change of the write permission.

[0008] The fourth aspect of the present application provides an electronic device comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.

[0009] The fifth aspect of the present application further provides a computer-readable storage medium having stored thereon a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the method.

[0010] The sixth aspect of the present application further provides a computer program product comprising a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the method.

[0011] By combining the communication link with a tree structure, the routing node can shorten the transmission path of the data packet between nodes through the routing decision, effectively reducing the link delay. In addition, the distributed directory maintained by the routing node can record the state information of the data packet related to the request in each communication direction in real time, providing real-time basis for the routing decision, and realizing accurate matching of link resources and node distribution. When processing the write permission change request, the transfer of the write permission is efficiently completed through the determined target communication direction, and the cache state of other shared nodes is synchronized, effectively improving the data interaction efficiency and resource utilization rate of the network on chip. BRIEF DESCRIPTION OF DRAWINGS

[0012] The above and other objects, features and advantages of the present application will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:

[0013] Figure 1A schematic diagram of a network-on-chip is shown in accordance with an embodiment of the present application.

[0014] Figure 2 A schematic diagram of a request packet transmission of a network-on-chip is shown in accordance with an embodiment of the present application.

[0015] Figure 3 A schematic diagram of a reply packet transmission of a network-on-chip is shown in accordance with an embodiment of the present application.

[0016] Figure 4 A schematic diagram of an invalidation notification packet transmission of a network-on-chip is shown in accordance with an embodiment of the present application.

[0017] Figure 5 A flow diagram of a routing node transmitting a packet in accordance with an embodiment of the present application is shown.

[0018] Figure 6A A schematic diagram of a conflicting target packet transmission of a network-on-chip is shown in accordance with an embodiment of the present application.

[0019] Figure 6B A schematic diagram of a conflicting temporary packet transmission of a network-on-chip is shown in accordance with an embodiment of the present application.

[0020] Figure 7 A flow diagram of a routing node transmitting a conflicting packet in accordance with an embodiment of the present application is shown.

[0021] Figure 8 A flow diagram of a distributed caching method based on a network-on-chip in accordance with an embodiment of the present application is shown.

[0022] Figure 9 A block diagram of an electronic device adapted to implement a distributed caching method based on a network-on-chip in accordance with an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary of the present application, and is not intended to limit the scope of the present application. In the following detailed description of the embodiments of the present application, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present application.

[0024] The terms used herein are merely used to describe specific embodiments, and are not intended to limit the present application. The terms "include" and "have" and the like used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0025] All terms used herein, including technical and scientific terms, have the meanings commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the use of any terms herein should not be interpreted to imply any limitation on the scope of the disclosure unless otherwise defined. The term "comprising" (and cognate terms such as "comprise" or "comprises") is used herein to mean that other elements can also be present. The term "comprising" is used herein to mean that other elements can also be present. The term "consisting essentially of" means that other elements can be present, but only if the other elements do not materially alter the basic and novel characteristics of the disclosed compositions and methods. The use of the negative term "consisting essentially of" does not mean that other elements can not be present, but only that other elements are present in a minor amount that does not materially alter the basic and novel characteristics of the compositions and methods.

[0026] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should be generally interpreted that the meaning of the expression is at least one of A, B, and C (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.).

[0027] In the technical solutions of the present application, the data involved (including but not limited to data for analysis, stored data, displayed data, etc.) are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.

[0028] Embodiments of the present application provide an on-chip network, the on-chip network comprising a plurality of communication nodes, the plurality of communication nodes forming a communication link having a tree structure based on a topology characteristic of the on-chip network; wherein the plurality of communication nodes comprise: a shared node having read-only permission for a data block accessed by sharing in the on-chip network; an exclusive node having write permission for the data block; a plurality of routing nodes each maintaining a distributed directory for recording state information of a data packet related to a request in each communication direction of the routing node in a process of processing the request for the data block; the routing node is configured to: in response to a write permission change request initiated by the shared node to the exclusive node, make a routing decision on the received data packet based on the state information in the distributed directory and position information of other shared nodes associated with the data block and the communication link, determine at least one target communication direction for transmitting the data packet, so as to complete the change of the write permission.

[0029] Figure 1 A schematic diagram of an on-chip network according to an embodiment of the present application is shown.

[0030] As Figure 1As shown, the network-on-chip includes a plurality of communication nodes, which form a tree-structured communication link based on the topology characteristics of the network-on-chip; wherein the plurality of communication nodes include: a shared node 101, which has read-only permission for a data block accessed by sharing in the network-on-chip; an exclusive node 102, which has write permission for the data block; a plurality of routing nodes 103, each of which maintains a distributed directory for recording state information of a data packet in each communication direction of the routing node 103 in the process of processing a request for the data block; the routing node 103 is configured to: in response to a write permission change request initiated by the shared node 101 to the exclusive node 102, make a routing decision on the received data packet based on the state information in the distributed directory and the position information of other shared nodes 101 associated with the data block and the communication link, and determine at least one target communication direction for transmitting the data packet to complete the change of the write permission.

[0031] According to an embodiment of the present application, in the deployment process of the plurality of communication nodes of the network-on-chip (NoC), the tree-structured communication link is formed by combining the connection characteristics of the network topology and the data transmission efficiency requirements through a preset link negotiation mechanism. The tree structure takes the data source node as the root node and the routing node 103 as the intermediate node. Fixed connections are established between nodes through dedicated communication channels to ensure that the data packet follows a clear path level in the transmission process and reduces transmission delay and link conflicts.

[0032] Among the plurality of communication nodes, the shared node 101 and the exclusive node 102 realize differentiated configuration of access permissions through a permission control module at the hardware level. The shared node 101 can only obtain the content of the data block marked as a shared attribute in the network-on-chip through a read interface and cannot initiate a data modification operation. The exclusive node 102 is equipped with an independent write control unit and can perform modification, update, and other operations on the data block. The permission configuration is fixed through the system initialization process of the network-on-chip to ensure the stability of access control.

[0033] The plurality of routing nodes 103 are each internally provided with a storage unit of a distributed directory, which records state information related to the request processing of each data block in real time, including the current transmission stage of the data packet and the link occupation of each communication direction. At the same time, the plurality of routing nodes 103 periodically interact with the shared node 101 and the exclusive node 102 to synchronously update the position identifiers of all shared nodes 101 associated with the data block, ensuring the accuracy of the position information.

[0034] When the shared node 101 needs to initiate a write permission change request to the exclusive node 102, the request data packet of the write permission change request is first transmitted to the corresponding routing node 103. After the routing node 103 receives the request data packet, the state information related to the data block stored in the distributed directory is immediately called, including the access state of the current data block, the link availability of each communication direction, and the like.

[0035] Meanwhile, combined with the position information of other synchronized shared nodes 101, the data transmission path is evaluated through a routing decision algorithm, and factors such as link delay, bandwidth occupancy, node load, and the like are comprehensively considered to determine at least one target communication direction. Subsequently, the data packet is transmitted to the exclusive node 102 through the tree-structured communication link, and the request transmission and response feedback of the write permission change are completed. During the entire process, the routing node 103 continuously monitors the data packet transmission state to ensure efficient completion of the permission change operation.

[0036] By combining the tree-structured communication link, the routing node can shorten the data packet transmission path between nodes through routing decision, effectively reducing the link delay. In addition, the distributed directory maintained by the routing node can record the state information of the data packet in each communication direction in real time, providing real-time basis for routing decision, and realizing precise matching of link resources and node distribution. In processing the write permission change request, the target communication direction is determined, the transfer of the write permission is efficiently completed, and the cache state of other shared nodes is synchronized, effectively improving the data interaction efficiency and resource utilization rate of the network-on-chip.

[0037] According to the embodiment of the application, the routing node is further configured to: in response to receiving the request data packet for the write permission change request sent by the shared node, determining a target communication direction for transmitting the request data packet based on the position information of the shared node and the exclusive node in the network-on-chip and the communication link, wherein the target communication direction points to a next hop node of a path in the communication link leading to the exclusive node; transmitting the request data packet to the next hop node along the target communication direction, and updating the state information corresponding to the target communication direction in the distributed directory to the write request state.

[0038] When the routing node receives the request data packet for the write permission change request sent by the shared node, the position identifier of the shared node itself and the position identifier of the exclusive node carried in the request data packet header are extracted first, and the pre-stored topology mapping table of the tree-structured communication link in the network-on-chip is called. The specific hierarchical position of the shared node and the exclusive node in the communication link and the complete transmission path therebetween are located through a topology matching algorithm.

[0039] On this basis, the routing node further analyzes its own position in the transmission path, and determines the directly connected node in the direction of the exclusive node, that is, determines the target communication direction for transmitting the request packet. The target communication direction accurately points to the next hop node on the path from the current routing node to the exclusive node in the communication link of the tree structure, ensuring that the request packet can be delivered along the shortest path level.

[0040] After determining the target communication direction, the routing node transmits the request packet to the corresponding next hop node along the target communication direction through the communication interface. The sending state of the request packet is confirmed in real time during transmission to ensure that the request packet is successfully sent.

[0041] At the same time, the routing node finds the entry associated with the target communication direction in the distributed directory, and updates the state information of the communication link recorded by it from "idle" or "ready" to "write request", so as to mark that the target communication direction is in the request packet transmission state of processing the write permission change request, avoid other related requests occupying the communication link during this period to cause conflict, and provide accurate directory basis for subsequent request response and state tracking. The cache entries of the distributed directory are shown in Table 1.

[0042] Table 1

[0043]

[0044] The field of address information is mapped to the specific physical address in the memory of the data source node, and the mapping algorithm supports direct mapping, full association and group association, etc., which is determined by the user. The state bits correspond to the current states of the four communication directions of the routing node, and for any routing node, the arbitration demand comes only from these four directions; only when the states of all directions are "00", the corresponding shared data block can be in the "clean" state.

[0045] The specific meaning of the state code is: "00" represents normal or write completion; "01" represents write request, that is, the shared node is sending a write request to the exclusive node, and when the entry contains this state, other subsequent write requests except the exclusive node will be ignored; "10" represents write request completion; "11" is a reserved state. The field of exclusive node identifies the node that has write permission for the data block, and the field of request node records the shared node that is initiating the write permission acquisition request, and the information bit is used to store extended control information.

[0046] By optimizing the routing selection and state update mechanism of the routing node, the transmission delay of the request packet is effectively reduced, and the processing efficiency of the write permission change request in the network-on-chip and the overall stability of the system are improved.

[0047] According to an embodiment of the present application, the plurality of communication nodes further comprise a data source node, the data source node storing data blocks, and the data source node being a logical root of the communication link with a tree structure; the routing node is further configured to: in a case that the shared node and the exclusive node are determined to be in a same sub-link of the communication link based on the position information of the shared node and the exclusive node in the network-on-chip, determine a target communication direction along the same sub-link to the exclusive node based on the position information of the shared node and the exclusive node in the network-on-chip and the same sub-link; and transmit the request data packet along the target communication direction until the request data packet is routed to the exclusive node; in a case that the shared node and the exclusive node are determined to be in different sub-links of the communication link based on the position information of the shared node and the exclusive node in the network-on-chip, determine a target communication direction to the data source node based on the position information of the shared node and the exclusive node in the network-on-chip and the communication link, and transmit the request data packet to the data source node along the target communication direction, and route the request data packet to the exclusive node by the data source node based on the position information of the exclusive node.

[0048] In the design of the network-on-chip, a data source node is additionally deployed, which carries a high-density storage unit and is specially used for storing all data blocks required for the operation of the network-on-chip. At the same time, the data source node is set as a root node of the communication link with a tree structure at the logical level, and all branch sub-links are extended from it, forming a hierarchical structure with the data source node as the center.

[0049] In this tree structure, all routing nodes can obtain the position information of the shared node by querying the information bits of the distributed directory cache, and convert it into a specific two-dimensional coordinate according to a fixed formula (Y coordinate = position information / 8, X coordinate = position information%8). By traversing and calculating the coordinates of the shared node and combining the position of the data source node as a fixed reference point, each routing node has the ability to make intelligent routing decisions locally, so as to independently initiate or relay the precise data forwarding and broadcasting in the region.

[0050] Specifically, based on the core mechanism of coordinate calculation, when two communication nodes need to communicate, the routing nodes on the path will make progressive direction determination: if the Y coordinates of the current node and the target node are consistent, the information is directly propagated in the direction of increasing or decreasing the X coordinate; if the Y coordinates are not consistent, the direction of adjusting the Y coordinate is preferred, and the final transmission is completed along the X direction after reaching the same Y coordinate level.

[0051] Therefore, when the routing node processes the write permission change request initiated by the shared node, the above core mechanism can be applied. By reading the position information of the shared node and the exclusive node carried in the request data packet and converting it into coordinates, and then comparing it with the topology mapping table of the communication link of the tree structure, if it is confirmed that both are in the same sub-link, the target communication direction to the exclusive node is directly determined by the above coordinate comparison method.

[0052] For example, as shown in FIG. 8, when S48 communicates with S24, the intermediate nodes (such as S40 and S32) on the path only need to determine the next hop direction by simply calculating the number of steps according to the difference between their own coordinates and the target coordinates, which reduces the dependence on the global routing table and complex path calculation, and significantly reduces the communication delay and node overhead. Figure 2

[0053] If it is determined that both belong to different sub-links, the node will calculate and select the target communication direction to the data source node. After the request data packet reaches the data source node, the data source node acts as a centralized router, recalculates the path of the sub-link according to the coordinates of the exclusive node, and completes the forwarding.

[0054] For example, as shown in FIG. 8, when S48 communicates with S24, the intermediate nodes (such as S40 and S32) on the path only need to determine the next hop direction by simply calculating the number of steps according to the difference between their own coordinates and the target coordinates, which reduces the dependence on the global routing table and complex path calculation, and significantly reduces the communication delay and node overhead. Figure 2 By optimizing the routing strategy of the routing node, efficient data transmission is realized. Specifically, when the shared node and the exclusive node are in the same sub-link, the request data packet is directly routed to the exclusive node along the sub-link; when they are in different sub-links, the request data packet is accurately transmitted to the exclusive node through the data source node, thereby improving the transmission efficiency and reliability of the system.

[0055] According to an embodiment of the present application, the routing node is further configured to: in response to receiving the reply data packet sent by the exclusive node for the write permission change request, if it is determined that the state information in the distributed directory is in the write request state, based on the position information of the other shared nodes associated with the data block and the communication link, determine at least one target communication direction for transmitting the reply data packet; transmit the reply data packet to the corresponding next hop node along the at least one target communication direction, update the state information corresponding to the target communication direction in the distributed directory to the write request completion state, and update the write permission attribution information of the data block to the shared node that initiates the write permission change request.

[0056]

[0057] ​​The routing node, after receiving the reply packet sent by the exclusive node for the write permission change request, retrieves the record of the data block corresponding to the reply packet from the distributed directory maintained by the routing node. Only when the state information of the data block in the distributed directory is explicitly marked as "in write request", the subsequent processing flow is continued, so as to avoid link conflicts or data confusion caused by abnormal state.

[0058] Subsequently, the routing node extracts the location information of all other shared nodes associated with the data block stored in the distributed directory. Meanwhile, in combination with the tree-shaped structure of the communication link of the network-on-chip, the location information and the link connection relationship of the current routing node are analyzed by a path optimization algorithm, and the path direction that can cover all associated shared nodes and ensure transmission efficiency is screened out, and finally at least one target communication direction for transmitting the reply packet is determined.

[0059] After determining the target communication direction, the routing node sends the reply packet to the respective next hop node along the target communication direction through the corresponding link port, and confirms that the reply packet has been successfully transmitted to the next hop node through the signal feedback mechanism during the transmission process.

[0060] Subsequently, the routing node performs two update operations on the distributed directory: one is to find the entries corresponding to the target communication directions in the distributed directory, and modify the state information from "write request in progress" to "write request completed", and release the occupation mark of the communication direction. The second is to update the write permission attribution record of the data block in the permission management partition of the distributed directory to the identifier of the shared node that initially initiated the write permission change request, so that subsequent access requests for the data block from other shared nodes can be accurately checked based on the updated permission information, and the consistency and security of data access are maintained.

[0061] Through the intelligent broadcast and directory synchronization after state confirmation, the confirmation reply of the write permission change can be accurately delivered to all related shared nodes, and the directory state is updated to completed and the permission attribution is explicitly transferred, so as to ensure the atomicity, consistency and global state of the data permission change transaction in the multi-core system.

[0062] According to the embodiments of the present application, the routing node is further configured to: in the case that there are multiple target communication directions for transmitting the reply packet based on the location information of the other shared nodes associated with the data block and the communication link, performing a replication operation on the reply packet, and transmitting the replicated reply packet along the respective target communication direction to the corresponding next hop node, so as to route the reply packet to the other shared nodes associated with the data block through the next hop nodes.

[0063] After analyzing the communication links of the on-chip network in conjunction with the location information of other shared nodes associated with the target data block, the routing node determines that there are multiple target communication directions for transmitting reply data packets, and then copies the reply data packets.

[0064] During the copying process, it is necessary to accurately replicate the complete content of the original response data packet, including key information such as the location identifier in the packet header and the permission change results, to ensure that each copied response data packet is completely consistent with the original response data packet, and to avoid information loss or errors due to copying deviations.

[0065] After the replication operation is complete, the routing node will send these replicated reply data packets to the corresponding next-hop node in each target communication direction through multiple independent link transmission interfaces. During the transmission process, the status of each transmission link will be monitored in real time to ensure that each reply data packet is successfully delivered to the corresponding next-hop node.

[0066] This replication and multiplexing mechanism is particularly crucial when performing group broadcasts. When a communication node needs to broadcast a reply count packet to all shared nodes sharing the same data block, it first calculates and sends the reply packet towards the data source node. Afterward, each routing node on the transmission path acts as a "broadcast proxy."

[0067] Specifically, while forwarding reply data packets along the main path (pointing to the data source node), they will query the locally cached distributed directory in parallel. Based on the coordinate information of other shared nodes recorded therein, they will determine in real time whether there are shared nodes that need to receive the reply data packets in other communication directions (X+, X-, Y+, Y-) and trigger "area broadcast", that is, copy the reply data packets and send them along the new direction.

[0068] For example, such as Figure 3 As shown, taking S62 initiating a broadcast as an example, when the reply data packet is transmitted from S54 to S38, S38 discovers through querying that there are two shared nodes, S15 and S55, in its X+ direction (this location information was recorded in S38's local cache directory during the initialization process of S15 and S55 accessing the communication link as shared nodes). Therefore, S38 copies the reply data packet and sends it to the adjacent S39, which then distributes it to S15 and S55. Simultaneously, the reply data packet continues to be transmitted along the backbone path to S37 and S36. S36 will also determine from its directory that there is S44 in the Y+ direction and perform the same broadcast copy operation until the reply data packet is transmitted to S48, as well as other shared nodes S09 and S01.

[0069] Subsequent next-hop nodes continue to forward or further broadcast the received reply data packet according to the distributed directory maintained by themselves. Through the hierarchical transmission and parallel diffusion mechanism of the communication link, the reply data packet is efficiently routed to all other sharing nodes associated with the data block. This ensures that all relevant sharing nodes can obtain the final result of the write permission change in time, thereby synchronously adjusting their access strategy for the data block.

[0070] According to an embodiment of the present application, the routing node is further configured to, in response to receiving the invalid notification data packet sent by the sharing node for the completion of the data block write, determine at least one target communication direction for transmitting the invalid notification data packet based on the location information of other sharing nodes associated with the data block and the communication link, if the state information in the distributed directory is determined to be in the write request completion state.

[0071] After receiving the invalid notification data packet sent by the sharing node for the completion of the data block write, the routing node retrieves the state record corresponding to the data block in the distributed directory. Only when the recorded state information is confirmed to be "write request completion", the subsequent broadcast transmission process is started.

[0072] For example, as shown in FIG. 8, in the scenario of initiating a write permission change request at S48, S48 can only write and send an invalid notification data packet after the request data packet previously sent by S48 has obtained the permission of the exclusive node S62 and broadcasted a reply data packet. Figure 4

[0073] In the process of sending by S48, when the invalid notification data packet is transmitted to S33, S33 finds by querying that there are two sharing nodes S09 and S01 in the Y-direction of S33. Therefore, S33 sends a copy of the invalid notification data packet to the adjacent S25, and S25 completes the distribution to S09 and S01. At the same time, the invalid notification data packet continues to pass along the backbone path to S35 and S36. S36 also determines according to its directory that there is S44 in the Y+ direction, and performs the same broadcast copy operation until the reply data packet is transmitted to S62 and other sharing nodes S55 and S15.

[0074] This transmission process ensures that the initiation of the invalid notification data packet strictly follows the complete permission change sequence of "request-permission-write-completion", effectively preventing the notification initiated by timing disorder or invalid operation from interfering with the data access order of the entire system.

[0075] ​Subsequently, the routing node extracts the location information of all other shared nodes associated with the data block. Combining this with the tree-structured communication links already built in the on-chip network, link matching and path planning algorithms are used to analyze the distribution of these shared nodes within the communication links and their connection relationships with the current node. Transmission paths that can efficiently cover all shared nodes are selected, thereby determining at least one target communication direction for transmitting the invalid notification data packet.

[0076] Once the target communication direction is determined, the routing node will send the invalid notification data packet along the target communication direction to the corresponding next-hop node through the corresponding link interface. The sending process is accompanied by real-time monitoring of the link status to ensure successful data packet delivery, laying the foundation for subsequent relay forwarding.

[0077] This mechanism fundamentally maintains the correct execution of the cache consistency protocol. Through strict state updates and an efficient broadcast network, it ensures the reliable synchronization of permission change results, significantly improving the overall reliability of the system and the efficiency of data access.

[0078] Figure 5 A flowchart illustrating the transmission of data packets by a routing node according to an embodiment of the present invention is shown.

[0079] like Figure 5 As shown, this embodiment includes operations S501 to S513.

[0080] During operation S501, a request data packet for a write permission change request was received from the shared node.

[0081] In operation S502, determine whether the sharing node and the exclusive node are on the same sub-link in the communication link. If yes, proceed to operation S505. If no, proceed to operation S503.

[0082] In operation S503, the target communication direction to the data source node is determined so that the request data packet can be transmitted to the data source node along the target communication direction.

[0083] When operating S504, the data source node uses the location information of the exclusive node to route request packets to the exclusive node.

[0084] In operation S505, the target communication direction of the exclusive node along the same sub-link is determined; the request data packet is transmitted along the target communication direction until the request data packet is routed to the exclusive node.

[0085] During operation of S506, a response data packet was received from the exclusive node in response to the write permission change request.

[0086] In operation S507, it is judged whether there are multiple target communication directions for transmitting the reply data packet. If yes, operation S508 is performed. If no, operation S509 is performed.

[0087] In operation S508, a copy operation is performed on the reply data packet, and the copied reply data packet is transmitted to the corresponding next hop node along the respective target communication direction, so as to route the reply data packet to the other shared nodes associated with the data block through the next hop node.

[0088] In operation S509, the reply data packet is transmitted to the corresponding next hop node along the target communication direction, so as to route the reply data packet to the other shared nodes associated with the data block through the next hop node.

[0089] In operation S510, an invalid notification data packet for data block write completion sent by the shared node is received.

[0090] In operation S511, it is judged whether there are multiple target communication directions for transmitting the invalid notification data packet. If yes, operation S512 is performed. If no, operation S513 is performed.

[0091] In operation S512, a copy operation is performed on the invalid notification data packet, and the copied invalid notification data packet is transmitted to the corresponding next hop node along the respective target communication direction, so as to route the invalid notification data packet to the other shared nodes associated with the data block through the next hop node.

[0092] In operation S513, the invalid notification data packet is transmitted to the corresponding next hop node along the target communication direction, so as to route the invalid notification data packet to the other shared nodes associated with the data block through the next hop node.

[0093] According to the embodiments of the present application, efficient and reliable cache consistency maintenance is achieved through differentiated path selection based on communication links and intelligent multicast replication mechanism. In the request forwarding stage, it is first judged whether the communication parties are located in the same sub-link. If yes, the request is directly forwarded along the link to realize fast direct transmission. If no, the request is first routed to the data source node, and the subsequent forwarding is completed by the data source node to ensure the optimal path.

[0094] In the reply and notification stage, the number of nodes to be notified is dynamically identified. When there are multiple target communication directions, data packet replication and parallel multicast are automatically performed, so that all related shared nodes can update the state synchronously. If there is only a single target communication direction, the request is directly forwarded. The whole process optimizes the communication path of permission change and data invalidation, greatly reduces the delay and network congestion, and significantly improves the system efficiency while ensuring data consistency.

[0095] According to an embodiment of the present application, the routing node is further configured to, in response to simultaneously receiving the request data packets sent by different shared nodes for the write permission change request of the data block, in the case of determining that there is a request conflict based on the state information in the distributed directory, determining a target data packet with the highest priority from the received multiple request data packets according to a preset communication protocol; determining a target communication direction to the exclusive node for the target data packet based on the position information of the shared node and the exclusive node in the network-on-chip and the communication link, so as to route the target data packet to the exclusive node and temporarily store the request data packets from other conflict request nodes.

[0096] When the routing node simultaneously receives multiple write permission change request data packets sent by different shared nodes for the same data block, a conflict detection mechanism is triggered immediately. The state information corresponding to the data block in the distributed directory is queried, and if it is found that the data block is currently in the “write request” state or there are multiple unprocessed permission change request records in the distributed directory, it is determined that there is a request conflict at this time.

[0097] In this case, the routing node will parse all the conflict request data packets according to the preset communication protocol of the network-on-chip, and extract the request initiation time, priority level of the shared node, data block associated emergency level and other key information carried in the header of each request data packet. According to the priority ordering rules (such as emergency level priority, node level priority or first-come-first-served, etc.) agreed in the preset communication protocol, one with the highest priority is selected from the multiple request data packets as a target data packet.

[0098] Subsequently, the routing node reads the position information of the corresponding shared node and the position information of the exclusive node in the target data packet, and determines the optimal transmission path between the two by a path planning algorithm combined with the communication link of the network-on-chip tree structure, and determines the target communication direction to the exclusive node. Then the target data packet is transmitted to the corresponding next hop node along the direction, so as to be finally routed to the exclusive node through link level forwarding.

[0099] For the request data packets sent by the remaining conflict request nodes, the routing node will temporarily store them in the built-in cache unit, and mark the conflict state and the initiation node information for each temporarily stored data packet. At the same time, the related entries of the temporarily stored requests are recorded in the distributed directory, and after the request with the highest priority is processed and the state information of the data block in the distributed directory is updated to a non-conflict state, the temporarily stored request data packets are processed in turn according to the preset rules, so as to ensure the ordered processing of multiple requests.

[0100] Through the conflict detection, priority arbitration and request selective forwarding mechanism, when multiple write requests for the same data block are received at the same time, the request with the highest priority can be forwarded to the exclusive node, and other conflicting requests can be temporarily stored, thereby effectively solving the access conflict problem when multiple nodes compete at the same time, and ensuring the orderliness and efficiency of the permission change process.

[0101] According to an embodiment of the application, the routing node is further configured to, in response to receiving an invalid notification packet of write completion for the data block sent by the shared node corresponding to the target packet, determine a target communication direction to the shared node currently having the write permission of the data block based on the position information and communication link of the conflict request node and the shared node currently having the write permission of the data block in the network on chip, and transmit the temporarily stored request packet along the target communication direction.

[0102] After the routing node receives the invalid notification packet of write completion for the data block sent by the shared node corresponding to the previously determined target packet, it will first complete the basic state check and information update, confirm that the state of the data block in the distributed directory has transitioned from "write request completion" to a state that can receive new requests, and then start the temporary request processing process. The entire conflict arbitration and recovery mechanism is supported by a set of communication protocols, and the data packet format definition is shown in Table 2.

[0103] Table 2

[0104]

[0105] The address information is the target address of the write permission change request; the type field is consistent with the state definition in the distributed directory; the step is used to assist path calculation, and is reduced by one after passing through each routing node, and triggers the next hop calculation when reduced to zero; the exclusive node and the request node are defined in the distributed directory.

[0106] For the arbitration code, the encoding strategy can be customized by the user, and guide the routing node to realize flexible write conflict arbitration logic, such as priority arbitration based on core number, polling algorithm to ensure fairness, least recently used strategy to prefer to serve the longest waiting request, location-aware arbitration to optimize physical transmission distance, or simple first-come-first-served principle.

[0107] When the routing node receives multiple write permission change request packets for the same data block in the same or in sequence in a certain communication direction, a conflict occurs. The routing node will make a decision according to the time sequence or the preset priority of the arbitration code.

[0108] When a conflict occurs, the routing node synchronously collects multiple real-time parameters, including the physical location of each shared node initiating the write permission change request (used to calculate path cost), the waiting time of the request in the queue, the static priority code carried by the request, and the current link load state of the routing node itself (such as the cache occupancy rate in each output direction).

[0109] The routing node weights and scores these dimensions through a built-in lightweight evaluation function, and finally selects the request with the highest overall score to pass first. For example, at the initial stage of system startup, it may focus on "physical location optimization" to reduce latency; when it is detected that requests are blocked in a certain direction for a long time, the weight of "least recently served" is automatically increased to ensure fairness. This enables the arbitration strategy to upgrade from static configuration to a dynamic and adaptive intelligent process.

[0110] In the specific implementation process, if the first-to-principle in the arbitration code is adopted, the first-arriving request data packet is selected to continue to pass forward, and the subsequent-arriving request data packet is suspended and temporarily stored locally. Specifically, the routing node updates the state of the corresponding communication direction in the distributed directory to "write request in progress", and calculates the step size for the selected request data packet and continues to forward it. For the suspended request data packet, the routing node only updates the state information in its entry direction and is temporarily stored without further propagation, thereby realizing the serialization processing of conflicting requests.

[0111] Specifically, for example, as shown in Figure 6A , S48 and S55 simultaneously initiate write permission change requests for the same data block. Assuming that the request data packet of S55 arrives at the conflict node S38 first. S38 determines the request data packet of S55 as the priority request according to the arbitration rule (such as the first-to-principle), and then updates the state of the X+ direction to "01" and continues to propagate the request data packet to the exclusive node S62.

[0112] Subsequently, the request data packet of S48 arrives at S38, and S38 detects that there is a conflict request to be processed in the X- direction, so it only updates the state of the X- direction to "01" and temporarily stores the request data packet of S48, suspending its propagation.

[0113] After receiving the request of S55, the exclusive node S62 gives up the exclusive right and sends a reply data packet. When the reply data packet arrives at the conflict node S38, S38 broadcasts it normally to the X+ direction, so that S55 finally completes the write operation and sends an invalid notification data packet. On the other hand, S38 detects that the state of the X- direction is "01", indicating that there is a temporarily stored S48 request, so it suspends the further propagation of the reply data packet to the X- direction and waits for the current transaction to complete.

[0114] As shown in Figure 6BAs shown, after receiving the invalidation notification packet from S55 at S38, the conflict processing flow enters the activation phase of the temporarily stored request. At this time, the routing node S38 extracts the temporarily stored request packet of S48 from the built-in cache unit and parses the location information thereof. Meanwhile, the location information of the latest exclusive node (at this time, S55 which has completed writing) of the current data block is obtained from the updated distributed directory. In combination with the tree structure of the on-chip network, S38 re-plans the execution path for the write permission change request of S48, and calculates the target communication direction to the new exclusive node S55.

[0115] After determining the target communication direction, S38 sends the temporarily stored request packet to the next hop node (such as S39) along the direction (X+), thereby restarting the transmission flow of the temporarily stored request packet, so that it can finally be routed to the current permission holder S55 and enter a new round of exclusive right transfer.

[0116] The above flow from conflict detection, arbitration, serialization and temporary storage to automatic awakening of the temporarily stored request after transaction completion ensures that all write requests can be processed in order without loss or error in a high-concurrency scenario. It avoids the bottleneck that may be caused by centralized arbitration through distributed local decision-making, and seamlessly connects conflict processing and normal point-to-point and broadcast processes by using the state directory and the temporary storage mechanism, thereby significantly improving the throughput and overall efficiency of the on-chip network in processing write conflicts while maintaining data consistency.

[0117] Figure 7 A flowchart of a routing node transmitting a data packet in conflict is shown according to an embodiment of the application.

[0118] As Figure 7 shown, the embodiment includes operation S701 to operation S707.

[0119] At operation S701, a request packet for a write permission change request for a data block sent from different shared nodes is received.

[0120] At operation S702, it is determined whether there is a request conflict based on the state information in the distributed directory. If yes, operation S703 is performed. If no, operation S705 is performed.

[0121] At operation S703, according to a preset communication protocol, a target data packet with the highest priority is determined from the received multiple request data packets.

[0122] At operation S704, the target data packet is routed to an exclusive node, and the request data packets from other conflict request nodes are temporarily stored.

[0123] In operation S705, the received request data packet is determined as a target data packet, and the target data packet is routed to an exclusive node.

[0124] In operation S706, an invalid notification data packet of a write completion of the data block sent by the shared node corresponding to the target data packet is received.

[0125] In operation S707, for the temporarily stored request data packets from other conflict request nodes, a target communication direction to the shared node currently having the write permission of the data block is determined, and the temporarily stored request data packets are transmitted along the target communication direction.

[0126] According to the embodiments of the present application, by performing conflict detection based on the state information in the distributed directory and priority arbitration according to the preset communication protocol, the conflict requests can be temporarily stored and processed by using the subsequent rerouting mechanism. This effectively solves the competition problem when multiple shared nodes simultaneously request write permissions.

[0127] The mechanism preferentially ensures timely processing and forwarding of the highest priority request, and temporarily stores other conflict requests. After the current permission holder completes the write operation, the temporarily stored requests are routed to the new permission holder. This not only ensures data consistency, but also realizes ordered and efficient processing of multiple concurrent requests, avoiding system congestion and resource conflicts.

[0128] According to the embodiments of the present application, the exclusive node is configured to: in response to receiving the request data packet transmitted by the routing node along the target communication direction, mark the writable copy of the data block in the local cache as a to-be-released state, and stop the write operation of the data block; and in a case where it is determined that the current write operation is completed, release the write permission of the data block, and send a reply data packet of the write permission change request to the shared node.

[0129] After the exclusive node receives the request data packet forwarded by the routing node along the target communication direction, it immediately starts the response process of the write permission change. First, the write copy corresponding to the data block stored in the local cache is called, and the state thereof is updated to the to-be-released state by the built-in state marking module. At the same time, the write operation interception mechanism is triggered to suspend the execution of all subsequent write instructions for the data block, avoiding data write conflict or data inconsistency during the permission change process.

[0130] Then, the exclusive node checks whether there is an unfinished write operation for the data block in real time through the write state monitoring unit. If there is an ongoing write task, it continues to wait for the completion of the task, including confirming the integrity of data write and verifying that the data write result is correct.

[0131] When it is confirmed that all write operations currently directed to the data block have been normally completed and the data state is stable, the exclusive node initiates a permission release module to release the write permission lock of the data block and update the permission attribution state of the data block in the local permission management record.

[0132] After the permission release is completed, the exclusive node generates a reply data packet for the write permission change request, the reply data packet containing an identification of successful permission release, the current state of the data block and other key information, and then sends the reply data packet to the shared node initiating the permission change request through the communication interface of the network on chip, thereby completing the response feedback process of the entire permission change.

[0133] Through the ordered permission release and state synchronization mechanism, the write permission is safely and non-conflictively transferred from the exclusive node to the requesting node, ensuring the consistency of the data in the permission change process and avoiding data damage or write operation interruption caused by sudden permission transfer.

[0134] According to the embodiment of the application, the shared node is further configured to: in response to receiving the reply data packet transmitted by the routing node in the target communication direction, updating the read-only copy of the data block in the local cache to a writable copy to perform a write operation on the data block.

[0135] After receiving the reply data packet transmitted by the routing node in the target communication direction, the shared node first analyzes and verifies the write permission change success identification contained in the data packet, thereby ensuring that the reply is valid feedback to the write permission change request initiated by the shared node.

[0136] After the verification, the shared node initiates a local cache state update mechanism, locates the read-only copy of the data block stored in the cache, modifies the access attribute identification of the copy through the built-in permission conversion module, switches the read-only state to the writable state, and completes the conversion from the read-only copy to the writable copy.

[0137] In this process, the shared node synchronously updates the local permission management record to explicitly mark that the shared node has obtained the write permission of the data block, and then can normally perform various write operations on the data block based on the converted writable copy, including data modification, addition, and replacement, and all write operations are directly performed on the writable copy, thereby ensuring the real-time and effectiveness of data change.

[0138] Through the ordered permission release and state synchronization mechanism, the write permission is safely and non-conflictively transferred from the exclusive node to the requesting node, effectively preventing data damage or write operation interruption caused by sudden permission transfer, and ensuring the consistency of the data.

[0139] Figure 8 A flow chart of a distributed cache method based on a network-on-chip is shown according to an embodiment of the present application.

[0140] As shown in Figure 8 the method comprises operation S810.

[0141] At operation S810, in response to a write permission change request initiated by a shared node to an exclusive node, a routing decision is made on the received data packet based on state information in the distributed directory and location information of other shared nodes associated with the data block and communication links, and at least one target communication direction for transmitting the data packet is determined to complete the change of the write permission.

[0142] According to an embodiment of the present application, a plurality of communication nodes in a network-on-chip are topologically deployed, and in combination with the topological characteristics of the network-on-chip and data transmission requirements, a tree-structured communication link is formed through link negotiation and path planning between the communication nodes, ensuring that data transmission between the communication nodes can be carried out along a clear tree-shaped path, reducing transmission conflicts and delays.

[0143] Among them, the communication nodes include two types of shared nodes and exclusive nodes, and both types of nodes realize access permission division through a permission control unit at the hardware level. The shared node can only obtain data blocks marked as shared attributes in the network-on-chip through a read-only interface and cannot initiate data modification operations. The exclusive node is equipped with an independent write control module and can perform write, update and other operations on data blocks. The permission configuration is fixed through system instructions in the network initialization phase, ensuring the stability of the permission management.

[0144] Each of the plurality of routing nodes has a distributed directory built-in, which records state information of data packets related to requests in the process of processing various data block requests in each communication direction of the routing node in real time, including link occupation, data packet transmission stage, request type identification, etc., providing data support for subsequent routing decisions.

[0145] When the routing node receives a write permission change request data packet initiated by a shared node to an exclusive node, it will immediately start the routing decision process. First, the state information corresponding to the data block is retrieved from the distributed directory maintained by itself, and the link availability of each communication direction is confirmed.

[0146] At the same time, the location information of other shared nodes associated with the data block stored in the distributed directory is extracted, and the specific positions of these shared nodes in the communication link are determined. Then, in combination with the communication link, the feasible transmission path from the current routing node to the exclusive node is analyzed.

[0147] By comprehensively evaluating factors such as link delay, bandwidth occupancy, node load and the like, the routing node makes a routing decision on the received request packet, and filters out at least one target communication direction that can efficiently complete transmission. Then the request packet is forwarded along the target communication direction, and after relay transmission by the intermediate routing node, it reaches the exclusive node, and the exclusive node completes the release and transfer of the write permission, and finally realizes the change of the write permission.

[0148] Based on the above-mentioned distributed cache method based on the network on chip, the application further provides a distributed cache device based on the network on chip. The routing decision module of the distributed cache device based on the network on chip in this embodiment.

[0149] The routing decision module is configured to, in response to the write permission change request initiated by the shared node to the exclusive node, make a routing decision on the received data packet based on the state information in the distributed directory and the position information of other shared nodes associated with the data block and the communication link, and determine at least one target communication direction for transmitting the data packet to complete the change of the write permission. In an embodiment, the routing decision module can be configured to perform the operation S810 described above, and details are not repeated here.

[0150] The application further provides a chip, which is a multi-core processor, and the chip is integrated with a network on chip having a tree-structured communication link and including a plurality of routing nodes distributed in the communication link. The multi-core processor includes a plurality of processor cores and corresponding private caches, and a chip-shared last-level cache. The network on chip connects all the processor cores, private caches and shared caches to form a coherent interconnection infrastructure within the processor.

[0151] The routing node is configured to maintain a distributed directory and perform the distributed cache method based on the network on chip as described in any embodiment of the application to coordinate cache coherence transactions between multiple cores within the chip.

[0152] The chip provided in this embodiment integrates a communication link having a tree structure, and the routing node maintains a distributed directory, so that the network on chip can efficiently and orderly execute a distributed cache coherence protocol within the chip, significantly reducing the delay of coherent communication and reducing network congestion, thereby effectively improving the overall performance and energy efficiency of the chip.

[0153] Figure 9 A block diagram of an electronic device suitable for implementing the distributed cache method based on the network on chip according to an embodiment of the application is shown.

[0154] As Figure 9As shown, the electronic device 900 according to an embodiment of the present application includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a read only memory (ROM) 902 or a program loaded into a random access memory (RAM) 903 from a storage section 908. The processor 901 can include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset, and / or a special purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), and so on. The processor 901 can also include an on-board memory for cache use. The processor 901 can include a single processing unit or multiple processing units to perform the various actions of the method processes according to embodiments of the present application. Efficient data exchange and communication can be achieved within the processor 901 or between the processor and the memory through a network on chip, which interconnects multiple cores and cache units within the processor based on a tree or other topology to support the consistency mechanisms of the distributed cache of the present application.

[0155] In the random access memory (RAM) 903, various programs and data required for the operation of the electronic device 900 are stored. The processor 901, the read only memory (ROM) 902, and the random access memory (RAM) 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method processes according to embodiments of the present application by executing the programs in the read only memory (ROM) 902 and / or the random access memory (RAM) 903. Note that the programs can also be stored in one or more memories other than the read only memory (ROM) 902 and the random access memory (RAM) 903. The processor 901 can also perform various operations of the method processes according to embodiments of the present application by executing the programs stored in the one or more memories.

[0156] According to embodiments of the present application, the electronic device 900 can also include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 can further include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as necessary. A removable recording medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 910 as necessary, so that a computer program read out therefrom is installed in the storage section 908 as necessary.

[0157] The application further provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments, or can exist independently without being assembled into the device / apparatus / system. The computer readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the application.

[0158] According to the embodiments of the application, the computer readable storage medium can be a non-volatile computer readable storage medium, which can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the application, the computer readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in connection with an instruction execution system, apparatus or device. For example, according to the embodiments of the application, the computer readable storage medium can include the read-only memory (ROM) 902 and / or the random access memory (RAM) 903 described above and / or one or more memories other than the read-only memory (ROM) 902 and the random access memory (RAM) 903.

[0159] The embodiments of the application also include a computer program product, which includes a computer program containing program codes for executing the method shown in the flow chart. When the computer program product is run in the computer system, the program codes are used to make the computer system implement the method of the distributed cache based on the network-on-chip provided by the embodiments of the application.

[0160] The above functions defined in the system / apparatus of the embodiments of the application are executed when the computer program is executed by the processor 901. According to the embodiments of the application, the system, apparatus, module, unit, etc. described above can be implemented by the computer program modules.

[0161] In one embodiment, the computer program can rely on tangible storage media such as optical storage media, magnetic storage media, etc. In another embodiment, the computer program can also be transmitted, distributed and downloaded in the form of signals on a network medium, and be downloaded and installed through the communication part 909 and / or installed from the detachable medium 911. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.

[0162] In such embodiments, the computer program can be downloaded and installed from the network via the communication section 909, and / or installed from the removable media 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiments of the present application are executed. The system, device, apparatus, module, unit, and the like described above can be realized by the computer program modules according to the embodiments of the present application.

[0163] According to the embodiments of the present application, the program code for executing the computer program provided by the embodiments of the present application can be written in any combination of one or more programming languages, and specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming language, and / or assembly / machine language. The programming language includes, but is not limited to, such as Java, C++, python, "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected to the Internet through an Internet service provider).

[0164] The flowcharts and block diagrams in the drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that shown in the figures. For example, two blocks noted in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts, can be implemented by dedicated hardware-based systems that perform specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0165] Those skilled in the art can understand that the features described in various embodiments of the present application can be combined and / or integrated in various combinations and / or integrations, even if such combinations or integrations are not explicitly described in the present application. In particular, the features described in various embodiments of the present application can be combined and / or integrated in various combinations and / or integrations without departing from the spirit and teachings of the present application. All such combinations and / or integrations fall within the scope of the present application.

[0166] The embodiments of the application have been described. However, these embodiments are merely for illustration and are not intended to limit the scope of the application. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Various alternatives and modifications to the embodiments described herein will be apparent to those skilled in the art in view of the foregoing without departing from the scope of the application.

Claims

1. A network-on-chip, comprising: The network-on-chip comprises a plurality of communication nodes, which form a tree-structured communication link based on a topology characteristic of the network-on-chip; wherein the plurality of communication nodes comprise: a shared node having read-only access to a data block shared in the network-on-chip; an exclusive node having write access to the data block; the plurality of communication nodes further comprise a data source node, which stores the data block, and the data source node serves as a logical root in the tree-structured communication link; a plurality of routing nodes, each of which maintains a distributed directory for recording state information of a data packet related to a request for the data block in each communication direction of the routing node during processing of the request; the routing node is configured to, in response to a write access change request initiated by the shared node to the exclusive node, make a routing decision for the received data packet based on the state information in the distributed directory and position information of other shared nodes associated with the data block and the communication link, to determine at least one target communication direction for transmitting the data packet to complete the change of write access; the routing node is further configured to: in a case where it is determined, based on position information of the shared node and the exclusive node in the network-on-chip, that the shared node and the exclusive node are in a same sub-link in the communication link, determine a target communication direction along the same sub-link to the exclusive node based on the position information of the shared node and the exclusive node in the network-on-chip and the same sub-link, and transmit a request data packet of the write access change request along the target communication direction until the request data packet is routed to the exclusive node; in a case where it is determined that the shared node and the exclusive node are in different sub-links in the communication link, determine a target communication direction to the data source node based on the position information of the shared node and the exclusive node in the network-on-chip and the communication link, and transmit the request data packet along the target communication direction to the data source node, and use the data source node to route the request data packet to the exclusive node based on position information of the exclusive node.

2. The network-on-chip of claim 1, wherein, the routing node is further configured to: in response to receiving a request data packet for the write access change request sent by the shared node, determine a target communication direction for transmitting the request data packet based on position information of the shared node and the exclusive node in the network-on-chip and the communication link, wherein the target communication direction points to a next hop node of a path to the exclusive node in the communication link; transmit the request data packet to the next hop node along the target communication direction, and update state information corresponding to the target communication direction in the distributed directory to a write request state.

3. The network-on-chip of claim 2, wherein, the routing node is further configured to: in response to receiving the reply data packet sent by the exclusive node for the write permission change request, in a case where it is determined that the state information in the distributed directory is the write request state, determining at least one target communication direction for transmitting the reply data packet based on the position information of the other shared nodes associated with the data block and the communication link; transmitting the reply data packet to the corresponding next hop node along the at least one target communication direction, updating the state information of the corresponding target communication direction in the distributed directory to a write request completion state, and updating the write permission attribution information of the data block to the shared node initiating the write permission change request.

4. The network-on-chip of claim 3, wherein, The routing node is further configured to: in a case where there are multiple target communication directions for transmitting the reply data packet based on the position information of the other shared nodes associated with the data block and the communication link, performing a replication operation on the reply data packet, and transmitting the replicated reply data packet to the corresponding next hop node along the respective target communication direction, so as to route the reply data packet to the other shared nodes associated with the data block through the transmission of the reply data packet by the next hop nodes.

5. The network-on-chip of claim 3, wherein, The routing node is further configured to: in response to receiving the invalid notification data packet sent by the shared node for the write completion of the data block, in a case where it is determined that the state information in the distributed directory is the write request completion state, determining at least one target communication direction for transmitting the invalid notification data packet based on the position information of the other shared nodes associated with the data block and the communication link; transmitting the invalid notification data packet to the corresponding next hop node along the at least one target communication direction.

6. The network-on-chip of claim 1, wherein, The routing node is further configured to: in response to simultaneously receiving the request data packets sent by different shared nodes for the write permission change request of the data block, in a case where it is determined that there is a request conflict based on the state information in the distributed directory, determining a target data packet with the highest priority from the received multiple request data packets according to a preset communication protocol; determining a target communication direction of the target data packet to the exclusive node based on the position information of the shared node corresponding to the target data packet and the exclusive node in the network-on-chip and the communication link, so as to route the target data packet to the exclusive node and temporarily store the request data packets from other conflicting request nodes.

7. The network-on-chip of claim 6, wherein, The routing node is further configured to: in response to receiving the invalid notification data packet sent by the shared node corresponding to the target data packet for the write completion of the data block, for the temporarily stored request data packets from other conflicting request nodes, determining a target communication direction to the shared node currently having the write permission of the data block based on the position information of the conflicting request nodes and the shared node currently having the write permission of the data block in the network-on-chip and the communication link, and transmitting the temporarily stored request data packets along the target communication direction.

8. The network-on-chip of claim 2, wherein, The exclusive node is configured to: in response to receiving the request data packet transmitted along the target communication direction via the routing node, marking a writable copy of the data block in the local cache as a to-be-released state, and stopping a write operation on the data block; in a case where it is determined that the current write operation is completed, releasing the write permission of the data block, and sending a reply data packet for the write permission change request to the shared node.

9. A method for distributed caching based on a network-on-chip, characterized in that, The network-on-chip includes a plurality of communication nodes, which form a communication link with a tree structure based on a topology characteristic of the network-on-chip; wherein the plurality of communication nodes include: a shared node having read-only permission for a data block sharedly accessed in the network-on-chip; an exclusive node having write permission for the data block; The plurality of communication nodes further include a data source node, which stores the data block, and the data source node serves as a logical root in the communication link with the tree structure; a plurality of routing nodes, each of which maintains a distributed directory for recording state information of a data packet related to a request for the data block in each communication direction of the routing node during processing of the request; The distributed cache method is performed by the routing node, including: in response to a write permission change request initiated by the shared node to the exclusive node, making a routing decision for a received data packet based on state information in the distributed directory, position information of other shared nodes associated with the data block, and the communication link, to determine at least one target communication direction for transmitting the data packet to complete the change of the write permission; The method further includes: in a case where it is determined, based on position information of the shared node and the exclusive node in the network-on-chip, that the shared node and the exclusive node are in a same sub-link in the communication link, determining a target communication direction along the same sub-link to the exclusive node based on the position information of the shared node and the exclusive node in the network-on-chip and the same sub-link, and transmitting a request data packet of the write permission change request along the target communication direction until the request data packet is routed to the exclusive node; in a case where it is determined that the shared node and the exclusive node are in different sub-links in the communication link, determining a target communication direction to the data source node based on position information of the shared node and the exclusive node in the network-on-chip and the communication link, to transmit the request data packet along the target communication direction to the data source node, and routing the request data packet to the exclusive node based on position information of the exclusive node by the data source node.

Citation Information

Patent Citations

  • Method for maintaining cache coherence in network on chip and network on chip routing

    CN102801600A

  • Data transmission method and device based on network-on-chip, and electronic equipment

    CN120675933A