Network-on-chip testing method and device and storage medium thereof

By performing XOR network encoding and path determination in the routing module of the 3D Mesh on-chip network, the problem of long-term network testing of the 3D Mesh on-chip network is solved and the testing efficiency is improved.

CN120474956APending Publication Date: 2025-08-12PEKING UNIV SHENZHEN GRADUATE SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510577106.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing three-dimensional Mesh on-chip network testing methods take a long time, resulting in inefficient testing.

Method used

When multiple test data packets are received in the first target routing module of a three-dimensional on-chip network, the target address of the data packet and the routing module address are determined, and whether XOR network encoding is performed is performed, and the conditions are encoded are then sent to the target address according to the transmission path of the encoded data packet, and the reference packet is obtained to determine the test result.

Benefits of technology

The test efficiency of the three-dimensional Mesh on-chip network is improved, and the problem of too long time caused by transmitting data packets in sequence according to priority is avoided, thus achieving fast and accurate testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474956A_ABST
    Figure CN120474956A_ABST
Patent Text Reader

Abstract

The invention provides a network-on-chip testing method and device and a storage medium, and the method comprises the steps: determining target addresses corresponding to a plurality of test data packets and a first address of a first target routing module if a plurality of test data packets coming to different directions are received in the first target routing module of a three-dimensional network-on-chip; determining whether to perform XOR network coding on the plurality of test data packets according to the first address and the target address; if it is determined that the plurality of test data packets are subjected to XOR network coding, performing XOR network coding on the plurality of test data packets to obtain a coded data packet; determining a transmission path of the coded data packet according to the target address and the first address, and sending the coded data packet to the target address through a second target routing module of the three-dimensional network-on-chip based on the transmission path to obtain a reference data packet; and determining a test result of the network-on-chip according to the reference data packet and the plurality of test data packets. According to the scheme, the testing efficiency of the three-dimensional network-on-chip can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circuit design, and in particular to a method and device for testing a network on chip and a storage medium thereof. Background Art

[0002] On-chip network is a communication architecture used in multi-core processors or system-on-chip (SoC) to handle data exchange between each core. Three-Dimensional Mesh Network-on-Chip (3D Mesh NoC) is a way to realize communication between IP modules in multi-processor system-on-chip (MPSoCs) with multiple layers. At present, in order to ensure that the on-chip network can be used normally, the on-chip network is usually functionally tested. However, it is limited by the existing testing methods. Since the functional test of the 3D Mesh NoC requires the use of test data packets to cover all straight paths and turning paths in the network, the test time increases quadratically with the increase of the scale of the 3D Mesh NoC, which leads to low test efficiency of the 3D Mesh NoC. Therefore, how to improve the test efficiency of the 3D Mesh NoC has become an urgent problem to be solved. Summary of the Invention

[0003] The main technical problem solved by the present invention is that the existing method for testing a three-dimensional on-chip network takes a long time, thereby resulting in low efficiency in testing the three-dimensional on-chip network.

[0004] According to a first aspect, an embodiment provides a method for testing an on-chip network, the method comprising: if a first target routing module of a three-dimensional on-chip network receives multiple test data packets from different directions, determining a target address corresponding to each of the multiple test data packets and a first address corresponding to the first target routing module that receives the multiple test data packets from different directions, wherein the multiple test data packets are in an unencoded state and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional on-chip network; determining whether to perform XOR network coding on the multiple test data packets based on the first address and the target address; if it is determined that XOR network coding is to be performed on the multiple test data packets, performing XOR network coding on the multiple test data packets to obtain an encoded data packet; determining a transmission path for the encoded data packet based on the target address and the first address, and sending the encoded data packet to the target address via a second target routing module of the three-dimensional on-chip network based on the transmission path to obtain a reference data packet; and determining a test result of the three-dimensional on-chip network based on the reference data packet and the multiple test data packets.

[0005] According to a second aspect, an embodiment provides a testing device for a network on chip (NOC), comprising: a first determining module for, if a first target routing module of a three-dimensional NOC receives multiple test data packets from different directions, determining a target address corresponding to each of the multiple test data packets and a first address corresponding to the first target routing module that receives the multiple test data packets from different directions, wherein the multiple test data packets are in an unencoded state and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional NOC; a judging module for determining whether to perform XOR network coding on the multiple test data packets based on the first address and the target address; an encoding module for, if it is determined that XOR network coding is to be performed on the multiple test data packets, performing XOR network coding on the multiple test data packets to obtain an encoded data packet; a transmitting module for determining a transmission path for the encoded data packet based on the target address and the first address, and sending the encoded data packet to the target address via a second target routing module of the three-dimensional NOC based on the transmission path to obtain a reference data packet; and a second determining module for determining a test result of the three-dimensional NOC based on the reference data packet and the multiple test data packets.

[0006] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the on-chip network testing method as described above is implemented.

[0007] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the on-chip network testing method as described above is implemented.

[0008] According to the on-chip network testing method / device of the above-mentioned embodiment, when the first target routing module of the three-dimensional on-chip network receives multiple test data packets from different directions, it can determine whether to perform XOR network coding on the multiple test data packets in the first target routing module based on the determined target addresses corresponding to the multiple test data packets and the first address of the first target routing module. Therefore, when it is determined that the multiple test data packets are to be XOR network coded, a coded data packet is obtained by performing XOR network coding on the multiple test data packets, and then a transmission path of the coded data packet is determined based on the first address and the target address. The coded data packet is then forwarded to the target addresses corresponding to the multiple test data packets via the second target routing module of the three-dimensional on-chip network through the transmission path to obtain a reference data packet. Finally, the reference data packet is compared with the multiple test data packets to determine the test result of the three-dimensional on-chip network. This effectively solves the problem of being unable to quickly and accurately test the three-dimensional mesh on-chip network, thereby improving the testing efficiency of the three-dimensional mesh on-chip network.

[0009] This solution determines whether to perform XOR network coding on multiple test data packets. In this way, when it is determined that XOR network coding is to be performed, the transmission path of the encoded data packet can be determined based on the target addresses corresponding to the multiple data packets. This avoids the problem of long transmission time caused by the need to transmit multiple data packets in sequence according to priority, and improves the transmission efficiency of the test data packets. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0011] Figure 1 It is a flowchart of a method for testing a network on chip according to an embodiment of the present application.

[0012] Figure 2 Schematic diagram of a three-dimensional mesh network-on-chip according to an embodiment of the present application.

[0013] Figure 3 3D Mesh Network-on-Chip (NOC) is a schematic diagram illustrating a path of a 3D Mesh NOC according to an embodiment of the present application.

[0014] Figure 4 It is a flowchart of a method for testing a network on chip according to another embodiment of the present application.

[0015] Figure 5It is a flowchart illustrating the specific steps of step 230 according to an embodiment of the present application.

[0016] Figure 6 It is a flowchart illustrating the specific steps of step 320 according to an embodiment of the present application.

[0017] Figure 7 1 is a schematic diagram showing a comparison between using XOR network coding and not using XOR network coding according to an embodiment of the present application.

[0018] Figure 8 It is a flowchart of a method for testing a network on chip according to another embodiment of the present application.

[0019] Figure 9 It is a flowchart of a method for testing a network on chip according to another embodiment of the present application.

[0020] Figure 10 FIG. 1 is a schematic diagram illustrating three planes in a 3D Mesh NoC according to an embodiment of the present application.

[0021] Figure 11 This is a NS multi-step test of the XY plane in a 3D Mesh NoC according to an embodiment of the present application.

[0022] Figure 12 This is a WE multi-step test on the XY plane in a 3D Mesh NoC according to an embodiment of the present application.

[0023] Figure 13 This is a four-corner routing test in the XY plane of a 3D Mesh NoC according to an embodiment of the present application.

[0024] Figure 14 It is a flowchart illustrating the specific steps of step 430 according to an embodiment of the present application.

[0025] Figure 15 4 is a block diagram of a network-on-chip testing device according to an embodiment of the present application.

[0026] Figure 16 It is a hardware structure diagram of an electronic device according to an embodiment of the present application.

[0027] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below.

[0028] The drawings and textual descriptions are not intended to limit the scope of the present invention in any way, but rather to illustrate the concept of the present invention to those skilled in the art through specific embodiments. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below by means of specific embodiments in conjunction with the accompanying drawings. Similar elements in different embodiments are numbered with associated similar elements. In the following embodiments, many detailed descriptions are provided to enable the present application to be better understood. However, those skilled in the art will readily appreciate that some of the features may be omitted in different circumstances, or may be replaced by other elements, materials, or methods. In some cases, some operations related to the present application are not shown or described in the specification. This is to avoid the core portion of the present application being overwhelmed by excessive descriptions, and for those skilled in the art, it is not necessary to describe these related operations in detail. They will fully understand the related operations based on the description in the specification and the general technical knowledge in the art.

[0030] In addition, the features, operations, or characteristics described in the specification may be combined in any appropriate manner to form various embodiments. Furthermore, the steps or actions in the method description may be reordered or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various sequences in the specification and drawings are provided solely for the purpose of clearly describing a particular embodiment and are not intended to be mandatory, unless otherwise specified.

[0031] The serial numbers assigned to components herein, such as "first," "second," etc., are used solely to distinguish the objects being described and do not convey any sequential or technical meaning. References to "connection" and "coupling" herein, unless otherwise specified, include both direct and indirect connections (couplings).

[0032] In existing solutions, test time increases quadratically with the size of the 3D Mesh NoC. Because functional testing of a 3D Mesh NoC requires test packets covering all straight and turning paths in the network, test time is related to the forwarding efficiency of the test packets. However, there is currently no precedent for implementing network coding in a 3DMesh NoC without changing the network topology, and testing methods based on 2D NoCs cannot guarantee the accuracy and efficiency of 3D NoC testing.

[0033] In an embodiment of the present invention, by determining whether to perform XOR network coding on multiple test data packets, it is possible to determine the transmission path of the encoded data packet based on the target addresses corresponding to each of the multiple data packets when it is determined to perform XOR network coding, thereby avoiding the problem of long transmission time caused by the need to transmit multiple data packets in sequence according to priority, and improving the transmission efficiency of the test data packets.

[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices. The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be executed in the order described. For example, some operations / steps may be further decomposed, while others may be combined or partially combined, so the actual execution order may vary depending on the actual situation.

[0035] See also Figure 1 , Figure 1 The test method of the network on chip provided by an embodiment of the present application is shown. In a specific embodiment, the test method of the network on chip can be applied to Figure 14 The network-on-chip test apparatus 700 and the electronic device 800 equipped with the network-on-chip test apparatus 700 are shown. Figure 15 The specific process of this embodiment will be described below. Of course, it is understandable that the method can be executed by a computer terminal with computing and processing capabilities, or other processors, or servers, etc. Figure 1 The process shown in FIG. 1 is described in detail. Specifically, the on-chip network testing method may include the following steps:

[0036] Step 110: If a plurality of test data packets are received from different directions in a first target routing module of a three-dimensional network on chip, a target address corresponding to each of the plurality of test data packets and a first address corresponding to the first target routing module that receives the plurality of test data packets from different directions are determined, wherein the plurality of test data packets are in an unencoded state, and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional network on chip.

[0037] As a method, the on-chip network is a distributed architecture for internal communication in multi-core chips, which aims to replace centralized communication methods such as traditional buses or cross switches. The three-dimensional network on chip (Three-Dimensional Mesh Network-on-Chip, 3D Mesh NoC) is a way to realize communication between IP modules in multi-processor system-on-chip (MPSoCs) with multiple layers. Among them, 3D Mesh NoC is a distributed architecture based on the traditional two-dimensional network on chip (Two-Dimensional Mesh Network-on-Chip, 2D Mesh NoC) by vertically stacking chip layers and using silicon through-via (TSV) technology to realize inter-layer communication. 3D Mesh NoC is composed of multiple routing modules (Router) regularly interconnected, and its topology is as follows: Figure 2 As shown, there are six directions in the 3D Mesh NoC, namely East (E), South (S), West (W), North (N), Up (U), and Down (D). The WE direction is the positive x-axis, the SN direction is the positive y-axis, and the DU is the positive z-axis. In this way, each routing module can be located by the address (x, y, z).

[0038] Optionally, in a 3D Mesh NoC, communication data between multiple IP modules is transmitted within the on-chip network (NOC) in the form of packets. Each packet consists of multiple fixed-bit-width flow control units (flits). The first flit of each packet is the head flit, which contains information such as the packet's source and destination addresses; the last flit is the tail flit, which indicates the packet's end point. The packets between the head and tail flits are payload flits, carrying the transmitted data. Dimension-Ordered Routing (DOR) is a widely used packet forwarding algorithm that controls the transmission path of each packet in a 3D Mesh NoC. Based on the routing priorities in the X-, Y-, and Z-axes, 3D Mesh NoCs offer six optional DOR strategies: XYZ-DOR, YXZ-DOR, XZY-DOR, ZXY-DOR, YZX-DOR, and ZYX-DOR. The order of the symbols "X", "Y" and "Z" respectively represents the direction of packet forwarding, that is, the horizontal axis direction, vertical axis direction and vertical axis direction in the world coordinate system. For example, when using XYZ-DOR for packet forwarding, a packet from the source address (X S ,Y S ,Z S ) is forwarded to the destination address (X D ,Y D ,Z D ) is: (X S ,Y S ,Z S ), first forward along the X axis to the address (X D ,Y S ,Z S ) routing module, and then forwarded along the Y axis to the address (X D ,Y D ,Z S ) routing module, and finally forwarded along the Z axis to the address (X D ,Y D ,Z D )’s routing module to complete the forwarding of data packets.

[0039] Optionally, the routing module in a 3D Mesh NoC has two operating modes: normal mode and test mode. When the NoC is operating normally, the routing module is in normal mode. In normal mode, the routing module may receive packet input requests from multiple directions simultaneously. When there are multiple processable input requests, an input priority arbiter algorithm determines which input request should be processed first. Common algorithms include fixed-priority arbiters and round-robin arbiters. After selecting the input request with the highest priority, the routing module receives the corresponding packet and forwards it from the appropriate output port based on the packet's configuration information (including source address, destination address, and DOR policy). For example, suppose routing module (3,0,0) receives packet P1 from direction W, where P1's source address, destination address, and DOR policy are (0,0,0), (3,2,1), and XYZ-DOR, respectively. Routing module (3,0,0) will forward packet P1 from output port N. When performing functional testing on an NoC, the routing module in the NoC enters test mode under the control of a test flag. In test mode, in addition to its normal logical functions, the routing module also performs XOR network coding and forwarding of encoded packets. XOR network coding is a network coding technique that performs an XOR operation on multiple packets at intermediate nodes (such as routers), combining them before transmission to reduce transmission times and improve throughput.

[0040] Optionally, the first target routing module refers to an edge routing module in a three-dimensional on-chip network. In a 3D MeshNoC, an edge routing module refers to a routing module located in the outermost plane of the NoC in space, and has less than 6 adjacent routing modules. In contrast, an internal routing module has adjacent routing modules in the six directions of East (E), South (S), West (W), North (N), Up (U), and Down (D). In the solution of the present application, since the edge routing module is usually used to process data packets entering or leaving the on-chip network, and the internal routing module is usually used to forward data packets sent by other modules, there may be data packets sent from different routing modules in the edge routing module. At this time, it is necessary to determine whether the multiple data packets received in the edge routing module need to be merged before transmission. Furthermore, when multiple test data packets from different directions are received in the first target routing module of the three-dimensional on-chip network, the target addresses corresponding to the multiple test data packets and the first address corresponding to the first target routing module that receives the multiple test data packets from different directions are determined.

[0041] Alternatively, a three-dimensional coordinate system may be established in the three-dimensional network-on-chip (NOC) based on a certain edge routing module as the origin and based on the positional relationships between different directions. Since routing modules are evenly distributed in the three-dimensional NOC, positioning can be performed based on the number of routing modules between the routing module and the coordinate origin to obtain a first address corresponding to the first target routing module. Alternatively, since the test data packet includes the source address and destination address corresponding to the test data packet, the destination addresses corresponding to each of the multiple test data packets can be determined directly in the test data packet.

[0042] Step 120: Determine whether to perform XOR network coding on the multiple test data packets according to the first address and the target address.

[0043] As a method to quickly transmit multiple test data packets in a three-dimensional on-chip network, thereby testing all transmission paths of the three-dimensional on-chip network, when the same routing module receives test data packets sent from multiple different directions, the multiple test data packets can be XOR-network-coded, thereby avoiding the problem of low transmission efficiency caused by the routing module having to forward the test data packets to the next routing module in order of priority. However, not all routing modules require XOR-network coding of multiple test data packets. Therefore, it is necessary to determine whether XOR-network coding of multiple test data packets is required based on the first address corresponding to the first target routing module and the target addresses corresponding to the multiple test data packets.

[0044] Optionally, since XOR network coding is a network coding technology that performs XOR operations on multiple data packets, merges them and then transmits them, therefore, if the data packet received by the routing module is a data packet in an encoded state, at this time, there is no need to perform XOR network coding on the data packet in the encoded state again. Therefore, when the first target routing module receives test data packets in an uncoded state from different directions, it will determine whether to perform XOR network coding on multiple test data packets.

[0045] Optionally, the coordinate relationship between the first address and the target address can be determined separately. The coordinate relationship can be the size relationship between the difference product corresponding to the first address and the target address corresponding to different test data packets on different coordinate axes and the threshold, or the same numerical value on a certain coordinate axis, etc.

[0046] Step 130: If it is determined to perform XOR network coding on the multiple test data packets, perform XOR network coding on the multiple test data packets to obtain coded data packets.

[0047] As one approach, if it is determined that the first target routing module currently needs to perform XOR network coding on the multiple test packets based on the first address and the target addresses corresponding to the multiple test packets, a coded packet can be obtained. Optionally, the coded packet can include data information corresponding to the multiple test packets, and the XOR network coding of the multiple test packets can be achieved through an XOR operation.

[0048] Alternatively, since there are two transmission paths in the 3D on-chip network, namely the straight path and the turning path, as Figure 3 As shown in the figure, in a 3D NoC, data signals are input from the input ports of the routing module in the E, W, S, N, U, or D directions, and then output from the output ports in the E, W, S, N, U, or D directions. In-Out represents a signal path that is input from the input port in the In direction and output from the output port in the Out direction. Here, In∈{E,W,S,N,U,D}, Out∈{E,W,S,N,U,D}, and In≠Out. Straight paths include WE, EW, NS, SN, UD, and DU, while turning paths include WS, SW, WU, UW, WD, and DW. Consequently, the test efficiency of a 3D NoC decreases as the number of propagation paths increases. In network coding, it is believed that linear encoding of some of the data transmitted in a NoC can improve the NoC's multicast performance. Therefore, the test efficiency of a 3D NoC can be improved by performing XOR network coding on multiple test network packets.

[0049] Optionally, if it is determined based on the first address and the target address that multiple test data packets are not to be XOR network encoded, the processing priorities corresponding to different test data packets and the output directions corresponding to different test data packets are determined according to the Dimension Order Routing (DOR) algorithm, thereby ensuring that the test data packets can be transmitted in the three-dimensional on-chip network, thereby achieving coverage of all paths of the three-dimensional on-chip network.

[0050] Step 140 : determining a transmission path of the encoded data packet according to the target address and the first address, and sending the encoded data packet to the target address via a second target routing module of the 3D network on chip based on the transmission path to obtain a reference data packet.

[0051] As a method, after performing XOR network coding on multiple test data packets, a unique coded data packet exists in the first target routing module. Then, the coded data packet can be directly forwarded to the next routing module without the need to perform data packet transmission priority. In this way, the output direction of the coded data packet can be determined according to the target addresses corresponding to the multiple test data packets and the first target routing module. In this way, the transmission path of the coded data packet can be determined based on the output direction and the target addresses corresponding to the multiple test data packets. Optionally, in order to ensure that multiple test data packets can be sent to their corresponding target addresses.

[0052] Optionally, when a coded data packet is transmitted in a three-dimensional on-chip network, the output direction of the coded data packet needs to be determined in each routing module, and then the transmission path corresponding to the coded data packet can be determined based on the output direction. Then, the coded data packet can be forwarded to its corresponding target address via the second target routing module of the three-dimensional on-chip network based on the transmission path, so as to obtain a reference data packet at the target address and implement testing of the three-dimensional on-chip network. Optionally, the second target routing module can be any routing module of the three-dimensional on-chip network that has not transmitted a test data packet or a coded data packet. Optionally, the difference between the first routing module and the second target routing module is that the first target routing module refers to the routing module corresponding to multiple test data packets in an uncoded state sent from different directions.

[0053] Step 150: Determine a test result of the 3D network on chip according to the reference data packet and the plurality of test data packets.

[0054] As a method, after multiple test data packets or encoded data packets after XOR network encoding are sent to the corresponding destination address, a reference data packet at the destination address is obtained to compare the reference data packet with the input original multiple test data packets to determine the test results of the three-dimensional on-chip network.

[0055] Optionally, since XOR network coding of multiple data may cause the data structure to change, multiple different data packets can be directly merged into one data packet. Therefore, the data corresponding to the encoded data packet can be directly compared with the data corresponding to the data packet before encoding to determine whether the test data packet has changed during the test process.

[0056] Optionally, when it is determined that the data corresponding to the reference data packet is different from the corresponding data in multiple test data packets, it can be determined that the test result of the three-dimensional network on chip is that there is a fault in the three-dimensional network on chip; when it is determined that the data corresponding to the reference data packet is the same as the corresponding data in multiple test data packets, it can be determined that the test result of the three-dimensional network on chip is that there is no fault in the three-dimensional network on chip.

[0057] Optionally, the reference data packet may be first XOR-restored based on the original test data packet input into the three-dimensional network-on-chip to obtain multiple sub-data packets, and then the multiple sub-data packets may be matched with the corresponding original test data packets input into the three-dimensional network-on-chip to determine that there is no fault in the three-dimensional network when it is determined that the data of the sub-data packet is the same as that of the corresponding original test data packet; or when it is determined that the data of the sub-data packet is different from that of the corresponding original test data packet, it is determined that there is a fault in the three-dimensional network-on-chip.

[0058] In other embodiments, if the reference data packet is not an encoded data packet, the reference data packet can be directly compared with its corresponding test data packet input into the 3D network-on-chip to determine whether the corresponding data in the reference data packet and the corresponding test data packet are the same, thereby determining the test result of the 3D network-on-chip.

[0059] In an embodiment of the present application, when the first target routing module of the three-dimensional on-chip network receives multiple test data packets from different directions, it can determine whether to perform XOR network coding on the multiple test data packets in the first target routing module based on the target addresses corresponding to the determined multiple test data packets and the first address of the first target routing module. When it is determined that the multiple test data packets are to be XOR network coded, a coded data packet is obtained by performing XOR network coding on the multiple test data packets, and then the transmission path of the coded data packet is determined based on the first address and the target address. The coded data packet is then forwarded to the target addresses corresponding to the multiple test data packets through the second target routing module of the three-dimensional on-chip network through the transmission path to obtain a reference data packet. Finally, the reference data packet is compared with the multiple test data packets to determine the test result of the three-dimensional on-chip network. This effectively solves the problem of not being able to quickly and accurately test the three-dimensional Mesh on-chip network, thereby improving the test efficiency of the three-dimensional Mesh on-chip network.

[0060] This solution determines whether to perform XOR network coding on multiple test data packets. In this way, when it is determined that XOR network coding is to be performed, the transmission path of the encoded data packet can be determined based on the target addresses corresponding to the multiple data packets. This avoids the problem of long transmission time caused by the need to transmit multiple data packets in sequence according to priority, and improves the transmission efficiency of the test data packets.

[0061] See also Figure 4 , Figure 4 The test method of the network on chip provided by an embodiment of the present application is shown below. Figure 4 The process shown in FIG. 1 is described in detail. Specifically, the on-chip network testing method may include the following steps:

[0062] Step 210: If a plurality of test data packets are received from different directions in a first target routing module of a three-dimensional network on chip, determine the target addresses corresponding to each of the plurality of test data packets and the first address corresponding to the first target routing module that receives the plurality of test data packets from different directions, wherein the plurality of test data packets are in an unencoded state, and the first address is the coordinate address of the first target routing module in the three-dimensional coordinate system corresponding to the three-dimensional network on chip.

[0063] Step 220: Determine the source directions corresponding to the plurality of test data packets.

[0064] As a method, since testing the three-dimensional on-chip network requires covering all paths on the three-dimensional on-chip network, and the judgment conditions for whether to perform XOR network coding corresponding to data packets corresponding to different directions are different, before determining whether to perform XOR network coding on multiple received test data packets in the first target routing module, it is necessary to confirm the source directions of multiple test data packets.

[0065] Optionally, when the first target routing module receives multiple test data packets, it can obtain the address corresponding to the previous routing module where the test data packets are located, thereby determining the source direction corresponding to each of the multiple test data packets based on the first address of the first target routing module and the address corresponding to the previous routing module.

[0066] Optionally, in order to facilitate the determination of the source directions corresponding to multiple test data packets, the addresses of the routing modules passed by each test data packet are recorded during the transmission process. When it is transmitted to the next routing module, the source direction of the test data packet can be determined based on the recorded address of the routing module, and after transmission to the target address, it can be determined whether the transmission of the test data packet covers all routing modules of the three-dimensional on-chip network, thereby ensuring the test accuracy of the three-dimensional on-chip network.

[0067] Step 230: Determine whether the plurality of test data packets meet preset conditions according to the source direction, the first address, and the destination address.

[0068] As a method, after determining the source directions corresponding to each of the multiple test data packets, the first address corresponding to the first target routing module, and the target addresses corresponding to each of the multiple test data packets, first determine the preset conditions corresponding to the multiple test data packets according to the source directions corresponding to each of the multiple test data packets, and then determine whether the multiple test data packets meet the corresponding preset conditions based on the first address and the target addresses corresponding to each of the multiple test data packets.

[0069] In some embodiments, as Figure 5 As shown, step 230 includes:

[0070] Step 310 : Determine a first product of the horizontal coordinate difference between the first address and the target address, a second product of the vertical coordinate difference between the first address and the target address, and a third product of the vertical coordinate difference between the first address and the target address.

[0071] As a method to determine whether multiple test packets require XOR network coding in the first target route, the products corresponding to the corresponding coordinate differences on different coordinate axes can be first determined based on the first address and the target addresses corresponding to the multiple test packets, so that a determination can be made based on the corresponding products. For example, if the first address is (x0, y0, z0), the target address corresponding to the first test packet P1 is (x1, y1, z1), and the target address corresponding to the second test packet P2 is (x2, y2, z2), the corresponding first product is (x1-x0)*(x2-x0), the second product is (y1-y0)*(y2-y0), and the third product is (z1-z0)*(z2-z0).

[0072] Step 320: Determine whether the plurality of test data packets meet a preset condition according to the source direction, the first product, the second product, and the third product.

[0073] As a method, after determining the first product, second product and third product between multiple test data packets and the first address respectively, the corresponding preset conditions are determined based on the source directions corresponding to the multiple test data packets, and then it is determined whether the first product, the second product, the third product and the specific first address and the target address meet the corresponding preset conditions, and then it is determined whether the multiple test data packets need to be XOR network coded in the first target routing module.

[0074] In some embodiments, as Figure 6 As shown, step 320 includes:

[0075] Step 321: If the source directions are the first direction and the second direction respectively, and the first product is less than or equal to the threshold, the second product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is met, wherein the first direction and the second direction are opposite directions to each other.

[0076] As a method to facilitate testing of a three-dimensional network on chip (NoC), all transmission paths can be considered as transmissions on different two-dimensional planes, for example, the XY plane, the YZ plane, and the XZ plane, thereby setting corresponding preset conditions based on different two-dimensional planes. When the source direction is determined to be the first direction and the second direction, multiple test packets may be transmitted in the XY plane or the XZ plane. If the vertical coordinates (i.e., the Z axis) of the multiple test packets in the XY plane do not change, the vertical axis values of the multiple test packets can be set to be the same, while the horizontal coordinates and vertical coordinates of the multiple test packets in the XY plane can be set to be different. Furthermore, the first product of the horizontal coordinate differences of the multiple test packets or the second product of the vertical coordinate differences of the multiple test packets can be set to be less than or equal to a threshold value. In this way, the multiple test packets can be determined to be test packets transmitted in the XY plane. Then, the corresponding Y-axis or X-axis conditions are set specifically based on the source direction of the test packets transmitted in the XY plane. If the source direction in the XY plane is the X-axis, the corresponding preset conditions can be that the first product is less than or equal to the threshold value, and the second product is greater than the threshold value.

[0077] Optionally, the first direction and the second direction are E or W respectively. Furthermore, when determining that the source direction is the first direction and the second direction, the corresponding preset conditions are that the first product is less than or equal to the threshold, the second product is greater than the threshold, and the vertical coordinate value in the target address corresponding to each of the multiple test data packets is the same as the vertical coordinate value in the first address.

[0078] Step 322: If the source directions are the first direction and the second direction respectively, and the first product is less than or equal to the threshold, the third product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, it is determined that the preset condition is met.

[0079] As a method, when the source direction is determined to be the first direction and the second direction, in the XZ plane, the vertical coordinates (i.e., the Y axis) of multiple test data packets do not change, so the values of the multiple test data packets on the vertical axis can be set to be the same, and the horizontal coordinates and vertical coordinates corresponding to the multiple test data packets in the XZ plane can be set to be different, and then the first product of the horizontal coordinate differences of the corresponding multiple test data packets or the third product of the vertical coordinate differences of the multiple test data packets can be set to be less than or equal to the threshold value, so that the multiple test data packets can be determined to be test data packets transmitted in the XZ plane, and then the corresponding conditions in the Z axis or in the X axis are set specifically according to the source direction of the test data packets transmitted in the XZ plane. If in XZ and the source direction is the X axis direction, the corresponding preset condition can be that the first product is less than or equal to the threshold value, and the third product is greater than the threshold value.

[0080] Optionally, the first direction and the second direction are E or W respectively. Furthermore, when determining that the source direction is the first direction and the second direction, the corresponding preset conditions are that the first product is less than or equal to the threshold, the third product is greater than the threshold, and the vertical coordinate value in the target address corresponding to each of the multiple test data packets is the same as the vertical coordinate value in the first address.

[0081] Step 323: If the source directions are the third direction and the fourth direction, respectively, and the first product is greater than the threshold, the second product is less than or equal to the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is met, wherein the third direction and the fourth direction are opposite directions to each other, and the third direction and the fourth direction are perpendicular to the first direction and the second direction, respectively.

[0082] As a method, when the source direction is determined to be the third direction and the fourth direction, multiple test data packets may be transmitted in the XY plane or the YZ plane. If in the XY plane, the vertical coordinates (i.e., the Z axis) of the multiple test data packets do not change, the values of the multiple test data packets on the vertical axis can be set to be the same, and the horizontal coordinates and vertical coordinates corresponding to the multiple test data packets in the XY plane can be set to be different, and then the first product of the horizontal coordinate differences of the corresponding multiple test data packets or the second product of the vertical coordinate differences of the multiple test data packets can be set to be less than or equal to a threshold value, so that the multiple test data packets can be determined to be test data packets transmitted in the XY plane, and then the corresponding conditions in the Y axis or the X axis are set specifically according to the source direction of the test data packets transmitted in the XY plane. In the XY plane, if the source is the X axis direction, the corresponding preset condition can be that the second product is less than or equal to the threshold value, and the first product is greater than the threshold value.

[0083] Optionally, the third direction and the fourth direction are S or N respectively. Furthermore, when determining that the source direction is the third direction and the fourth direction, the corresponding preset conditions are that the second product is less than or equal to the threshold, the first product is greater than the threshold, and the vertical coordinate value in the target address corresponding to each of the multiple test data packets is the same as the vertical coordinate value in the first address.

[0084] Step 324: If the source directions are the third direction and the fourth direction respectively, and the second product is less than or equal to the threshold, the third product is greater than the threshold, and the horizontal coordinates corresponding to the first address and the target address are equal, it is determined that the preset condition is met.

[0085] As a method, when the source direction is determined to be the first direction and the second direction, in the YZ plane, the horizontal coordinates (i.e., the X-axis) of multiple test data packets do not change, so the values of multiple test data packets on the horizontal axis can be set to be the same, and the vertical coordinates and vertical coordinates corresponding to multiple test data packets in the YZ plane can be set to be different, and then the second product of the vertical coordinate differences of the corresponding multiple test data packets or the third product of the vertical coordinate differences of the multiple test data packets can be set to be less than or equal to the threshold value, so that the multiple test data packets can be determined to be test data packets transmitted in the YZ plane, and then the corresponding conditions in the Z axis or in the Y axis are set specifically according to the source direction of the test data packets transmitted in the YZ plane. If in YZ and the source direction is the Y-axis direction, the corresponding preset condition can be that the second product is less than or equal to the threshold value, and the third product is greater than the threshold value.

[0086] Optionally, the third direction and the fourth direction are S or N respectively. Furthermore, when determining that the source direction is the third direction and the fourth direction, the corresponding preset conditions are that the second product is less than or equal to the threshold, the third product is greater than the threshold, and the horizontal coordinate values in the target addresses corresponding to the multiple test data packets are the same as the horizontal coordinate values in the first address.

[0087] Step 325: If the source directions are the fifth direction and the sixth direction, and the third product is less than or equal to the threshold, the first product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is met, wherein the fifth direction and the sixth direction are opposite directions to each other, and the fifth direction and the sixth direction are perpendicular to the first direction, the second direction, the third direction, and the fourth direction, respectively.

[0088] As a method, when the source direction is determined to be the fifth direction and the sixth direction, multiple test data packets may be transmitted in the XZ plane or the YZ plane. If in the XZ plane, the vertical coordinates (i.e., the Y axis) of the multiple test data packets do not change, the values of the multiple test data packets on the vertical axis can be set to be the same, and the horizontal coordinates and vertical coordinates corresponding to the multiple test data packets in the XZ plane can be set to be different, and then the first product of the horizontal coordinate differences of the corresponding multiple test data packets or the third product of the vertical coordinate differences of the multiple test data packets can be set to be less than or equal to the threshold value, so that the multiple test data packets can be determined to be test data packets transmitted in the XZ plane, and then the corresponding conditions in the Z axis or the X axis are set specifically according to the source direction of the test data packets transmitted in the XZ plane. If the source in the XZ plane is the Z axis direction, the corresponding preset condition can be that the third product is less than or equal to the threshold value, and the first product is greater than the threshold value.

[0089] Optionally, the third direction and the fourth direction are S or N respectively. Furthermore, when determining that the source direction is the third direction and the fourth direction, the corresponding preset conditions are that the third product is less than or equal to the threshold, the first product is greater than the threshold, and the vertical coordinate value in the target address corresponding to each of the multiple test data packets is the same as the vertical coordinate value in the first address.

[0090] Step 326: If the source directions are the fifth direction and the sixth direction respectively, and the third product is less than or equal to the threshold, the second product is greater than the threshold, and the horizontal coordinates corresponding to the first address and the target address are equal, it is determined that the preset condition is met.

[0091] As a method, when the source direction is determined to be the fifth direction and the sixth direction, multiple test data packets may be transmitted in the XZ plane or the YZ plane. If in the YZ plane, the horizontal coordinates (i.e., the X-axis) of the multiple test data packets do not change, the values of the multiple test data packets on the horizontal axis can be set to be the same, and the vertical coordinates and vertical coordinates corresponding to the multiple test data packets in the YZ plane can be set to be different, and then the second product of the vertical coordinate differences of the corresponding multiple test data packets or the third product of the vertical coordinate differences of the multiple test data packets can be set to be less than or equal to the threshold value, so that the multiple test data packets can be determined to be test data packets transmitted in the YZ plane, and then the corresponding conditions in the Z axis or the Y axis are set specifically according to the source direction of the test data packets transmitted in the YZ plane. In the YZ plane, if the source is the Z-axis direction, the corresponding preset condition can be that the third product is less than or equal to the threshold value, and the second product is greater than the threshold value.

[0092] Optionally, the third direction and the fourth direction are S or N respectively. Furthermore, when determining that the source direction is the third direction and the fourth direction, the corresponding preset conditions are that the third product is less than or equal to the threshold, the second product is greater than the threshold, and the horizontal coordinate values in the target addresses corresponding to the multiple test data packets are the same as the horizontal coordinate values in the first address.

[0093] Please continue reading Figure 4 , step 240, if it is determined that the preset condition is met, determine to perform XOR network coding on the multiple test data packets.

[0094] As a method, after determining that the preset conditions of the corresponding source direction are met based on the first address and the target addresses corresponding to each of the multiple test data packets, the XOR network coding can be performed on the multiple test data packets corresponding to the source direction in the first target routing module by enabling the XOR coding function.

[0095] Optionally, XOR network coding can improve the multicast performance of NoC. Figure 7As shown in the classic butterfly network model in network coding theory, P in the figure A and P B There are two data packets multicasted from source node s to destination nodes d1 and d2. According to the Max-Flow Min-Cut Theorem, if Figure 7 If the maximum capacity of each path in is 1, then the theoretical maximum flow (maxflow) from the source node s to the destination node d1 or d2 is 2. However, if forwarding is performed through a conventional "store-and-forward" network, the actual maximum flows from the source node s to the two destination nodes are 2 and 1 respectively, which are lower than the theoretical upper limit. Figure 7 In a "store-code-forward" network that applies network coding theory, when P A and P B After reaching the intermediate node 3, it will be encoded into a new data packet through bitwise XOR operation And forward it to the intermediate node 4. The two destination nodes receive the encoded data packet and the original data packet P A (or P B ), only a bitwise XOR operation is required on the two received data packets to obtain another original data packet P B (or P A ), so that the actual maximum flow from the source node s to the two destination nodes in the "store-encode-forward" network is 2, which reaches the theoretical maximum value. In this way, multiple test data packets are XOR network coded when it is determined that the preset conditions are met, so as to improve the transmission efficiency of the test data packets in the three-dimensional on-chip network.

[0096] Step 250: If it is determined that the preset condition is not satisfied, determine not to perform XOR network coding on the multiple test data packets.

[0097] As a method, when it is determined that the preset conditions corresponding to multiple test data packets are not met, it can be known that if the multiple test data packets are still XOR-network encoded, the transmission efficiency of the test data in the three-dimensional on-chip network may be reduced. Therefore, at this time, it is determined not to perform XOR-network encoding on the multiple test data packets, and in order to ensure that the test of the three-dimensional on-chip network can be completed, the multiple test data packets received in the first target routing module are transmitted sequentially according to the conventional on-chip network data transmission strategy.

[0098] Step 260: If it is determined to perform XOR network coding on the multiple test data packets, perform XOR network coding on the multiple test data packets to obtain coded data packets.

[0099] Step 270 : determining a transmission path of the encoded data packet according to the target address and the first address, and sending the encoded data packet to the target address via a second target routing module of the 3D network on chip based on the transmission path to obtain a reference data packet.

[0100] Step 280: Determine a test result of the 3D network on chip according to the reference data packet and the plurality of test data packets.

[0101] The specific step descriptions of step 210 and step 260 to step 280 can refer to step 110 and step 130 to step 150, which will not be repeated here.

[0102] In this embodiment, the source directions of multiple test data packets in the first target routing module can be determined first, so that whether the multiple test data packets meet the preset conditions can be determined based on the source directions corresponding to the multiple test data packets, the target addresses corresponding to the multiple data packets and the first address of the first target routing module, and then the multiple test data packets are XOR-network-coded if the conditions are met, or the multiple test data packets are not XOR-network-coded if it is determined that the conditions are not met, so that the encoded data packets can be forwarded to the corresponding target address, thereby shortening the test time of the three-dimensional on-chip network and improving the test efficiency of the three-dimensional on-chip network.

[0103] See also Figure 8 , Figure 8 The test method of the network on chip provided by an embodiment of the present application is shown below. Figure 8 The process shown in FIG. 1 is described in detail. Specifically, the on-chip network testing method may include the following steps:

[0104] Step 401: If a plurality of test data packets are received from different directions in a first target routing module of a three-dimensional on-chip network, a target address corresponding to each of the plurality of test data packets and a first address corresponding to the first target routing module that receives the plurality of test data packets from different directions are determined, wherein the plurality of test data packets are in an unencoded state, and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional on-chip network.

[0105] Step 402: Determine whether to perform XOR network coding on the multiple test data packets according to the first address and the target address.

[0106] Step 403: If it is determined to perform XOR network coding on the multiple test data packets, perform XOR network coding on the multiple test data packets to obtain coded data packets.

[0107] Step 404: If the source directions are the first direction and the second direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then determine whether the encoded data packet is output in the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0108] As a method, after completing the XOR network coding of multiple test data packets, in order to complete the test of the three-dimensional on-chip network, it is necessary to determine the output direction of the encoded data packet, so that the encoded data packet can be accurately transmitted to the next routing module, and then continued to be forwarded by the next routing module to the target address to complete the test of the three-dimensional on-chip network.

[0109] Optionally, since the output directions corresponding to multiple test data packets corresponding to different source directions are also different, in order to ensure that the entire three-dimensional on-chip network can be covered, the output direction of the encoded data packet can be determined based on the source directions of the multiple test data packets and the coordinate relationship between the target addresses of the multiple test data packets and the first address corresponding to the first target routing module.

[0110] Optionally, when it is determined that the source directions of multiple test data packets are respectively the first direction or the second direction, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, at this time, in the XY plane transmission in the three-dimensional on-chip network, the output direction of the encoded data packet can be changed to ensure that the turning path of the three-dimensional on-chip network can be changed, so that the encoded data packet can be determined to be output from the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0111] Optionally, if it is determined that the vertical coordinate of the target address is greater than the vertical coordinate of the first address, the encoded data packet is determined to be output from the third direction; if it is determined that the vertical coordinate of the target address is less than the vertical coordinate of the first address, the encoded data packet is determined to be output from the fourth direction.

[0112] Step 405: If the source directions are the first direction and the second direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then determine whether the encoded data packet is output in the fifth direction or the sixth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0113] As a method, when it is determined that the source directions of multiple test data packets are respectively the first direction or the second direction, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, at this time, in the XZ plane transmission in the three-dimensional on-chip network, the output direction of the encoded data packet can be changed to ensure that the turning path of the three-dimensional on-chip network can be changed, so that the encoded data packet can be determined to be output from the fifth direction or the sixth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address.

[0114] Optionally, if it is determined that the vertical coordinate of the target address is greater than the vertical coordinate of the first address, the encoded data packet is determined to be output from the fifth direction; if it is determined that the vertical coordinate of the target address is less than the vertical coordinate of the first address, the encoded data packet is determined to be output from the sixth direction.

[0115] Step 406: If the source directions are the third direction and the fourth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, determine whether the encoded data packet is output in the first direction or the second direction based on the horizontal coordinate of the target address and the horizontal coordinate of the first address.

[0116] As a method, when it is determined that the source directions of multiple test data packets are the third direction or the fourth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, at this time, in the XY plane transmission in the three-dimensional on-chip network, the output direction of the encoded data packet can be changed to ensure that the turning path of the three-dimensional on-chip network can be changed, so that the encoded data packet can be determined to be output from the first direction or the second direction according to the horizontal coordinate of the target address and the horizontal coordinate of the first address.

[0117] Optionally, if it is determined that the horizontal coordinate of the target address is greater than the horizontal coordinate of the first address, the encoded data packet is determined to be output from the first direction; if it is determined that the horizontal coordinate of the target address is less than the horizontal coordinate of the first address, the encoded data packet is determined to be output from the second direction.

[0118] Step 407: If the source directions are the third direction and the fourth direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, then determine whether the encoded data packet is output in the fifth direction or the sixth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0119] As a method, when it is determined that the source directions of multiple test data packets are the third direction or the fourth direction, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, at this time, in the YZ plane transmission in the three-dimensional on-chip network, the output direction of the encoded data packet can be changed to ensure that the turning path of the three-dimensional on-chip network can be changed, so that the encoded data packet can be determined to be output from the fifth direction or the sixth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0120] Optionally, if it is determined that the vertical coordinate of the target address is greater than the vertical coordinate of the first address, the encoded data packet is determined to be output from the fifth direction; if it is determined that the vertical coordinate of the target address is less than the vertical coordinate of the first address, the encoded data packet is determined to be output from the sixth direction.

[0121] Step 408: If the source directions are the fifth direction and the sixth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then determine whether the encoded data packet is output in the first direction or the second direction according to the horizontal coordinate of the target address and the horizontal coordinate of the first address.

[0122] As a method, when it is determined that the source directions of multiple test data packets are the fifth direction or the sixth direction, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, at this time, in the XZ plane transmission in the three-dimensional on-chip network, the output direction of the encoded data packet can be changed to ensure that the turning path of the three-dimensional on-chip network can be changed, so that the encoded data packet can be determined to be output from the first direction or the second direction according to the horizontal coordinate of the target address and the horizontal coordinate of the first address.

[0123] Optionally, if it is determined that the horizontal coordinate of the target address is greater than the horizontal coordinate of the first address, the encoded data packet is determined to be output from the first direction; if it is determined that the horizontal coordinate of the target address is less than the horizontal coordinate of the first address, the encoded data packet is determined to be output from the second direction.

[0124] Step 409: If the source directions are the fifth direction and the sixth direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, then determine whether the encoded data packet is output to the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0125] As a method, when it is determined that the source directions of multiple test data packets are the fifth direction or the sixth direction, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, at this time, in the YZ plane transmission in the three-dimensional on-chip network, the output direction of the encoded data packet can be changed to ensure that the turning path of the three-dimensional on-chip network can be changed, so that the encoded data packet can be determined to be output from the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0126] Optionally, if it is determined that the vertical coordinate of the target address is greater than the vertical coordinate of the first address, the encoded data packet is determined to be output from the third direction; if it is determined that the vertical coordinate of the target address is less than the vertical coordinate of the first address, the encoded data packet is determined to be output from the fourth direction.

[0127] Step 410: Send the encoded data packet to the target address via the second target routing module of the 3D network on chip based on the transmission path to obtain a reference data packet.

[0128] Step 411: Determine a test result of the 3D network on chip according to the reference data packet and the plurality of test data packets.

[0129] The specific step descriptions of steps 401 to 403 and steps 410 to 411 may refer to steps 110 to 130 and step 150 , and will not be repeated here.

[0130] In this embodiment, the output direction corresponding to the encoded data packet in the first target routing module can be determined based on the source directions corresponding to the multiple test data packets in the first target routing module, and the size relationship between the first address and the coordinate values of the multiple test data packets on different coordinate axes, thereby ensuring that the encoded data packet can be accurately forwarded to the corresponding target address, thereby improving the test accuracy of the three-dimensional on-chip network.

[0131] See also Figure 9 , Figure 9 The test method of the network on chip provided by an embodiment of the present application is shown below. Figure 9 The process shown in FIG. 1 is described in detail. Specifically, the on-chip network testing method may include the following steps:

[0132] Step 510: If a plurality of test data packets are received from different directions in a first target routing module of a three-dimensional network on chip, a target address corresponding to each of the plurality of test data packets and a first address corresponding to the first target routing module that receives the plurality of test data packets from different directions are determined, wherein the plurality of test data packets are in an unencoded state, and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional network on chip.

[0133] Step 520: Determine whether to perform XOR network coding on the multiple test data packets according to the first address and the target address.

[0134] Step 530: If it is determined to perform XOR network coding on the multiple test data packets, perform XOR network coding on the multiple test data packets to obtain coded data packets.

[0135] Step 540: Determine a transmission path for the encoded data packet according to the target address and the first address.

[0136] Step 550: Determine the input direction corresponding to the encoded data packet in the second target routing module.

[0137] As a method, multiple test data packets are encoded in the first target routing module to obtain an encoded data packet, and the encoded data packet is sent to other routing modules, namely the second target routing module, so that the other routing modules forward it. In the routing module that receives the encoded data packet, in order to accurately send the encoded data packet to the target addresses corresponding to the multiple test data packets, it is necessary to determine the input direction of the encoded data packet in the second routing module.

[0138] Optionally, in order to accurately determine the amount, such as direction, of the encoded data packet in the second target routing module, the second target routing module can be used as the origin, thereby determining the input direction of the encoded data packet based on the positional relationship of the first routing module relative to the origin.

[0139] Optionally, the input direction of the encoded data packet may be determined according to the first coordinate of the first target routing module and the coordinate of the second target routing module.

[0140] Step 560: Determine the second address of the second target routing module, and determine the coordinate relationship between the target address and the second address.

[0141] As one approach, a three-dimensional coordinate system can be established in the three-dimensional on-chip network based on a certain edge routing module as the origin and based on the positional relationship between different directions. Since the routing modules are evenly distributed in the three-dimensional on-chip network, positioning can be performed based on the number of routing modules between the routing modules and the coordinate origin to obtain a second address corresponding to the second target routing module.

[0142] Optionally, the coordinate relationship between the target address and the second address may be a size relationship between the abscissa, ordinate and vertical coordinate of the target address and the abscissa, ordinate and vertical coordinate of the second address.

[0143] Step 570: Determine the transmission direction of the encoded data packet according to the input direction and the coordinate relationship, and send the encoded data packet to the target address based on the transmission path and the transmission direction to obtain a reference data packet.

[0144] As a method, after determining the input direction of the encoded data packet and the coordinate relationship between the second address and the target address, the forwarding direction of the encoded data packet can be determined by the input direction and the coordinate relationship, so that the encoded data packet can be accurately forwarded to the corresponding target address, thereby achieving coverage of all paths of the three-dimensional on-chip network and completing the test of the three-dimensional on-chip network.

[0145] Optionally, if the source directions are the first direction and the second direction respectively, and the horizontal coordinate of the target address is not equal to the horizontal coordinate of the first address, then the encoded data packet is determined to be output in the first direction or the second direction based on the horizontal coordinate of the target address and the horizontal coordinate of the first address; if the source directions are the first direction and the second direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, then the encoded data packet is determined to be output in the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address; if the source directions are the first direction and the second direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, then the encoded data packet is determined to be output in the fifth direction or the sixth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0146] Optionally, if the source directions are the third direction and the fourth direction respectively, and the vertical coordinate of the target address is not equal to the vertical coordinate of the first address, then the encoded data packet is determined to be output in the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address; if the source directions are the third direction and the fourth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then the encoded data packet is determined to be output in the first direction or the second direction based on the horizontal coordinate of the target address and the horizontal coordinate of the first address; if the source directions are the third direction and the fourth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then the encoded data packet is determined to be output in the fifth direction or the sixth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0147] Optionally, if the source directions are the fifth direction and the sixth direction respectively, and the vertical coordinate of the target address is not equal to the vertical coordinate of the first address, then the encoded data packet is determined to be output in the fifth direction or the sixth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address; if the source directions are the fifth direction and the sixth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then the encoded data packet is determined to be output in the first direction or the second direction based on the horizontal coordinate of the target address and the horizontal coordinate of the first address; if the source directions are the fifth direction and the sixth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, then the encoded data packet is determined to be output in the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

[0148] Optionally, in order to ensure the accuracy of the test on the 3D network on chip, all paths of the 3D network on chip need to be covered, and since any straight path or turning path of any routing module in the 3D Mesh NoC must be located on one of the XY planes, XZ planes or YZ planes, such as Figure 10As shown. Therefore, if the test method can cover all straight paths and turning paths in the XY plane, XZ plane, and YZ plane, then the test can cover all straight paths and turning paths to be tested in the 3D Mesh NoC. Then, the test for the three-dimensional network on chip can be divided into tests in the XY plane, XZ plane, and YZ plane. In each plane, there are five ways to cover all straight paths and turning paths in the plane. For example, for the XY plane, a third direction-fourth direction multi-step test, a fourth direction-third direction multi-step test, a first direction-second direction single-step test, a second direction-first direction single-step test, and a four-corner routing test can be used.

[0149] For the third direction-fourth direction multi-step test (i.e., NS multi-step test), it consists of the following three sub-tests: Sub-test 1: Divide the routing modules on the XY plane into multiple groups of 3 columns, where the i-th group contains the routing modules in the 3i-2 column, the 3i-1 column, and the 3i column. Figure 11 The figure shows an example of grouping, in which each selected rectangle is a three-column group. All three-column groups are tested in parallel. Subtest 2: Divide the routing modules on the XY plane into multiple three-column groups, where the i-th group contains the routing modules of the 3i-1th column, the 3ith column, and the 3i+1th column. Subtest 3: Divide the routing modules on the XY plane into multiple three-column groups, where the i-th group contains the routing modules of the 3ith column, the 3i+1th column, and the 3i+2th column. If the above grouping rules are followed, there may be some columns that cannot be assigned to any group in some subtests. If a column cannot be assigned to any group in a subtest, the routing module of this column does not have to participate in the subtest. In each of the above subtests, the parallel testing of the three-column groups includes the following m-1 steps, such as Figure 11 As shown, where m is the number of rows in the XY plane.

[0150] Step 1: First, two test packets are injected into the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) and the routing module in the upper right corner (i.e., routing module 3 in the figure), respectively, and transmitted according to the XY-DOR strategy. The destination address of the packet injected into routing module 1 is routing module 6, and the destination address of the packet injected into routing module 3 is routing module 4. As shown by the dotted arrows in the figure, the forwarding path of the two packets is: routing 1 / routing 3 → routing 2 (encoded into a single encoded packet by the XOR network coding logic) → routing 5 → routing 4 and routing 6. Routers 4 and 6 change the destination address of the received packets to routing p and routing r, respectively, and then forward the packets to routing p and routing r, respectively. Secondly, after completing the injection of the above two test packets, two more packets are injected into the routing module in the upper left corner (i.e., routing module 1 in the figure) and the routing module in the upper right corner (i.e., routing module 3 in the figure), respectively, and transmitted according to the XY-DOR strategy. The destination address of the packet injected into routing module 1 is routing module p, and the destination address of the packet injected into routing module 3 is routing module r. As shown by the red arrows in the figure, the two data packets are forwarded to routing modules p and r along the direction N→S.

[0151] Step 2: Inject two test packets into the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) and the routing module in the upper right corner (i.e., routing module 3 in the figure), respectively, and transmit them according to the XY-DOR strategy. The destination address of the packet injected into routing module 1 is routing module 9, and the destination address of the packet injected into routing module 3 is routing module 7. As shown by the dotted arrows in the figure, the forwarding path of the two packets is: routing 1 / routing 3 → routing 2 (encoded into a single encoded packet by the XOR network coding logic) → routing 5 → routing 8 → routing 7 and routing 9. Routers 7 and 9 change the destination address of the received packets to routing p and routing r, respectively, and then forward the packets to routing p and routing r, respectively. The corresponding steps are executed in this way until step m-1: Inject two test packets into the routing module in the upper left corner (i.e., routing module 1 in the figure) and the routing module in the upper right corner (i.e., routing module 3 in the figure), respectively, and transmit them according to the XY-DOR strategy. The destination address of the packet injected into routing module 1 is routing module r, and the destination address of the packet injected into routing module 3 is routing module p. As shown by the dashed arrows in the figure, the forwarding path of the two data packets is: Route 1 / Route 3 → Route 2 (encoded into a single encoded data packet by the XOR network coding logic) → Route 5 → Route 8 → … → Route q → Route p and Route r. All test packets have the same payload flits. The test packets are injected into the 3D on-chip network from the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) or the routing module in the upper right corner (i.e., routing module 3 in the figure) and leave the on-chip network from the routing module in the lower left corner (i.e., routing module p in the figure) or the routing module in the lower right corner (i.e., routing module r in the figure).

[0152] For the fourth direction—the third direction multi-step test (i.e., the SN multi-step test), the corresponding test method is almost identical to the NS multi-step test. However, in the SN multi-step test, data packets are injected into the three-dimensional on-chip network from the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) or the routing module in the upper right corner (i.e., routing module 3 in the figure) and leave the NoC from the routing module in the lower left corner (i.e., routing module p in the figure) or the routing module in the lower right corner (i.e., routing module r in the figure). In the SN multi-step test, the opposite is true: data packets are injected into the three-dimensional on-chip network from the routing module in the lower left corner (i.e., routing module p in the figure) or the routing module in the lower right corner (i.e., routing module r in the figure) of each group and leave the on-chip network from the routing module in the upper left corner (i.e., routing module 1 in the figure) or the routing module in the upper right corner (i.e., routing module 3 in the figure).

[0153] For the first direction-second direction single-step test (i.e., WE single-step test), it consists of the following three sub-tests: Sub-test 1: Divide the routing modules on the XY plane into multiple groups of 3 rows, where the i-th group contains the routing modules in the 3i-2 row, the 3i-1 row, and the 3i row. Figure 12 The shown example is a grouping example, in which the selected rectangle is a three-row group. All three-row groups are tested in parallel. Subtest 2: Divide the routing modules on the XY plane into multiple 3-row groups, where the i-th group contains the routing modules in the 3i-1 row, the 3i row, and the 3i+1 row. Subtest 3: Divide the routing modules on the XY plane into multiple 3-row groups, where the i-th group contains the routing modules in the 3i row, the 3i+1 row, and the 3i+2 row. If the above grouping rules are followed, there may be some columns that cannot be assigned to any group in some subtests. If a column cannot be assigned to any group in a subtest, the routing modules in this row do not have to participate in the subtest. In each of the above subtests, the parallel testing of the three-row groups includes the following steps:

[0154] like Figure 12 As shown, two test packets are injected into the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) and the routing module in the lower left corner (i.e., routing module 3 in the figure), respectively, and transmitted according to the YX-DOR strategy. The destination address of the packet injected into routing module 1 is routing module 6, and the destination address of the packet injected into routing module 3 is routing module 4. As shown by the red arrows in the figure, the forwarding path of the two packets is: routing 1 / routing 3 → routing 2 (encoded into a single encoded packet by the XOR network coding logic) → routing 5 → routing 4 and routing 6. Routers 4 and 6 change the destination address of the received packets to routing x and routing z, respectively, and then forward the packets to routing x and routing z, respectively. After the injection of the above two test packets, two more packets are injected into the routing module in the upper left corner (i.e., routing module 1 in the figure) and the routing module in the lower left corner (i.e., routing module 3 in the figure), respectively, and transmitted according to the XY-DOR strategy. The destination address of the packet injected into routing module 1 is routing module x, and the destination address of the packet injected into routing module 3 is routing module z. As shown by the red arrows in the figure, two data packets are forwarded along the W→E direction to routing modules x and z. In this test, all test packets have the same payload flits. The test packets are injected into the 3D on-chip network from the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) or the routing module in the lower left corner (i.e., routing module 3 in the figure) and leave the on-chip network from the routing module in the upper right corner (i.e., routing module x in the figure) or the routing module in the lower right corner (i.e., routing module z in the figure).

[0155] For the second-direction-first-direction single-step test (i.e., EW single-step test), the corresponding test method is almost identical to the NS multi-step test. However, in the WE single-step test, data packets are injected into the NoC from the routing module in the upper left corner of each group (i.e., routing module 1 in the figure) or the routing module in the lower left corner (i.e., routing module 3 in the figure) and leave the NoC from the routing module in the upper right corner (i.e., routing module x in the figure) or the routing module in the lower right corner (i.e., routing module z in the figure). In the EW single-step test, the opposite is true: data packets are injected into the 3D NoC from the routing module in the upper right corner (i.e., routing module x in the figure) or the routing module in the lower right corner (i.e., routing module z in the figure) of each group and leave the NoC from the routing module in the upper left corner (i.e., routing module 1 in the figure) or the routing module in the lower left corner (i.e., routing module 3 in the figure) of each group.

[0156] For the four-corner routing test, the turning paths in the four routing modules located at the upper left corner, upper right corner, lower left corner and lower right corner of each plane are tested, including the following steps: Figure 13 As shown in Figure 2, the test data packets are injected into Route 1, Route 4, Route 7, and Route 10, respectively, and leave the on-chip network from Route 3, Route 6, Route 9, and Route 12 along the paths "Route 1 → Route 2 → Route 3", "Route 4 → Route 5 → Route 6", "Route 7 → Route 8 → Route 9", and "Route 10 → Route 11 → Route 12". Step 2: As shown in Figure 2 Figure 13 As shown, the test packets are injected into route 3, route 6, route 9 and route 12 respectively, and leave the on-chip network from route 1, route 4, route 7 and route 10 along the paths "route 3 → route 2 → route 1", "route 6 → route 5 → route 4", "route 9 → route 8 → route 7" and "route 12 → route 11 → route 10" respectively.

[0157] Similarly, for the YX plane, NS multi-step test, SN multi-step test, UD single-step test, DU single-step test, and four-corner routing test can be designed. For the XZ plane, UD multi-step test, DU multi-step test, WE single-step test, EW single-step test, and four-corner routing test can be designed. The test steps in the YZ and XZ planes can be specifically referred to the test methods and steps in the XY plane, and will not be repeated here.

[0158] Optionally, when testing in all planes of a three-dimensional on-chip network, the following order can be followed: XY plane test 1 (NS multi-step test) → YZ plane test 1 (NS multi-step test) → wait for all data packets to leave the on-chip network → XY plane test 2 (SN multi-step test) → YZ plane test 2 (SN multi-step test) → wait for all data packets to leave the on-chip network → XY plane test 3 (WE single-step test) → XZ plane test 3 (WE single-step test) → wait for all data packets to leave the on-chip network → XY plane test 4 (EW single-step test) → XZ plane test 4 (EW single-step test) ) → Wait for all data packets to leave the on-chip network → XZ plane test 1 (UD multi-step test) → YZ plane test 3 (UD single-step test) → Wait for all data packets to leave the on-chip network → XZ plane test 2 (DU multi-step test) → YZ plane test 4 (DU single-step test) → Wait for all data packets to leave the NoC → XY plane test 5 (four-corner routing test) → Wait for all data packets to leave the on-chip network → XZ plane test 5 (four-corner routing test) → Wait for all data packets to leave the on-chip network → YZ plane test 5 (four-corner routing test) → Wait for all data packets to leave the on-chip network → Test completed.

[0159] Step 580: Determine a test result of the 3D network on chip according to the reference data packet and the plurality of test data packets.

[0160] The specific step descriptions of steps 510 to 540 and step 580 can refer to steps 110 to 130 and step 150, which will not be repeated here.

[0161] In this embodiment, the functional test of the three-dimensional on-chip network is decomposed into functional tests of three types of planes: XY, XZ and YZ. In addition, in the test of each type of plane, the specific forwarding direction and path of the encoded data packet are determined to improve the forwarding efficiency of the test data packet, thereby reducing the test time.

[0162] See also Figure 14 , Figure 14 The test method of the network on chip provided by an embodiment of the present application is shown below. Figure 14 The process shown in FIG. 1 is described in detail. Specifically, the on-chip network testing method may include the following steps:

[0163] Step 610: If a plurality of test data packets are received from different directions in a first target routing module of a three-dimensional network on chip, a target address corresponding to each of the plurality of test data packets and a first address corresponding to the first target routing module that receives the plurality of test data packets from different directions are determined, wherein the plurality of test data packets are in an unencoded state, and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional network on chip.

[0164] Step 620: Determine whether to perform XOR network coding on the multiple test data packets according to the first address and the target address.

[0165] Step 630: If it is determined to perform XOR network coding on the multiple test data packets, perform XOR network coding on the multiple test data packets to obtain coded data packets.

[0166] Step 640: Determine a transmission path for the encoded data packet according to the target address and the first address, and send the encoded data packet to the target address via a second target routing module of the 3D network on chip based on the transmission path to obtain a reference data packet.

[0167] The specific descriptions of steps 610 to 640 may refer to steps 110 to 140 and will not be repeated here.

[0168] Step 650: Determine whether the data in the reference data packet is identical to the data corresponding to each of the plurality of test data packets.

[0169] As a method to determine whether a 3D NoC is functioning properly, a test data packet can be transmitted within the 3D NoC. The resulting data packet is then compared with the input test data packet to determine whether data loss, data errors, or data transmission failures occurred during transmission within the 3D NoC. Therefore, after obtaining a reference data packet, the reference data packet is compared with multiple test data packets originally input to the 3D NoC to determine whether the corresponding data is identical.

[0170] In other embodiments, since the first target routing module may not perform XOR network coding on multiple test data packets, the reference data packet may also be a data packet in an uncoded state.

[0171] Step 660: If they are the same, determine that the 3D network on chip has passed the functional test.

[0172] As a method, when it is determined that the data in the reference data packet is identical to the data corresponding to each of the multiple test data packets, it can be determined that no failure occurred during the transmission of the test data packet, thereby confirming that the 3D network on chip passed the functional test.

[0173] Step 670: If different, determine that the 3D network on chip has failed the functional test.

[0174] As a method, when it is determined that the data in the reference data packet is different from the data corresponding to each of the multiple test data packets, it can be determined that the test data packet may have failed during transmission, causing its data to change, thereby determining whether the three-dimensional on-chip network has passed the functional test.

[0175] In this embodiment, after the 3D network-on-chip forwards multiple test data packets to corresponding target addresses to obtain a reference data packet, in order to determine whether the 3D network-on-chip passes the functional test, the reference data packet can be directly compared with the multiple test data packets to determine the test results, thereby ensuring the test accuracy of the 3D network-on-chip.

[0176] Figure 15 FIG. 1 is a block diagram of a test device for a network on chip according to an embodiment of the present application. Figure 15 As shown, the network on chip testing device 700 includes: a first determination module 710 , a judgment module 720 , an encoding module 730 , a transmission module 740 and a second determination module 750 .

[0177] A first determination module 710 is configured to, if a first target routing module of a 3D network-on-chip receives multiple test data packets from different directions, determine the target addresses corresponding to the multiple test data packets and the first address corresponding to the first target routing module that received the multiple test data packets from different directions, wherein the multiple test data packets are in an uncoded state and the first address is the coordinate address of the first target routing module in the three-dimensional coordinate system corresponding to the 3D network-on-chip; a judgment module 720 is configured to determine whether to perform XOR network coding on the multiple test data packets based on the first address and the target address; an encoding module 730 is configured to, if it is determined that XOR network coding is to be performed on the multiple test data packets, perform XOR network coding on the multiple test data packets to obtain a coded data packet; a transmission module 740 is configured to determine a transmission path for the coded data packet based on the target address and the first address, and send the coded data packet to the target address via the second target routing module of the 3D network-on-chip based on the transmission path to obtain a reference data packet; and a second determination module 750 is configured to determine a test result of the 3D network-on-chip based on the reference data packet and the multiple test data packets.

[0178] In some embodiments, the judgment module 720 includes: a source direction determination submodule, used to determine the source direction corresponding to each of the multiple test data packets; a first judgment submodule, used to determine whether the multiple test data packets meet the preset conditions based on the source direction, the first address and the target address; a first determination submodule, used to determine whether the multiple test data packets meet the preset conditions if it is determined that the preset conditions are met; and a second determination submodule, used to determine not to perform XOR network coding on the multiple test data packets if it is determined that the preset conditions are not met.

[0179] In some embodiments, the judgment submodule includes: a first determination unit, used to determine a first product of the horizontal coordinate difference between the first address and the target address, a second product of the vertical coordinate difference between the first address and the target address, and a third product of the vertical coordinate difference between the first address and the target address; a judgment unit, used to determine whether the multiple test data packets meet a preset condition based on the source direction, the first product, the second product and the third product.

[0180] In some embodiments, the judgment unit includes: a third determining subunit, for determining that the preset condition is met if the source directions are the first direction and the second direction respectively, and the first product is less than or equal to a threshold, the second product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, wherein the first direction and the second direction are opposite directions to each other; a fourth determining subunit, for determining that the preset condition is met if the source directions are the first direction and the second direction respectively, and the first product is less than or equal to a threshold, the third product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal; a fifth determining subunit, for determining that the preset condition is met if the source directions are the third direction and the fourth direction respectively, and the first product is greater than the threshold, the second product is less than or equal to the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, wherein the third direction and the fourth direction are opposite directions to each other, and the third direction and the fourth direction are respectively opposite to the first direction and the fourth direction. the second direction is perpendicular to the second direction; or a sixth determining subunit is configured to determine that the preset condition is satisfied if the source directions are the third direction and the fourth direction respectively, and the second product is less than or equal to the threshold, the third product is greater than the threshold, and the horizontal coordinates corresponding to the first address and the target address are equal; or a seventh determining subunit is configured to determine that the preset condition is satisfied if the source directions are the fifth direction and the sixth direction respectively, and the third product is less than or equal to the threshold, the first product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, wherein the fifth direction and the sixth direction are opposite directions, and the fifth direction and the sixth direction are perpendicular to the first direction, the second direction, the third direction, and the fourth direction respectively; or an eighth determining subunit is configured to determine that the preset condition is satisfied if the source directions are the fifth direction and the sixth direction respectively, and the third product is less than or equal to the threshold, the second product is greater than the threshold, and the horizontal coordinates corresponding to the first address and the target address are equal.

[0181] In some embodiments, the transmission module 740 includes: a first output direction determination submodule, which is used to determine whether the encoded data packet is output in the third direction or the fourth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address if the source directions are the first direction and the second direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address; a second output direction determination submodule, which is used to determine whether the encoded data packet is output in the fifth direction or the sixth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address if the source directions are the first direction and the second direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address; a third output direction determination submodule, which is used to determine whether the encoded data packet is output in the first direction according to the horizontal coordinate of the target address and the horizontal coordinate of the first address if the source directions are the third direction and the fourth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address or output in the second direction; a fourth output direction determining submodule, for determining, if the source directions are the third direction and the fourth direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, that the encoded data packet is output in the fifth direction or the sixth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address; a fifth output direction determining submodule, for determining, if the source directions are the fifth direction and the sixth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, that the encoded data packet is output in the first direction or the second direction according to the horizontal coordinate of the target address and the horizontal coordinate of the first address; a sixth output direction determining submodule, for determining, if the source directions are the fifth direction and the sixth direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, that the encoded data packet is output in the third direction or the fourth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address.

[0182] In some embodiments, the transmission module 740 also includes: an input direction determination submodule, used to determine the input direction corresponding to the encoded data packet in the second target routing module; a coordinate relationship determination submodule, used to determine the second address of the second target routing module, and determine the coordinate relationship between the target address and the second address; a transmission submodule, used to determine the transmission direction of the encoded data packet according to the input direction and the coordinate relationship, and send the encoded data packet to the target address based on the transmission path and the transmission direction.

[0183] In some embodiments, the second determination module includes: a second judgment submodule, used to determine whether the data in the reference data packet is identical to the data corresponding to each of the multiple test data packets; a third determination submodule, used to determine that the three-dimensional on-chip network has passed the functional test if they are identical; and a fourth determination submodule, used to determine that the three-dimensional on-chip network has failed the functional test if they are different.

[0184] According to one aspect of the embodiments of the present application, an electronic device is also provided, such as Figure 16 As shown, the electronic device 700 includes a processor 710 and one or more memories 720. The one or more memories 720 are used to store program instructions executed by the processor 710. When the processor 710 executes the program instructions, the above-mentioned on-chip network testing method is implemented.

[0185] Furthermore, the processor 710 may include one or more processing cores. The processor 710 runs or executes instructions, programs, code sets or instruction sets stored in the memory 720, and calls data stored in the memory 720. Optionally, the processor 710 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 710 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to handle wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor and may be implemented separately through a communication chip.

[0186] According to one aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device. The computer-readable storage medium carries computer-readable instructions. When the computer-readable storage instructions are executed by a processor, the method of any of the above embodiments is implemented.

[0187] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0188] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0189] The above examples are used to illustrate the present invention, which are only used to help understand the present invention and are not intended to limit the present invention. Those skilled in the art can make several simple deductions, modifications or substitutions based on the concept of the present invention.

Claims

1. A method for testing a network on chip, characterized in that: The method comprises: If a first target routing module of the three-dimensional network-on-chip receives multiple test data packets from different directions, determining a target address corresponding to each of the multiple test data packets and a first address corresponding to the first target routing module that received the multiple test data packets from different directions, wherein the multiple test data packets are in an unencoded state, and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional network-on-chip; determining whether to perform XOR network coding on the multiple test data packets according to the first address and the target address; If it is determined to perform XOR network coding on the multiple test data packets, performing XOR network coding on the multiple test data packets to obtain coded data packets; determining a transmission path for the encoded data packet according to the target address and the first address, and sending the encoded data packet to the target address via a second target routing module of the 3D network on chip based on the transmission path to obtain a reference data packet; A test result of the three-dimensional network on chip is determined according to the reference data packet and the plurality of test data packets.

2. The method according to claim 1, characterized in that The determining whether to perform XOR network coding on the multiple test data packets according to the first address and the target address includes: Determining source directions corresponding to each of the plurality of test data packets; Determining whether the plurality of test data packets meet preset conditions respectively according to the source direction, the first address and the target address; If it is determined that the preset condition is met, determining to perform XOR network coding on the multiple test data packets; If it is determined that the preset condition is not met, it is determined not to perform XOR network coding on the multiple test data packets.

3. The method according to claim 2, characterized in that The determining whether the plurality of test data packets meet preset conditions according to the source direction, the first address, and the destination address respectively includes: determining a first product of a difference between the abscissa of the first address and the target address, a second product of a difference between the ordinate of the first address and the target address, and a third product of a difference between the ordinate of the first address and the target address; It is determined whether the plurality of test data packets meet a preset condition according to the source direction, the first product, the second product, and the third product.

4. The method according to claim 3, characterized in that The determining whether the plurality of test data packets meet a preset condition according to the source direction, the first product, the second product, and the third product includes: If the source directions are a first direction and a second direction respectively, and the first product is less than or equal to a threshold, the second product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is met, wherein the first direction and the second direction are opposite directions; If the source directions are the first direction and the second direction respectively, and the first product is less than or equal to the threshold, the third product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is met; If the source directions are the third direction and the fourth direction respectively, and the first product is greater than the threshold, the second product is less than or equal to the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is satisfied, wherein the third direction and the fourth direction are opposite directions to each other, and the third direction and the fourth direction are perpendicular to the first direction and the second direction respectively; or If the source directions are the third direction and the fourth direction respectively, and the second product is less than or equal to the threshold, the third product is greater than the threshold, and the horizontal coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is met; or If the source directions are the fifth direction and the sixth direction, respectively, and the third product is less than or equal to the threshold, the first product is greater than the threshold, and the vertical coordinates corresponding to the first address and the target address are equal, then it is determined that the preset condition is satisfied, wherein the fifth direction and the sixth direction are opposite directions to each other, and the fifth direction and the sixth direction are perpendicular to the first direction, the second direction, the third direction, and the fourth direction, respectively; or If the source directions are the fifth direction and the sixth direction respectively, and the third product is less than or equal to the threshold, the second product is greater than the threshold, and the horizontal coordinates corresponding to the first address and the target address are equal, it is determined that the preset condition is met.

5. The method according to claim 4, characterized in that Determining a transmission path of the encoded data packet according to the target address and the first address includes: If the source directions are the first direction and the second direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, determining whether the encoded data packet is output in the third direction or the fourth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address; If the source directions are the first direction and the second direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, determining whether the encoded data packet is output in the fifth direction or the sixth direction according to the vertical coordinate of the target address and the vertical coordinate of the first address; If the source directions are the third direction and the fourth direction respectively, and the vertical coordinate of the target address is equal to the vertical coordinate of the first address, determining whether the encoded data packet is output in the first direction or the second direction according to the horizontal coordinate of the target address and the horizontal coordinate of the first address; If the source directions are the third direction and the fourth direction respectively, and the horizontal coordinate of the destination address is equal to the horizontal coordinate of the first address, determining whether the encoded data packet is output in the fifth direction or the sixth direction according to the vertical coordinate of the destination address and the vertical coordinate of the first address; If the source directions are the fifth direction and the sixth direction respectively, and the vertical coordinate of the destination address is equal to the vertical coordinate of the first address, determining whether the encoded data packet is output in the first direction or the second direction according to the horizontal coordinate of the destination address and the horizontal coordinate of the first address; If the source directions are the fifth direction and the sixth direction respectively, and the horizontal coordinate of the target address is equal to the horizontal coordinate of the first address, then the encoded data packet is determined to be output in the third direction or the fourth direction based on the vertical coordinate of the target address and the vertical coordinate of the first address.

6. The method according to claim 4, characterized in that The step of sending the encoded data packet to the target address via the second target routing module of the three-dimensional network on chip based on the transmission path includes: Determining an input direction corresponding to the encoded data packet in the second target routing module; Determining a second address of the second target routing module, and determining a coordinate relationship between the target address and the second address; The transmission direction of the encoded data packet is determined according to the input direction and the coordinate relationship, and the encoded data packet is sent to the target address based on the transmission path and the transmission direction.

7. The method according to any one of claims 1 to 6, characterized in that Determining a test result of the three-dimensional network on chip according to the reference data packet and the plurality of test data packets includes: Determining whether the data in the reference data packet is identical to the data corresponding to each of the plurality of test data packets; If they are the same, determining that the three-dimensional network on chip passes the functional test; If different, it is determined that the three-dimensional network on chip fails the functional test.

8. A test device for a network on chip, characterized in that: The device comprises: a first determining module configured to, if a first target routing module of a three-dimensional network-on-chip receives a plurality of test data packets from different directions, determine a target address corresponding to each of the plurality of test data packets and a first address corresponding to the first target routing module that receives the plurality of test data packets from different directions, wherein the plurality of test data packets are in an unencoded state and the first address is a coordinate address of the first target routing module in a three-dimensional coordinate system corresponding to the three-dimensional network-on-chip; a judgment module, configured to determine whether to perform XOR network coding on the plurality of test data packets according to the first address and the target address; an encoding module, configured to, if it is determined that the multiple test data packets are to be XOR-network-coded, perform XOR-network-coding on the multiple test data packets to obtain encoded data packets; a transmission module, configured to determine a transmission path of the encoded data packet according to the target address and the first address, and send the encoded data packet to the target address via a second target routing module of the 3D network on chip based on the transmission path to obtain a reference data packet; The second determining module is configured to determine a test result of the three-dimensional network on chip according to the reference data packet and the plurality of test data packets.

9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 7.