Arithmetic unit, arithmetic unit control method and computing device
By designing an independent clock system in the computing device, the clock correlation problem of logic control module and data path module is solved, and the flexible adjustment of their respective clock frequency and power consumption reduction are achieved, improving the performance and stability of the computing device.
Patent Information
- Application Number
- CN202411266945.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-11-29
AI Technical Summary
When computing devices with multiple computing cores perform hash operation tasks, the clock correlation problem between the logic control module and the data path module cannot meet their respective clock requirements at the same time.
Design a computing unit, including multiple computing engines, each computing engine consists of a logic control module and a data path module, and provides independent first and second clock signals through a clock component. The overall logic control module is responsible for adjusting the clocks of each module. and further adjust the clock frequency of the data path module through a distributed clock generator and multiplexer.
The independent clock frequency of the logic control module and the data path module is realized, which meets their respective performance requirements, while reducing the power consumption of the computing unit and improving timing stability.
Smart Images

Figure CN119045607A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer science, and in particular to a computing unit and a computing device with multiple computing cores. Background Art
[0002] When computing devices with multiple computing cores perform hashing tasks, the high-performance computing core design faces a technical problem, namely the clock association between the logic control module and the data path module. The logic control module requires precise timing control to ensure correct task scheduling and instruction execution, while the data path module needs to perform hashing calculations at a higher rate. The two share the same clock and cannot simultaneously meet their respective clock requirements. Summary of the invention
[0003] In order to solve the problem that the logic control module and the data path module share the same clock and cannot simultaneously meet their respective clock requirements, the present invention discloses an operation unit, comprising:
[0004] A plurality of computing engines, each of which comprises a logic control module and a data path module connected to each other, wherein the logic control module is used to receive task information, the data path module is used to calculate a calculation result based on the task information and synchronize the calculation result to the logic control module, and the logic control module is also used to obtain task return information according to the calculation result;
[0005] A clock component, configured to generate at least one first clock signal and at least one second clock signal independent of the first clock signal, wherein the first clock signal is provided to the logic control module, and the second clock signal can be configured as a clock of the data path module;
[0006] The overall logic control module is connected to the plurality of logic control modules and the clock component, and is used to send task information to the plurality of logic control modules and receive task return information from the plurality of logic control modules.
[0007] In the above-mentioned operation unit, the clock frequency of the first clock signal is lower than the clock frequency of the second clock signal.
[0008] In the above technical solution, when the clock frequency of the data path module does not increase, the clock frequency of the logic control module is lower than the clock frequency of the data path module, so as to reduce the power consumption of the operation unit.
[0009] In the above-mentioned computing unit, the clock component further comprises:
[0010] A phase-locked loop for generating a frequency-multiplied clock signal;
[0011] at least one first frequency divider, the first frequency divider being connected to the phase-locked loop and each of the logic control modules, and being configured to generate the first clock signal;
[0012] At least one second frequency divider, the second frequency divider is connected to the phase-locked loop and each of the data path modules, and is used to generate the second clock signal.
[0013] In the above technical solution, the overall logic control module can flexibly adjust the clock frequencies of the logic control modules and / or data path modules in batches.
[0014] The above-mentioned operation unit also includes: at least one distributed clock generator, each of which is connected to the corresponding data path module, and the distributed clock generator is used to generate a third clock signal, and the third clock signal can be configured as a clock corresponding to the data path module.
[0015] The above-mentioned operation unit also includes: a multiplexer, each of which is connected between the corresponding distributed clock generator, the clock component and the corresponding data path module, and the multiplexer is also connected to the overall logic control module. The multiplexer is used to configure one of the second clock signal and the third clock signal as the clock of the corresponding data path module under the control of the overall logic control module.
[0016] In the above-mentioned operation unit, the overall logic control module is connected to a plurality of the distributed clock generators, and is used to adjust the clock frequency of the third clock signal generated by the distributed clock generators.
[0017] In the above technical solution, a third clock signal is provided to the corresponding data path module through multiple distributed clock generators, which can further accurately meet the performance requirements of the data path module according to the task calculation situation of each data path module, thereby reducing the power consumption of the computing unit as a whole.
[0018] In the above-mentioned computing unit, the distributed clock generator is a ring oscillator.
[0019] In the above-mentioned operation unit, the logic control module and the data path module also include: a data synchronization pulse generating circuit, used to send out a data synchronization pulse signal; a data synchronization edge detector circuit, used to detect a data synchronization edge signal; wherein, the logic control module and the data path module perform data synchronization through the data synchronization pulse signal, the data synchronization edge signal and the register.
[0020] In order to better achieve the purpose of the present invention, the present invention also provides a chip, including one or more computing units of any one of the above items.
[0021] In order to better achieve the purpose of the present invention, the present invention also provides a computing board for a computing device, comprising one or more of the above-mentioned chips.
[0022] In order to better achieve the purpose of the present invention, the present invention also provides a computing device, including a power board, a control board, a connecting board, a radiator and a plurality of computing boards, wherein the control board is connected to the computing board through the connecting board, the radiator is arranged around the computing board, the power board is used to provide power to the connecting board, the control board, the radiator and the computing board, and the computing board is any one of the above-mentioned computing boards.
[0023] In order to better achieve the purpose of the present invention, the present invention also provides a control method for an operation unit, and the operation unit clock control method includes the following steps: the clock component generates at least one first clock signal and provides it to multiple logic control modules; the clock component generates at least one second clock signal independent of the first clock signal and can be configured as the clock of multiple data path modules; the overall logic control module sends task information to multiple logic control modules and receives task return information from multiple logic control modules; the data path module calculates a calculation result based on the task information and synchronizes the calculation result to the logic control module.
[0024] The above technical solution provides independent clocks to the logic control module and the data path module, thereby satisfying their respective clock requirements.
[0025] In the clock control method of the above-mentioned operation unit, the following steps are further included: the overall logic control module obtains the workload of multiple computing engines based on the task return information of multiple logic control modules; the overall logic control module controls the clock signals of multiple logic control modules and / or multiple data path modules according to the workload of the multiple computing engines.
[0026] In the clock control method of the computing unit, the step of the overall logic control module controlling the clock signals of the plurality of logic control modules and / or the plurality of data path modules according to the workload of the plurality of computing engines further comprises:
[0027] The overall logic control module adjusts the frequency of the first clock signal through the clock component according to the workload of the multiple computing engines; and / or the overall logic control module adjusts the frequency of the second clock signal through the clock component according to the workload of the multiple computing engines.
[0028] In the above technical solution, the overall logic control module can flexibly adjust the clock frequencies of the logic control modules and / or data path modules in batches.
[0029] In the clock control method of the computing unit, the step of the overall logic control module controlling the clock signals of the plurality of data path modules according to the workloads of the plurality of computing engines further includes:
[0030] The overall logic control module configures one of the second clock signal and the third clock signal as the clock of the data path module corresponding to the multiplexer through the multiplexer according to the workload of the multiple computing engines.
[0031] In the clock control method of the above-mentioned operation unit, the step in which the overall logic control module controls the clock signals of the multiple data path modules according to the workloads of the multiple computing engines also includes: when the clocks of the multiple data path modules are configured as the third clock signal, the overall logic control module adjusts the clock frequency of the third clock signal through the distributed clock generators corresponding to the multiple data path modules according to the workloads of the multiple computing engines.
[0032] In the above technical solution, a third clock signal is provided to the corresponding data path module through multiple distributed clock generators, which can further accurately meet the performance requirements of the data path module according to the task calculation situation of each data path module, thereby reducing the power consumption of the computing unit as a whole.
[0033] In order to better achieve the above-mentioned purpose, the present invention also provides a storage medium for storing a computer control program, wherein the computer control program is used to execute the steps of any one of the above-mentioned clock control methods.
[0034] The clock control method of the computing unit, chip, computing board, computing device and computing unit disclosed in the present invention enables the logic control module and the data path module to have independent clock frequencies, thereby meeting their respective performance requirements to the greatest extent without reducing the overall performance. At the same time, the logic control module and the data path module have independent clock frequencies, which can also reduce the power consumption of the computing unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The figure is a schematic block diagram of the composition of a computing unit in one embodiment of the present invention.
[0036] Figure 2 The figure is a block diagram of the connection relationship between the overall logic control module and the logic control module in one embodiment of the present invention.
[0037] Figure 3The figure is a schematic block diagram of the composition of a computing unit in another embodiment of the present invention.
[0038] Figure 4 The figure is a schematic block diagram of the composition of a computing unit in another embodiment of the present invention.
[0039] Figure 5 The figure is a schematic block diagram of the composition of a computing unit in another embodiment of the present invention.
[0040] Figure 6 Schematic diagram of data synchronization between a logic control module and a data path module in one embodiment of the present invention.
[0041] Figure 7 The figure is a schematic block diagram of the composition of a computing unit in another embodiment of the present invention.
[0042] Figure 8 The figure is a schematic diagram of a computing pipeline for task scheduling in one embodiment of the present invention.
[0043] Fig. 9 FIG. 1 is a waveform diagram of the forward transmission of the computing unit clock in one embodiment of the present invention.
[0044] Fig.10 FIG. 1 is a waveform diagram of the reverse transmission of the computing unit clock in one embodiment of the present invention.
[0045] Fig.11 The figure is a schematic diagram of a chip of the present invention.
[0046] Fig.12 This is a schematic diagram of a computing board of the present invention.
[0047] Fig.13 A schematic diagram of a computing device according to the present invention.
[0048] Wherein, the reference numerals are:
[0049] 1- General logic control module
[0050] 11-Calculation Engine
[0051] 111-Logic Control Module
[0052] 113, 113'- first clock signal
[0053] 112-Data Path Module
[0054] 114, 114'- second clock signal 2- clock component
[0055] 21-Phase-Locked Loop
[0056] 22, 22'-First divider
[0057] 23, 23'- Second divider
[0058] 3-Distributed clock control unit
[0059] 31-Distributed Clock Generator
[0060] 311-third clock signal
[0061] 32-Multiplexer
[0062] 4-External storage
[0063] 10-Calculation unit
[0064] 100-chip
[0065] 101-Control Unit
[0066] 1000-Computing Devices
[0067] 1001-Power board
[0068] 1002 control board
[0069] 1003-Connection plate
[0070] 1004-Radiator DETAILED DESCRIPTION
[0071] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments to further understand the purpose, solution and beneficial technical effects of the present invention. Obviously, the specific embodiments described in the present invention are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments disclosed in the present invention, all other embodiments obtained by ordinary technicians in this field without spending creative labor also belong to the scope disclosed by the technical solution of the present invention.
[0072] It should be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0073] Certain words are used in the specification and the appended claims to refer to specific components or parts. It should be understood by those skilled in the art that technical users or manufacturers may refer to the same component or part by different nouns or terms. This specification and the appended claims do not distinguish components or parts by differences in names, but by differences in functions.
[0074] In the present invention, the directions or positional relationships indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like are based on the directions or positional relationships shown in the drawings. These terms are mainly used to better describe the present invention and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific direction, or to be constructed and operated in a specific direction.
[0075] In addition, the terms "installed", "set", "provided with", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0076] To better understand the technical solution of the present invention, please refer to Figure 1 The content shown. Among them, Figure 1 It is a schematic block diagram of the architecture of the computing unit 10 in one embodiment of the present invention.
[0077] In this embodiment, the present invention discloses a computing unit 10, including: a plurality of computing engines (CE) 11, each computing engine 11 includes a logic control module (CTRL) 111 and a data path module (DP, datapath) 112 connected to each other, the logic control module 111 receives task information, the data path module 112 calculates a calculation result based on the task information and synchronizes the calculation result to the logic control module 111, and the logic control module also obtains task return information according to the calculation result; a clock component 2, the clock component 2 generates one or more first clock signals 113 and one or more second clock signals 114 independent of the first clock signal 113, the first clock signal 113 is provided to the logic control module 111, and the second clock signal 114 can be configured as the clock of the data path module 112; and a total logic control module (TOPCTRL) 1, connected to the plurality of logic control modules 111 and the clock component 2 (for the sake of simplicity and ease of viewing, Figure 1The connection between the overall logic control module 1 and the multiple logic control modules 111 is not shown in the figure. The overall logic control module 1 sends task information to the multiple logic control modules 111 and receives task return information from the multiple logic control modules 111.
[0078] In this embodiment, the overall logic control module 1 is responsible for distributing task information to each computing engine 11 and receiving task return information from each computing engine 11. The logic control module 111 of each computing engine 11 is responsible for receiving task information sent by the overall logic control module 1 and returning the task information to the overall logic control module 1. At the same time, the logic control module 111 of each computing engine 11 passes the task information to the data path module 112, and the data path module 112 performs calculations according to the task information.
[0079] In this embodiment, when the task is characterized by a relatively long execution time, for example, generally in the order of ms or above, after the logic control module 111 of the computing engine 11 completes the reception of the task information, it starts the task and keeps the task-related information for the data path module 112 to use at any time; when the task is completed, the logic control module 111 sends the information to the general logic control module 1. In this process, the logic control module 111 does not need to act most of the time and is in a relatively static state. Moreover, the time ratio occupied by the above stages of receiving the task information of the general logic control module 1, starting the task and sending the information to the general logic control module 1 is very low.
[0080] In this embodiment, at least one first clock signal 113 is provided to multiple logic control modules 111 through the clock component 2, and at least one second clock signal 114 independent of the first clock signal 113 is provided to multiple data path modules 112, that is, the clocks of the logic control modules 111 and the data path modules 112 are decoupled, so that the logic control modules 111 and the data path modules 112 can have their own independent working clocks, so that their respective performance requirements can be met according to the characteristics of the tasks.
[0081] In a specific embodiment of the computing unit 10 of the present invention, the clock frequency of the first clock signal 113 is lower than the clock frequency of the second clock signal 114 .
[0082] In the embodiment of the present invention, if the execution time of the task is long, the logic control module 111 does not need to use the same high frequency clock as the data path module 112. In a further embodiment, when the logic control module 111 does not need to participate in the task calculation, the clock of the logic control module 111 is turned off under the control of the overall logic control module 1. When the clock frequency of the data path module 112 remains unchanged, reducing or turning off the clock of the logic control module 111 can reduce the power consumption of the operation unit 10.
[0083] In order to better illustrate the embodiments of the present invention, see Figure 2 , Figure 2 1 is a block diagram of the connection relationship between the overall logic control module 1 and the logic control module 111 in one embodiment of the present invention.
[0084] In a specific embodiment of the computing unit 10 of the present invention, the overall logic control module 1 is connected to each logic control module 111 , and the overall logic control module 1 sends task information to the logic control module 111 and receives task return information from the logic control module 111 .
[0085] See also Figure 1 In a specific embodiment of the operation unit 10 of the present invention, the clock component 2 further includes: a phase-locked loop (PLL) 21, which generates a multiplied clock signal; one or more first frequency dividers (DIV1) 22, which are connected to the phase-locked loop 21 and each logic control module 111, wherein the first frequency divider 22 generates a first clock signal 113; and, one or more second frequency dividers (DIV2) 23, which are connected to the phase-locked loop 21 and each data path module 112, wherein the second frequency divider 23 generates a second clock signal 114.
[0086] In order to better illustrate the embodiments of the present invention, see Figure 3 , Figure 3 FIG. 1 is a schematic block diagram of the composition of the operation unit 10 in another embodiment of the present invention.
[0087] This embodiment and Figure 1 The main difference between the embodiments is that the number of the first frequency dividers (DIV1 and DIV1') and the number of the second frequency dividers (DIV2 and DIV2') is two, which is only for illustration and the present invention is not limited thereto.
[0088] In this embodiment, when the number of the first frequency divider 22 and the second frequency divider 23 are both greater than one, the clock frequencies of the multiple first clock signals (for example, 113 and 113') are different from each other, and the clock frequencies of the multiple second clock signals (for example, 114 and 114') are different from each other. The overall logic control module 1 can provide different clocks to the multiple logic control modules 111 by switching the multiple first frequency dividers; it can also provide different clocks to the multiple data path modules 112 by switching the multiple second frequency dividers. At the same time, the overall logic control module 1 can also provide the clock generated by the first frequency divider 22 to a part of the logic control modules 111 and provide the clock generated by the first frequency divider 22' to another part of the logic control modules 111 according to the characteristics of the task. The same is true for the data path module 112, which will not be repeated. In the above technical solution, the overall logic control module 1 can flexibly adjust the clock frequency of the logic control module 111 and / or the data path module 112 in batches.
[0089] In a further embodiment, the first frequency divider 22 and the second frequency divider 23 may also be dynamic frequency dividers, and the overall logic control module 1 may adjust the clock frequency of the clock signal generated by the first frequency divider 22 and / or the second frequency divider 23 .
[0090] To better illustrate the embodiments of the present invention, please refer to Figure 4 , Figure 4 FIG. 1 is a schematic block diagram of the composition of the operation unit 10 in another embodiment of the present invention.
[0091] In a specific embodiment of the present invention, it also includes:
[0092] At least one distributed clock generator (RO) 31 , each distributed clock generator 31 is connected to a corresponding data path module 112 , and the distributed clock generator 31 generates a third clock signal 311 , which can be configured as a clock of the corresponding data path module 112 .
[0093] Furthermore, in a specific embodiment of the present invention, it also includes:
[0094] Multiplexers (MUX) 32, each multiplexer 32 is connected between the corresponding distributed clock generator 31, the clock component 2 and the corresponding data path module 112, and the multiplexer 32 is also connected to the overall logic control module 1. Under the control of the overall logic control module 1, the multiplexer 32 selects one of the second clock signal 114 and the third clock signal 311 as the clock of the corresponding data path module 112. Specifically, the multiplexer 32 is connected to the second frequency divider 23 of the corresponding clock component 2 and the distributed clock generator 31, and the selection end of the multiplexer 32 is connected to the overall logic control module 1.
[0095] In a specific embodiment of the present invention, the overall logic control module 1 is connected to a plurality of distributed clock generators 31 to adjust the clock frequency of the third clock signal 311 generated by the distributed clock generators 31 .
[0096] In this embodiment, through the adjustment of the plurality of distributed clock generators 31 by the overall logic control module 1 , the clock frequencies of the plurality of third clock signals 311 may be all the same, or partially the same, or different from each other.
[0097] In this embodiment, the distributed clock generator 31 is a ring oscillator.
[0098] Compared with the clock signal generated by the phase-locked loop and the frequency divider, the clock signal generated by the ring oscillator has a fast startup speed and a small device area, and is therefore suitable for being provided to the data path module 112 of each computing engine 11.
[0099] In the above technical solution, a third clock signal 311 is provided to the corresponding data path module 112 through multiple distributed clock generators 31, and an independent clock can be further provided for each data path module 112. According to the task calculation situation of each data path module 112, the performance requirements of the data path module 112 can be more accurately met, thereby reducing the power consumption of the operation unit as a whole. The clock adjustment of each data path module can use the dynamic voltage and frequency scaling (DVFS) method.
[0100] To better illustrate the embodiments of the present invention, please refer to Figure 5 , Figure 5 FIG. 1 is a schematic block diagram of the composition of a computing unit in another embodiment of the present invention. Figure 4 The main difference between the embodiment is that the operation unit 10 further includes a distributed clock control unit (ROCTRL) 3 (in order to simplify the drawings, Figure 5 The connection between the first frequency divider 22 and the logic control module 111 is not shown in the figure), and the distributed clock control unit 3 is connected to the overall logic control module 1 and each distributed clock generator 31. The distributed clock control unit 3 receives the control instruction of the overall logic control module 1, and adjusts or controls the clock frequency of the target distributed clock generator 31 according to the control instruction. In the above technical solution, by setting the distributed clock control unit 3, the architecture can be modularized, the complexity of the overall logic control module 1 is reduced, and debugging and maintenance are facilitated.
[0101] In a specific embodiment of the present invention, the computing engine 11 uses pipeline technology. After the logic control module 111 receives the task information from the overall logic control module 1, it saves the task information (the task information includes source data and task configuration information) and then starts the task. After starting the task, the data path module 112 starts to execute the task. The data path module 112 performs multiple calculations based on the source data and task configuration information in the task information. Each calculation starts from the head of the pipeline and ends at the tail. The calculation process is divided into multiple stages. If the result of the calculation meets the preset condition (the condition comes from the task configuration information), the logic control module 111 will be triggered to send the task return information to the overall logic control module 1. Since the clocks of the logic control module 111 and the data path module 112 are independent of each other, data synchronization is required during the task execution process. The timing of data synchronization can be obtained according to the task configuration information. For example, data synchronization can be performed when the data path module 112 receives task information from the logic control module 111, at the head of the pipeline, the middle of the pipeline, the tail of the pipeline, and when the data path module 112 completes the task calculation and returns the task calculation result to the logic control module 111. In other task execution stages, the logic control module 111 and the data path module 112 do not need to be synchronized. Since the clock frequency of the logic control module 111 is lower than the clock frequency of the data path module 112, the power consumption of the computing engine 11 can be reduced. In one embodiment of the present invention, data synchronization can be performed at each stage of the task calculation process through the task configuration information, thereby improving the accuracy and reliability of the task calculation.
[0102] To better illustrate the embodiments of the present invention, please refer to Figure 6 , Figure 6 Schematic diagram of data synchronization between the logic control module 111 and the data path module 112 in one embodiment of the present invention.
[0103] In a specific embodiment of the present invention, the logic control module 111 and the data path module 112 both further include:
[0104] A data synchronization pulse generating circuit is used to generate a data synchronization pulse signal; and a data synchronization edge detector circuit is used to detect the data synchronization edge signal; wherein,
[0105] The logic control module 111 and the data path module 112 perform data synchronization through data synchronization pulse signals, data synchronization edge signals and registers.
[0106] Those skilled in the art should know that the data synchronization pulse generating circuit in the above-mentioned embodiment can be a pulse generating circuit composed of an oscillation period, and the data synchronization edge detector circuit can be any one of an upper edge, a lower edge or a double edge detection circuit. The data synchronization pulse generating circuit and the data synchronization edge detector are both standard circuits in digital circuits and are not described in detail here. The register can be a data register, a general register or other type of register, and the present invention does not limit it.
[0107] In this embodiment, since the clocks of the data path module 112 and the logic control module 111 are different and independent of each other, the data transmission between them needs to be synchronized. The working principle of data synchronization through data synchronization pulse signal, data synchronization edge signal and register is as follows:
[0108] When the logic control module 111 is the data sender, the data path module 112 is the data receiver; when the logic control module 111 is the data receiver, the data path module 112 is the data sender. The data sender stores the data to be synchronized into the register, the data sender initiates a data synchronization edge signal, the data synchronization edge detector circuit of the data receiver detects the data synchronization edge signal; the data synchronization pulse generating circuit of the data receiver sends a data synchronization pulse signal; the data receiver reads the data to be synchronized in the register to complete data synchronization.
[0109] In this embodiment, if Figure 6 As shown, when the logic control module 111 notifies the data path module 112 to perform data synchronization, the logic control module 111 stores the task data data0 in the register, and then the logic control module 111 sends a data synchronization edge signal and outputs it to the data path module 112. The data path module 112 detects the data synchronization edge signal through the data synchronization edge detector circuit, and generates a data synchronization pulse signal through the data synchronization pulse generating circuit. Then, the data path module 112 reads the data data0 in the register (for example, the data data0 is the task information).
[0110] When the data path module 112 notifies the logic control module 111 to perform data synchronization, the data path module 112 stores the data data1 to be synchronized into the register, and then sends out a data synchronization edge signal, and outputs it to the logic control module 111. The logic control module 111 detects the data synchronization edge signal through the data synchronization edge detector circuit, and generates a data synchronization pulse signal through the data synchronization pulse generating circuit. Then, the logic control module 111 reads the data data1 in the register (for example, the data data1 is the task return information) to complete the data synchronization.
[0111] To better illustrate the embodiments of the present invention, please refer to Figure 7 , Figure 7 FIG. 1 is a schematic block diagram of the composition of the operation unit 10 in another embodiment of the present invention.
[0112] In a specific embodiment of the present invention, the data path module 112 and the logic control module 111 perform data synchronization in the external memory 4 .
[0113] In this embodiment, when the data volume of the task information to be executed is large, it is necessary to use the external memory 4 for reading and storage. Before the calculation task starts, the data path module 112 reads the external memory 4 to obtain the task information. After the data path module 112 completes the task calculation, it writes to the external memory 4 to store the task return information in the external memory 4, and then synchronizes the task return information to the logic control module 111.
[0114] To better illustrate the embodiments of the present invention, please refer to Figure 8 , Figure 8 The figure is a schematic diagram of a computing pipeline for task scheduling in one embodiment of the present invention.
[0115] The task scheduling of the neural network processor NPU (Neural Processing Unit) is similar to the hash calculation task, which dispatches multiple large tasks to multiple computing engines 11, and the calculation time is relatively long.
[0116] The logic control module 111 receives a task and splits it into multiple subtasks of a large order of magnitude. Multiple subtasks share the same task configuration control information. Similarly, in the NPU, a large computing task is also split into multiple subtasks of a large order of magnitude, and multiple subtasks share the control information of the same large task. Figure 8 In the command, the main task is TaskCMD and the subtask is Cycle CMD.
[0117] In one embodiment of the present invention, a neural network processor NPU is provided, including a computing engine 11, a control unit and a storage unit, the control unit is connected to the computing engine 11 and the storage unit, the computing engine 11 further includes a data path module 112 and a logic control module 111, wherein the clocks of the data path module 112 and the logic control module 111 are independent of each other, and the structure of providing the data path module 112 and the logic control module 111 with independent clocks is the same as the implementation of the computing unit 10 of the present invention, and will not be repeated here. Compared with the logic control module 111 and the data path module 112 sharing the same clock, it has better flexibility to adapt to different software algorithms and hardware architectures.
[0118] Multiple sub-tasks share the control information of the same large task, reducing the number of scheduling times of the control information. The clocks of the data path module 112 and the logic control module 111 are independent of each other. By reducing the clock frequency of the logic control module 111, the overall power consumption of the NPU is reduced.
[0119] To better illustrate the embodiments of the present invention, please refer to Figure 9-10 , Fig. 9 FIG. 1 is a waveform diagram of the clock forward transmission of the computing unit 10 in one embodiment of the present invention. Fig.10 FIG. 1 is a waveform diagram of clock reverse transmission of the computing unit 10 in one embodiment of the present invention.
[0120] The clocks of the logic control module 111 and the data path module 112 can be transmitted in a forward direction or a reverse direction.
[0121] In the existing design, both the logic control module 111 and the data path module 112 share the same clock, and the clock will be broadcast to each stage of the pipeline, which may cause the timing of the pipeline to be unstable.
[0122] In one embodiment of the present invention, since the clocks of the data path module 112 and the logic control module 111 are independent of each other, the timing can be guaranteed to be stable when the clock of the pipeline is forwarded. Compared with the broadcast clock, in the computing unit 10 of the present invention, each level of the forward clock has a buffer, that is, setup time, which can provide sufficient driving capability, so the timing is more stable.
[0123] In one embodiment of the present invention, since the clocks of the data path module 112 and the logic control module 111 are independent of each other, the timing can be guaranteed to be accurate when the pipeline clock is transmitted in reverse. In the computing unit 10 of the present invention, the clock reverse transmission can bring a longer hold time, so the timing is more accurate, which is beneficial to the design of the back end.
[0124] To better illustrate the embodiments of the present invention, please refer to Fig.11 , Fig.11 The present invention also provides a chip, such as Fig.11 As shown, the chip 100 includes a control unit 101 and one or more computing units 10. The control unit 101 inputs data to the computing unit 10 and processes the data output by the computing unit 10.
[0125] To better illustrate the embodiments of the present invention, please refer to Fig.12 , Fig.12 FIG. 1 is a schematic diagram of a computing board of the present invention. Fig.12As shown, the present invention also provides a computing board 200 for a computing device, comprising one or more of the above-mentioned chips 100.
[0126] To better illustrate the embodiments of the present invention, please refer to Fig.13 , Fig.13 A schematic diagram of a computing device according to the present invention.
[0127] like Fig.13 As shown, the present invention also provides a computing device 1000, including a power board 1001, a control board 1002, a connecting board 1003, a radiator 1004 and a plurality of computing boards 200, wherein the control board 1002 is connected to the computing board 200 through the connecting board 1003, the radiator 1004 is arranged around the computing board 200, the power board 1001 provides power to the connecting board 1003, the control board 1002, the radiator 1004 and the computing board 200, and the computing board 200 is any one of the above-mentioned computing boards 200.
[0128] In order to better illustrate the embodiments of the present invention, the present invention further provides a control method of an operation unit 10, the control method is used to control any of the above-mentioned operation units 10, and the clock control method of the operation unit includes the following steps:
[0129] The clock component 2 generates at least one first clock signal 113 and provides it to a plurality of logic control modules 111;
[0130] The clock component 2 generates at least one second clock signal 114 which is independent of the first clock signal 113 and can be configured as a clock for a plurality of datapath modules 112;
[0131] The overall logic control module 1 sends task information to the multiple logic control modules 111 and receives task return information from the multiple logic control modules 111;
[0132] The data path module 112 calculates the calculation result based on the task information and synchronizes the calculation result to the logic control module 111. In a specific embodiment of the clock control method of the operation unit 10 of the present invention, the steps are also included:
[0133] The overall logic control module 1 obtains the workload of the plurality of computing engines 11 according to the task return information of the plurality of logic control modules 111;
[0134] The overall logic control module 1 controls the clock signals of the multiple logic control modules 111 and / or the multiple data path modules 112 according to the workloads of the multiple computing engines 11. In this embodiment, the overall logic control module 1 obtains the workloads of the multiple computing engines 11 according to the task return information of the multiple logic control modules 111, which can be obtained by obtaining the voltage, power, clock frequency, task execution time and other data of the logic control modules 111 and the data path modules 112 of the computing engines 11 during the task execution process.
[0135] In a specific embodiment of the clock control method of the computing unit 10 of the present invention, the step of the overall logic control module 1 controlling the clock signals of the plurality of logic control modules 111 and / or the plurality of data path modules 112 according to the workload of the plurality of computing engines 11 further comprises:
[0136] The overall logic control module 1 adjusts the frequency of the first clock signal 113 through the clock component 2 according to the workload of the plurality of computing engines 11;
[0137] The overall logic control module 1 adjusts the frequency of the second clock signal 114 through the clock component 2 according to the workloads of the plurality of computing engines 11 .
[0138] Specifically, in this embodiment, the overall logic control module 1 can adjust the frequency of the first clock signal 113 and / or the second clock signal 114 according to the workload of the plurality of computing engines 11 obtained. For example, if the execution time of the task is relatively long, the logic control module 111 does not need to use a clock with the same high frequency as the data path module 112; in a further embodiment, when the logic control module 111 does not need to participate in the task calculation, the clock of the logic control module 111 is turned off under the control of the overall logic control module 1, and when the clock frequency of the data path module 112 remains unchanged, reducing or turning off the clock of the logic control module 111 can reduce the power consumption of the computing unit 10.
[0139] In a further embodiment, the overall logic control module 1 can control any logic control module 111 to use the first clock signal 113 provided by any first frequency divider according to the workload of the plurality of computing engines 11; and can also control any data path module 112 to use the second clock signal 114 provided by any second frequency divider. In the above technical solution, the overall logic control module 1 can flexibly adjust the clock frequencies of the logic control modules 111 and / or the data path modules 112 in batches.
[0140] In a specific embodiment of the clock control method of the computing unit 10 of the present invention, the step of controlling the clock signals of the plurality of data path modules 112 according to the workload of the plurality of computing engines 11 by the overall logic control module 1 further includes:
[0141] The overall logic control module 1 selects one of the second clock signal 114 and the third clock signal 311 through the multiplexer 32 to configure as the clock of the data path module 112 corresponding to the multiplexer 32 according to the workload of the multiple computing engines 11 .
[0142] In one embodiment of the clock control method of the computing unit 10 of the present invention, the step of controlling the clock signals of the plurality of data path modules 112 according to the workload of the plurality of computing engines 11 by the overall logic control module 1 further includes:
[0143] When the clocks of the multiple data path modules 112 are configured as the third clock signal, the overall logic control module 1 adjusts the clock frequency of the third clock signal 311 through the distributed clock generators 31 corresponding to the multiple data path modules 112 according to the workload of the multiple computing engines 11 .
[0144] Specifically, in this embodiment, the overall logic control module 1 can control any distributed clock 31 to generate different clock frequencies according to the workload of multiple computing engines 11, so as to meet the performance requirements of each data path module 112, that is, dynamically adjust the clock frequency of the data path module 112 of each computing engine 11 according to the workload of the computing engine 11, so as to reduce the power consumption of the computing unit 10 as a whole. Dynamically adjusting the clock frequency of the data path module 112 according to the workload of the computing engine 11 can be achieved by a dynamic voltage frequency adjustment DVFS method.
[0145] In a further implementation scheme, the overall logic control module 1 can also control the opening or closing of the clock of any data path module 112. In a few scenarios, when the data path module 112 does not need to calculate, stopping the clock signal of the data path module 112 can further reduce power consumption.
[0146] In one embodiment of the clock control method of the operation unit 10 of the present invention, the overall logic control module 1 adjusts the clock frequency of the third clock signal 311 generated by the distributed clock generator 31 within a frequency range, the frequency range is 300 MHz to 1.6 GHz, and the gears are 32 gears, but the present invention is not limited thereto.
[0147] The present invention also provides a storage medium for storing a computer control program, which is used to implement the steps of the clock control method of the aforementioned operation unit when the computer control program is executed by a processor.
[0148] The above-mentioned computer program can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.
[0149] The clock control method of the computing unit, chip, computing board, computing device and computing unit disclosed in the present invention enables the logic control module 111 and the data path module 112 to have independent clock frequencies, thereby meeting their respective performance requirements to the greatest extent without reducing the overall performance. At the same time, the logic control module 111 and the data path module 112 have independent clock frequencies, which can also reduce the power consumption of the computing unit, make the timing of the computing unit more stable, and have better flexibility to adapt to different software algorithms and hardware architectures.
[0150] In summary, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, technicians familiar with the field can evolve various corresponding changes and deformations based on the present invention, but these corresponding changes and deformations should all fall within the scope of protection of the patent applied for the present invention.
Claims
1. A computing unit, characterized in that: include: A plurality of computing engines, each of which comprises a logic control module and a data path module connected to each other, wherein the logic control module is used to receive task information, the data path module is used to calculate a calculation result based on the task information, synchronize the calculation result to the logic control module, and the logic control module is also used to obtain task return information according to the calculation result; A clock component, configured to generate at least one first clock signal and at least one second clock signal, wherein the first clock signal is provided to the logic control module, and the second clock signal can be configured as a clock of the data path module; The overall logic control module is connected to the plurality of logic control modules and the clock component, and is used to send task information to the plurality of logic control modules and receive task return information from the plurality of logic control modules.
2. The computing unit according to claim 1, characterized in that: A clock frequency of the first clock signal is lower than a clock frequency of the second clock signal.
3. The computing unit according to claim 1, characterized in that: The clock component further comprises: Phase-locked loop, used to generate a frequency-multiplied clock signal; at least one first frequency divider, the first frequency divider being connected to the phase-locked loop and each of the logic control modules, and being configured to generate the first clock signal; At least one second frequency divider, the second frequency divider is connected to the phase-locked loop and each of the data path modules, and is used to generate the second clock signal.
4. The computing unit according to claim 1, characterized in that: Also includes: At least one distributed clock generator, each of which is connected to the corresponding data path module, and the distributed clock generator is used to generate a third clock signal, and the third clock signal can be configured as a clock corresponding to the data path module.
5. The computing unit according to claim 4, characterized in that: Also includes: A multiplexer, each of the multiplexers is connected between the corresponding distributed clock generator, the clock component and the corresponding data path module, and the multiplexer is also connected to the overall logic control module. The multiplexer is used to configure one of the second clock signal and the third clock signal as the clock of the corresponding data path module under the control of the overall logic control module.
6. The computing unit according to claim 5, characterized in that: The overall logic control module is connected to the plurality of distributed clock generators and is used to adjust the clock frequency of the third clock signal generated by the distributed clock generators.
7. The computing unit according to claim 6, characterized in that: The distributed clock generator is a ring oscillator.
8. The computing unit according to any one of claims 1 to 7, characterized in that: The logic control module and the data path module also include: A data synchronization pulse generating circuit is used to send out a data synchronization pulse signal; The data synchronization edge detector circuit is used to detect the data synchronization edge signal; wherein, The logic control module and the data path module perform data synchronization through a data synchronization pulse signal, a data synchronization edge signal and a register.
9. A chip, characterized in that: The method comprises one or more computing units according to any one of claims 1 to 8.
10. A computing board for computing equipment, characterized in that: Comprising one or more chips as claimed in claim 9.
11. A computing device, comprising a power board, a control board, a connection board, a radiator and a plurality of computing boards, wherein the control board is connected to the computing board through the connection board, the radiator is arranged around the computing board, the power board is used to provide power to the connection board, the control board, the radiator and the computing board, characterized in that: The computing board is any one of the computing boards described in claim 10.
12. A method for controlling a computing unit, for controlling the computing unit according to any one of claims 1 to 8, characterized in that: The control method of the operation unit includes: The clock component generates at least one first clock signal and provides it to the plurality of logic control modules; The clock component generates at least one second clock signal independent of the first clock signal and can be configured as a clock for a plurality of the datapath modules; The overall logic control module sends task information to the plurality of logic control modules and receives task return information from the plurality of logic control modules; The data path module calculates a calculation result based on the task information and synchronizes the calculation result to the logic control module.
13. The method according to claim 12, characterized in that Also includes the steps: The overall logic control module obtains the workload of multiple computing engines according to the task return information of the multiple logic control modules; The overall logic control module controls the clock signals of the plurality of logic control modules and / or the plurality of data path modules according to the workloads of the plurality of computing engines.
14. The method according to claim 13, characterized in that The step of the overall logic control module controlling the clock signals of the plurality of logic control modules and / or the plurality of data path modules according to the workloads of the plurality of computing engines further comprises: The overall logic control module adjusts the frequency of the first clock signal through the clock component according to the workload of the multiple computing engines; and / or, The overall logic control module adjusts the frequency of the second clock signal through the clock component according to the workloads of the plurality of computing engines.
15. The method according to claim 14, characterized in that The step of the overall logic control module controlling the clock signals of the plurality of data path modules according to the workloads of the plurality of computing engines further comprises: The overall logic control module configures one of the second clock signal and the third clock signal as the clock of the data path module corresponding to the multiplexer through the multiplexer according to the workload of the multiple computing engines.
16. The method according to claim 15, characterized in that The step of the overall logic control module controlling the clock signals of the plurality of data path modules according to the workloads of the plurality of computing engines further comprises: When the clocks of the multiple data path modules are configured as the third clock signal, the overall logic control module adjusts the clock frequency of the third clock signal through the distributed clock generators corresponding to the multiple data path modules according to the workloads of the multiple computing engines.
17. A storage medium for storing a computer control program, characterized in that: The computer control program is used to execute the steps of the method according to any one of claims 12 to 16.
Citation Information
Cited By
Computing unit, control method for computing unit, and computing device
WO2026056662A1
