On-chip network simulation models, shortest path planning methods, devices, and multi-core chips

By establishing a connection characteristic table and determining the path with the minimum total path length, the problem of high complexity in multi-core chip simulation models in existing technologies is solved, achieving efficient path planning and performance evaluation, and improving the efficiency and reliability of chip design.

CN115204085BActive Publication Date: 2026-11-17STREAM COMPUTING INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110401435.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-14
Publication Date
2026-11-17
Estimated Expiration
2041-04-14

AI Technical Summary

Technical Problem

Existing on-chip network simulation models suffer from high simulation complexity, high resource consumption, and inability to accurately evaluate performance in multi-core chip designs, resulting in low routing planning efficiency.

Method used

A connection characteristic table is established to record the path information between any two ports. By searching and comparing, the path with the shortest total path length is determined as the data transmission path, which simplifies the path planning process and avoids deadlock problems.

Benefits of technology

It achieves simple and flexible optimal path planning, reduces simulation computation and hardware requirements, improves chip program compilation efficiency, saves resources and improves path reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115204085B_ABST
    Figure CN115204085B_ABST
Patent Text Reader

Abstract

This disclosure provides an on-chip network simulation model and a shortest path planning method, apparatus, and multi-core chip. The on-chip network includes multiple ports. The method includes: establishing a connection characteristic table for each port, where the connection characteristic table records path information between any two ports; based on the connection characteristic table, finding all possible transmission paths from the data transmission start port to the data transmission end port; and determining the path with the minimum total path length from all possible transmission paths as the transmission path from the data transmission start port to the data transmission end port. This disclosure can determine the optimal routing scheme extremely quickly, minimizing data transmission latency, saving routing planning and simulation resources, avoiding deadlock problems during data transmission, improving path reliability, and efficiently applying it to chip design and program compilation, guiding chip design and performance optimization, thereby saving costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of program compilation technology, specifically relating to an on-chip network simulation model and a shortest path planning method, device, and multi-core chip. Background Technology

[0002] Before designing multi-core chips for neural network computing, simulation models of each component module are typically built for functional verification and performance evaluation. Once the chip is manufactured and put into application, the efficiency of the neural network computing program needs to be evaluated in real-time during each compilation process to optimize the generated program. This necessitates the development of an accurate and efficient neural network chip simulator.

[0003] Generally, in multi-core chips, communication between cores and between a core and other modules is conducted through a Network on Chip (NoC). This involves establishing a NoC simulation model, and then selecting and optimizing data transmission paths—that is, routing methods—based on this model. Different NoC simulation models employ different routing methods, with significantly varying effectiveness.

[0004] The typical NoC simulation model and corresponding routing method are as follows:

[0005] I. Precise NoC Model for Software Analog Circuits:

[0006] This model prioritizes accuracy, representing the NoC circuit through software simulation to accurately evaluate its performance, including precise data delay. During path selection, a static routing table is created based on the actual circuit operation and its operating state to complete the path selection. However, this method results in complex software design, long simulation times, and high requirements for the machine running the simulation program.

[0007] II. A crude NoC model expressing functional modules:

[0008] This model prioritizes efficiency, treating the NoC as a functional module with certain behavioral characteristics. The simulation results only express the behavior of each interface of the NoC, thus enabling fast simulation and low requirements for the machine running the simulation program. However, because the simulation model is too coarse, it cannot represent the actual characteristics of the NoC, cannot obtain accurate timing information, and cannot simulate the congestion conditions of the NoC, so it is almost impossible to perform path selection and optimization.

[0009] In summary, for precise software-simulated circuit NoC models, the simulation program is complex, slow, resource-intensive, and costly when performing routing planning simulations. For NoC models with coarse functional module representations, path selection and optimization are almost impossible, making it impossible to accurately evaluate chip performance and optimize the program. Summary of the Invention

[0010] This disclosure aims to address at least one of the problems existing in the prior art by providing an on-chip network simulation model and a shortest path planning method, apparatus, and multi-core chip.

[0011] One aspect of this disclosure provides a shortest path planning method for an on-chip network simulation model, wherein the on-chip network includes multiple ports, the method comprising:

[0012] Establish a connection characteristic table for each port, wherein the connection characteristic table records the path information between any two ports;

[0013] Based on the connection characteristic table, find all possible transmission paths from the data transmission start port to the data transmission end port; and,

[0014] The path with the shortest total path length among all possible transmission paths is determined as the transmission path from the data transmission start port to the data transmission end port.

[0015] In some implementations, the establishment of a connection characteristic table for each of the ports, wherein the connection characteristic table records path information between any two of the ports, includes:

[0016] If there is a physical direct path between any two ports, the path information between any two ports is the number of clock cycles required for data to be transmitted along the physical direct path, and the number of clock cycles is used as the length of the physical direct path between the two ports.

[0017] If there is no physical direct connection path between any two ports, then the path information between any two ports is a preset value.

[0018] In some implementations, finding all possible transmission paths from the data transmission start port to the data transmission end port based on the connection characteristic table includes:

[0019] A data transmission path table is established, which includes ports arranged sequentially along a first direction;

[0020] Based on the connection characteristic table, the relay ports at each level between the data transmission start port and the data transmission end port are identified to determine all possible transmission paths from the data transmission start port to the data transmission end port.

[0021] Along the second direction of the data transmission path table, all possible transmission paths are recorded, each corresponding to a different port; and

[0022] Determine the path length of all possible transmission paths.

[0023] In some implementations, finding the relay ports at each level between the data transmission start port and the data transmission end port according to the connection characteristic table includes:

[0024] Based on the path information between the current port and other ports in the connection characteristic table, find all ports that have a physical direct connection path to the current port and use them as relay ports for the current port.

[0025] In some implementations, determining the path with the minimum total path length from all possible transmission paths includes:

[0026] The total path length of each possible transmission path is obtained by summing the lengths of all sub-paths in each path.

[0027] Compare the total path lengths of each possible transmission path and select the path with the smallest total path length as the transmission path.

[0028] Another aspect of this disclosure provides a path planning device for an on-chip network simulation model, the on-chip network including multiple ports, the device comprising:

[0029] The first establishment module is used to establish a connection characteristic table for each of the ports, wherein the connection characteristic table records the path information between any two of the ports.

[0030] The lookup module is used to find all possible transmission paths from the data transmission start port to the data transmission end port according to the connection characteristic table;

[0031] The comparison module is used to determine the path with the smallest total path length from all possible transmission paths as the transmission path from the data transmission start port to the data transmission end port.

[0032] In some implementations, the first establishment module is used to establish a connection characteristic table for each of the ports, the connection characteristic table recording path information between any two of the ports, including:

[0033] The first establishment module is specifically used for:

[0034] If there is a physical direct path between any two ports, the path information between any two ports is the number of clock cycles required for data to be transmitted along the physical direct path, and the number of clock cycles is used as the length of the physical direct path between the two ports.

[0035] If there is no physical direct connection path between any two ports, then the path information between any two ports is a preset value.

[0036] In some embodiments, the apparatus further includes a second establishment module, the second establishment module being used for:

[0037] A data transmission path table is established, which includes ports arranged sequentially along a first direction;

[0038] The search module is also used for:

[0039] Based on the connection characteristic table, the relay ports at each level between the data transmission start port and the data transmission end port are identified to determine all possible transmission paths from the data transmission start port to the data transmission end port.

[0040] Along the second direction of the data transmission path table, all possible transmission paths are recorded, each corresponding to a different port; and

[0041] Determine the path length of all possible transmission paths.

[0042] In some implementations, the lookup module is further configured to locate, based on the connection characteristic table, all relay ports between the data transmission start port and the data transmission end port, including:

[0043] The search module is specifically used for:

[0044] Based on the path information between the current port and other ports in the connection characteristic table, find all ports that have a physical direct connection path to the current port and use them as relay ports for the current port.

[0045] In some implementations, the comparison module is configured to determine the possible path with the minimum total path length from all possible transmission paths, including:

[0046] The comparison module is specifically used for:

[0047] The total path length of each possible transmission path is obtained by summing the lengths of all sub-paths in each path.

[0048] Compare the total path lengths of each possible transmission path and select the path with the smallest total path length as the transmission path.

[0049] Another aspect of this disclosure provides an on-chip network simulation model, said on-chip network simulation model employing the method described above; or,

[0050] The on-chip network simulation model includes the device described above.

[0051] Another aspect of this disclosure provides a multi-core chip including at least one set of computing cores, the chip being configured to perform the methods described above; or,

[0052] The chip includes the device described above.

[0053] Another aspect of this disclosure provides an electronic device comprising:

[0054] One or more processors;

[0055] A storage unit for storing one or more programs that, when executed by one or more processors, enable the one or more processors to implement the method described above.

[0056] Another aspect of this disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, enables the implementation of the method described above.

[0057] This disclosure discloses a method and apparatus for shortest path planning in an on-chip network simulation model, along with a multi-core chip. Based on an established connectivity characteristic table, it can easily and flexibly plan the optimal path. The algorithm is simple to implement, requires minimal simulation computation, reduces the hardware requirements for running simulation programs, and significantly saves resources for routing planning and simulation. It also avoids deadlocks during data transmission, improves path reliability, enhances the efficiency of chip program compilation, and improves the efficiency of automatic program compilation by neural network compilers. In chip design, it can also quickly evaluate chip performance based on adjustments to the NoC (No Core), providing timely feedback to guide chip design and performance optimization, thereby saving costs. Attached Figure Description

[0058] Figure 1 This is a schematic block diagram illustrating the composition of an electronic device according to an embodiment of the present disclosure;

[0059] Figure 2 A flowchart of a shortest path planning method for an on-chip network simulation model according to another embodiment of this disclosure;

[0060] Figure 3 This is a schematic diagram of a NoC simulation model according to another embodiment of the present disclosure;

[0061] Figure 4 This is a schematic diagram of a NoC simulation model according to another embodiment of the present disclosure;

[0062] Figures 5 to 9 This is a schematic diagram illustrating the update process of the forward data transmission path table according to another embodiment of this disclosure;

[0063] Figure 10 This is a schematic diagram of a path planning device for an on-chip network simulation model according to another embodiment of the present disclosure. Detailed Implementation

[0064] To enable those skilled in the art to better understand the technical solutions of this disclosure, the disclosure will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] First, refer to Figure 1 This describes an example electronic device for implementing the apparatus and methods of the embodiments of this disclosure.

[0066] like Figure 1 As shown, the electronic device 200 includes one or more processors 210, one or more storage devices 220, one or more input devices 230, one or more output devices 240, etc., and these components are interconnected via a bus system 250 and / or other forms of connection mechanisms. It should be noted that... Figure 1 The components and structures of the electronic devices shown are merely exemplary and not limiting; other components and structures may be used as needed.

[0067] The processor 210 can be a neural network processor composed of chips with a multi-core architecture, or a single central processing unit (CPU), or a central processing unit plus a multi-core neural network processor array, or other forms of processing unit with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device 200 to perform the desired functions.

[0068] Storage device 220 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, which a processor may execute to implement the client functions (implemented by the processor) in the embodiments of this disclosure described below, and / or other desired functions. Various applications and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the applications.

[0069] The input device 230 may be a device used by a user to input commands, and may include one or more of a keyboard, mouse, microphone, and touch screen.

[0070] The output device 240 can output various information (such as images or sounds) to the outside (e.g., a user) and may include one or more of a display, a speaker, etc.

[0071] Below, we will refer to Figure 2 A shortest path planning method for an on-chip network simulation model according to an embodiment of the present disclosure is described.

[0072] For example, such as Figure 2 As shown, a shortest path planning method S100 for an on-chip network simulation model is provided, wherein the on-chip network includes multiple ports, and method S100 includes:

[0073] S110. Establish a connection characteristic table for each of the ports, wherein the connection characteristic table records the path information between any two ports.

[0074] Specifically, they can be combined together Figure 3 In this step, the on-chip network can include N ports, namely P1 to P2. N Each port can simultaneously perform input and output, or a port can sometimes be unidirectional, meaning it can only perform input or output. This embodiment does not limit this. The on-chip network includes N ports P1 to P2. N At the same time, a connection characteristic table is created to represent the connection characteristics of each port, as shown in Table 1:

[0075] Table 1

[0076]

[0077] As shown in Table 1, the connection characteristics table records any port P X To another port P Y Path information L XY For example, L 12 This represents the path information from port P1 to port P2, L 21 This represents the path information from port P2 to port P1, L 1N This indicates the distance from port P1 to port P. N Path information, L N1 Indicates from port P N Path information to port P1, etc.

[0078] It should be noted that in the connection characteristic table, the path information from any port to other ports can be arranged by row or by column. Those skilled in the art can choose according to actual needs, and this embodiment does not limit this.

[0079] S120. Based on the connection characteristic table, find all possible transmission paths from the data transmission start port to the data transmission end port.

[0080] Specifically, in this step, when the data transmission start port is P X The data transmission termination port is P. Y At that time, according to the connection characteristic table, find the port P. X to port P Y All possible transmission paths. For example, when port P X For port P1, port P Y When port P3 is selected, according to the connection characteristic table, all possible transmission paths from port P1 to port P3 can be: P1→P3, P1→P2→P3.

[0081] S130. Determine the path with the shortest total path length from all possible transmission paths as the transmission path from the data transmission start port to the data transmission end port.

[0082] Specifically, in this step, when the data transmission start port is P X The data transmission termination port is P. Y At that time, from port P X to port P Y Determine the path with the minimum total path length from all possible transmission paths, and use it as port P. X to port P Y The transmission path is defined by the minimum total path length, which indicates the shortest routing time for data transmission. For example, when port P... X For port P1, port P YFor port P3, all possible transmission paths from port P1 to port P3 are: P1→P3, P1→P2→P3. The path with the shortest total path length is determined from the paths P1→P3 and P1→P2→P3, and this path is taken as the transmission path from port P1 to port P3.

[0083] The shortest path planning method for the on-chip network simulation model in this embodiment can easily and flexibly plan the optimal path based on the established connection characteristic table. The algorithm is simple to implement, requires little simulation computation, reduces the hardware requirements for running the simulation program, and greatly saves resources for routing planning and simulation. It can also avoid problems such as deadlock during data transmission, improve path reliability, improve the efficiency of chip program compilation, and improve the efficiency of automatic program compilation by the neural network compiler. In chip design, it can also quickly evaluate chip performance based on the designer's adjustments to NoC, provide timely feedback, guide chip design and performance optimization, thereby saving costs.

[0084] For example, the connection characteristic table for establishing the connection characteristics of each port, wherein the connection characteristic table records path information between any two ports, includes:

[0085] If a physical direct path exists between any two ports, the path information between them is the number of clock cycles required for data transmission along that physical direct path, and this number of clock cycles serves as the length of the physical direct path between the two ports. If no physical direct path exists between any two ports, the path information between them is a preset value.

[0086] Specifically, for any port P X To another port P Y Path information L XY If from port P X to port P Y If a physical direct connection exists, then the corresponding path information L XY The number of clock cycles required for data to travel along this physical direct path, i.e., the number of clock cycles from port P. X Direct transmission to port P Y The required number of clock cycles, i.e., latency, is used as the number of clock cycles from port P. X to port P Y The physical direct path length, and also indicates the distance from port P. X to port P Y Direct communication is possible. If from port P... X to port P Y If there is no physical direct connection path, then the corresponding path information L XY This is the default value, indicating that it is from port P. X to port PY Direct communication is not possible; communication must be conducted across other ports. This preset value can be 0 or other values, such as A, B, C, etc. Those skilled in the art can set it according to actual needs, and this embodiment does not limit this.

[0087] The shortest path planning method of the on-chip network simulation model in this embodiment sets the corresponding path information in the connection characteristic table according to whether there is a physical direct connection path between any two ports. This allows the physical direct connection path status and physical direct connection path length between any two ports to be obtained intuitively through the connection characteristic table, which facilitates subsequent path planning.

[0088] For example, finding all possible transmission paths from the data transmission start port to the data transmission end port according to the connection characteristic table includes:

[0089] A data transmission path table is established, which includes ports arranged sequentially along a first direction.

[0090] Specifically, the data transmission path table lists all ports included in the on-chip network sequentially along a first direction. This first direction can be a row, meaning the ports can be arranged sequentially in the same row, or a column, meaning the ports can be arranged sequentially in the same column. Those skilled in the art can choose according to actual needs, and this embodiment is not limited in this regard.

[0091] Based on the connection characteristic table, the relay ports at each level between the data transmission start port and the data transmission end port are found to determine all possible transmission paths from the data transmission start port to the data transmission end port.

[0092] Specifically, the data transmission start port is first designated as the first-level relay port, which is also the current port. Then, according to the connection characteristic table, the next-level relay ports of the current port are found, that is, the various second-level relay ports corresponding to the first-level relay ports. Each of the second-level relay ports is designated as the current port. The next-level relay ports of the current port are then found, that is, the various third-level relay ports corresponding to the various second-level relay ports. Each of the third-level relay ports is designated as the current port, and so on, until the data transmission termination port becomes the next-level relay port of the current port. At this point, all possible transmission paths from the data transmission start port to the data transmission termination port have been found.

[0093] It should be noted that, since this embodiment is a shortest path planning method for an on-chip network simulation model, in order to avoid infinite loops in data transmission and simulation, when searching for relay ports at each level between the data transmission start port and the data transmission end port, the search can be performed only along the data transmission direction, so that all possible transmission paths are unidirectional acyclic paths.

[0094] Along the second direction of the data transmission path table, record all possible transmission paths, each corresponding to a different port, and determine the path length of each possible transmission path.

[0095] Specifically, in the data transmission path table, if the first direction is rows (i.e., ports are arranged sequentially in the same row), several rows can be pre-set along the second direction, each corresponding to a different port. Each row records a possible transmission path, and all possible transmission paths are arranged by row. The position corresponding to each port in each row records the transmission path length between that port and its upstream relay port within the corresponding possible transmission path. Similarly, if the first direction is columns (i.e., ports are arranged sequentially in the same column), several columns can be pre-set along the second direction, each corresponding to a different port. Each column records a possible transmission path, and all possible transmission paths are arranged by column. The position corresponding to each port in each column records the transmission path length between that port and its upstream relay port within the corresponding possible transmission path. Based on the connection characteristic table, the transmission path lengths between each port and its upstream relay port in each possible transmission path are determined, thus determining the path length of all possible transmission paths.

[0096] The shortest path planning method of the on-chip network simulation model in this embodiment searches for relay ports at each level according to the connection characteristic table to determine all possible transmission paths from the data transmission start port to the data transmission end port, thereby avoiding deadlock and other problems during data transmission and improving the reliability of the planned path.

[0097] For example, finding the relay ports at each level between the data transmission start port and the data transmission end port according to the connection characteristic table includes:

[0098] Based on the path information between the current port and other ports in the connection characteristic table, find all ports that have a physical direct connection path to the current port and use them as relay ports for the current port.

[0099] Specifically, in the connection characteristics table, based on the path information between the current port and other ports, all ports whose corresponding path information is not a preset value are found. These ports are those with a physical direct connection path to the current port and are used as relay ports for the current port.

[0100] For example, in the data transmission path table, the port order can be either positive or negative. Specifically, as shown in Table 2, when data transmission is from port P1 to port P... N In other words, when the data transmission direction is forward, the ports in the data transmission path table can be arranged in forward order, that is, from port P1 to port P2. N The data transmission path table is arranged in the order shown in Table 2, which is the forward data transmission path table. N When the data transmission direction is negative, the ports in the data transmission path table can be arranged in negative order, that is, from port P1. N The data transmission path table is arranged in the order of port P1, and at this time it is the negative data transmission path table.

[0101] Table 2

[0102]

[0103] It should be noted that the total path length of each possible transmission path can also be recorded in the forward or negative data transmission path table. As shown in Table 2, when the ports are arranged by row, a "Sum" column can be added after the column containing the last port to record the total path length of each possible transmission path. Alternatively, when the ports are arranged by column, a "Sum" row can be added after the row containing the last port to record the total path length of each possible transmission path.

[0104] When initializing the forward or negative data transmission path table, the ports can be arranged sequentially along the first direction, and then several rows or columns can be set along the second direction to record all possible transmission paths. All possible transmission paths correspond to different ports. Several rows or columns indicate that no preset transmission path exists. Correspondingly, all values ​​in the Sum column or Sum row are also 0.

[0105] For example, as shown in Table 1, in the connection characteristics table, the row where each port is located is set to row 0, and the column where each port is located is set to column 0. Then, for any port P X Its row is row X, and its column is column X. When any port P X To another port PY When there is a physical direct connection path between them, the corresponding path information L XY is the port P X to port P Y physical direct connection path length, that is, the path information L XY is a non-zero number. When there is no physical direct connection path between any port P X and another port P Y , the corresponding path information L XY is the preset value 0. The data transmission start port is set as the path start port P X0 , and the data transmission end port is set as the path end port P Y0 . The variable X is initialized to the start port number X0, and Y is initialized to the end port number Y0. If Y>X, it indicates that the data is transmitted along the direction from port P1 to port P N , that is, the forward transmission direction, and all possible transmission paths found later can be stored in the forward data transmission path table; if Y<X, it indicates that the data is transmitted along the direction from port P N to port P1, that is, the reverse transmission direction, and all possible transmission paths found later can be stored in the reverse data transmission path table.

[0106] If Y>X, the port with the port number X can first be used as the first-level relay port and also as the current port. In the connection characteristic table, if the path information from any port to other ports is arranged in rows, all ports corresponding to non-zero numbers in the X-th row are found; if the path information from any port to other ports is arranged in columns, all ports corresponding to non-zero numbers in the X-th column are found. Each port with a port number greater than X is respectively used as a second-level relay port, and the non-zero number corresponding to each second-level relay port is respectively stored in the corresponding position of each second-level relay port in the corresponding transmission path in the forward data transmission path table, as the sub-path length between each second-level relay port and its previous-level relay port; then, taking each second-level relay port as the new current port in turn, using the same method to continue searching for the path end port P Y0 at all levels of relay ports, until all relay ports have been searched, all possible transmission paths are formed, and all sub-path lengths are stored in the forward data transmission path table, then all possible transmission path searches are completed.

[0107] If Y<X, the port with the port number X may be first used as the first-stage relay port and also as the current port. In the connection characteristic table, if the path information from any port to other ports is arranged in rows, the ports corresponding to all non-zero numbers in the X-th row are searched; if the path information from any port to other ports is arranged in columns, the ports corresponding to all non-zero numbers in the X-th column are searched. Each port with a port number smaller than X is respectively used as a second-stage relay port, and the non-zero number corresponding to each second-stage relay port is respectively stored in the corresponding position of each second-stage relay port in the corresponding transmission path in the negative-direction data transmission path table, as the sub-path length between each second-stage relay port and its upper-level relay port; then, taking each second-stage relay port as the new current port in turn, the same method is used to continue searching for the path termination port P Y0 relay ports at all levels; until all relay ports are searched, all possible transmission paths are formed, and all sub-path lengths are stored in the negative-direction data transmission path table, the search for all possible transmission paths is completed.

[0108] Exemplarily, the determining the path with the minimum total path length from all the possible transmission paths includes:

[0109] accumulating all sub-path lengths in each of all the possible transmission paths to obtain the total path length of each of the possible transmission paths;

[0110] comparing the total path lengths of the respective possible transmission paths, and taking the path with the minimum total path length as the transmission path.

[0111] Specifically, all sub-paths in each possible transmission path and their corresponding sub-path lengths are respectively determined, all sub-path lengths in each possible transmission path are respectively accumulated, so as to obtain the total path length of each possible transmission path, and then the total path lengths of the respective possible transmission paths are compared, and the path with the minimum total path length is taken as the final path.

[0112] Exemplarily, as shown in Table 2, each row containing non-zero numbers is searched from the positive-direction data transmission path table or the negative-direction data transmission path table, each row corresponds to a possible transmission path, and each non-zero number is the corresponding sub-path length. All non-zero numbers in each row are accumulated to obtain the Sum value corresponding to each row, that is, all sub-path lengths in each possible transmission path are accumulated, and the accumulation result is stored in the corresponding position in the Sum column, so that the total path length of each possible transmission path can be obtained. The values of all non-zero numbers in the Sum column are compared, and the path corresponding to the minimum non-zero number is selected, which is the path with the minimum total path length among all possible transmission paths, and is taken as the final path.

[0113] The shortest path planning method of the on-chip network simulation model in this embodiment calculates the total path length of each possible transmission path from the data transmission start port to the data transmission end port, compares the total path lengths of each possible transmission path, and determines the path with the minimum total path length. This minimizes the routing time for data transmission from the data transmission start port to the data transmission end port, thereby saving resources for routing planning and simulation, achieving route selection at the fastest speed, and thus being applied efficiently in chip design and program compilation.

[0114] To illustrate the above process in detail, a specific example is provided below.

[0115] Take a NoC simulation model with 6 ports as an example.

[0116] like Figure 4 As shown, NoC includes 6 input / output ports, namely ports P1 to P6, and the connection relationship between each port is as follows: Figure 4 As shown in the diagram, the arrowed lines between any two ports indicate a direct physical connection path between them along the direction of the arrow. For example, there are two direct physical connections between ports P1 and P2: one is a direct physical connection path from port P1 to port P2, and the other is a direct physical connection path from port P2 to port P1.

[0117] In a given direction, there is either no direct physical path between any two ports, or at most one. However, there may be multiple indirect physical paths. In other words, there may be multiple physical paths between any two ports that pass through other ports. For example, the physical path from port P1 to port P3 can be a direct physical path from port P1 to port P3, or it can be an indirect physical path from port P1 to port P3 via port P2.

[0118] Taking the shortest path planning from port P1 to port P6 as an example, the specific planning process is as follows:

[0119] Establish a data transmission start port P1 to data transmission end port P6 as follows Figure 4 The connection characteristics of the NoC simulation model are shown in Table 3:

[0120] Table 3

[0121]

[0122] In Table 3, 0 indicates that there is no direct physical path from the port in that row to the port in that column. A non-zero number indicates that there is a direct physical path from the port in that row to the port in that column. The number of clock cycles required for data transmission from the port in that row to the port in that column is this non-zero number, which is also the length of the corresponding direct physical path. The position of 0 can also be represented in gray to indicate that the direct physical path between the port in that row and the port in that column is unavailable during path selection.

[0123] Because data is transmitted from port P1 to port P6 in the forward direction, the port order corresponds to the forward direction when establishing the data transmission path table. This means establishing a forward data transmission path table and setting a Sum column to record all possible transmission paths from the data transmission start port P1 to the data transmission end port P6 and their corresponding total path length. The initialization of the forward data transmission path table is shown in Table 4.

[0124] Table 4

[0125] Positive Direction Table

[0126]

[0127] During initialization, each port is arranged in rows, and several rows of 0 are set under each port's row to record all possible transmission paths. For example, 20 rows of 0 or 30 rows of 0 can be set.

[0128] Using the data transmission starting port P1 as the current port, locate the row containing port P1 in the connection characteristic table. Find all non-zero numbers (2 and 3) in that row, corresponding to ports P2 and P3. Use ports P2 and P3 as relay ports for port P1, thus obtaining two sub-paths: P1→P2 and P1→P3, with lengths of 2 and 3 clock cycles respectively. In the forward data transmission path table, as shown... Figure 5 As shown, fill in 2 and 3 in the positions corresponding to port P2 and port P3 in different rows to represent two different possible transmission paths.

[0129] Using port P2 as the current port, according to the connection characteristic table, find the relay ports of port P2, namely ports P3 and P5, resulting in two sub-paths P2→P3 and P2→P5, with corresponding sub-path lengths of 2 clock cycles and 4 clock cycles respectively. Since the newly added sub-path P2→P5 increases the number of possible transmission paths to 3, therefore, as... Figure 6As shown, fill in 4 into the position of the other row corresponding to port P5 in the forward data transmission path table, and fill in 2 into the position corresponding to P2 in that row to complete the sub-path in the possible transmission path.

[0130] Using port P3 as the current port, and according to the connection characteristic table, find the relay port P4 of port P3, thus obtaining a sub-path P3→P4, with a sub-path length of 2 clock cycles. For example... Figure 7 As shown, update the forward data transmission path table. Since both sub-paths previously passed through port P3, when updating the path, it is necessary to update both possible transmission paths.

[0131] Using port P4 as the current port, and according to the connection characteristic table, find the relay port P5 of port P4, thus obtaining a sub-path P4→P5, with a sub-path length of 2 clock cycles. For example... Figure 8 As shown, update the forward data transmission path table. Since both sub-paths previously passed through port P4, when updating the path, it is necessary to update both possible transmission paths.

[0132] Using port P5 as the current port, and according to the connection characteristic table, find the relay port P6 of port P5, thus obtaining a sub-path P5→P6, with a sub-path length of 2 clock cycles. For example... Figure 9 As shown, update the forward data transmission path table. Since the previous three sub-paths all passed through port P5, when updating the path, it is necessary to update the corresponding three possible transmission paths.

[0133] Since the sub-path P5→P6 in each possible transmission path has reached the data transmission termination port P6, that is, the data transmission termination port P6 has become the next-level relay port of the current port P5. At this point, all possible transmission paths from the data transmission start port P1 to the data transmission termination port P6 have been found, so the termination path search is complete.

[0134] In the forward data transmission path table, all non-zero numbers in each row are summed, and the sum is filled into the corresponding position in the Sum column, as shown in Table 5, to obtain the total path length of each possible transmission path. The total path lengths of each possible transmission path are compared, and the path with the smallest total path length, P1→P2→P5→P6, is selected. Its length is 8 clock cycles, and this path is used as the transmission path from the data transmission start port P1 to the data transmission end port P6.

[0135] Table 5

[0136] Positive Direction Table

[0137]

[0138] Another aspect of this disclosure, such as Figure 10 As shown, a path planning device 100 for an on-chip network simulation model is provided. This device 100 can be applied to the methods described above. Specific details not mentioned in the following description can be found in the relevant preceding descriptions and will not be repeated here. The on-chip network includes multiple ports, and the device 100 includes:

[0139] The first establishment module 110 is used to establish a connection characteristic table for each of the ports, wherein the connection characteristic table records the path information between any two of the ports.

[0140] The lookup module 120 is used to find all possible transmission paths from the data transmission start port to the data transmission end port according to the connection characteristic table.

[0141] The comparison module 130 is used to determine the path with the smallest total path length from all possible transmission paths as the transmission path from the data transmission start port to the data transmission end port.

[0142] The path planning device of the on-chip network simulation model in this embodiment can easily and flexibly plan the optimal path based on the established connection characteristic table. The algorithm is simple to implement, has a small amount of simulation computation, reduces the hardware requirements for running the simulation program, and greatly saves resources for routing planning and simulation. It can also avoid problems such as deadlock in data transmission, improve the reliability of the path, improve the efficiency of chip program compilation, and improve the efficiency of automatic program compilation by the neural network compiler. In chip design, it can also quickly evaluate the chip performance based on the designer's adjustment of NoC, provide timely feedback, guide chip design and performance optimization, thereby saving costs.

[0143] For example, the first establishment module 110 is used to establish a connection characteristic table for each of the ports, the connection characteristic table recording path information between any two of the ports, including:

[0144] The first module 110 is specifically used for:

[0145] If there is a physical direct path between any two ports, the path information between any two ports is the number of clock cycles required for data to be transmitted along the physical direct path, and the number of clock cycles is used as the length of the physical direct path between the two ports.

[0146] If there is no physical direct connection path between any two ports, then the path information between any two ports is a preset value.

[0147] For example, the device 100 further includes a second establishment module 140, which is used to:

[0148] A data transmission path table is established, which includes ports arranged sequentially along a first direction;

[0149] The lookup module 120 is also used for:

[0150] Based on the connection characteristic table, the relay ports at each level between the data transmission start port and the data transmission end port are identified to determine all possible transmission paths from the data transmission start port to the data transmission end port.

[0151] Along the second direction of the data transmission path table, all possible transmission paths are recorded, each corresponding to a different port; and

[0152] Determine the path length of all possible transmission paths.

[0153] For example, the lookup module 120 is further configured to, based on the connection characteristic table, find the relay ports at each level between the data transmission start port and the data transmission end port, including:

[0154] The lookup module 120 is specifically used for:

[0155] Based on the path information between the current port and other ports in the connection characteristic table, find all ports that have a physical direct connection path to the current port and use them as relay ports for the current port.

[0156] For example, the second establishment module 140 is used to establish a data transmission path table, including:

[0157] In the data transmission path table, the port order is either positive or negative.

[0158] For example, the comparison module 130 is used to determine the possible path with the minimum total path length from all possible transmission paths, including:

[0159] Comparison module 130 is specifically used for:

[0160] The total path length of each possible transmission path is obtained by summing the lengths of all sub-paths in each path.

[0161] Compare the total path lengths of each possible transmission path and select the path with the smallest total path length as the transmission path.

[0162] Another aspect of this disclosure provides an on-chip network simulation model, said on-chip network simulation model employing the method described above; or,

[0163] The on-chip network simulation model includes the device described above.

[0164] Another aspect of this disclosure provides a multi-core chip including at least one set of computing cores, the chip being configured to perform the methods described above; or,

[0165] The chip includes the device described above.

[0166] Another aspect of this disclosure provides an electronic device comprising:

[0167] One or more processors;

[0168] A storage unit for storing one or more programs that, when executed by one or more processors, enable the one or more processors to implement the method described above.

[0169] Another aspect of this disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, enables the implementation of the method described above.

[0170] The computer-readable storage medium may be included in the apparatus or device disclosed herein, or it may exist independently.

[0171] The computer-readable storage medium can be any tangible medium that contains or stores a program, and can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples include, but are not limited to, connections having one or more wires, portable computer disks, hard disks, optical fibers, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0172] The computer-readable storage medium may also include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code, specific examples of which include, but are not limited to, electromagnetic signals, optical signals, or any suitable combination thereof.

[0173] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.

Claims

1. A shortest path planning method for an on-chip network simulation model, wherein the on-chip network includes multiple ports, characterized in that, The method includes: Establish a connection characteristic table for each port, wherein the connection characteristic table records the path information between any two ports; Based on the connection characteristic table, find all possible transmission paths from the data transmission start port to the data transmission end port; and, The path with the shortest total path length is determined from all possible transmission paths and used as the transmission path from the data transmission start port to the data transmission end port. The connection characteristic table for establishing the connection characteristics of each port is described above. The connection characteristic table records path information between any two ports, including: If there is a physical direct path between any two ports, the path information between any two ports is the number of clock cycles required for data to be transmitted along the physical direct path, and the number of clock cycles is used as the length of the physical direct path between the two ports. If there is no physical direct connection path between any two ports, then the path information between any two ports is a preset value; Determining the path with the minimum total path length from all possible transmission paths includes: The total path length of each possible transmission path is obtained by summing the lengths of all sub-paths in each path; the sub-path length is the physical direct connection length between two ports that have a physical direct connection. Compare the total path lengths of all possible transmission paths and select the path with the shortest total path length as the transmission path; the shortest total path length indicates the shortest routing time for data transmission. The step of finding all possible transmission paths from the data transmission start port to the data transmission end port based on the connection characteristic table includes: A data transmission path table is established, which includes ports arranged sequentially along a first direction; Based on the connection characteristic table, the relay ports at each level between the data transmission start port and the data transmission end port are identified to determine all possible transmission paths from the data transmission start port to the data transmission end port. Along the second direction of the data transmission path table, all possible transmission paths are recorded, each corresponding to a different port; and, Determine the path length of all possible transmission paths; When locating relay ports at each level between the data transmission start port and the data transmission end port, the search is only performed along the data transmission direction to ensure that all possible transmission paths are unidirectional and loop-free.

2. The method according to claim 1, characterized in that, The step of finding the relay ports at each level between the data transmission start port and the data transmission end port according to the connection characteristic table includes: Based on the path information between the current port and other ports in the connection characteristic table, find all ports that have a physical direct connection path to the current port and use them as relay ports for the current port.

3. A path planning device for an on-chip network simulation model, wherein the on-chip network includes multiple ports, characterized in that, The device includes: The first establishment module is used to establish a connection characteristic table for each of the ports, wherein the connection characteristic table records the path information between any two of the ports. The lookup module is used to find all possible transmission paths from the data transmission start port to the data transmission end port according to the connection characteristic table; The comparison module is used to determine the path with the shortest total path length from all possible transmission paths as the transmission path from the data transmission start port to the data transmission end port; The connection characteristic table for establishing the connection characteristics of each port is described above. The connection characteristic table records path information between any two ports, including: If there is a physical direct path between any two ports, the path information between any two ports is the number of clock cycles required for data to be transmitted along the physical direct path, and the number of clock cycles is used as the length of the physical direct path between the two ports. If there is no physical direct connection path between any two ports, then the path information between any two ports is a preset value; Determining the path with the minimum total path length from all possible transmission paths includes: The total path length of each possible transmission path is obtained by summing the lengths of all sub-paths in each path; the sub-path length is the physical direct connection length between two ports that have a physical direct connection. Compare the total path lengths of all possible transmission paths and select the path with the shortest total path length as the transmission path; the shortest total path length indicates the shortest routing time for data transmission. The step of finding all possible transmission paths from the data transmission start port to the data transmission end port based on the connection characteristic table includes: A data transmission path table is established, which includes ports arranged sequentially along a first direction; Based on the connection characteristic table, the relay ports at each level between the data transmission start port and the data transmission end port are identified to determine all possible transmission paths from the data transmission start port to the data transmission end port. Along the second direction of the data transmission path table, all possible transmission paths are recorded, each corresponding to a different port; and, Determine the path length of all possible transmission paths; When locating relay ports at each level between the data transmission start port and the data transmission end port, the search is only performed along the data transmission direction to ensure that all possible transmission paths are unidirectional and loop-free.

4. An on-chip network simulation model, characterized in that, The on-chip network simulation model adopts the method described in claim 1 or 2; or, The on-chip network simulation model includes the device described in claim 3.

5. A multi-core chip, comprising at least one computing core group, characterized in that, The chip is used to perform the method according to claim 1 or 2; or, The chip includes the device as described in claim 3.

6. An electronic device, characterized in that, include: One or more processors; A storage unit for storing one or more programs that, when executed by one or more processors, enable the one or more processors to implement the method according to claim 1 or 2.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it can implement the method according to claim 1 or 2.

Citation Information

Patent Citations

  • Fault-tolerant on-chip network system with global communication service management capability and method

    CN103973482A

  • Network-on-chip congestion control method based on dynamic routing table

    CN104202253A