Chip and current adjustment method based on neural network

By introducing a neural network circuit into the chip to predict current changes and activate energy-consuming circuits in stages, the problem of instantaneous voltage drop during the power supply of a single system chip is solved, and the stability and voltage stability of the processor core are improved.

CN113138652BActive Publication Date: 2024-09-13REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010052331.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-17
Publication Date
2024-09-13
Estimated Expiration
2040-01-17

AI Technical Summary

Technical Problem

During the power supply process of the system single chip, the induced electromotive force effect of the metal conductor causes an instant drop in voltage, which may cause abnormalities in the digital signal processor. Especially when the amount of calculations suddenly increases, the instantaneous current difference is too large, causing a voltage drop.

Method used

Design a chip that includes an instruction storage unit, a processor core, a neural network circuit, and a switching circuit. The neural network circuit predicts the upcoming current changes, and when high power consumption requirements are predicted, it activates the energy-consuming circuit in stages. Gradually increase the external current received by the chip to avoid excessive voltage drops.

Benefits of technology

Without affecting the core computing performance of the processor, it effectively avoids excessive voltage drops, prevents excessive instantaneous current differences, and improves the stability and reliability of the chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113138652B
    Figure CN113138652B
Patent Text Reader

Abstract

The present invention relates to a chip and a current adjustment method based on a neural network. A chip includes: an instruction storage unit, a processor core, an input circuit, a neural network circuit, a plurality of energy-consuming circuits and a switch circuit. When the chip is operating, the processor core performs operations according to a plurality of instructions under current supply. At the same time, the neural network circuit predicts the upcoming current change based on the data stream representing the time-varying current generated by the input circuit and outputs a corresponding control signal. Under the control of the control signal, the switch circuit selectively provides a frequency to at least one energy-consuming circuit, so that the energy-consuming circuit receiving the frequency performs operations according to the frequency under current supply. Therefore, the chip can predict whether there will be a high power consumption demand and pre-start the virtual current mechanism in a timely manner, thereby avoiding excessive voltage drop without affecting the computing performance of the processor core.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a chip and a current adjustment method based on a neural network, and is particularly suitable for a chip with a processor core. Background Art

[0002] A system on a chip (SOC) is a chip that integrates multiple functional components, such as a chip that integrates a central processing unit, memory, logic components, and analog components.

[0003] When the system-on-chip is in operation, the system-on-chip is powered by an external power supply, and then the system-on-chip supplies power to its internal components. In an electronic circuit, when the current of a metal conductor changes from time to time, the metal conductor itself will generate a reverse electromotive force (i.e., voltage) to resist the change in current; this effect may cause the supply voltage to drop momentarily. And the instantaneous drop in voltage may cause circuit abnormality. For example, the external power supply supplies power to the digital signal processor (DSP) inside the system-on-chip through the power supply path formed by metal conductors such as external circuit wiring, chip pins, bonding wires (Bonding Wire) and power pads (VDD Pad). These metal conductors will have the aforementioned induced electromotive force effect. Therefore, when the DSP increases the amount of calculation momentarily, it will draw a large amount of current momentarily, and the voltage drop caused by this momentary current difference may cause the DSP to be abnormal. In particular, this phenomenon will be particularly obvious when the DSP switches from a low amount of calculation momentarily to a high amount of calculation. Summary of the invention

[0004] In one embodiment, a chip includes: an instruction storage unit, a processor core, an input circuit, a neural network circuit, multiple energy consumption circuits, and a switch circuit. The instruction storage unit is used to store multiple instructions. The processor core is coupled to the instruction storage unit and is used to perform operations under a current supply. Here, the processor core includes: a control circuit and an operation circuit. The control circuit is coupled to the instruction storage unit and is used to read multiple instructions in sequence. The operation circuit is coupled to the control circuit and is used to perform operations according to the instructions read by the control circuit. The input circuit is used to generate a data stream representing a time-varying current. Among them, the data stream includes multiple data, which correspond to multiple instructions respectively, and each data represents the current consumed by the processor core when performing operations according to the corresponding instructions. The neural network circuit is coupled to the input circuit, and the neural network circuit includes multiple functions and multiple parameters. Here, the neural network circuit is used to predict the upcoming changes in current based on the data stream, function and parameters and output corresponding control signals. The switch circuit couples the neural network circuit and the energy consumption circuit. The switch circuit is used for selectively providing a frequency to at least one energy-consuming circuit under the control of a control signal, so that the energy-consuming circuit receiving the frequency can operate according to the frequency under the current supply.

[0005] In one embodiment, a current adjustment method based on a neural network includes: supplying power required for the operation of a processor core with a current; the processor core sequentially reads a plurality of instructions and performs operations according to the instructions read by the control circuit; generating a data stream representing a time-varying current; predicting an upcoming change in current according to the data stream by a neural network circuit; and selectively enabling at least one of a plurality of energy-consuming circuits according to the predicted upcoming change in current. The data stream includes a plurality of data, each of which corresponds to a plurality of instructions, and each data represents the current consumed when the processor core performs operations according to the corresponding instructions. Here, the energy-consuming circuit after being enabled supplies power required for operation with a current.

[0006] In summary, the chip and the current adjustment method based on the neural network of any embodiment can use the neural network circuit to predict the high power consumption demand according to the busyness of the processor core, and then start the virtual current mechanism, thereby avoiding excessive voltage drop without affecting the computing performance of the processor core. In some embodiments, when it is predicted that there will be a high power consumption demand, the energy consumption circuit is activated in stages to gradually increase the external current received by the chip to prevent the instantaneous current difference from being too large, thereby preventing the voltage from dropping suddenly. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 A schematic diagram of a chip according to an embodiment of the present invention is shown in FIG.

[0008] Figure 2 for Figure 1A schematic diagram of an exemplary processor core and a predicted current difference unit. DETAILED DESCRIPTION

[0009] Reference Figure 1 In some embodiments, the chip 10 includes a processor core 110 , an instruction storage unit 122 , a predicted current difference unit 130 , and a virtual current unit 140 .

[0010] The processor core 110 is coupled to the instruction storage unit 122 and the predicted current difference unit 130 . The predicted current difference unit 130 is coupled between the processor core 110 and the phantom current unit 140 .

[0011] The processor core 110 includes a control circuit 112 and a computing circuit 114. The control circuit 112 is coupled to the instruction storage unit 122 and the predicted current difference unit 130 outside the processor core 110 via the instruction pad 116 of the processor core 110. In addition, the control circuit 112 is also coupled to the computing circuit 114 inside the processor core 110.

[0012] The predicted current difference unit 130 includes an input circuit 132 and a neural network circuit 134. The input circuit 132 is coupled between the processor core 110 and the neural network circuit 134, and the neural network circuit 134 is coupled between the input circuit 132 and the virtual current unit 140. The neural network circuit 134 includes a plurality of functions and a plurality of parameters.

[0013] The virtual current unit 140 includes a switch circuit 142 and a plurality of energy consumption circuits 144. The control end of the switch circuit 142 is coupled to the neural network circuit 134. The input end of the switch circuit 142 is coupled to the frequency. The plurality of output ends of the switch circuit 142 are respectively coupled to the energy consumption circuits 144. In some embodiments, each energy consumption circuit 144 may be a logic circuit composed of one or more logic gates.

[0014] The instruction storage unit 122 stores a plurality of instructions, such as store instructions (Store), load instructions (Load), no operation instructions (NOP), addition instructions (ADD), subtraction instructions, multiplication instructions, division instructions, multiply-accumulate 32 instructions (MAC 32), and floating addition instructions (float ADD).

[0015] When the chip 10 is in operation, an external current is supplied to the chip 10 to supply the power required for the operation of the components inside the chip 10, such as Figure 1 As shown. Figure 1 In the diagram, the power lines are shown in bold. Figure 1Although the current received by the chip 10 from the outside is directly provided to the internal components as an illustration, this power supply method is not limited to the present invention; according to actual needs, the current received by the chip 10 can also be provided to the internal components via a voltage regulating circuit.

[0016] Here, the processor core 110 performs calculations under the power supply of current, that is, executes programs. Figure 1 and Figure 2 During the execution of a program by the processor core 110 , the control circuit 112 sequentially reads a plurality of instructions from the instruction storage unit 122 and controls the operation circuit 114 so that the operation circuit 114 performs operations according to the instructions read by the control circuit 112 .

[0017] While the processor core 110 executes the program, the input circuit 132 generates a data stream DS representing a time-varying current, so that the neural network circuit 134 executes a prediction model based on the data stream DS. Here, the data stream DS input to the neural network circuit 134 includes a plurality of data, each of which corresponds to a plurality of instructions, and each data represents the current consumed by the processor core 110 when performing operations according to the corresponding instructions. In other words, each data in the data stream DS input to the neural network circuit 134 is equivalent to the current consumed by the processor core 110 when executing the corresponding instruction. In addition, the current consumed by the processor core 110 when executing the instruction changes with time according to the complexity and density of the instruction (i.e., equivalent to the amount of operations of the processor core 110), so the data stream DS input to the neural network circuit 134 indicates the change of the current consumed by the processor core 110. For example, each data in the data stream DS input to the neural network circuit 134 can be the current consumed by the processor core 110 when executing the instruction with the maximum current consumption, corresponding to the normalized percentage of the current consumed by the processor core 110 when the instruction is executed. In other words, the normalized percentage of the current consumption of the processor core 110 when the instruction with the maximum current consumption is executed is 100%. In one example, assuming that the current consumption of the processor core 110 is 10 μW when "MAC64" is executed, the normalized percentage corresponding to MAC64 is 100%. The current consumption of the processor core 110 when "ADD" is executed is 5 μW. Relative to the current consumption of the processor core 110 when "MAC64" is executed, the normalized percentage corresponding to "ADD" is 50%.

[0018] In the prediction mode of the neural network circuit 134, the neural network circuit 134 predicts the upcoming current change according to the input data stream DS, its function and its parameters, and outputs a control signal Sc corresponding to the upcoming current change to the control end of the switch circuit 142. Here, the switch circuit 142 selectively enables at least one energy consumption circuit 144 according to the control signal Sc, that is, selectively provides a frequency to at least one energy consumption circuit 144 under the control of the control signal Sc, so that the energy consumption circuit 144 with the received frequency performs operation according to the received frequency under the external current supply.

[0019] In one embodiment, the input circuit 132 may include a table lookup circuit. The table lookup circuit is coupled between the processor core 110 and the neural network circuit 134. While the control circuit 112 reads instructions from the instruction storage unit 122, the table lookup circuit will capture each instruction read by the control circuit 112 and convert it into corresponding data by looking up each instruction captured. In other words, the chip 10 may also include a table storage unit 124, and the input circuit 132 is coupled to the table storage unit 124. The table storage unit 124 stores a comparison table (as shown in Table 1 below). This comparison table records various instructions and the amount of current consumed by the processor core 110 to execute corresponding instructions (i.e., the data corresponding to each instruction). Among them, the current can be expressed as a normalized percentage of the consumed current. In some embodiments, the current of various instructions can be obtained by computer simulation, and then a comparison table of instructions and current can be generated in advance.

[0020] Table 1

[0021] instruction Current MAC64 100% MAC32 90% ADD 50% LOAD 30% STORE 30% NOP 10% … … … … … …

[0022] Before the processor core 110 executes a program, the table lookup circuit reads out the comparison table from the instruction storage unit 122 and loads it therein. Subsequently, when the table lookup circuit retrieves an instruction, the table lookup circuit can convert the instruction into the corresponding current amount (i.e., data) consumed by the processor core 110 according to the type of the retrieved instruction and the comparison table, and feed the converted current amount into the neural network circuit 134.

[0023] For example, Figure 2The instruction string CS shown in FIG. 1 (i.e., the implementation of the aforementioned program) is taken as an example. Among them, the operation circuit 114 may include multiple instruction processing units, such as: a load processing unit 114a, a storage processing unit 114b, an addition processing unit 114c, a multiplication and addition processing unit 114d, and a floating-addition processing unit 114e. Each instruction processing unit is coupled to the control circuit 112 via an internal bus. The load processing unit 114a is used to load data according to the load instruction LOAD. The storage processing unit 114b is used to store the storage data to the data storage unit (not shown) according to the storage instruction STORE. The addition processing unit 114c is used to perform data addition operations according to the addition instruction ADD. The multiplication and addition processing unit 114d is used to perform data multiplication and addition operations according to the multiplication and addition instruction MAC32. The floating-addition processing unit 114e is used to perform data floating-addition operations according to the floating-addition instruction.

[0024] During the period when the processor core 110 executes the program, the control circuit 112 reads the first instruction (i.e., the multiplication and addition instruction MAC32) in the instruction string CS from the instruction storage unit 122, and controls the multiplication and addition processing unit 114d to perform multiplication and addition operations on the input data according to the multiplication and addition instruction MAC32. At this time, the table lookup circuit (i.e., the input circuit 132) retrieves the multiplication and addition instruction MAC32 and uses the multiplication and addition instruction MAC32 to query the comparison table shown in Table 1 to obtain the corresponding data (i.e., "90%") and feed it to the neural network circuit 134. Next, the control circuit 112 reads the second instruction (i.e., the addition instruction ADD) in the instruction string CS from the instruction storage unit 122, and controls the addition processing unit 114c to perform addition operations on the input data according to the addition instruction ADD. At this time, the table lookup circuit retrieves the multiplication and addition instruction MAC32 and uses the addition instruction ADD to query the comparison table shown in Table 1 to obtain the corresponding data (i.e., "50%") and feed it to the neural network circuit 134. And so on, until the last instruction in the instruction string CS (i.e., the storage instruction STORE) is completed.

[0025] In other words, while the processor core 110 executes the instruction string CS, the input circuit 132 also sequentially captures each instruction in the instruction string CS and converts it into corresponding data, so that the input circuit 132 feeds the data stream DS corresponding to the instruction string CS to the neural network circuit 134.

[0026] In some embodiments, the function of the neural network circuit 134 can be implemented by a long short-term memory (LSTM) algorithm. Here, the input time step of the neural network circuit 134 is a first number of data. The first number can be a positive integer, such as 50, 100, 200, 300 or more. In other words, the predicted current difference unit 130 can predict the change of current in a given time in the coming future based on the first number of instructions that the processor core 110 has executed or is executing, that is, the change of current consumed when the processor core 110 will sequentially execute the second number of instructions. The second number can be a positive integer, such as 1, 2, 3, 4, 5..., 10 or more. For example, the predicted current difference unit 130 can predict the change of current consumed when the processor core 110 will execute 5 instructions (i.e., the 101st to 105th instructions) based on the 100 instructions that the processor core 110 has executed or is executing.

[0027] In some embodiments, when the neural network circuit 134 predicts that the upcoming current change is that the increase in current within the upcoming predetermined time is greater than a predetermined threshold (i.e., indicating that there will be a high instantaneous current difference), the neural network circuit 134 outputs a control signal Sc indicating the conduction frequency CK to the switch circuit 142, so that the switch circuit 142 provides the frequency CK to the energy consumption circuit 144 in stages under the control of the control signal Sc. In other words, the control signal Sc is time-varying.

[0028] In an exemplary embodiment, the control signal Sc may be of order 0 to N. N is a positive integer and is equal to the total number of energy consumption circuits 144. The switch circuit 142 includes a plurality of switches, and these switches correspond to the energy consumption circuits 144 respectively. Here, the number of switches is equal to the number of energy consumption circuits 144. Each switch is coupled between the frequency CK and the corresponding energy consumption circuit 144, and is controlled by the control signal Sc, that is, the control end of the switch is coupled to the output of the neural network circuit 134. When the neural network circuit 134 predicts that the upcoming current change is that the increase in current within the upcoming predetermined time is not greater than the predetermined threshold (that is, it indicates that the operation program of the instruction to be executed will not cause a high instantaneous current difference), the neural network circuit 134 outputs a control signal Sc of "order 0"; at this time, the switches in the switch circuit 142 are in a fully closed state under the control of the control signal Sc, thereby disconnecting the frequency CK and all energy consumption circuits 144. When the change in current predicted by the neural network circuit 134 is that the increase in current within the upcoming predetermined time is greater than a predetermined threshold value (i.e., indicating that there will be a high instantaneous current difference), the control signal Sc output by the neural network circuit 134 gradually changes from "1st order" to "Nth order"; at this time, the switch in the switch circuit 142 is gradually switched to the on state under the control of the control signal Sc, thereby gradually providing the frequency CK to the energy consumption circuit 144. In other words, when the control signal Sc is "1st order", the switch circuit 142 provides the frequency CK to one energy consumption circuit 144 and disconnects the remaining energy consumption circuits 144. When the control signal Sc is "2nd order", the switch circuit 142 provides the frequency CK to two energy consumption circuits 144 and disconnects the remaining energy consumption circuits 144. When the control signal Sc is "3rd order", the switch circuit 142 provides the frequency CK to three energy consumption circuits 144 and disconnects the remaining energy consumption circuits 144. And so on, until the control signal Sc is "Nth order", the switch of the switch circuit 142 is in a fully open state to provide the frequency CK to all energy consumption circuits 144. In some embodiments, during the period when the control signal Sc output by the neural network circuit 134 gradually changes from "1st order" to "Nth order", if the neural network circuit 134 predicts that the upcoming current change is that the increase in current is not greater than a predetermined threshold within the upcoming predetermined time, the neural network circuit 134 will change to output the control signal Sc of "0th order".

[0029] In this embodiment, the chip 10 may further include a power pin 150 and a power supply line 152. The power supply line 152 is coupled between the power pin 150 and the power pad 117 of the processor core 110. When the chip 10 is operating, the power pin 150 receives current from outside the chip 10 and flows to the processor core 110 through the power supply line 152. In some embodiments, the power supply line 152 may be a bonding wire.

[0030] In some embodiments, the chip 10 may further include another power supply line 154. The power supply line 154 is coupled between the power pin 150 and the predicted current difference unit 130 and between the power pin 150 and the virtual current unit 140. When the chip 10 is operating, the power pin 150 receives current from outside the chip 10, and the current flows to the virtual current unit 140 through the power supply line 154. In addition, during the period when the neural network circuit 134 predicts that there will be a high instantaneous current difference, as the energy consumption circuit 144 is enabled (i.e., the frequency CK is received and the operation is performed according to the frequency CK), the enabled energy consumption circuit 144 is also powered by the current received by the power pin 150 through the power supply line 154, so that the external current received by the chip 10 begins to gradually increase before the execution of the high-computation instruction as the energy consumption circuit 144 is enabled in stages.

[0031] In some embodiments, the chip 10 may further include a weight selection circuit 160 and a weight storage unit 126. The weight selection circuit 160 is coupled to the weight storage unit 126 and the neural network circuit 134. The weight selection circuit 160 stores a plurality of weight combinations. Each weight combination corresponds to an operation information of the processor core 110. In an example, assuming that the function of the neural network circuit 134 is implemented by a long short-term memory (LSTM) algorithm, these weight combinations are parameters obtained by training the neural network circuit 134 with different input time steps. In other words, in the training mode of the neural network circuit 134, the neural network circuit 134 is trained according to a data stream DS of an input time step, a function and a control signal Sc corresponding to the data stream DS to adjust the weight (Weight) (i.e., parameter) of each neuron of the neural network circuit 134 to the input. After training with each input time step of the data stream DS and its control signal Sc, the weight and distribution state of the neural network circuit 134 will be recorded as a weight combination, and this weight combination will be stored in the weight storage unit 126.

[0032] Before the processor core 110 executes the program, the weight selection circuit 160 selects a weight combination corresponding to the current operation information from the plurality of weight combinations stored in the weight storage unit 126 according to the current operation information of the processor core 110 and sets the parameters of the neural network circuit 134 with the selected weight combination, that is, sets the weight of each neuron, so that the neural network circuit 134 executes the prediction mode based on the selected weight combination. In some embodiments, the operation information may be the specification information of the input data to be calculated by the processor core 110 (such as bit rate and / or bit width, etc.), and / or the application field of the processor core 110, etc.

[0033] In some embodiments, the instruction storage unit 122 , the table storage unit 124 , the data storage unit, and the weight storage unit 126 may be implemented by one or more memories 120 .

[0034] In some embodiments, the predicted current difference unit 130 and / or the virtual current unit 140 may be implemented by another processor core. In some embodiments, the predicted current difference unit 130 and / or the virtual current unit 140 may also be a functional circuit directly formed on a carrier of a chip.

[0035] In summary, the chip and the current adjustment method based on the neural network of any embodiment can use the neural network circuit 134 to predict that there will be a high power demand according to the busyness of the processor core 110, and then start the virtual current mechanism, thereby avoiding excessive voltage drop without affecting the computing performance of the processor core 110. In some embodiments, when it is predicted that there will be a high power demand, the energy consumption circuit 144 is enabled in stages to gradually increase the external current received by the chip 10 to prevent the instantaneous current difference from being too large, thereby preventing the voltage from dropping suddenly.

[0036]

Explanation of symbols

[0037] 10: Chip

[0038] 110: Processor core

[0039] 112: Control circuit

[0040] 114: Operational Circuit

[0041] 114a: Loading processing unit

[0042] 114b: Storage processing unit

[0043] 114c: Add processing unit

[0044] 114d: Multiplication and addition processing unit

[0045] 114e: floating processing unit

[0046] 116: Instruction pad

[0047] 117: Power pad

[0048] 120: Memory

[0049] 122: instruction storage unit

[0050] 124: table storage unit

[0051] 126: Weight storage unit

[0052] 130: Prediction current difference unit

[0053] 132: Input circuit

[0054] 134:Neural Network Circuit

[0055] 140: Pseudo-current unit

[0056] 142: Switching circuit

[0057] 144: Energy consumption circuit

[0058] 150: Power pin

[0059] 152: Power supply line

[0060] 154: Power supply line

[0061] CK: Frequency

[0062] DS: Data Stream

[0063] CS: Command String

[0064] Sc: Control signal

[0065] STORE: storage instruction

[0066] LOAD: Load instruction

[0067] ADD: add instruction

[0068] NOP: No operation instruction

[0069] MAC32: Multiply-add instruction.

Claims

1. A chip, include: an instruction storage unit for storing a plurality of instructions; A processor core is coupled to the instruction storage unit and is used to perform calculations under a current supply. The processor core includes: a control circuit, coupled to the instruction storage unit, for sequentially reading the plurality of instructions; and an operation circuit, coupled to the control circuit, for performing operations according to the plurality of instructions read by the control circuit; An input circuit for generating a data stream representing the time-varying current, wherein the data stream includes a plurality of data, the plurality of data respectively corresponding to the plurality of instructions, and each of the data represents the current consumed when the processor core performs operations according to the corresponding instruction; a neural network circuit coupled to the input circuit, the neural network circuit comprising a plurality of functions and a plurality of parameters, the neural network circuit being used to predict an upcoming change in current according to the data stream, the plurality of functions and the plurality of parameters and output a corresponding control signal; a plurality of energy consuming circuits; and a switch circuit coupling the neural network circuit and the plurality of energy consumption circuits; When the neural network circuit predicts that the change of the current is about to occur, the increase of the current is greater than a predetermined threshold within a predetermined time, the switch circuit selectively provides a frequency to at least one of the plurality of energy-consuming circuits under the control of the control signal, so that the energy-consuming circuit receiving the frequency performs operation according to the frequency under the power supply of the current. The input circuit includes: A table lookup circuit is coupled between the processor core and the neural network circuit, and is used to retrieve each instruction read by the control circuit and convert the retrieved instructions into corresponding data by looking up the table.

2. The chip according to claim 1, further comprising: include: A weight storage unit for storing a plurality of weight combinations, wherein each weight combination corresponds to an operation information of the processor core; as well as A weight selection circuit is coupled to the weight storage unit and the neural network circuit, and is used to select the corresponding weight combination from the multiple weight combinations according to the current operation information of the processor core and set the multiple parameters of the neural network circuit with the selected weight combination.

3. The chip according to claim 1, further comprising: include: A power pin for receiving the current from outside the chip; as well as A power supply circuit is coupled between the power pin and the processor core.

4. The chip according to claim 3, in, The power supply circuit is a bonding wire.

5. The chip according to claim 1, in, When the neural network circuit predicts that the upcoming change in the current is that the increase in the current within an upcoming predetermined time is greater than a predetermined threshold, the switch circuit provides the frequency to the multiple energy-consuming circuits in stages under the control of the control signal.

6. A current adjustment method based on neural network, include: Supplying power required for operation of a processor core with a current; The processor core sequentially reads a plurality of instructions and performs operations according to the plurality of instructions read by the control circuit; Generate a data stream representing the time-varying current, wherein the data stream includes a plurality of data, the plurality of data respectively correspond to the plurality of instructions, and each of the data represents the current consumed when the processor core performs operations according to the corresponding instruction; predicting, by a neural network circuit, an upcoming change in current based on the data stream; and When the change of the current that is about to occur is predicted to be an increase in the current that is greater than a predetermined threshold within a predetermined time, at least one of the plurality of energy-consuming circuits is selectively enabled, wherein the enabled energy-consuming circuit supplies power required for operation with the current, The step of generating the data stream representing the time-varying current comprises: The plurality of instructions read by the processor core are captured and each of the captured instructions is converted into the corresponding data by looking up a table.

7. The current regulation method based on neural network according to claim 6, further comprising: include: Select one of a plurality of weight combinations according to current operation information of the processor core; as well as The neural network is set with the selected weight combination.

8. The neural network-based current regulation method according to claim 6, wherein the step of selectively enabling the plurality of energy-consuming circuits according to the predicted upcoming change in the current include: When the predicted upcoming change in the current is that the increase in the current within an upcoming predetermined time is greater than a predetermined threshold, the frequencies are provided to the multiple energy consumption circuits in stages.