WO2022184008A1 - Many-core route mapping method and apparatus, device and medium - Google Patents

Many-core route mapping method and apparatus, device and medium Download PDF

Info

Publication number
WO2022184008A1
WO2022184008A1 PCT/CN2022/078236 CN2022078236W WO2022184008A1 WO 2022184008 A1 WO2022184008 A1 WO 2022184008A1 CN 2022078236 W CN2022078236 W CN 2022078236W WO 2022184008 A1 WO2022184008 A1 WO 2022184008A1
Authority
WO
WIPO (PCT)
Prior art keywords
routing
planned
path
target
time slice
Prior art date
Application number
PCT/CN2022/078236
Other languages
French (fr)
Chinese (zh)
Inventor
王封
祝夭龙
Original Assignee
北京灵汐科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京灵汐科技有限公司 filed Critical 北京灵汐科技有限公司
Publication of WO2022184008A1 publication Critical patent/WO2022184008A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17306Intercommunication techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • G06F15/7825Globally asynchronous, locally synchronous, e.g. network on chip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks

Definitions

  • the embodiments of the present application relate to the technical field of many-core chips, and in particular, to a many-core route mapping method, apparatus, device, and medium.
  • NOC Network On Chip
  • Embodiments of the present application provide a many-core route mapping method, apparatus, device, and medium, so as to improve the utilization rate of routing resources during many-core route mapping.
  • an embodiment of the present application provides a many-core route mapping method, including:
  • an embodiment of the present application provides a many-core route mapping device, including:
  • a transmission clock determination module used for determining the target transmission clock of the data to be routed between the core nodes in the many-core system
  • a time slice determination module configured to determine at least one target time slice to which the target transmission clock belongs from a plurality of time slices
  • the routing path planning module is configured to determine the routing path of the to-be-planned routing data in each of the target time slices according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
  • embodiments of the present application provide an electronic device, including one or more processors; and a storage device, on which one or more programs are stored, when the one or more programs are stored by the one or more programs
  • the processor executes, so that the one or more processors implement the many-core route mapping method according to any one of claims 1 to 9; one or more I/O interfaces are connected between the processors and the Between the memories, it is configured to realize the information interaction between the processor and the memory.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the many-core route mapping method described in any embodiment of the present application.
  • embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in an electronic device
  • the processor in the electronic device executes the route mapping method for implementing the many cores described in any embodiment of the present application.
  • At least one target time slice corresponding to the to-be-planned routing data is determined, and then according to the target time slice corresponding to each target time slice
  • the corresponding currently planned routing resource determines the routing path of the routing data to be planned in each target time slice, so as to perform route mapping.
  • routing paths are planned according to time slices, which can avoid the phenomenon that some paths are blocked and some routes are idle due to different routing times, so as to make full use of routing resources and improve the utilization rate of on-chip network routing resources. , which is beneficial to improve routing efficiency.
  • FIG. 1 is a schematic diagram of a network-on-chip in an embodiment of the present application.
  • FIG. 2 is a flowchart of a route mapping method for many cores in an embodiment of the present application
  • FIG. 3 is a schematic diagram of time slice division and routing path planning in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a many-core route mapping apparatus in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device in an embodiment of the present application.
  • the routing volume is the data volume transmitted by the routing; in the routing planning process, the routing path is usually planned based on the principle that the routing volume of a single path is the smallest on the premise of the shortest path.
  • the routing path In an on-chip network, there are usually multiple paths between a source core node and a target core node. The shortest path between the two refers to the path with the fewest core node hops, and a single path refers to two adjacent core nodes.
  • the shortest path with the smallest routing amount of a single path can be selected as the planned path from the source core node to the target core node.
  • the routing volume between each two core nodes is almost the same. However, once the routing path is determined, in the actual data transmission process, some paths may be blocked and some routes may be idle due to different routing times, resulting in insufficient utilization of routing resources of the on-chip network and low routing efficiency.
  • the planned path from the source core node A to the target core node D is (A-B-C-D each letter represents a core node on the many-core chip), and the source core node S to the target core node D
  • the planned path is S-A-H-G-D
  • the planned path from the source core node A to the target core node E is A-H-I-F-E.
  • the route of the path A-B-C-D has completed all data transmission within the first 100 clocks (clk), it will be idle in the following clocks , while the route S-A-H-G-D and the route A-H-I-F-E transmit data between the 200th clock and the 300th clock, the two routes will be blocked between the paths A-H, while the paths A-B-C-D are still idle, and the routing resources are obvious. underutilized.
  • the planned path from the source core node S to the target core node D is S-A-B-C-D, the utilization rate of routing resources can be significantly improved, and path congestion can be avoided.
  • Embodiments of the present disclosure provide a many-core route mapping method, by determining a target transmission clock of to-be-planned routing data between core nodes in a many-core system; from multiple time slices, determining at least one of the target transmission clocks to which the target transmission clock belongs Target time slice: According to the current planning routing resources corresponding to each target time slice, determine the routing path of the to-be-planned routing data within each target time slice for route mapping, which can significantly improve the utilization of routing resources, thereby improving the Communication efficiency of many-core systems.
  • FIG. 2 is a flowchart of a many-core route mapping method provided by an embodiment of the present application.
  • the embodiment of the present application can be applied to the situation of performing routing path planning on a network-on-chip of a many-core chip. It is implemented by the route mapping device of the core, which can be implemented in software and/or hardware, and can generally be integrated in electronic equipment.
  • the route mapping method of the many-core includes:
  • the routing data to be planned refers to the data on the many-core chip that is transmitted from the source core node to the target core node and needs to be planned for the on-chip network routing path.
  • the core node refers to a node device corresponding to one core in the many-core chip, and the source core node and the target core node are the starting and ending core nodes of the routing data to be planned.
  • the target transmission clock of the routing data to be planned refers to the clock range occupied by the routing data to be planned for transmission on the on-chip network.
  • it may be the transmission start and end clock, and may also be the transmission start clock and the transmission clock duration.
  • the transmission clock duration may be determined according to the quotient of the data volume of the routing data to be planned and the routing bandwidth.
  • the clock (clk) of some routing data to be planned starts to be transmitted (starting clock) at the 20th clock, 20 clocks (transmission clock duration) need to be transmitted.
  • the Mth clock may be simply referred to as the clock M, where M is an integer greater than or equal to 1.
  • the 20th clock may be referred to as clock 20 for short
  • the 40th clock may be referred to as clock 40 for short.
  • the time slice is obtained by dividing the clock, and each time slice includes at least one clock.
  • the method before step S110, further includes: S11, counting target transmission clocks with different routing data to be planned, and obtaining all clocks with different routing data to be planned; S12, dividing time slices according to all the clocks to obtain Multiple time slices and clocks included in each time slice.
  • the multiple time slices may be time slices obtained by dividing all clocks evenly.
  • the number of time slices is related to the number of clocks included in each time slice. The smaller the number of clocks included in each time slice, the greater the time slice. the greater the number.
  • the number of clocks included in different time slices is not exactly the same.
  • the number of clocks included in any two time slices may be the same or different.
  • the target transmission clock may be compared with the clocks included in each time slice, so as to determine each time slice to which the target transmission clock belongs, The time slice is called the target time slice.
  • the target transmission clock is clock 20 to clock 40
  • the clocks included in the first time slice are clock 0 to clock 10
  • the clocks included in the second time slice are clock 11 to clock 30
  • the clocks included in the third time slice are clocks are clocks 31 to 40
  • the target time slices to which the target transmission clock belongs are the second time slice and the third time slice.
  • S130 Determine a routing path of the routing data to be planned within each target time slice according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
  • the routing path of the routing data to be planned when the routing data to be planned is only transmitted in part of the clock, the routing path of the routing data to be planned only needs to be determined in the corresponding target time slice, and the route of the routing data to be planned does not need to be determined in the remaining time slices The path will not occupy the routing resources in the rest of the time slice.
  • the routing paths of the routing data to be planned are separately planned.
  • the routing paths planned in each target time slice are integrated, that is, the finally determined routing path of the routing data to be planned.
  • the routing paths of the routing data to be planned in different target time slices are not exactly the same.
  • the routing paths of the routing data to be planned in any two target time slices may be the same or different.
  • the routing path of the routing data to be planned from source core node A to target core node D in the second time slice is A-B-C-D
  • the routing data to be planned from source core node A to target core node D in the third time slice is A-H-G-D.
  • the routing path of the routing data to be planned in each target time slice is specifically determined with reference to the currently planned routing resources in the target time slice.
  • the currently planned routing resource refers to the status of routing planning at the current moment, and specifically refers to the planned routing paths and their routing quantities.
  • a routing path can be selected based on the principle of the minimum total amount of routing data for a single path, wherein a single path is adjacent path between two cores.
  • the routing path of the to-be-planned routing data within the target time slice which may be specifically:
  • the total amount of currently planned routing data refers to the total amount of planned routing data at the current moment. For example, a routing data with a data volume of 10 has been planned on a single path between core node A and core node H. If the number of routing data is 15, the total amount of currently planned routing data of a single path between the core node A and the core node H is 25.
  • the target path selection strategy may be any strategy for path selection of the route to be planned on the on-chip network, which aims to improve the utilization rate of routing resources and avoid path congestion, which is not specifically limited in this embodiment of the present application.
  • the target path selection strategy may be based on the minimum number of node hops between the source core node and the target core node, and preferentially select the path with the smallest total amount of routing data for a single path.
  • the general direction of the routing path can be determined first according to the principle of the minimum number of hops between the source core node and the target core node, and then the overall direction of the routing data can be determined according to a single path.
  • the final routing path of the to-be-planned routing data within the target time slice is determined according to the principle of the least amount.
  • each single path of the to-be-planned routing data from the source core node to the target core node in the on-chip network can be sequentially determined according to the above target path selection strategy, and these single paths are integrated as the to-be-planned routing data at the target time On-chip routing paths.
  • the number of core node hops from core node A to core node D via core node H is the same as the number of core node hops from core node A to core node D via core node B. If the number of node hops is equal and least, then the routing path from core node A to core node D via core node H can be selected, or the routing path from core node A to core node D via core node B can be selected; When selecting a single path between core node A and core node H, or selecting a single path between core node A and core node B, the single path with the smallest total amount of routing data is preferentially selected.
  • a single path between core node A and core node B is selected, that is, the routing path between the source core node A and the target core node D is planned to be the core node A through the core node B to the core node.
  • the routing path of node D is selected, that is, the routing path between the source core node A and the target core node D is planned to be the core node A through the core node B to the core node. The routing path of node D.
  • the routing path of the to-be-planned routing data in the target time slice is determined, which may specifically include the following: step:
  • the next core node corresponding to the current core node is determined according to the single horizontal path or the single vertical path.
  • the first current core node is the source core node of the routing data to be planned
  • a single horizontal path and a single vertical path corresponding to the current core node are determined.
  • a single path in the horizontal direction refers to a single horizontal path to the left or a single path to the right horizontally determined according to the principle of the minimum number of hops between the source core node and the target core node;
  • the vertical upward single path or the vertical downward single path determined by the principle of least hops between the core node and the target core node.
  • the above process is repeated until the next core node corresponding to the current core node is determined as the target core node of the routing data to be planned, and the planning of the routing path of the routing data to be planned within the target time slice is completed. .
  • the source core node of the data to be planned is core node A
  • the target core node is core node D
  • the routing data volume is 20, and the currently planned routing data of each single path in the target time slice
  • the total amount is: the total current planned routing data of a single path between core node S and core node A is 10, and the current planned routing data total of a single path between core node A and core node H is 10.
  • the current total planned routing data of a single path between H and core node G is 10, and the current planned routing data of a single path between core node G and core node D is 10.
  • the total current planning routing data of a single path between core node A and core node B is 0, and the current planning routing data total of a single path between core node B and core node C is 0, and core node C to core node.
  • the current total planned routing data of a single path between D is 0.
  • the vertical single path corresponding to the core node A is a single path between the core node A and the core node B.
  • the total amount of current planned routing data of a single path in the horizontal direction corresponding to core node A is 10
  • the total amount of current planned routing data of a single path in the vertical direction corresponding to core node A is 0, it is determined that the total amount of planned routing data of a single path in the vertical direction corresponding to core node A is 0.
  • the total amount of current planning routing data of the corresponding single path in the horizontal direction and the single path in the vertical direction is not equal, so the single vertical path corresponding to the core node A is used as the planned single path, and the core node is determined according to the single path.
  • the current core node is updated from core node A to core node B.
  • the routing path of the routing data to be planned within the target time slice is core node A-core node B-core node C-core node D.
  • the target path selection strategy may further include: if based on the minimum number of node hops between the source core node and the target core node, preferentially select the path with the smallest total amount of routing data for a single path to meet the preset requirements If the overload condition is exceeded, you can comprehensively consider the number of node hops and the total amount of current planned routing data to re-determine the alternative routing paths for the routing data to be planned, and evaluate the alternative routing paths to select the evaluation result among the alternative routing paths.
  • the optimal routing path is used as the final routing path of the routing data to be planned.
  • the overload condition may be, for example, that the total amount of path routing data is greater than the set quantity threshold, or the ratio of the total amount of path routing data to the to-be-planned routing data reaches a set target value, which is not specifically limited in this embodiment of the present application.
  • evaluating the alternative routing path may be to score the alternative routing path according to the respective proportions of the number of node hops and the total amount of currently planned routing data, and obtain a routing path with an optimal evaluation result according to the scoring result;
  • the alternative routing paths are evaluated, and the alternative routing paths may also be scored according to a preset evaluation function, and a routing path with an optimal evaluation result is obtained according to the scoring result. How to evaluate the alternative routing paths may be determined according to actual applications, which is not specifically limited in this embodiment of the present application.
  • the source core node of the data to be planned is core node A
  • the target core node is core node D
  • the path with the least number of node hops between the source core node and the target core node is the path A-B-C-D and paths A-H-G-D
  • one of the two paths is determined according to the principle that the total amount of routing data on a single path satisfies the preset overload condition, if the total amount of routing data on the path is greater than the set number threshold, it is necessary to comprehensively consider node hops Re-determine the alternative routing path of the to-be-planned routing data based on the total number of routing data and the current total planned routing data.
  • the path with a smaller total routing data per path can be selected as the alternative routing path. For example, if the total amount of routing data for a single path is zero, assuming that the selected alternative routing paths are path A-S-J-K-C-D and path A-H-I-F-E-D, these two paths can be evaluated, and the best evaluated path is used as the route data to be planned. Final routing path.
  • the routing paths of the data to be planned in each target time slice need to be sequentially determined as the data transmission paths.
  • the other routing paths of the to-be-planned data are continued to be planned, until the planning of all the to-be-planned routing data routing paths is completed.
  • the total amount of routing between each two core nodes in each time slice is similar.
  • the corresponding data packets can be transmitted according to the determined routing path.
  • the route mapping method of the embodiment of the present application may further include: adjusting a plurality of time slices according to the current routing information, and updating the time slices included in each time slice. Clock to get updated multiple time slices.
  • the smaller the time slice the greater the number of time slices, and the finer the routing path planning, and the higher the route utilization rate.
  • the number of time slices is directly related to the number of routing table entries, and the number of routing paths in each time slice is directly related to the number of routing entries in the routing table. Therefore, the storage space occupied by the routing instructions and the size of the time slice can be balanced by adjusting the time slice.
  • adjusting multiple time slices according to the current routing information may include: determining the total target number of time slices according to the size of the routing table and/or the number of routing entries, and dividing the time obtained by dividing according to the total target quantity slices are split or merged.
  • the total target number of time slices can be determined, and according to the difference between the current number of time slices and the total number of targets, the divided time slices are processed. Split or merge.
  • the time slice of routing data whose data volume is less than the data volume threshold may be regarded as a time slot with a small task volume
  • the time slot of routing data whose data volume is greater than or equal to the data volume threshold may be regarded as a time slot with a large task volume
  • the adjustment of the time slice obtained by division may include: if the routing paths planned in adjacent time slices are consistent, combining the adjacent time slices into one time slice.
  • these adjacent multiple time slices can be combined into one time slice to reduce routing table entries, optimize the number of routes, and reduce the number of routes. The effect of the size of the storage space occupied by the instruction.
  • At least one target time slice corresponding to the to-be-planned routing data is determined according to the target transmission clock of the to-be-planned routing data, and then the to-be-planned routing resources are determined according to the currently planned routing resources corresponding to each target time slice.
  • the routing path of routing data within each target time slice for routing mapping.
  • routing paths are planned according to time slices, which can avoid the phenomenon that some paths are blocked and some routes are idle due to different routing times, so as to make full use of routing resources and improve the utilization rate of on-chip network routing resources. , which is beneficial to improve routing efficiency.
  • the transmission data from the core node S to the core node D may be transmitted in the first time slice.
  • the paths in the last nine time slices are also occupied, but in fact, the routing paths in the later time slices are all empty. Then, based on the total data volume of all time slices, this path is exclusively used in all time slices, and the rest of the transmitted data needs to be transmitted by detours, which will bring additional routing resource consumption.
  • the routing path from the core node S to the core node D in the next nine time slices is not occupied, and other data can be transmitted via the core node S and the core node D (assuming that the It is used by the transmission data from the core node O to the core node P), thereby improving the routing utilization rate and reducing the congestion.
  • the technical solutions of the embodiments of the present application individually plan routing paths for each time slice, which improves routing efficiency, reduces detours and congestion, reduces total routing time, and improves information throughput.
  • FIG. 4 is a flowchart of a many-core route mapping method provided by an embodiment of the present application.
  • the embodiment of the present application is embodied on the basis of the foregoing embodiment, wherein, in determining the route between the core nodes in the many-core system Before the target transmission clocks of the routing data to be planned, the method provided by the embodiment of the present application further includes: counting target transmission clocks of different routing data to be planned to obtain all clocks of different routing data to be planned; dividing time slices according to all the clocks to obtain Multiple time slices and clocks included in each time slice.
  • the route mapping method of the many-core includes:
  • the time slice before determining the target time slice to which the target transmission clock belongs, the time slice may be firstly divided according to all the clocks, and the clock corresponding to each time slice is determined.
  • the clock can be divided evenly to obtain multiple time slices, and each time slice includes the same number of clocks; it is also possible to non-uniformly divide the clock to obtain multiple time slices, and the clocks included in different time slices The numbers are not exactly the same.
  • the steps of dividing time slices according to all the clocks may specifically include: S21, according to the data volume of the multiple pieces of routing data to be planned and the target transmission clock of each piece of routing data to be planned, perform time Slice segmentation; S22, if the starting and ending core nodes of at least two of the multiple pieces of routing data to be planned are the same, determine the overlapping clock according to the target transmission clocks of the at least two routing data to be planned, and divide the overlapping clock as a time piece.
  • step S21 statistics may be performed on each piece of data to be routed, and the number of time slices may be determined according to the target transmission clock and data volume of the plurality of pieces of data to be routed, so as to realize the division of time slices.
  • a piece of data to be routed with the largest amount of data may be selected, and the target transmission clock of the piece of data to be routed may be divided into one time slice or multiple time slices.
  • the target transmission clocks of these pieces of data to be routed are close to each other or there are overlapping clocks, the target transmission clocks of these pieces of data to be routed are integrated as a time slice. or multiple slices.
  • the first N clocks can be divided into a time slice; If the target transmission clock of the routing data is the last N clocks, the last N clocks can be divided into a time slice.
  • the manner of performing time slice segmentation may be determined according to the actual situation, which is not specifically limited in this embodiment of the present application.
  • the time slice may be divided according to the target transmission clock of each piece of routing data to be planned and the starting and ending core nodes.
  • each piece of routing data to be planned there are multiple pieces of routing data to be planned with the same starting and ending core nodes, that is, multiple pieces of routing data to be planned with the same source core node and target core node, the A plurality of target transmission clocks of data to be routed are divided into time slices.
  • the target transmission clocks of the two routing data to be planned can be regarded as a time slice respectively. Divide.
  • time slice segmentation may include: if the starting and ending core nodes of the two pieces of routing data to be planned are the same, then according to the two pieces of routing data to be planned, the starting and ending core nodes are the same.
  • the target transfer clock determines the overlapping clock and divides the overlapping clock as a time slice.
  • the overlapping clock can be divided as a time slice. Further, the respective non-overlapping clocks in the two target transmission clocks of the data to be routed to be planned may be divided as a time slice respectively.
  • the starting and ending core nodes of the two routing data to be planned are both core node S and core node D.
  • the target transmission clock of one routing data to be planned is the 20th clock to the 40th clock, and the other one is the routing data to be planned.
  • the target transmission clock is the 30th clock to the 50th clock. Therefore, the overlapping clocks of the two target transmission clocks of the data to be routed are the 30th clock to the 40th clock, so the 30th clock to the 40th clock can be 40 clocks are divided as a time slice.
  • the 20th clock to the 30th clock may be divided as one time slice
  • the 40th clock to the 50th clock may be divided as one time slice.
  • the principle is to minimize the overlapping time of different routes passing through the same path. Furthermore, in the time slice corresponding to the 20th clock to the 30th clock, and in the time slice corresponding to the 40th clock to the 50th clock, the two data to be routed can be time-division multiplexed with the same maximum For the optimal path, in the time slice corresponding to the 30th clock to the 40th clock, there is only one to-be-planned route data to plan the above-mentioned optimal route, and the other to-be-planned route data to re-plan its suboptimal route.
  • S450 Determine a routing path of the routing data to be planned within each target time slice according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
  • time slice obtained by the segmentation can also be adjusted to balance the size of the storage space occupied by the routing instruction and the size of the time slice.
  • each route path is the shortest route, thereby improving route efficiency.
  • FIG. 5 is a schematic structural diagram of a many-core route mapping apparatus provided by an embodiment of the present application.
  • the embodiment of the present application may be applied to a situation in which routing paths are planned for a network-on-chip on a many-core chip, and the apparatus may adopt software and/or hardware. It can be realized in a way and can generally be integrated in electronic equipment.
  • the apparatus 500 includes: a transmission clock determination module 510 , a time slice determination module 520 and a routing path planning module 530 . in,
  • the transmission clock determination module 510 is used to determine the target transmission clock of the to-be-planned routing data between the core nodes in the many-core system;
  • a time slice determining module 520 configured to determine at least one target time slice to which the target transmission clock belongs from a plurality of time slices;
  • the routing path planning module 530 is configured to determine the routing path of the routing data to be planned within each target time slice according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
  • At least one target time slice corresponding to the to-be-planned routing data is determined according to the target transmission clock of the to-be-planned routing data, and then the to-be-planned routing resources are determined according to the currently planned routing resources corresponding to each target time slice The routing path of routing data within each target time slice for routing mapping.
  • routing paths are planned according to time slices, which can avoid the phenomenon that some paths are blocked and some routes are idle due to different routing times, so as to make full use of routing resources and improve the utilization rate of on-chip network routing resources. , which is beneficial to improve routing efficiency.
  • the number of target time slices is multiple, wherein the routing paths of the routing data to be planned in different target time slices are not exactly the same.
  • the above-mentioned device further includes: a time slice segmentation module, configured to count the target transmission clocks of different to-be-planned routing data before determining the target transmission clocks of the to-be-planned routing data between the core nodes in the many-core system, Obtain all clocks with different routing data to be planned; divide time slices according to all clocks to obtain multiple time slices and the clocks included in each time slice.
  • a time slice segmentation module configured to count the target transmission clocks of different to-be-planned routing data before determining the target transmission clocks of the to-be-planned routing data between the core nodes in the many-core system, Obtain all clocks with different routing data to be planned; divide time slices according to all clocks to obtain multiple time slices and the clocks included in each time slice.
  • the number of clocks included in different time slices is not the same.
  • the time slice segmentation module is specifically used to perform time slice segmentation according to the target transmission clock and data volume of each piece of routing data to be planned; the time slice segmentation module is also specifically used if at least one of the If the starting and ending core nodes of the two routing data to be planned are the same, the overlapping clock is determined according to the target transmission clocks of the at least two routing data to be planned, and the overlapping clock is divided into a time slice.
  • the above device further includes: a time slice adjustment module, configured to adjust multiple time slices according to the current routing information before determining at least one target time slice to which the target transmission clock belongs, and update the time slices included in each time slice. Clock to get updated multiple time slices.
  • a time slice adjustment module configured to adjust multiple time slices according to the current routing information before determining at least one target time slice to which the target transmission clock belongs, and update the time slices included in each time slice. Clock to get updated multiple time slices.
  • a time slice adjustment module which is specifically used to determine the total target number of time slices according to the size of the routing table and/or the number of routing entries, and to split or merge the obtained time slices according to the total number of targets; If the planned routing paths in adjacent time slices are consistent, the adjacent time slices are merged into one time slice.
  • the routing path planning module 330 is specifically configured to determine the total amount of currently planned routing data of a single path included in the target time slice; wherein, a single path is a path between two adjacent cores; according to the target path selection strategy, The routing path of the to-be-planned routing data in the target time slice is determined according to the total amount of currently planned routing data of a single path included in the target time slice.
  • the routing path planning module 330 is specifically configured to determine a horizontal single path and a vertical single path corresponding to the current core node for the current core node involved in the routing path of the routing data to be planned within the target time slice; if If the total amount of currently planned routing data of a single horizontal path and a single vertical path is not equal, the next core node corresponding to the current core node is determined according to the single path with the smallest total planned routing data; If the total amount of currently planned routing data for a single vertical path is equal, the next core node corresponding to the current core node is determined according to a single horizontal path or a single vertical path.
  • the above-mentioned many-core route mapping apparatus can execute the many-core route-mapping method provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects corresponding to the executed many-core route-mapping method.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • the electronic device includes: one or more processors 601 ; and a memory 602 on which one or more programs are stored. When the one or more programs are executed by the one or more processors, one or more programs are executed. Multiple processors implement the task mapping method of the first aspect of the embodiments of the present application; one or more I/O interfaces 603 are connected between the processors and the memory, and are configured to implement information interaction between the processor and the memory.
  • the processor 601 is a device with data processing capability, including but not limited to a central processing unit (CPU), etc.;
  • the memory 602 is a device with data storage capability, including but not limited to random access memory (RAM, more specifically Such as SDRAM, DDR, etc.), read only memory (ROM), electrified erasable programmable read only memory (EEPROM), flash memory (FLASH);
  • the I/O interface (read and write interface) 603 is connected between the processor 601 and the memory 602 , can realize the information interaction between the processor 601 and the memory 602, which includes but is not limited to a data bus (Bus) and the like.
  • Buss data bus
  • the processor 601, the memory 602, and the I/O interface 603 are interconnected by a bus, which in turn is connected to other components of the computing device.
  • the memory 602 may be used to store software programs and computer-executable programs, such as program instructions corresponding to a many-core route mapping method in the embodiments of the present application , including: determining the target transmission clock of the to-be-planned routing data between the core nodes in the many-core system; from multiple time slices, determining at least one target time slice to which the target transmission clock belongs; The currently planned routing resources are determined, and the routing path of the to-be-planned routing data in each target time slice is determined for routing mapping.
  • the processor 601 executes various functional applications and data processing of the chip by running the software program instructions stored in the memory 602, ie, implements a many-core route mapping method in any embodiment of the above method.
  • the memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function; the storage data area may store data created according to the use of the chip, and the like. Additionally, memory 602 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • Embodiments of the present application also provide a storage medium containing computer-executable instructions, and the computer-executable instructions are used to implement a many-core route mapping method when executed by a processor.
  • the method includes: determining a core in a many-core system The target transmission clock of the to-be-planned routing data between nodes; from multiple time slices, determine at least one target time slice to which the target transmission clock belongs; according to the currently planned routing resources corresponding to each target time slice, determine the to-be-planned route The routing path of data within each target time slice for route mapping.
  • the computer-executable instructions when executed by the processor, may also be used to implement the technical solution of a many-core route mapping method provided by any embodiment of the present application.
  • Embodiments of the present application also provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying the computer-readable codes, when the computer-readable codes run in a processor of an electronic device , the processor in the electronic device executes the route mapping method for implementing the many-core of the above embodiment.
  • the included units and modules are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized;
  • the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.

Abstract

Disclosed are a many-core route mapping method and apparatus, device, and a medium. Said method comprises: determining a target transmission clock of route data to be planned between core nodes in a many-core system (S110); determining, from a plurality of time slices, at least one target time slice to which the target transmission clock belongs (S120); and according to the currently planned route resource corresponding to each target time slice, determining a route path of said route data in each target time slice, so as to perform route mapping (S130). In the present application, route paths are respectively planned according to time slices, improving the utilization rate of network on chip route resources.

Description

众核的路由映射方法、装置、设备及介质Many-core route mapping method, device, device and medium 技术领域technical field
本申请实施例涉及众核芯片技术领域,尤其涉及一种众核的路由映射方法、装置、设备及介质。The embodiments of the present application relate to the technical field of many-core chips, and in particular, to a many-core route mapping method, apparatus, device, and medium.
背景技术Background technique
在众核(包括多核)芯片设计中,NOC(Network On Chip,片上网络)是实现核与核之间通信的常用方案,其中,NOC性能是整个芯片性能能否提高的关键,而路由映射会对NOC的通信效率产生较大影响。In the design of many-core (including multi-core) chips, NOC (Network On Chip) is a common solution for realizing communication between cores. Among them, NOC performance is the key to whether the performance of the entire chip can be improved, and route mapping will It has a great influence on the communication efficiency of NOC.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种众核的路由映射方法、装置、设备及介质,以在众核路由映射时提高路由资源的利用率。Embodiments of the present application provide a many-core route mapping method, apparatus, device, and medium, so as to improve the utilization rate of routing resources during many-core route mapping.
第一方面,本申请实施例提供一种众核的路由映射方法,包括:In a first aspect, an embodiment of the present application provides a many-core route mapping method, including:
确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;Determine the target transmission clock of the data to be routed between the core nodes in the many-core system;
从多个时间片中,确定所述目标传输时钟所属的至少一个目标时间片;From a plurality of time slices, determine at least one target time slice to which the target transmission clock belongs;
根据与每个所述目标时间片对应的当前规划路由资源,确定所述待规划路由数据在每个所述目标时间片内的路由路径,以进行路由映射。Determine the routing path of the to-be-planned routing data in each of the target time slices according to the currently planned routing resources corresponding to each of the target time slices, so as to perform route mapping.
第二方面,本申请实施例提供一种众核的路由映射装置,包括:In a second aspect, an embodiment of the present application provides a many-core route mapping device, including:
传输时钟确定模块,用于确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;a transmission clock determination module, used for determining the target transmission clock of the data to be routed between the core nodes in the many-core system;
时间片确定模块,用于从多个时间片中,确定所述目标传输时钟所属的至少一个目标时间片;a time slice determination module, configured to determine at least one target time slice to which the target transmission clock belongs from a plurality of time slices;
路由路径规划模块,用于根据与每个所述目标时间片对应的当前规划路由资源,确定所述待规划路由数据在每个所述目标时间片内的路由路径,以进行路由映射。The routing path planning module is configured to determine the routing path of the to-be-planned routing data in each of the target time slices according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
第三方面,本申请实施例提供一种电子设备,包括一个或多个处理器;存储装 置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现根据权利要求1至9中任意一项所述的众核的路由映射方法;一个或多个I/O接口,连接在所述处理器与存储器之间,配置为实现所述处理器与存储器的信息交互。In a third aspect, embodiments of the present application provide an electronic device, including one or more processors; and a storage device, on which one or more programs are stored, when the one or more programs are stored by the one or more programs The processor executes, so that the one or more processors implement the many-core route mapping method according to any one of claims 1 to 9; one or more I/O interfaces are connected between the processors and the Between the memories, it is configured to realize the information interaction between the processor and the memory.
第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请任意实施例所述的众核的路由映射方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the many-core route mapping method described in any embodiment of the present application.
第五方面,本申请实施例提供一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现本申请任意实施例所述的众核的路由映射方法。In a fifth aspect, embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in an electronic device When running in the processor, the processor in the electronic device executes the route mapping method for implementing the many cores described in any embodiment of the present application.
本申请实施例的技术方案中,根据众核系统中的核心节点之间的规划路由数据的目标传输时钟,确定与待规划路由数据对应的至少一个目标时间片,进而根据与每个目标时间片对应的当前规划路由资源确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。在上述技术方案中,按照时间片分别进行路由路径规划,能够避免由于路由时间不同出现部分路径阻塞、部分路由空闲的现象,以此尽量充分地利用路由资源,提高了片上网络路由资源的利用率,进而有利于提高路由效率。In the technical solution of the embodiment of the present application, according to the target transmission clock of the planned routing data between the core nodes in the many-core system, at least one target time slice corresponding to the to-be-planned routing data is determined, and then according to the target time slice corresponding to each target time slice The corresponding currently planned routing resource determines the routing path of the routing data to be planned in each target time slice, so as to perform route mapping. In the above technical solution, routing paths are planned according to time slices, which can avoid the phenomenon that some paths are blocked and some routes are idle due to different routing times, so as to make full use of routing resources and improve the utilization rate of on-chip network routing resources. , which is beneficial to improve routing efficiency.
附图说明Description of drawings
图1是本申请实施例中的一种片上网络的示意图;1 is a schematic diagram of a network-on-chip in an embodiment of the present application;
图2是本申请实施例中的一种众核的路由映射方法的流程图;2 is a flowchart of a route mapping method for many cores in an embodiment of the present application;
图3是本申请实施例中的一种时间片划分及路由路径规划示意图;3 is a schematic diagram of time slice division and routing path planning in an embodiment of the present application;
图4是本申请实施例中的一种众核的路由映射方法的流程图;4 is a flowchart of a route mapping method for many cores in an embodiment of the present application;
图5是本申请实施例中的一种众核的路由映射装置的结构示意图;5 is a schematic structural diagram of a many-core route mapping apparatus in an embodiment of the present application;
图6是本申请实施例中的一种电子设备的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an electronic device in an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的 是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present application.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in greater detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts various operations (or steps) as a sequential process, many of the operations may be performed in parallel, concurrently, or concurrently. Additionally, the order of operations can be rearranged. The process may be terminated when its operation is complete, but may also have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, subroutines, and the like.
相关技术中,路由量即路由传输的数据量;在路由规划过程中,通常是在最短路径的前提下,基于单条路径路由量最小的原则规划路由的路径。在片上网络中,源核心节点到目标核心节点之间的路径通常有多条,二者之间的最短路径指的是核心节点跳数最少的路径,单条路径指的是相邻两个核心节点之间的路径,当源核心节点到目标核心节点之间的最短路径有多条的情况下,可以选择单条路径路由量最小的一条最短路径作为源核心节点到目标核心节点的规划路径。In the related art, the routing volume is the data volume transmitted by the routing; in the routing planning process, the routing path is usually planned based on the principle that the routing volume of a single path is the smallest on the premise of the shortest path. In an on-chip network, there are usually multiple paths between a source core node and a target core node. The shortest path between the two refers to the path with the fewest core node hops, and a single path refers to two adjacent core nodes. When there are multiple shortest paths between the source core node and the target core node, the shortest path with the smallest routing amount of a single path can be selected as the planned path from the source core node to the target core node.
当整体路由规划后,每两个核心节点之间的路由量几乎差不多。但是,路由路径一旦确定,在实际数据发送过程中可能会由于路由时间不同出现部分路径阻塞、部分路由空闲的现象,导致片上网络的路由资源没有被充分利用,路由效率低下。After the overall routing is planned, the routing volume between each two core nodes is almost the same. However, once the routing path is determined, in the actual data transmission process, some paths may be blocked and some routes may be idle due to different routing times, resulting in insufficient utilization of routing resources of the on-chip network and low routing efficiency.
以图1所示的片上网络为例,假设源核心节点A到目标核心节点D的规划路径为(A-B-C-D每个字母表示众核芯片上的一个核心节点),源核心节点S到目标核心节点D的规划路径为S-A-H-G-D,源核心节点A到目标核心节点E的规划路径为A-H-I-F-E,若路径A-B-C-D的路由在前100个时钟(clk)内已完成全部数据传输,在后面的时钟内全部处于空闲状态,而路径S-A-H-G-D的路由和路径A-H-I-F-E路由都在第200个时钟到第300个时钟之间传输数据,两条路由会在路径A-H之间堵塞,与此同时路径A-B-C-D却还在空闲,路由资源明显没有被充分利用。此时,若源核心节点S到目标核心节点D的规划路径为S-A-B-C-D,则可明显改善路由资源的利用率,避免路径堵塞。Taking the on-chip network shown in Figure 1 as an example, it is assumed that the planned path from the source core node A to the target core node D is (A-B-C-D each letter represents a core node on the many-core chip), and the source core node S to the target core node D The planned path is S-A-H-G-D, and the planned path from the source core node A to the target core node E is A-H-I-F-E. If the route of the path A-B-C-D has completed all data transmission within the first 100 clocks (clk), it will be idle in the following clocks , while the route S-A-H-G-D and the route A-H-I-F-E transmit data between the 200th clock and the 300th clock, the two routes will be blocked between the paths A-H, while the paths A-B-C-D are still idle, and the routing resources are obvious. underutilized. At this time, if the planned path from the source core node S to the target core node D is S-A-B-C-D, the utilization rate of routing resources can be significantly improved, and path congestion can be avoided.
本公开实施例提供一种众核的路由映射方法,通过确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;从多个时间片中,确定目标传输时钟所属的至少一个目标时间片;根据与每个目标时间片对应的当前规划路由资源,确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射,可以明显提高路由资源的利用率,从而提高众核系统的通信效率。Embodiments of the present disclosure provide a many-core route mapping method, by determining a target transmission clock of to-be-planned routing data between core nodes in a many-core system; from multiple time slices, determining at least one of the target transmission clocks to which the target transmission clock belongs Target time slice: According to the current planning routing resources corresponding to each target time slice, determine the routing path of the to-be-planned routing data within each target time slice for route mapping, which can significantly improve the utilization of routing resources, thereby improving the Communication efficiency of many-core systems.
图2为本申请实施例提供的众核的路由映射方法的流程图,本申请实施例可适用于对众核芯片的片上网络进行路由路径规划的情况,该方法可以由本申请实施例提供的众核的路由映射装置来执行,该装置可采用软件和/或硬件的方式实现,并一般可集成在电子设备中。2 is a flowchart of a many-core route mapping method provided by an embodiment of the present application. The embodiment of the present application can be applied to the situation of performing routing path planning on a network-on-chip of a many-core chip. It is implemented by the route mapping device of the core, which can be implemented in software and/or hardware, and can generally be integrated in electronic equipment.
如图2所示,本申请实施例提供的众核的路由映射方法,包括:As shown in FIG. 2 , the route mapping method of the many-core provided by the embodiment of the present application includes:
S110、确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟。S110. Determine the target transmission clock of the routing data to be planned between the core nodes in the many-core system.
在该步骤中,待规划路由数据,指的是众核芯片上由源核心节点向目标核心节点传输的需要进行片上网络路由路径规划的数据。其中,核心节点指的是众核芯片中与一个核心对应的节点设备,源核心节点和目标核心节点即为待规划路由数据的起止核心节点。In this step, the routing data to be planned refers to the data on the many-core chip that is transmitted from the source core node to the target core node and needs to be planned for the on-chip network routing path. The core node refers to a node device corresponding to one core in the many-core chip, and the source core node and the target core node are the starting and ending core nodes of the routing data to be planned.
在本申请实施例中,待规划路由数据的目标传输时钟,指的是待规划路由数据在片上网络进行传输时所占用的时钟范围。例如可以是传输起止时钟,还可以是传输起始时钟以及传输时钟时长。其中,传输时钟时长可以根据待规划路由数据的数据量与路由带宽的商值确定。示例性的,某待规划路由数据在时钟(clk)为第20个时钟开始传输(起始时钟),需要传输20个时钟(传输时钟时长)。In this embodiment of the present application, the target transmission clock of the routing data to be planned refers to the clock range occupied by the routing data to be planned for transmission on the on-chip network. For example, it may be the transmission start and end clock, and may also be the transmission start clock and the transmission clock duration. The transmission clock duration may be determined according to the quotient of the data volume of the routing data to be planned and the routing bandwidth. Exemplarily, when the clock (clk) of some routing data to be planned starts to be transmitted (starting clock) at the 20th clock, 20 clocks (transmission clock duration) need to be transmitted.
为了便于描述,在下述实施例的描述中,可以将第M个时钟简称为是时钟M,M大于或等于1的整数。例如第20个时钟可以简称为时钟20,第40个时钟可以简称为时钟40。For convenience of description, in the description of the following embodiments, the Mth clock may be simply referred to as the clock M, where M is an integer greater than or equal to 1. For example, the 20th clock may be referred to as clock 20 for short, and the 40th clock may be referred to as clock 40 for short.
S120、从多个时间片中,确定目标传输时钟所属的至少一个目标时间片。S120. From the multiple time slices, determine at least one target time slice to which the target transmission clock belongs.
在该步骤中,时间片是对时钟进行切分得到的时间片,每个时间片包括至少一个时钟。In this step, the time slice is obtained by dividing the clock, and each time slice includes at least one clock.
在一些实施例中,在步骤S110之前,该方法还包括:S11,统计不同待规划路由数据的目标传输时钟,得到不同待规划路由数据的所有时钟;S12,根据所有时钟切分时间片,得到多个时间片和每个时间片包括的时钟。In some embodiments, before step S110, the method further includes: S11, counting target transmission clocks with different routing data to be planned, and obtaining all clocks with different routing data to be planned; S12, dividing time slices according to all the clocks to obtain Multiple time slices and clocks included in each time slice.
示例性的,多个时间片可以是将所有时钟均匀切分后得到的时间片,时间片的数量与每个时间片包括的时钟数量相关,每个时间片包括的时钟数量越小,时间片的数量越多。Exemplarily, the multiple time slices may be time slices obtained by dividing all clocks evenly. The number of time slices is related to the number of clocks included in each time slice. The smaller the number of clocks included in each time slice, the greater the time slice. the greater the number.
在本申请实施例中,不同时间片包括的时钟的数量不完全相同。其中,在划分得到的多个时间片中,任意两个时间片包括的时钟的数量可以相同,也可以不相同。In this embodiment of the present application, the number of clocks included in different time slices is not exactly the same. Among the multiple time slices obtained by division, the number of clocks included in any two time slices may be the same or different.
在一些实施例中,在确定各个时间片分别包括的时钟之后,可以将目标传输时 钟与各个时间片分别包括的时钟进行比对,即可确定目标传输时钟所属的各个时间片,将所属于的时间片称之为目标时间片。In some embodiments, after determining the clocks included in each time slice, the target transmission clock may be compared with the clocks included in each time slice, so as to determine each time slice to which the target transmission clock belongs, The time slice is called the target time slice.
例如,目标传输时钟为时钟20~时钟40,第一个时间片包括的时钟为时钟0~时钟10,第二个时间片包括的时钟为时钟11~时钟30,第三个时间片包括的时钟为时钟31~时钟40,则目标传输时钟所属的目标时间时间片为第二个时间片和第三个时间片。For example, the target transmission clock is clock 20 to clock 40, the clocks included in the first time slice are clock 0 to clock 10, the clocks included in the second time slice are clock 11 to clock 30, and the clocks included in the third time slice are clocks are clocks 31 to 40, and the target time slices to which the target transmission clock belongs are the second time slice and the third time slice.
S130、根据与每个目标时间片对应的当前规划路由资源,确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。S130: Determine a routing path of the routing data to be planned within each target time slice according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
在一些实施例中,当待规划路由数据仅在部分时钟内传输时,只需在对应的目标时间片内确定待规划路由数据的路由路径,无需在其余时间片内确定待规划路由数据的路由路径,不会占用其余时间片内的路由资源。In some embodiments, when the routing data to be planned is only transmitted in part of the clock, the routing path of the routing data to be planned only needs to be determined in the corresponding target time slice, and the route of the routing data to be planned does not need to be determined in the remaining time slices The path will not occupy the routing resources in the rest of the time slice.
在本申请实施例中,针对每个目标时间片,分别对待规划路由数据的路由路径进行规划。各个目标时间片内规划的路由路径综合起来,即为最终确定的待规划路由数据的路由路径。In the embodiment of the present application, for each target time slice, the routing paths of the routing data to be planned are separately planned. The routing paths planned in each target time slice are integrated, that is, the finally determined routing path of the routing data to be planned.
可选的,当目标时间片的数量为多个时,待规划路由数据在不同目标时间片内的路由路径不完全相同。针对多个目标时间片,待规划路由数据在任意两个目标时间片内的路由路径可以相同,也可以不相同。例如,源核心节点A向目标核心节点D的待规划路由数据在第二个时间片中的路由路径为A-B-C-D,源核心节点A向目标核心节点D的待规划路由数据在第三个时间片中的路由路径为A-H-G-D。Optionally, when the number of target time slices is multiple, the routing paths of the routing data to be planned in different target time slices are not exactly the same. For multiple target time slices, the routing paths of the routing data to be planned in any two target time slices may be the same or different. For example, the routing path of the routing data to be planned from source core node A to target core node D in the second time slice is A-B-C-D, and the routing data to be planned from source core node A to target core node D in the third time slice The routing path is A-H-G-D.
其中,待规划路由数据在每个目标时间片内的路由路径,具体是参考该目标时间片内的当前规划路由资源确定的。当前规划路由资源,指的是当前时刻的路由已规划情况,具体指的是已规划完成的路由路径及其路由量。The routing path of the routing data to be planned in each target time slice is specifically determined with reference to the currently planned routing resources in the target time slice. The currently planned routing resource refers to the status of routing planning at the current moment, and specifically refers to the planned routing paths and their routing quantities.
也即,在确定待规划路由数据在某个目标时间片内的路由路径时,只需考虑该目标时间片内的当前规划路由资源,无需考虑其他目标时间片内的当前规划路由资源。That is, when determining the routing path of the to-be-planned routing data in a certain target time slice, only the currently planned routing resources in the target time slice are considered, and the currently planned routing resources in other target time slices do not need to be considered.
在根据与目标时间片对应的当前规划路由资源,确定待规划路由数据在该目标时间片内的路由路径时,可以单条路径路由数据总量最小为原则选择路由路径,其中,单条路径为相邻两核之间的路径。When determining the routing path of the to-be-planned routing data within the target time slice according to the currently planned routing resources corresponding to the target time slice, a routing path can be selected based on the principle of the minimum total amount of routing data for a single path, wherein a single path is adjacent path between two cores.
可选的,根据与目标时间片对应的当前规划路由资源,确定待规划路由数据在目标时间片内的路由路径,可以具体为:Optionally, according to the currently planned routing resources corresponding to the target time slice, determine the routing path of the to-be-planned routing data within the target time slice, which may be specifically:
确定目标时间片内所包含单条路径的当前规划路由数据总量;按照目标路径选择策略,根据目标时间片内所包含单条路径的当前规划路由数据总量,确定待规划路由数据在目标时间片内的路由路径。Determine the total amount of currently planned routing data of a single path included in the target time slice; according to the target path selection strategy, according to the total current planned routing data of a single path included in the target time slice, determine that the to-be-planned routing data is within the target time slice routing path.
其中,当前规划路由数据总量,指的是当前时刻已规划的路由数据的总数量,例如,核心节点A和核心节点H之间的单条路径上已经规划了一个数据量为10的路由数据,一个数量为15的路由数据,则核心节点A和核心节点H之间的单条路径的当前规划路由数据总量为25。The total amount of currently planned routing data refers to the total amount of planned routing data at the current moment. For example, a routing data with a data volume of 10 has been planned on a single path between core node A and core node H. If the number of routing data is 15, the total amount of currently planned routing data of a single path between the core node A and the core node H is 25.
目标路径选择策略,可以是在片上网络对待规划路由进行路径选择的任意一种策略,旨在提高路由资源的利用率,避免路径堵塞,对此本申请实施例不作具体限定。The target path selection strategy may be any strategy for path selection of the route to be planned on the on-chip network, which aims to improve the utilization rate of routing resources and avoid path congestion, which is not specifically limited in this embodiment of the present application.
示例性的,目标路径选择策略,可以是以源核心节点至目标核心节点之间节点跳数最少为基础,优先选择单条路径路由数据总量最小的路径。在源核心节点到目标核心节点之间的路由进行路径规划时,可以首先根据源核心节点至目标核心节点之间跳数最少的原则可以确定路由路径的大致方向,然后再根据单条路径路由数据总量最小的原则确定待规划路由数据在目标时间片内最终的路由路径。Exemplarily, the target path selection strategy may be based on the minimum number of node hops between the source core node and the target core node, and preferentially select the path with the smallest total amount of routing data for a single path. When planning the route between the source core node and the target core node, the general direction of the routing path can be determined first according to the principle of the minimum number of hops between the source core node and the target core node, and then the overall direction of the routing data can be determined according to a single path. The final routing path of the to-be-planned routing data within the target time slice is determined according to the principle of the least amount.
具体的,可以根据上述目标路径选取策略依次确定待规划路由数据在片上网络中由源核心节点至目标核心节点之间的各条单条路径,将这些单条路径整合起来作为待规划路由数据在目标时间片内的路由路径。Specifically, each single path of the to-be-planned routing data from the source core node to the target core node in the on-chip network can be sequentially determined according to the above target path selection strategy, and these single paths are integrated as the to-be-planned routing data at the target time On-chip routing paths.
以规划源核心节点A到目标核心节点D之间的路由为例,假设核心节点A经核心节点H到核心节点D的核心节点跳数,与核心节点A经核心节点B到核心节点D的核心节点跳数相等且最少,则既可以选择核心节点A经核心节点H到核心节点D的路由路径,又可以选择核心节点A经核心节点B到核心节点D的路由路径;在确定是选择核心节点A和核心节点H之间的单条路径,还是选择核心节点A和核心节点B之间的单条路径时,优先选择路由数据总量最小的单条路径,假如核心节点A经核心节点B之间的单条路径的路由数据总量最小,则选择核心节点A和核心节点B之间的单条路径,也即规划源核心节点A到目标核心节点D之间的路由路径为核心节点A经核心节点B到核心节点D的路由路径。Taking the route planning from source core node A to target core node D as an example, it is assumed that the number of core node hops from core node A to core node D via core node H is the same as the number of core node hops from core node A to core node D via core node B. If the number of node hops is equal and least, then the routing path from core node A to core node D via core node H can be selected, or the routing path from core node A to core node D via core node B can be selected; When selecting a single path between core node A and core node H, or selecting a single path between core node A and core node B, the single path with the smallest total amount of routing data is preferentially selected. If core node A passes through the single path between core node B If the total amount of routing data of the path is the smallest, then a single path between core node A and core node B is selected, that is, the routing path between the source core node A and the target core node D is planned to be the core node A through the core node B to the core node. The routing path of node D.
进一步的,在一些实施例中,按照目标路径选择策略,根据目标时间片内所包含单条路径的当前规划路由数据总量,确定待规划路由数据在目标时间片内的路由路径,可以具体包括如下步骤:Further, in some embodiments, according to the target path selection strategy, according to the total amount of currently planned routing data of a single path included in the target time slice, the routing path of the to-be-planned routing data in the target time slice is determined, which may specifically include the following: step:
针对待规划路由数据在目标时间片内的路由路径涉及的当前核心节点,确定与当前核心节点对应的水平方向单条路径和竖直方向单条路径;For the current core node involved in the routing path of the to-be-planned routing data in the target time slice, determine a horizontal single path and a vertical single path corresponding to the current core node;
如果水平方向单条路径和竖直方向单条路径的当前规划路由数据总量不相等,则根据当前规划路由数据总量最小的单条路径,确定与当前核心节点对应的下一个核心节点;If the total amount of current planned routing data of a single path in the horizontal direction and a single path in the vertical direction is not equal, then determine the next core node corresponding to the current core node according to the single path with the smallest total amount of currently planned routing data;
如果水平方向单条路径和竖直方向单条路径的当前规划路由数据总量相等,则根据水平方向单条路径或竖直方向单条路径,确定与当前核心节点对应的下一个核心节点。If the total amount of currently planned routing data of a single horizontal path and a single vertical path is equal, the next core node corresponding to the current core node is determined according to the single horizontal path or the single vertical path.
在确定待规划路由数据的当前核心节点(首个当前核心节为待规划路由数据的源核心节点)之后:After determining the current core node of the routing data to be planned (the first current core node is the source core node of the routing data to be planned):
首先,确定与当前核心节点对应的水平方向单条路径和竖直方向单条路径。其中,水平方向单条路径,指的是根据源核心节点至目标核心节点之间跳数最少的原则确定的水平向左单条路径或者水平向右单条路径;竖直方向单条路径,指的是根据源核心节点至目标核心节点之间跳数最少的原则确定的竖直向上单条路径或者竖直向下单条路径。First, a single horizontal path and a single vertical path corresponding to the current core node are determined. Among them, a single path in the horizontal direction refers to a single horizontal path to the left or a single path to the right horizontally determined according to the principle of the minimum number of hops between the source core node and the target core node; The vertical upward single path or the vertical downward single path determined by the principle of least hops between the core node and the target core node.
其次,判断与当前核心节点对应的水平方向单条路径和竖直方向单条路径的当前规划路由数据总量是否相等,若否,则将当前规划路由数据总量最小的单条路径作为规划的单条路径,并根据该单条路径确定与当前核心节点对应的下一个核心节点,重新作为当前核心节点;若是,则根据预先设置的优先级选择水平方向单条路径或竖直方向单条路径作为规划的单条路径,并根据该单条路径确定与当前核心节点对应的下一个核心节点,重新作为当前核心节点。Secondly, it is judged whether the total amount of the current planning routing data of the horizontal single path and the vertical single path corresponding to the current core node is equal. And determine the next core node corresponding to the current core node according to the single path, and take it as the current core node again; if so, select a horizontal single path or a vertical single path as the planned single path according to the preset priority, and The next core node corresponding to the current core node is determined according to the single path, and is taken as the current core node again.
针对重新确定的当前核心节点,重复执行上述流程,直至确定与当前核心节点对应的下一个核心节点为待规划路由数据的目标核心节点,至此完成对待规划路由数据在目标时间片内路由路径的规划。For the re-determined current core node, the above process is repeated until the next core node corresponding to the current core node is determined as the target core node of the routing data to be planned, and the planning of the routing path of the routing data to be planned within the target time slice is completed. .
以图1所示的片上网络为例,假设待规划数据的源核心节点为核心节点A,目标核心节点为核心节点D,路由数据量为20,目标时间片内各单条路径的当前规划路由数据总量为:核心节点S到核心节点A之间的单条路径的当前规划路由数据总量为10,核心节点A到核心节点H之间的单条路径的当前规划路由数据总量为10,核心节点H到核心节点G之间的单条路径的当前规划路由数据总量为10,核心节点G到核心节点D之间的单条路径的当前规划路由数据总量为10。核心节点A到核心 节点B之间的单条路径的当前规划路由数据总量为0,核心节点B到核心节点C之间的单条路径的当前规划路由数据总量为0,核心节点C到核心节点D之间的单条路径的当前规划路由数据总量为0。Taking the on-chip network shown in Figure 1 as an example, it is assumed that the source core node of the data to be planned is core node A, the target core node is core node D, the routing data volume is 20, and the currently planned routing data of each single path in the target time slice The total amount is: the total current planned routing data of a single path between core node S and core node A is 10, and the current planned routing data total of a single path between core node A and core node H is 10. The current total planned routing data of a single path between H and core node G is 10, and the current planned routing data of a single path between core node G and core node D is 10. The total current planning routing data of a single path between core node A and core node B is 0, and the current planning routing data total of a single path between core node B and core node C is 0, and core node C to core node. The current total planned routing data of a single path between D is 0.
首先,将核心节点A作为当前核心节点,根据源核心节点至目标核心节点之间跳数最少(节点跳数为三跳)的原则,确定与核心节点A对应的水平方向单条路径为核心节点A到核心节点H之间的单条路径,与核心节点A对应的竖直方向单条路径为核心节点A到核心节点B之间的单条路径。First, take core node A as the current core node, and determine the single horizontal path corresponding to core node A as core node A according to the principle of the minimum number of hops between the source core node and the target core node (the number of node hops is three hops). A single path to the core node H, the vertical single path corresponding to the core node A is a single path between the core node A and the core node B.
其次,由于与核心节点A对应的水平方向单条路径的当前规划路由数据总量为10,与核心节点A对应的竖直方向单条路径的当前规划路由数据总量为0,判断出与核心节点A对应的水平方向单条路径和竖直方向单条路径的当前规划路由数据总量不相等,故将与核心节点A对应的竖直方向单条路径作为规划的单条路径,并根据该单条路径确定与核心节点A对应的下一个核心节点B,当前核心节点由核心节点A更新为核心节点B。Secondly, since the total amount of current planned routing data of a single path in the horizontal direction corresponding to core node A is 10, and the total amount of current planned routing data of a single path in the vertical direction corresponding to core node A is 0, it is determined that the total amount of planned routing data of a single path in the vertical direction corresponding to core node A is 0. The total amount of current planning routing data of the corresponding single path in the horizontal direction and the single path in the vertical direction is not equal, so the single vertical path corresponding to the core node A is used as the planned single path, and the core node is determined according to the single path. For the next core node B corresponding to A, the current core node is updated from core node A to core node B.
如此循环,规划核心节点A到核心节点B之间的单条路径之后几条单条路径为核心节点B到核心节点C之间的单条路径、核心节点C到核心节点D之间的单条路径,由此,待规划路由数据在目标时间片内的路由路径为核心节点A-核心节点B-核心节点C-核心节点D。In this cycle, after planning a single path between core node A and core node B, the following single paths are a single path between core node B and core node C, and a single path between core node C and core node D, thus , the routing path of the routing data to be planned within the target time slice is core node A-core node B-core node C-core node D.
在上述目标路径选取策略的基础上,目标路径选取策略还可以包括:若以源核心节点至目标核心节点之间节点跳数最少为基础,优先选择单条路径路由数据总量最小的路径满足预设的过载条件,则可以综合考虑节点跳数与当前规划路由数据总量重新确定待规划路由数据的备选路由路径,并对备选路由路径进行评估,以在各备选路由路径中选择评估结果最优的一条路由路径作为待规划路由数据的最终路由路径。On the basis of the above target path selection strategy, the target path selection strategy may further include: if based on the minimum number of node hops between the source core node and the target core node, preferentially select the path with the smallest total amount of routing data for a single path to meet the preset requirements If the overload condition is exceeded, you can comprehensively consider the number of node hops and the total amount of current planned routing data to re-determine the alternative routing paths for the routing data to be planned, and evaluate the alternative routing paths to select the evaluation result among the alternative routing paths. The optimal routing path is used as the final routing path of the routing data to be planned.
其中,过载条件例如可以是路径路由数据总量大于设定数量阈值,还可以是路径路由数据总量与待规划路由数据的比值达到设定目标值等,本申请实施例对此不作具体限定。The overload condition may be, for example, that the total amount of path routing data is greater than the set quantity threshold, or the ratio of the total amount of path routing data to the to-be-planned routing data reaches a set target value, which is not specifically limited in this embodiment of the present application.
示例性的,对备选路由路径进行评估,可以是根据节点跳数与当前规划路由数据总量各自的比重对备选路由路径进行打分,根据打分结果得到评估结果最优的一条路由路径;对备选路由路径进行评估,还可以是根据预设的评估函数对备选路由路径进行打分,根据打分结果得到评估结果最优的一条路由路径。关于如何对备选 路由路径进行评估,可以根据实际应用来确定,对此本申请实施例不作具体限定。Exemplarily, evaluating the alternative routing path may be to score the alternative routing path according to the respective proportions of the number of node hops and the total amount of currently planned routing data, and obtain a routing path with an optimal evaluation result according to the scoring result; The alternative routing paths are evaluated, and the alternative routing paths may also be scored according to a preset evaluation function, and a routing path with an optimal evaluation result is obtained according to the scoring result. How to evaluate the alternative routing paths may be determined according to actual applications, which is not specifically limited in this embodiment of the present application.
依旧以图1所示的片上网络为例,假设待规划数据的源核心节点为核心节点A,目标核心节点为核心节点D,源核心节点至目标核心节点之间节点跳数最少路径为路径A-B-C-D和路径A-H-G-D,若两条路径中根据单条路径路由数据总量最小的原则确定的一条路由路径满足预设的过载条件,如路径路由数据总量大于设定数量阈值,则需要可以综合考虑节点跳数与当前规划路由数据总量重新确定待规划路由数据的备选路由路径,此时,可以在增加路径节点跳数的前提下,选择单条路径路由数据总量较小的路径作为备选路由路径,例如单条路径路由数据总量为零的路径,假设选择的备选路由路径为路径A-S-J-K-C-D和路径A-H-I-F-E-D,则可以对这两条路径进行评估,将评估最优的一条路径作为待规划路由数据的最终路由路径。Still taking the on-chip network shown in Figure 1 as an example, assume that the source core node of the data to be planned is core node A, the target core node is core node D, and the path with the least number of node hops between the source core node and the target core node is the path A-B-C-D and paths A-H-G-D, if one of the two paths is determined according to the principle that the total amount of routing data on a single path satisfies the preset overload condition, if the total amount of routing data on the path is greater than the set number threshold, it is necessary to comprehensively consider node hops Re-determine the alternative routing path of the to-be-planned routing data based on the total number of routing data and the current total planned routing data. At this time, on the premise of increasing the number of path node hops, the path with a smaller total routing data per path can be selected as the alternative routing path. For example, if the total amount of routing data for a single path is zero, assuming that the selected alternative routing paths are path A-S-J-K-C-D and path A-H-I-F-E-D, these two paths can be evaluated, and the best evaluated path is used as the route data to be planned. Final routing path.
在待规划路由数据的目标传输时钟属于多个目标时间片的情况下,需要依次确定待规划数据在每个目标时间片内的路由路径,作为数据传输的路径。In the case where the target transmission clocks of the data to be planned belong to multiple target time slices, the routing paths of the data to be planned in each target time slice need to be sequentially determined as the data transmission paths.
在规划完成一条待规划路由数据的路由路径之后,继续对其他条待规划数据的路由路径进行规划,直至完成所有条待规划路由数据的路由路径的规划。After a routing path of the to-be-planned routing data is planned, the other routing paths of the to-be-planned data are continued to be planned, until the planning of all the to-be-planned routing data routing paths is completed.
当整体路由路径规划完成后,在每个时间片内每两个核心节点之间的路由总量均差不多,映射到众核芯片后,就可以按照确定好的路由路径传输相应的数据包。When the overall routing path planning is completed, the total amount of routing between each two core nodes in each time slice is similar. After mapping to the many-core chip, the corresponding data packets can be transmitted according to the determined routing path.
进一步的,本申请实施例的路由映射方法,在确定目标传输时钟所属的至少一个目标时间片之前,还可以包括:根据当前路由信息对多个时间片进行调整,并更新每个时间片包括的时钟,得到更新后的多个时间片。Further, before determining at least one target time slice to which the target transmission clock belongs, the route mapping method of the embodiment of the present application may further include: adjusting a plurality of time slices according to the current routing information, and updating the time slices included in each time slice. Clock to get updated multiple time slices.
其中,时间片越小,时间片的数量就越多,进而路由路径规划得就越精细,路由使用率就越高。然而,时间片的数量与路由表表项的数量直接相关,每个时间片内路由路径的条数与路由表表项中的路由条数直接相关。因此,可以通过调整时间片来平衡路由指令所占的存储空间大小以及时间片大小。Among them, the smaller the time slice, the greater the number of time slices, and the finer the routing path planning, and the higher the route utilization rate. However, the number of time slices is directly related to the number of routing table entries, and the number of routing paths in each time slice is directly related to the number of routing entries in the routing table. Therefore, the storage space occupied by the routing instructions and the size of the time slice can be balanced by adjusting the time slice.
在一些实施方式中,根据当前路由信息对多个时间片进行调整,可以包括:根据路由表大小和/或路由条数确定时间片的目标总数量,并根据目标总数量对切分得到的时间片进行拆分或合并。In some embodiments, adjusting multiple time slices according to the current routing information may include: determining the total target number of time slices according to the size of the routing table and/or the number of routing entries, and dividing the time obtained by dividing according to the total target quantity slices are split or merged.
其中,可以根据路由指令占的存储空间大小和时间片大小的均衡策略,确定时间片的目标总数量,并根据时间片的当前数量与目标总数量的差值,对切分得到的时间片进行拆分或合并。Among them, according to the balancing strategy of the storage space occupied by routing instructions and the size of time slices, the total target number of time slices can be determined, and according to the difference between the current number of time slices and the total number of targets, the divided time slices are processed. Split or merge.
在一些实施例中,可以将数据量小于数据量阈值的路由数据所在时间片作为任 务量较小的时间片,将数据量大于或等于该数据量阈值的路由数据所在时间片作为任务量较大的时间片;将任务量较小的两个时间片合为一个时间片,也可以将较大的时间片拆分成多个。In some embodiments, the time slice of routing data whose data volume is less than the data volume threshold may be regarded as a time slot with a small task volume, and the time slot of routing data whose data volume is greater than or equal to the data volume threshold may be regarded as a time slot with a large task volume The two time slices with a small amount of tasks are combined into one time slice, or the larger time slice can be split into multiple time slices.
在一些实施方式中,对切分得到的时间片进行调整,可以包括:如果相邻时间片内规划的路由路径一致,则将相邻时间片合并为一个时间片。In some implementations, the adjustment of the time slice obtained by division may include: if the routing paths planned in adjacent time slices are consistent, combining the adjacent time slices into one time slice.
如果相邻的多个时间片内路由路径选择得完全一致,可以对这些相邻的多个时间片合成一个时间片,以此减少路由表表项,实现对路由条数的优化,达到降低路由指令占的存储空间大小的效果。If the routing paths in multiple adjacent time slices are completely consistent, these adjacent multiple time slices can be combined into one time slice to reduce routing table entries, optimize the number of routes, and reduce the number of routes. The effect of the size of the storage space occupied by the instruction.
本申请实施例的技术方案中,根据待规划路由数据的目标传输时钟,确定与待规划路由数据对应的至少一个目标时间片,进而根据与每个目标时间片对应的当前规划路由资源确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。在上述技术方案中,按照时间片分别进行路由路径规划,能够避免由于路由时间不同出现部分路径阻塞、部分路由空闲的现象,以此尽量充分地利用路由资源,提高了片上网络路由资源的利用率,进而有利于提高路由效率。In the technical solutions of the embodiments of the present application, at least one target time slice corresponding to the to-be-planned routing data is determined according to the target transmission clock of the to-be-planned routing data, and then the to-be-planned routing resources are determined according to the currently planned routing resources corresponding to each target time slice. The routing path of routing data within each target time slice for routing mapping. In the above technical solution, routing paths are planned according to time slices, which can avoid the phenomenon that some paths are blocked and some routes are idle due to different routing times, so as to make full use of routing resources and improve the utilization rate of on-chip network routing resources. , which is beneficial to improve routing efficiency.
举例来讲,假设划分10个时间片,如图3所示(图中仅示出部分时间片),由核心节点S到核心节点D的传输数据可能就在第1个时间片传输,相关技术中后9个时间片(图中未完全示出)内的路径也会被占,但实际上后面时间片内路由路径都是空的。那么,按所有时间片的总数据量来算,那么所有时间片内这条路径都独占了,其余传输数据需要绕路传输,绕路传输就会带来额外的路由资源消耗。For example, assuming that 10 time slices are divided, as shown in Figure 3 (only some time slices are shown in the figure), the transmission data from the core node S to the core node D may be transmitted in the first time slice. Related Art The paths in the last nine time slices (not fully shown in the figure) are also occupied, but in fact, the routing paths in the later time slices are all empty. Then, based on the total data volume of all time slices, this path is exclusively used in all time slices, and the rest of the transmitted data needs to be transmitted by detours, which will bring additional routing resource consumption.
在本申请实施例提供的技术方案中,后面9个时间片内核心节点S到核心节点D的路由路径是未被占用的,可以其他经由核心节点S和核心节点D的其他传输数据(假设是由核心节点O到核心节点P的传输数据)使用,以此提高了路由使用率,减少了拥堵。进而,本申请实施例技术方案针对每个时间片都单独规划路由路径,提高了路由效率,减少了绕路和拥堵,也减少了路由总时间,提高了信息吞吐率。In the technical solutions provided in the embodiments of the present application, the routing path from the core node S to the core node D in the next nine time slices is not occupied, and other data can be transmitted via the core node S and the core node D (assuming that the It is used by the transmission data from the core node O to the core node P), thereby improving the routing utilization rate and reducing the congestion. Furthermore, the technical solutions of the embodiments of the present application individually plan routing paths for each time slice, which improves routing efficiency, reduces detours and congestion, reduces total routing time, and improves information throughput.
图4为本申请实施例提供的一种众核的路由映射方法的流程图,本申请实施例在前述实施例的基础上进行具体化,其中,在确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟之前,本申请实施例提供的方法还包括:统计不同待规划路由数据的目标传输时钟,得到不同待规划路由数据的所有时钟;根据所有时钟切分时间片,得到多个时间片和每个时间片包括的时钟。4 is a flowchart of a many-core route mapping method provided by an embodiment of the present application. The embodiment of the present application is embodied on the basis of the foregoing embodiment, wherein, in determining the route between the core nodes in the many-core system Before the target transmission clocks of the routing data to be planned, the method provided by the embodiment of the present application further includes: counting target transmission clocks of different routing data to be planned to obtain all clocks of different routing data to be planned; dividing time slices according to all the clocks to obtain Multiple time slices and clocks included in each time slice.
如图4所示,本申请实施例提供的众核的路由映射方法,包括:As shown in FIG. 4 , the route mapping method of the many-core provided by the embodiment of the present application includes:
S410、确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟。S410. Determine the target transmission clock of the routing data to be planned between the core nodes in the many-core system.
S420、统计不同待规划路由数据的目标传输时钟,得到不同待规划路由数据的所有时钟。S420: Counting target transmission clocks of different routing data to be planned, to obtain all clocks of different routing data to be planned.
S430、根据所有时钟切分时间片,得到多个时间片和每个时间片包括的时钟。S430. Divide the time slices according to all the clocks to obtain multiple time slices and the clocks included in each time slice.
在本申请实施例中,在确定目标传输时钟所属的目标时间片之前,可以首先根据所有时钟进行时间片的切分,并确定出每个时间片对应的时钟。In this embodiment of the present application, before determining the target time slice to which the target transmission clock belongs, the time slice may be firstly divided according to all the clocks, and the clock corresponding to each time slice is determined.
示例性地,可以对时钟进行均匀切分得到多个时间片,每个时间片包括的时钟的数量相同;也可以的对时钟进行非均匀切分得到多个时间片,不同时间片包括的时钟的数量不完全相同。Exemplarily, the clock can be divided evenly to obtain multiple time slices, and each time slice includes the same number of clocks; it is also possible to non-uniformly divide the clock to obtain multiple time slices, and the clocks included in different time slices The numbers are not exactly the same.
在一些实施例中,步骤S430中,根据所有时钟切分时间片的步骤,可以具体包括:S21,根据多条待规划路由数据的数据量及每条待规划路由数据的目标传输时钟,进行时间片切分;S22,如果多条中的至少两条待规划路由数据的起止核心节点相同,则根据至少两条待规划路由数据的目标传输时钟确定重叠时钟,并将重叠时钟切分作为一个时间片。In some embodiments, in step S430, the steps of dividing time slices according to all the clocks may specifically include: S21, according to the data volume of the multiple pieces of routing data to be planned and the target transmission clock of each piece of routing data to be planned, perform time Slice segmentation; S22, if the starting and ending core nodes of at least two of the multiple pieces of routing data to be planned are the same, determine the overlapping clock according to the target transmission clocks of the at least two routing data to be planned, and divide the overlapping clock as a time piece.
在上述步骤S21,可以对各条待路由数据进行统计,根据多条待路由数据的目标传输时钟以及数据量,确定时间片的数量,实现对时间片的切分。In the above step S21, statistics may be performed on each piece of data to be routed, and the number of time slices may be determined according to the target transmission clock and data volume of the plurality of pieces of data to be routed, so as to realize the division of time slices.
例如,可以选取数据量最大的一条待路由数据,将该条待路由数据的目标传输时钟作为一个时间片或多个时间片进行切分。For example, a piece of data to be routed with the largest amount of data may be selected, and the target transmission clock of the piece of data to be routed may be divided into one time slice or multiple time slices.
再例如,可以选取数据量较小的几条待路由数据,如果这几条待路由数据的目标传输时钟临近或存在重叠时钟,则根据这几条待路由数据的目标传输时钟整合作为一个时间片或多个片进行切分。For another example, several pieces of data to be routed with a small amount of data can be selected. If the target transmission clocks of these pieces of data to be routed are close to each other or there are overlapping clocks, the target transmission clocks of these pieces of data to be routed are integrated as a time slice. or multiple slices.
又例如,由核心节点A到核心节点D的待路由数据的目标传输时钟为前N个时钟,则可以将这前N个时钟切分为一个时间片;由核心节点S到核心节点D的待路由数据的目标传输时钟为最后N个时钟,则可以将这后N个时钟切分为一个时间片。For another example, if the target transmission clocks of the data to be routed from core node A to core node D are the first N clocks, the first N clocks can be divided into a time slice; If the target transmission clock of the routing data is the last N clocks, the last N clocks can be divided into a time slice.
根据各条待规划路由数据的目标传输时钟以及数据量,进行时间片切分的方式可以根据实际情况进行确定,本申请实施例对此不作具体限定。According to the target transmission clock and data volume of each piece of routing data to be planned, the manner of performing time slice segmentation may be determined according to the actual situation, which is not specifically limited in this embodiment of the present application.
在上述步骤S22,可以根据各条待规划路由数据的目标传输时钟以及起止核心节点,进行时间片切分。In the above step S22, the time slice may be divided according to the target transmission clock of each piece of routing data to be planned and the starting and ending core nodes.
在该实施例中,如果在各条待规划路由数据中,存在起止核心节点相同的多条待规划路由数据,也即源核心节点和目标核心节点相同的多条待规划路由数据,可 以根据这多条待规划路由数据的目标传输时钟,对时间片进行切分。In this embodiment, if in each piece of routing data to be planned, there are multiple pieces of routing data to be planned with the same starting and ending core nodes, that is, multiple pieces of routing data to be planned with the same source core node and target core node, the A plurality of target transmission clocks of data to be routed are divided into time slices.
例如,如果两条待规划路由数据的起止核心节点相同,且两条待规划路由数据的目标传输时钟之间没有重叠时钟,则可以将两条待规划路由数据的目标传输时钟分别作为一个时间片进行切分。For example, if the starting and ending core nodes of the two routing data to be planned are the same, and there is no overlapping clock between the target transmission clocks of the two routing data to be planned, the target transmission clocks of the two routing data to be planned can be regarded as a time slice respectively. Divide.
进一步的,根据各条待规划路由数据的目标传输时钟以及起止核心节点,进行时间片切分,可以包括:如果两条待规划路由数据的起止核心节点相同,则根据两条待规划路由数据的目标传输时钟确定重叠时钟,并将重叠时钟切分作为一个时间片。Further, according to the target transmission clock and the starting and ending core nodes of each piece of routing data to be planned, time slice segmentation may include: if the starting and ending core nodes of the two pieces of routing data to be planned are the same, then according to the two pieces of routing data to be planned, the starting and ending core nodes are the same. The target transfer clock determines the overlapping clock and divides the overlapping clock as a time slice.
如果两条待规划路由数据的起止核心节点相同,且两条待规划路由数据的目标传输时钟之间存在重叠时钟,则可以将重叠时钟作为一个时间片进行切分。进一步的,还可以将两条待规划路由数据的目标传输时钟中各自的非重叠时钟,分别作为一个时间片进行切分。If the starting and ending core nodes of the two routing data to be planned are the same, and there is an overlapping clock between the target transmission clocks of the two routing data to be planned, the overlapping clock can be divided as a time slice. Further, the respective non-overlapping clocks in the two target transmission clocks of the data to be routed to be planned may be divided as a time slice respectively.
例如,两条待规划路由数据的起止核心节点均为核心节点S和核心节点D,其中,一条待规划路由数据的目标传输时钟为第20个时钟至第40个时钟,另一条待规划路由数据的目标传输时钟为第30个时钟至第50个时钟,因此,两条待规划路由数据的目标传输时钟的重叠时钟为第30个时钟至第40个时钟,故可以将第30个时钟至第40个时钟作为一个时间片进行切分。另外,可以将第20个时钟至第30个时钟作为一个时间片进行切分,将第40个时钟至第50个时钟作为一个时间片进行切分。For example, the starting and ending core nodes of the two routing data to be planned are both core node S and core node D. Among them, the target transmission clock of one routing data to be planned is the 20th clock to the 40th clock, and the other one is the routing data to be planned. The target transmission clock is the 30th clock to the 50th clock. Therefore, the overlapping clocks of the two target transmission clocks of the data to be routed are the 30th clock to the 40th clock, so the 30th clock to the 40th clock can be 40 clocks are divided as a time slice. In addition, the 20th clock to the 30th clock may be divided as one time slice, and the 40th clock to the 50th clock may be divided as one time slice.
也即,在时间片切分时,以经过同一路径的不同路由重叠时间最小为原则。进而,在与第20个时钟至第30个时钟对应的时间片内,以及与第40个时钟至第50个时钟对应的时间片内,这两条待路由数据可以分时复用同一条最优路径,在与第30个时钟至第40个时钟对应的时间片内,只有一条待规划路由数据规划上述的最优路径,另一条待规划路由数据重新规划其次优路径。That is, when the time slice is divided, the principle is to minimize the overlapping time of different routes passing through the same path. Furthermore, in the time slice corresponding to the 20th clock to the 30th clock, and in the time slice corresponding to the 40th clock to the 50th clock, the two data to be routed can be time-division multiplexed with the same maximum For the optimal path, in the time slice corresponding to the 30th clock to the 40th clock, there is only one to-be-planned route data to plan the above-mentioned optimal route, and the other to-be-planned route data to re-plan its suboptimal route.
S440、从多个时间片中,确定目标传输时钟所属的至少一个目标时间片。S440. From the multiple time slices, determine at least one target time slice to which the target transmission clock belongs.
S450、根据与每个目标时间片对应的当前规划路由资源,确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。S450: Determine a routing path of the routing data to be planned within each target time slice according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
进一步的,还可以对切分得到的时间片进行调整,以平衡路由指令所占的存储空间大小以及时间片大小。Further, the time slice obtained by the segmentation can also be adjusted to balance the size of the storage space occupied by the routing instruction and the size of the time slice.
本申请实施例未尽详细解释之处请参见前述实施例,在此不再赘述。For details that are not explained in detail in the embodiments of the present application, please refer to the foregoing embodiments, which will not be repeated here.
根据本申请实施例的众核的路由映射方法,可以保证每条路由路径是最短路径的前提下减少路由拥塞,从而提高了路由效率。According to the many-core route mapping method of the embodiment of the present application, it is possible to reduce route congestion on the premise that each route path is the shortest route, thereby improving route efficiency.
图5为本申请实施例提供的一种众核的路由映射装置的结构示意图,本申请实施例可适用于对众核芯片片上网络进行路由路径规划的情况,该装置可采用软件和/或硬件的方式实现,并一般可集成在电子设备中。如图5所示,该装置500包括:传输时钟确定模块510、时间片确定模块520和路由路径规划模块530。其中,FIG. 5 is a schematic structural diagram of a many-core route mapping apparatus provided by an embodiment of the present application. The embodiment of the present application may be applied to a situation in which routing paths are planned for a network-on-chip on a many-core chip, and the apparatus may adopt software and/or hardware. It can be realized in a way and can generally be integrated in electronic equipment. As shown in FIG. 5 , the apparatus 500 includes: a transmission clock determination module 510 , a time slice determination module 520 and a routing path planning module 530 . in,
传输时钟确定模块510,用于确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;The transmission clock determination module 510 is used to determine the target transmission clock of the to-be-planned routing data between the core nodes in the many-core system;
时间片确定模块520,用于从多个时间片中,确定目标传输时钟所属的至少一个目标时间片;a time slice determining module 520, configured to determine at least one target time slice to which the target transmission clock belongs from a plurality of time slices;
路由路径规划模块530,用于根据与每个目标时间片对应的当前规划路由资源,确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。The routing path planning module 530 is configured to determine the routing path of the routing data to be planned within each target time slice according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
本申请实施例的技术方案中,根据待规划路由数据的目标传输时钟,确定与待规划路由数据对应的至少一个目标时间片,进而根据与每个目标时间片对应的当前规划路由资源确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。在上述技术方案中,按照时间片分别进行路由路径规划,能够避免由于路由时间不同出现部分路径阻塞、部分路由空闲的现象,以此尽量充分地利用路由资源,提高了片上网络路由资源的利用率,进而有利于提高路由效率。In the technical solutions of the embodiments of the present application, at least one target time slice corresponding to the to-be-planned routing data is determined according to the target transmission clock of the to-be-planned routing data, and then the to-be-planned routing resources are determined according to the currently planned routing resources corresponding to each target time slice The routing path of routing data within each target time slice for routing mapping. In the above technical solution, routing paths are planned according to time slices, which can avoid the phenomenon that some paths are blocked and some routes are idle due to different routing times, so as to make full use of routing resources and improve the utilization rate of on-chip network routing resources. , which is beneficial to improve routing efficiency.
可选的,目标时间片的数量为多个,其中,待规划路由数据在不同目标时间片内的路由路径不完全相同。Optionally, the number of target time slices is multiple, wherein the routing paths of the routing data to be planned in different target time slices are not exactly the same.
可选的,上述装置还包括:时间片切分模块,用于在确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟之前,统计不同待规划路由数据的目标传输时钟,得到不同待规划路由数据的所有时钟;根据所有时钟切分时间片,得到多个时间片和每个时间片包括的时钟。Optionally, the above-mentioned device further includes: a time slice segmentation module, configured to count the target transmission clocks of different to-be-planned routing data before determining the target transmission clocks of the to-be-planned routing data between the core nodes in the many-core system, Obtain all clocks with different routing data to be planned; divide time slices according to all clocks to obtain multiple time slices and the clocks included in each time slice.
可选的,不同时间片包括的时钟的数量不完全相同。Optionally, the number of clocks included in different time slices is not the same.
可选的,时间片切分模块,具体用于根据各条待规划路由数据的目标传输时钟以及数据量,进行时间片切分;时间片切分模块,具体还用于如果多条中的至少两条待规划路由数据的起止核心节点相同,则根据至少两条待规划路由数据的目标传输时钟确定重叠时钟,并将重叠时钟切分作为一个时间片。Optionally, the time slice segmentation module is specifically used to perform time slice segmentation according to the target transmission clock and data volume of each piece of routing data to be planned; the time slice segmentation module is also specifically used if at least one of the If the starting and ending core nodes of the two routing data to be planned are the same, the overlapping clock is determined according to the target transmission clocks of the at least two routing data to be planned, and the overlapping clock is divided into a time slice.
可选的,上述装置还包括:时间片调整模块,用于在确定目标传输时钟所属的 至少一个目标时间片之前,根据当前路由信息对多个时间片进行调整,并更新每个时间片包括的时钟,得到更新后的多个时间片。Optionally, the above device further includes: a time slice adjustment module, configured to adjust multiple time slices according to the current routing information before determining at least one target time slice to which the target transmission clock belongs, and update the time slices included in each time slice. Clock to get updated multiple time slices.
可选的,时间片调整模块,具体用于根据路由表大小和/或路由条数确定时间片的目标总数量,并根据目标总数量对切分得到的时间片进行拆分或合并;如果相邻时间片内规划的路由路径一致,则将相邻时间片合并为一个时间片。Optionally, a time slice adjustment module, which is specifically used to determine the total target number of time slices according to the size of the routing table and/or the number of routing entries, and to split or merge the obtained time slices according to the total number of targets; If the planned routing paths in adjacent time slices are consistent, the adjacent time slices are merged into one time slice.
可选的,路由路径规划模块330,具体用于确定目标时间片内所包含单条路径的当前规划路由数据总量;其中,单条路径为相邻两核之间的路径;按照目标路径选择策略,根据目标时间片内所包含单条路径的当前规划路由数据总量,确定待规划路由数据在目标时间片内的路由路径。Optionally, the routing path planning module 330 is specifically configured to determine the total amount of currently planned routing data of a single path included in the target time slice; wherein, a single path is a path between two adjacent cores; according to the target path selection strategy, The routing path of the to-be-planned routing data in the target time slice is determined according to the total amount of currently planned routing data of a single path included in the target time slice.
进一步的,路由路径规划模块330,具体用于针对待规划路由数据在目标时间片内的路由路径涉及的当前核心节点,确定与当前核心节点对应的水平方向单条路径和竖直方向单条路径;如果水平方向单条路径和竖直方向单条路径的当前规划路由数据总量不相等,则根据当前规划路由数据总量最小的单条路径,确定与当前核心节点对应的下一个核心节点;如果水平方向单条路径和竖直方向单条路径的当前规划路由数据总量相等,则根据水平方向单条路径或竖直方向单条路径,确定与当前核心节点对应的下一个核心节点。Further, the routing path planning module 330 is specifically configured to determine a horizontal single path and a vertical single path corresponding to the current core node for the current core node involved in the routing path of the routing data to be planned within the target time slice; if If the total amount of currently planned routing data of a single horizontal path and a single vertical path is not equal, the next core node corresponding to the current core node is determined according to the single path with the smallest total planned routing data; If the total amount of currently planned routing data for a single vertical path is equal, the next core node corresponding to the current core node is determined according to a single horizontal path or a single vertical path.
上述众核的路由映射装置可执行本申请任意实施例所提供的众核的路由映射方法,具备执行的众核的路由映射方法相应的功能模块和有益效果。The above-mentioned many-core route mapping apparatus can execute the many-core route-mapping method provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects corresponding to the executed many-core route-mapping method.
图6为本申请实施例提供的一种电子设备的硬件结构示意图。如图6所示,该电子设备包括:一个或多个处理器601;存储器602,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现本申请实施例第一方面的任务映射方法;一个或多个I/O接口603,连接在处理器与存储器之间,配置为实现处理器与存储器的信息交互。其中,处理器601为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等;存储器602为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM,更具体如SDRAM、DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH);I/O接口(读写接口)603连接在处理器601与存储器602间,能实现处理器601与存储器602的信息交互,其包括但不限于数据总线(Bus)等。FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. As shown in FIG. 6 , the electronic device includes: one or more processors 601 ; and a memory 602 on which one or more programs are stored. When the one or more programs are executed by the one or more processors, one or more programs are executed. Multiple processors implement the task mapping method of the first aspect of the embodiments of the present application; one or more I/O interfaces 603 are connected between the processors and the memory, and are configured to implement information interaction between the processor and the memory. The processor 601 is a device with data processing capability, including but not limited to a central processing unit (CPU), etc.; the memory 602 is a device with data storage capability, including but not limited to random access memory (RAM, more specifically Such as SDRAM, DDR, etc.), read only memory (ROM), electrified erasable programmable read only memory (EEPROM), flash memory (FLASH); the I/O interface (read and write interface) 603 is connected between the processor 601 and the memory 602 , can realize the information interaction between the processor 601 and the memory 602, which includes but is not limited to a data bus (Bus) and the like.
在一些实施例中,处理器601、存储器602和I/O接口603通过总线相互连接,进而与计算设备的其它组件连接。In some embodiments, the processor 601, the memory 602, and the I/O interface 603 are interconnected by a bus, which in turn is connected to other components of the computing device.
在一些实施例中,存储器602作为一种非暂态计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本申请实施例中的一种众核的路由映射方法对应的程序指令,包括:确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;从多个时间片中,确定目标传输时钟所属的至少一个目标时间片;根据与每个目标时间片对应的当前规划路由资源,确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。In some embodiments, the memory 602, as a non-transitory computer-readable storage medium, may be used to store software programs and computer-executable programs, such as program instructions corresponding to a many-core route mapping method in the embodiments of the present application , including: determining the target transmission clock of the to-be-planned routing data between the core nodes in the many-core system; from multiple time slices, determining at least one target time slice to which the target transmission clock belongs; The currently planned routing resources are determined, and the routing path of the to-be-planned routing data in each target time slice is determined for routing mapping.
处理器601通过运行存储在存储器602中的软件程序指令,从而执行芯片的各种功能应用以及数据处理,即实现上述方法任意实施例中的一种众核的路由映射方法。The processor 601 executes various functional applications and data processing of the chip by running the software program instructions stored in the memory 602, ie, implements a many-core route mapping method in any embodiment of the above method.
存储器602可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据芯片的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非暂态性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态性固态存储器件。The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function; the storage data area may store data created according to the use of the chip, and the like. Additionally, memory 602 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
本申请实施例还提供一种包含计算机可执行指令的存储介质,计算机可执行指令在由处理器执行时用于实现一种众核的路由映射方法,该方法包括:确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;从多个时间片中,确定目标传输时钟所属的至少一个目标时间片;根据与每个目标时间片对应的当前规划路由资源,确定待规划路由数据在每个目标时间片内的路由路径,以进行路由映射。Embodiments of the present application also provide a storage medium containing computer-executable instructions, and the computer-executable instructions are used to implement a many-core route mapping method when executed by a processor. The method includes: determining a core in a many-core system The target transmission clock of the to-be-planned routing data between nodes; from multiple time slices, determine at least one target time slice to which the target transmission clock belongs; according to the currently planned routing resources corresponding to each target time slice, determine the to-be-planned route The routing path of data within each target time slice for route mapping.
可选的,该计算机可执行指令在由处理器执行时还可以用于实现本申请任意实施例所提供的一种众核的路由映射方法的技术方案。Optionally, the computer-executable instructions, when executed by the processor, may also be used to implement the technical solution of a many-core route mapping method provided by any embodiment of the present application.
本申请实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当计算机可读代码在电子设备的处理器中运行时,电子设备中的处理器执行用于实现上述实施例的众核的路由映射方法。Embodiments of the present application also provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying the computer-readable codes, when the computer-readable codes run in a processor of an electronic device , the processor in the electronic device executes the route mapping method for implementing the many-core of the above embodiment.
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等, 包括若干指令用以使得芯片执行本申请各个实施例的方法。From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and necessary general-purpose hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation manner . Based on such understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to related technologies, and the computer software products can be stored in a computer-readable storage medium, such as a computer floppy disk, A read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., include several instructions to make the chip execute the methods of the various embodiments of the present application.
值得注意的是,上述众核的路由映射装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。It is worth noting that, in the embodiment of the above-mentioned many-core route mapping device, the included units and modules are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; In addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present application and applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present application. The scope is determined by the scope of the appended claims.

Claims (13)

  1. 一种众核的路由映射方法,其特征在于,包括:A route mapping method for many cores, comprising:
    确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;Determine the target transmission clock of the data to be routed between the core nodes in the many-core system;
    从多个时间片中,确定所述目标传输时钟所属的至少一个目标时间片;From a plurality of time slices, determine at least one target time slice to which the target transmission clock belongs;
    根据与每个所述目标时间片对应的当前规划路由资源,确定所述待规划路由数据在每个所述目标时间片内的路由路径,以进行路由映射。Determine the routing path of the to-be-planned routing data in each of the target time slices according to the currently planned routing resources corresponding to each of the target time slices, so as to perform route mapping.
  2. 根据权利要求1所述的方法,其特征在于,所述目标时间片的数量为多个,其中,所述待规划路由数据在不同目标时间片内的路由路径不完全相同。The method according to claim 1, wherein the number of the target time slices is multiple, wherein the routing paths of the to-be-planned routing data in different target time slices are not identical.
  3. 根据权利要求1所述的方法,其特征在于,在所述确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟之前,所述方法还包括:The method according to claim 1, wherein before the determining the target transmission clock of the data to be routed between the core nodes in the many-core system, the method further comprises:
    统计不同待规划路由数据的目标传输时钟,得到所述不同待规划路由数据的所有时钟;Counting target transmission clocks of different routing data to be planned, to obtain all clocks of the routing data different to be planned;
    根据所述所有时钟切分时间片,得到多个时间片和每个时间片包括的时钟。Divide the time slices according to all the clocks to obtain multiple time slices and the clocks included in each time slice.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述所有时钟切分时间片,包括:The method according to claim 3, wherein the dividing a time slice according to all the clocks comprises:
    根据多条所述待规划路由数据的数据量及每条所述待规划路由数据的目标传输时钟,进行时间片切分;According to the data volume of the multiple pieces of routing data to be planned and the target transmission clock of each piece of the routing data to be planned, time slice segmentation is performed;
    其中,如果多条中的至少两条所述待规划路由数据的起止核心节点相同,则根据所述至少两条所述待规划路由数据的目标传输时钟确定重叠时钟,并将所述重叠时钟切分作为一个时间片。Wherein, if at least two of the multiple pieces of the to-be-planned routing data have the same starting and ending core nodes, an overlapping clock is determined according to the target transmission clocks of the at least two to-be-planned routing data, and the overlapping clocks are switched to divided as a time slice.
  5. 根据权利要求1所述的方法,其特征在于,在所述确定所述目标传输时钟所属的至少一个目标时间片之前,所述方法还包括:The method according to claim 1, wherein before the determining of at least one target time slice to which the target transmission clock belongs, the method further comprises:
    根据当前路由信息对所述多个时间片进行调整,并更新每个时间片包括的时钟,得到更新后的多个时间片。The multiple time slices are adjusted according to the current routing information, and the clock included in each time slice is updated to obtain updated multiple time slices.
  6. 根据权利要求5所述的方法,其特征在于,所述根据当前路由信息对所述多个时间片进行调整,包括:The method according to claim 5, wherein the adjusting the multiple time slices according to the current routing information comprises:
    根据路由表大小和/或路由条数确定时间片的目标总数量,并根据所述目标总数量对切分得到的时间片进行拆分或合并;Determine the total target number of time slices according to the size of the routing table and/or the number of routing bars, and split or merge the time slices obtained by splitting according to the total target number;
    其中,如果相邻时间片内规划的路由路径一致,则将所述相邻时间片合并为一个时间片。Wherein, if the planned routing paths in adjacent time slices are consistent, the adjacent time slices are merged into one time slice.
  7. 根据权利要求1所述的方法,其特征在于,所述根据与所述目标时间片对应的当前规划路由资源,确定所述待规划路由数据在所述目标时间片内的路由路径,包括:The method according to claim 1, wherein the determining the routing path of the to-be-planned routing data within the target time slice according to the currently planned routing resources corresponding to the target time slice comprises:
    确定所述目标时间片内所包含单条路径的当前规划路由数据总量;其中,所述单条路径为相邻两核之间的路径;Determine the total amount of currently planned routing data of a single path included in the target time slice; wherein, the single path is a path between two adjacent cores;
    按照目标路径选择策略,根据所述目标时间片内所包含单条路径的当前规划路由数据总量,确定所述待规划路由数据在所述目标时间片内的路由路径。According to the target path selection strategy, the routing path of the to-be-planned routing data in the target time slice is determined according to the total amount of currently planned routing data of a single path included in the target time slice.
  8. 根据权利要求7所述的方法,其特征在于,所述按照目标路径选择策略,根据所述目标时间片内所包含单条路径的当前规划路由数据总量,确定所述待规划路由数据在所述目标时间片内的路由路径,包括:The method according to claim 7, wherein, according to the target path selection strategy, according to the total amount of currently planned routing data of a single path included in the target time slice, it is determined that the to-be-planned routing data is in the Routing paths within the target time slice, including:
    针对所述待规划路由数据在所述目标时间片内的路由路径涉及的当前核心节点,确定与所述当前核心节点对应的水平方向单条路径和竖直方向单条路径;For the current core node involved in the routing path of the to-be-planned routing data in the target time slice, determine a horizontal single path and a vertical single path corresponding to the current core node;
    如果所述水平方向单条路径和所述竖直方向单条路径的当前规划路由数据总量不相等,则根据所述当前规划路由数据总量最小的单条路径,确定与所述当前核心节点对应的下一个核心节点;If the total amount of currently planned routing data of the single path in the horizontal direction and the single path in the vertical direction is not equal, determine the next path corresponding to the current core node according to the single path with the smallest total amount of the currently planned routing data. a core node;
    如果所述水平方向单条路径和所述竖直方向单条路径的当前规划路由数据总量相等,则根据所述水平方向单条路径或所述竖直方向单条路径,确定与所述当前核心节点对应的下一个核心节点。If the total amount of the currently planned routing data of the single horizontal path and the single vertical path is equal, then determine the current core node corresponding to the single horizontal path or the single vertical path. next core node.
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,不同时间片包括的时钟的数量不完全相同。The method according to any one of claims 1-8, wherein the number of clocks included in different time slices is not exactly the same.
  10. 一种众核的路由映射装置,其特征在于,包括:A kind of route mapping device of many cores, is characterized in that, comprises:
    传输时钟确定模块,用于确定众核系统中的核心节点之间的待规划路由数据的目标传输时钟;a transmission clock determination module, used for determining the target transmission clock of the data to be routed between the core nodes in the many-core system;
    时间片确定模块,用于从多个时间片中,确定所述目标传输时钟所属的至少一个目标时间片;a time slice determination module, configured to determine at least one target time slice to which the target transmission clock belongs from a plurality of time slices;
    路由路径规划模块,用于根据与每个所述目标时间片对应的当前规划路由资源,确定所述待规划路由数据在每个所述目标时间片内的路由路径,以进行路由映射。The routing path planning module is configured to determine the routing path of the to-be-planned routing data in each of the target time slices according to the currently planned routing resources corresponding to each target time slice, so as to perform route mapping.
  11. 一种电子设备,包括:An electronic device comprising:
    一个或多个处理器;one or more processors;
    存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现根据权利要求1至9中任意一项 所述的方法;A storage device having one or more programs stored thereon which, when executed by the one or more processors, cause the one or more processors to implement any one of claims 1 to 9 a method as described;
    一个或多个I/O接口,连接在所述处理器与存储器之间,配置为实现所述处理器与存储器的信息交互。One or more I/O interfaces, connected between the processor and the memory, are configured to realize the information interaction between the processor and the memory.
  12. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-9中任一所述的方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-9 is implemented.
  13. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现权利要求1-9中的任一权利要求所述的方法。A computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, which when executed in a processor of an electronic device, the electronic A processor in the device executes the method for implementing any of claims 1-9.
PCT/CN2022/078236 2021-03-01 2022-02-28 Many-core route mapping method and apparatus, device and medium WO2022184008A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110226931.3 2021-03-01
CN202110226931.3A CN114996199A (en) 2021-03-01 2021-03-01 Many-core route mapping method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2022184008A1 true WO2022184008A1 (en) 2022-09-09

Family

ID=83018512

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/078236 WO2022184008A1 (en) 2021-03-01 2022-02-28 Many-core route mapping method and apparatus, device and medium

Country Status (2)

Country Link
CN (1) CN114996199A (en)
WO (1) WO2022184008A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501504B (en) * 2023-06-27 2023-09-12 上海燧原科技有限公司 Space-time mapping method and device for data stream, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080123682A1 (en) * 2006-06-27 2008-05-29 Justin Michael Yackoski Method for scheduling transmissions in an ad hoc network
CN102799560A (en) * 2012-09-07 2012-11-28 上海交通大学 Dynamic reconfigurable subnetting method and system based on network on chip
CN106168940A (en) * 2016-06-22 2016-11-30 中国科学院计算技术研究所 The road network implementation method of high density network-on-chip and device
CN112003787A (en) * 2020-08-14 2020-11-27 北京灵汐科技有限公司 Routing path determining method, device, control equipment and storage medium
US20200396158A1 (en) * 2019-06-11 2020-12-17 Mellanox Technologies Tlv Ltd. Throughput in a crossbar network element by modifying mappings between time slots and ports

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080123682A1 (en) * 2006-06-27 2008-05-29 Justin Michael Yackoski Method for scheduling transmissions in an ad hoc network
CN102799560A (en) * 2012-09-07 2012-11-28 上海交通大学 Dynamic reconfigurable subnetting method and system based on network on chip
CN106168940A (en) * 2016-06-22 2016-11-30 中国科学院计算技术研究所 The road network implementation method of high density network-on-chip and device
US20200396158A1 (en) * 2019-06-11 2020-12-17 Mellanox Technologies Tlv Ltd. Throughput in a crossbar network element by modifying mappings between time slots and ports
CN112003787A (en) * 2020-08-14 2020-11-27 北京灵汐科技有限公司 Routing path determining method, device, control equipment and storage medium

Also Published As

Publication number Publication date
CN114996199A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US9590813B1 (en) Supporting multicast in NoC interconnect
US10348563B2 (en) System-on-chip (SoC) optimization through transformation and generation of a network-on-chip (NoC) topology
KR102285138B1 (en) System level simulation in network on chip
US9860197B2 (en) Automatic buffer sizing for optimal network-on-chip design
US9130856B2 (en) Creating multiple NoC layers for isolation or avoiding NoC traffic congestion
US9529400B1 (en) Automatic power domain and voltage domain assignment to system-on-chip agents and network-on-chip elements
US9426099B2 (en) Router, method for controlling router, and program
US9294354B2 (en) Using multiple traffic profiles to design a network on chip
US9477280B1 (en) Specification for automatic power management of network-on-chip and system-on-chip
US10554496B2 (en) Heterogeneous SoC IP core placement in an interconnect to optimize latency and interconnect performance
US9825809B2 (en) Dynamically configuring store-and-forward channels and cut-through channels in a network-on-chip
US11838211B2 (en) System and method to determine optimal path(s) and use load balancing in an interconnect
US10042404B2 (en) Automatic generation of power management sequence in a SoC or NoC
US20140331027A1 (en) Asymmetric mesh noc topologies
US20140301241A1 (en) Multiple heterogeneous noc layers
WO2022184008A1 (en) Many-core route mapping method and apparatus, device and medium
US10469338B2 (en) Cost management against requirements for the generation of a NoC
US10547514B2 (en) Automatic crossbar generation and router connections for network-on-chip (NOC) topology generation
US20180198682A1 (en) Strategies for NoC Construction Using Machine Learning
US10084725B2 (en) Extracting features from a NoC for machine learning construction
JP6372103B2 (en) Switch device, data transfer control method, and data transfer control program
US20180074959A1 (en) Node-based computing devices with virtual circuits

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22762473

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE