Vector processors, data processing methods and electronic devices
By adjusting the execution timing of mixed-precision vector instructions, the problem of dynamic voltage drop caused by power supply current fluctuations in mixed-precision computing was solved, thereby improving the stability and computational efficiency of the vector processor.
Patent Information
- Application Number
- CN202611620999.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-20
- Publication Date
- 2026-11-17
AI Technical Summary
During mixed-precision computing, fluctuations in the power supply current of the computing unit cause dynamic voltage drops in the power supply, affecting the stable operation of the computing unit, resulting in timing violations and calculation errors, and sacrificing energy efficiency and reliability.
The instruction parsing unit and activity prediction unit in the vector processor adjust the execution timing of mixed-precision vector instructions according to the instruction type information, thereby extending the execution time, mitigating circuit activity fluctuations, suppressing power supply current fluctuations, and preventing dynamic voltage drop of the power supply.
It effectively improves the stability and computational efficiency of the mixed-precision processing unit, reduces the probability of power supply current fluctuations, and enhances the operational reliability and energy efficiency of the computing unit.
Smart Images

Figure CN123114556A_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, the field of computer technology, and in particular to a vector processor, a data processing method, and an electronic device. Background Technology
[0002] With the rapid development of data-intensive applications such as artificial intelligence, machine learning, and scientific computing, higher demands are being placed on processor computing performance, energy efficiency, and flexibility. In these application scenarios, data often has different numerical ranges and precision requirements, so a single data precision usually cannot achieve a performance balance between data computing efficiency, memory usage, and computational accuracy. Based on this, mixed-precision computing technology has emerged. Its core idea is to flexibly adopt different data precisions at different stages of the computation process while ensuring the accuracy of the final result, thereby improving computational processing performance.
[0003] However, in mixed-precision computation triggered by a single instruction, the circuits within the computing unit that process data of varying precisions all need to operate within the execution cycle of that single instruction. These circuits, processing data of different precisions, often exhibit significant differences in their circuit structure, scale, and operating frequency. This results in non-uniform circuit activity within the computing unit in both time and space, leading to substantial current demands on the computing unit's power network within a short period. This causes significant power current fluctuations and current spikes. These transient current spikes can easily trigger dynamic voltage drops in the power supply, affecting the stable operation of the computing unit. Summary of the Invention
[0004] This application provides a vector processor, a data processing method, and an electronic device to address, to some extent, the problem that current mixed-precision computing technology is prone to power supply current fluctuations, causing dynamic voltage drops in the power supply and affecting the stable operation of the mixed-precision computing unit.
[0005] The technical solution of this application embodiment is implemented as follows: This application provides a vector processor, which includes: an instruction parsing unit, an activity prediction unit, and a mixed precision processing unit; The instruction parsing unit is used to read and decode mixed-precision vector instructions to obtain instruction decoding information. The instruction decoding information includes instruction type information, which indicates the operation type and operation data type of the mixed-precision vector instruction. The activity prediction unit is used to determine the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information. The target circuit activity intensity indicates the circuit activity intensity of the power network supplying power to the mixed precision processing unit when the mixed precision processing unit executes the mixed precision vector instruction. The mixed precision processing unit is configured to adjust the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a smooth adjustment strategy, and execute the mixed precision vector instruction based on the adjusted execution timing. The smooth adjustment strategy is used to extend the execution duration of the mixed precision vector instruction.
[0006] This application provides a data processing method applied to a vector processor, the vector processor comprising: an instruction parsing unit, an activity prediction unit, and a mixed-precision processing unit; the data processing method includes: The instruction parsing unit reads and decodes the mixed-precision vector instruction to obtain instruction decoding information, which includes instruction type information, indicating the operation type and operation data type of the mixed-precision vector instruction. The activity prediction unit determines the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information. The target circuit activity intensity indicates the circuit activity intensity of the power network supplying power to the mixed precision processing unit when the mixed precision processing unit executes the mixed precision vector instruction. The mixed precision processing unit adjusts the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a smooth adjustment strategy, and executes the mixed precision vector instruction based on the adjusted execution timing. The smooth adjustment strategy is used to extend the execution duration of the mixed precision vector instruction.
[0007] This application provides an electronic device, which includes any of the vector processors described in this application.
[0008] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the data processing method provided in this application when executed by a processor.
[0009] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the data processing method provided in this application.
[0010] The embodiments of this application have the following beneficial effects: This application provides a vector processor, a data processing method, and an electronic device. The vector processor includes an instruction parsing unit, an activity prediction unit, and a mixed-precision processing unit. The instruction parsing unit reads and decodes mixed-precision vector instructions to obtain instruction decoding information, which includes instruction type information indicating the operation type and data type of the mixed-precision vector instruction. The activity prediction unit determines the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information. This target circuit activity intensity indicates the circuit activity intensity of the power network supplying power to the mixed-precision processing unit when the mixed-precision processing unit executes the mixed-precision vector instruction. The mixed-precision processing unit adjusts the execution timing of the mixed-precision vector instruction according to the target circuit activity intensity using a smoothing adjustment strategy, and executes the mixed-precision vector instruction based on the adjusted execution timing. In this technical solution, the mixed-precision processing unit extends the execution time of mixed-precision vector instructions by adjusting their execution timing. This reduces the fluctuations in circuit activity of the mixed-precision processing unit in the time dimension, improves the uniformity of circuit activity, and to a certain extent avoids concentrated circuit activity. This effectively reduces the probability of large transient current supply demands in the power network, suppresses power network current fluctuations, effectively smooths peaks and fills valleys, prevents current spikes in the power network from causing dynamic voltage drops, ensures stable operation of the mixed-precision processing unit, and improves the computational efficiency of the vector processor. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 1 ; Figure 2 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 2 ; Figure 3 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 3 ; Figure 4 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 4 ; Figure 5 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 5 ; Figure 6 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 6 ; Figure 7 This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 7 ; Figure 8This is a schematic diagram of the structure of a vector processor provided in an embodiment of this application. Figure 8 ; Figure 9 This is a flowchart illustrating a data processing method provided in an embodiment of this application.
[0012] Figure label: 1- Vector processor; 2- Privileged software; 11-Instruction parsing unit; 12-Activity prediction unit; 13-Mixed precision processing unit; 14-Power network; 15-Vector control and status register; 16-Exception handling module; 17-Data update module; 18-Processor configuration port; 19-Update data temporary cache; 20-Processor core; 131-Loading and Memory Module; 132-Mixed Precision Calculation Module; 133-Instruction Scheduling Logic Module; 1321-Instruction Scheduling Circuit; 1322-Execution Control Circuit; 1323-Arithmetic Timing Circuit; 1324-Clock Gating Circuit; 13231-Precision Segmentation and Routing Circuit; 13232-Multi-channel Precision Conversion Circuit; 13233-Multiplication Accumulator Tree Circuit; 13234-Rounder; 121-Prediction Module; 122-Rank Quantization Module; 123-Tag Embedding Module; 161-Voltage Monitoring Circuit; 162-Abnormal Control Circuit; It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] With the rapid development of data-intensive applications such as artificial intelligence, machine learning, and scientific computing, higher demands are being placed on the computing performance, energy efficiency, and flexibility of processors. In these application scenarios, data often has different numerical ranges and precision requirements, making it difficult to achieve a performance balance between data computation efficiency, memory usage, and computational accuracy using a single data precision. Therefore, mixed-precision computing technology has emerged. Its core idea is to flexibly employ different data precisions at different stages of the computation process while ensuring the accuracy of the final result. This reduces data storage volume, data transmission overhead, and power consumption of computing units, thereby accelerating computational processing performance. Data precision, also known as data format, indicates the data bit width and data type, with the data type defining the number of bytes in the data. For example, data precision can be FP16, BF16, FP32, INT8, etc.
[0015] However, in mixed-precision computation triggered by a single instruction, the computational unit needs to run circuits for processing data of different precisions within the execution cycle of that single instruction. For example, in a vector processor supporting mixed-precision computation, a mixed-precision vector instruction may dynamically trigger the operation of heterogeneous circuits for processing data of different precisions, such as INT8, FP16, and FP32, within a single execution cycle. Specifically, during the execution of a mixed-precision vector instruction-triggered fusion multiplication-addition operation, both the circuits for processing low-precision data and the circuits for processing high-precision data are triggered to run within the instruction cycle of that mixed-precision vector instruction. These two circuits differ significantly in transistor size, frequency, and mode. This highly non-uniform circuit activity in time and space causes drastic current demand fluctuations in the vector processor's power network within a short time window (typically within one or a few clock cycles), resulting in large power current fluctuations and current spikes. These transient current spikes can easily cause dynamic voltage drops and power supply noise spikes through the parasitic impedance of the power network, affecting the operation of the vector processor and causing problems such as timing violations and calculation errors, performance and energy efficiency losses, and reliability risks.
[0016] Specifically, for example, firstly, when the power supply voltage drops below a critical value due to power supply noise spikes, the switching speed of logic gates in the vector processor decreases. This can cause signals on critical paths in the circuit to become unstable within a single clock cycle, resulting in timing violations, unpredictable computational errors, or circuit system crashes, leading to timing violations and computational errors in the vector processor. Secondly, to ensure circuit stability under maximum power supply noise conditions, conservative strategies are typically adopted to reduce power supply noise and maintain circuit stability by lowering the maximum operating frequency of the vector processor or increasing the operating voltage of the processor core. However, lowering the maximum operating frequency directly reduces the performance potential of the vector processor, while increasing the operating voltage increases both static and dynamic power consumption, both of which compromise energy efficiency and reduce the energy efficiency advantage of mixed-precision computing. Furthermore, the dynamic voltage drop of the power network can accelerate the aging of transistors in the circuit due to repeated voltage stress fluctuations, affecting chip reliability.
[0017] Please refer to Figure 1 This illustration shows a schematic diagram of a vector processor provided in an embodiment of this application. This vector processor can solve the aforementioned problems to a certain extent. Figure 1 As shown, the vector processor 1 includes an instruction parsing unit 11, an activity prediction unit 12, and a mixed precision processing unit 13.
[0018] The instruction parsing unit 11 is used to read and decode mixed-precision vector instructions to obtain instruction decoding information. The instruction decoding information includes instruction type information, which indicates the operation type and data type of the mixed-precision vector instruction.
[0019] Activity prediction unit 12 is used to determine the target circuit activity intensity corresponding to the mixed precision vector instruction based on instruction type information. The target circuit activity intensity indicates the circuit activity intensity of the power supply network 14 that supplies power to the mixed precision processing unit 13 when the mixed precision processing unit 13 executes the mixed precision vector instruction.
[0020] The mixed-precision processing unit 13 is used to adjust the execution timing of mixed-precision vector instructions according to the activity intensity of the target circuit using a smoothing adjustment strategy, and to execute the mixed-precision vector instructions based on the adjusted execution timing. The smoothing adjustment strategy is used to extend the execution duration of the mixed-precision vector instructions.
[0021] In this embodiment, a mixed-precision vector instruction is used to trigger operations involving multiple different data precisions. Its instruction type information indicates the operation type and data type of the mixed-precision vector instruction. The operation data type can refer to the precision type of the data involved in the operation of the mixed-precision vector instruction. In some embodiments, a mixed-precision vector instruction is used to trigger operations on source data of a first precision to obtain target data of a second precision, where the first precision and the second precision are different. The instruction type information of the mixed-precision vector instruction may include: the target operation type of the mixed-precision vector instruction, the first precision, and the second precision. Optionally, the target operation type can be the opcode of the mixed-precision vector instruction. Alternatively, the target operation type may include the opcode and function code of the mixed-precision vector instruction.
[0022] The circuit activity intensity of power network 14, also known as circuit switching activity intensity, characterizes the degree of fluctuation in current / voltage of power network 14 caused by mixed-precision processing unit 13. Optionally, the circuit activity intensity of power network 14 will differ when mixed-precision processing unit 13 executes mixed-precision vector instructions with different instruction type information. In some embodiments, the circuit activity intensity of power network 14 can be the peak value of the rate of change of current of power network 14 over time during the execution of mixed-precision vector instructions by mixed-precision processing unit 13. For example, the circuit activity intensity F of power network 14 can satisfy: F = ( )max, I represents the current of power network 14, and t represents the current sampling period. This circuit activity intensity can be understood as the steepness of the current ramp-up during the instantaneous switching of the transistors in power network 14. In other embodiments, the circuit activity intensity of power network 14 can be the peak value of the short-time energy of power network 14 during the execution of mixed-precision vector instructions by mixed-precision processing unit 13. For example, the circuit activity intensity F of power network 14 can satisfy: F = ( )max.
[0023] In some embodiments, the power network 14 supplies power to at least the mixed-precision processing unit 13. The power network 14 can be a power supply circuit within the vector processor 1. Alternatively, the power network 14 can be an external power supply circuit for the vector processor 1. It should be noted that the accompanying drawings of the embodiments of this application illustrate the power network 14 as an example of a power supply circuit built into the vector processor 1.
[0024] In some embodiments, the activity prediction unit 12 may be a dedicated hardware circuit that can determine the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information of the mixed precision vector instruction.
[0025] In this embodiment, after reading the mixed-precision vector instruction, the instruction parsing unit can decode the instruction to obtain instruction decoding information. The activity prediction unit can determine the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information in the instruction decoding information. This allows the mixed-precision processing unit to adjust the execution timing of the mixed-precision vector instruction according to the target circuit activity intensity using a smoothing adjustment strategy. The mixed-precision vector instruction is then executed based on the adjusted execution timing to extend its execution duration. This reduces circuit activity fluctuations in the mixed-precision processing unit over time, improves the uniformity of circuit activity, and to some extent avoids concentrated circuit activity. This effectively reduces the probability of large transient current supply demands in the power network, suppresses power network current fluctuations, effectively smooths peaks and fills valleys, prevents current spikes in the power network that could cause dynamic voltage drops, ensures stable operation of the mixed-precision processing unit, and improves the computational efficiency of the vector processor.
[0026] In an optional embodiment of this application, the instruction type information of the mixed-precision vector instruction includes: target operation type, first precision, and second precision. The activity prediction unit 12 is further configured to determine the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information of the mixed-precision vector instruction and the circuit activity model. The circuit activity model describes the relationship between the circuit activity intensity of the power network 14 when the mixed-precision processing unit 13 executes the mixed-precision vector instruction and the instruction type information of the mixed-precision vector instruction executed by the mixed-precision processing unit 13.
[0027] In some embodiments, the circuit activity model can be a pre-configured static model of the power network 14, used to predict the circuit activity intensity of the power network 14 when the mixed-precision processing unit 13 executes mixed-precision vector instructions. Alternatively, the circuit activity intensity of the power network 14 can be measured when the vector processor executes mixed-precision vector instructions with different instruction types to obtain the calibrated circuit activity intensity corresponding to multiple mixed-precision vectors with different instruction types, and a circuit activity model can be generated. Alternatively, RTL simulation can be used to determine the circuit activity intensity of the power network 14 when the vector processor executes mixed-precision vector instructions with different instruction types to simulate the calibrated circuit activity intensity corresponding to multiple mixed-precision vectors with different instruction types, and a circuit activity model can be generated.
[0028] For example, the circuit activity intensity is the peak value of the rate of change of the current in the power network 14 over time. The real-time current of the power network 14 at each sampling point during the execution of mixed-precision vector instructions by the vector processor can be obtained through actual measurement or simulation, and the rate of change of the real-time current at each sampling point can be determined. The peak value of the rate of change of the real-time current at each sampling point is taken as the circuit activity intensity of the power network 14 corresponding to that mixed-precision vector instruction, thus obtaining the correspondence between the instruction type information (operation type, first precision, second precision) of the mixed-precision vector instruction and the circuit activity intensity. Similarly, by actual measurement or simulation, the real-time current of the power network 14 at each sampling point during the execution of multiple mixed-precision vector instructions by the processor can be obtained to obtain the circuit activity intensity of the power network 14 corresponding to each of the multiple mixed-precision vector instructions, thereby obtaining the instruction type information of the multiple mixed-precision vector instructions, and the correspondence between each instruction type information and the circuit activity intensity, generating a circuit activity model.
[0029] In an optional configuration, the circuit activity model includes a circuit activity lookup table. The circuit activity lookup table records the circuit activity intensity of the power network 14, indexed by instruction type information of mixed-precision vector instructions. The activity prediction unit 12 is further configured to look up the circuit activity lookup table based on the target operation type, first precision, and second precision to obtain the target circuit activity intensity.
[0030] After the instruction parsing unit reads and decodes the mixed-precision vector instruction to obtain its instruction type information, the activity prediction unit 12 can look up the circuit activity lookup table based on the target operation type, first precision, and second precision in the instruction type information to obtain the circuit activity intensity corresponding to the instruction type information, thus obtaining the target circuit activity intensity corresponding to the mixed-precision vector instruction. The circuit activity lookup table records the circuit activity intensity of the power network 14 using the instruction type information of the mixed-precision vector instruction as an index. It is easy to understand that by searching the circuit activity lookup table based on the instruction type information, the circuit activity intensity corresponding to that instruction type information can be obtained, i.e., the circuit activity intensity of the power network 14 can be determined when the mixed-precision processing unit 13 executes a mixed-precision instruction with that instruction type information.
[0031] In some embodiments, the circuit activity lookup table can be a hash table, comprising multiple key-value pairs. Each key-value pair records a correspondence between a set of instruction type information and circuit activity intensity. In each key-value pair, the key field records the target operation type, first precision, and second precision in the instruction type information, and the value field records the circuit activity intensity. The activity prediction unit 12 can retrieve the corresponding value from the circuit activity lookup table based on the target operation type, first precision, and second precision to obtain the target circuit activity intensity corresponding to the target operation type, first precision, and second precision.
[0032] For example, the instruction type information obtained by the instruction parsing unit from decoding the mixed-precision vector instruction includes the precision combination code (i.e., the data type of the operation) and the target operation type code (i.e., the operation type) of the mixed-precision vector instruction. The precision combination code is the encoding information of the first precision and the second precision; the target operation type code is the encoding information of the target operation type of the mixed-precision vector instruction. The circuit activity lookup table records the circuit activity intensity of the power network 14, indexed by the precision combination code and the operation type code of the mixed-precision vector instruction. The activity prediction unit 12 can query the pre-configured circuit activity lookup table, indexed by the precision combination code and the operation type code of the mixed-precision vector instruction, in order to accurately predict in real time the circuit activity intensity that the mixed-precision vector instruction to be executed by the mixed-precision processing unit 13 will cause.
[0033] In this optional scenario, by pre-configuring a circuit activity lookup table, the activity prediction unit 12 can quickly and accurately predict the intensity of circuit activity caused by the mixed precision vector instruction to be executed by the mixed precision processing unit 13 by querying the pre-configured circuit activity lookup table. This facilitates subsequent adjustment of the execution timing of the mixed precision vector instruction based on the intensity of the circuit activity, thereby extending the execution time of the mixed precision vector instruction and thus mitigating the circuit activity fluctuations of the mixed precision processing unit 13 in the time dimension, effectively suppressing the power current fluctuations of the power supply network 14.
[0034] In some embodiments, the circuit activity model may also be a dynamic model of the power network 14, which is used to dynamically predict the circuit activity intensity of the power network 14 when the mixed precision processing unit 13 is about to execute (i.e. the next execution) a mixed precision vector instruction based on the mixed precision vector instruction recently executed by the mixed precision processing unit 13, forming an adaptive circuit activity intensity prediction framework.
[0035] In an optional embodiment, the circuit activity model is a model obtained by training a neural network based on training data. The training data includes: an instruction sequence and the circuit activity intensity of the power network corresponding to each mixed-precision vector instruction in the instruction sequence, wherein the instruction sequence includes: instruction type information of multiple mixed-precision vector instructions arranged in execution order.
[0036] The activity prediction unit 12 is also used to input the target operation type, the first precision and the second precision, and the instruction type information of the N most recently executed mixed precision vector instructions of the mixed precision processing unit 13 into the circuit activity model to obtain the target circuit activity intensity, where N is a positive integer.
[0037] After the instruction parsing unit 11 reads and decodes the mixed precision vector instruction to obtain the instruction type information of the mixed precision vector instruction, the activity prediction unit 12 can input the target operation type, first precision and second precision of the mixed precision vector instruction, as well as the operation type, first precision and second precision of the N mixed precision vector instructions recently executed by the mixed precision processing unit 13, into the circuit activity model to obtain the target circuit activity intensity corresponding to the mixed precision vector instruction that the mixed precision processing unit 13 is about to execute (read and decoded by the instruction parsing unit 11) output by the circuit activity model.
[0038] In this optional embodiment, an instruction sequence evolving over time can be collected according to the order of mixed-precision vector instructions executed by the vector processor 1. This instruction sequence includes instruction type information for multiple consecutively executed mixed-precision vector instructions arranged in execution order. Furthermore, the circuit activity intensity of the power network corresponding to each mixed-precision vector instruction in the instruction sequence is collected to obtain training data for the neural network.
[0039] Optionally, the neural network can be trained based on training data until a circuit activity model is obtained. This allows the circuit activity model to learn the mapping relationship between the historical circuit state and the execution cycle of the next mixed-precision vector instruction, as well as the physical activity characteristics of the power network 14 that reflect the intensity of circuit activity. This effectively predicts the circuit activity intensity of the power network 14 triggered by the upcoming mixed-precision vector instruction. The input to the circuit activity model can be the instruction type information of the N consecutive mixed-precision vector instructions executed by the mixed-precision processing unit 13, and the next mixed-precision vector instruction to be executed by the mixed-precision processing unit 13. The output of the circuit activity model is the circuit activity intensity of the power network 14 corresponding to the next mixed-precision vector instruction to be executed by the mixed-precision processing unit 13.
[0040] In some embodiments, the neural network can be a recurrent neural network (RNN) based on fixed weights or a gated recurrent unit (GRU), etc. It should be noted that the circuit activity intensity corresponding to each mixed-precision vector instruction in the training data can be the actual circuit activity intensity of the power network 14 when the mixed-precision processing unit 13 executes the mixed-precision vector instruction.
[0041] For example, multiple sets of data from the instruction sequence can be sequentially input into a neural network for training until the model convergence condition is met to obtain a circuit activity model. Each set of data can include instruction type information for N consecutively executed mixed-precision vector instructions in the instruction sequence, arranged in execution order. The model convergence condition is that the difference between the circuit activity intensity corresponding to a single mixed-precision vector instruction output by the neural network and the actual circuit activity intensity is within the error range. The actual circuit activity intensity refers to the circuit activity intensity of the power network 14 corresponding to the next mixed-precision vector instruction after the last mixed-precision vector instruction in that set of data. Specifically, for example, the instruction sequence of the training data includes instruction type information for P consecutively executed mixed-precision vector instructions. Each set of data can include instruction type information for the Qth to Q+N-1th mixed-precision vector instructions in the instruction sequence, where Q is a positive integer and Q≤P-N+1. The model convergence condition is that the difference between the circuit activity intensity corresponding to a single mixed-precision vector instruction output by the neural network and the actual circuit activity intensity corresponding to the Q+Nth mixed-precision vector instruction in the instruction sequence is within the error range.
[0042] Another example involves collecting instruction type information from historically executed mixed-precision vector instructions. This instruction type information includes the precision combination code and operation type code of the mixed-precision vector instructions, along with the measured circuit activity strength of the power network 14 during the execution of the mixed-precision vector instructions. This information is used to obtain training data for the neural network, also known as instruction history window information. The activity prediction unit 12 includes a lightweight, hardware-implemented deep learning inference unit on which a neural network runs. By training the neural network running on this deep learning inference unit based on the training data, a circuit activity model is obtained. This model is used to continuously predict the circuit activity strength of the power network 14 corresponding to the next mixed-precision vector instruction to be executed, based on the historically executed mixed-precision vector instructions.
[0043] In this optional embodiment, the trained circuit activity model can continuously predict the circuit activity intensity of the next clock cycle or the next mixed-precision vector instruction based on the instruction stream to be executed by the mixed-precision processing unit 13 and the instructions executed in the past. The activity prediction unit 12 can input the instruction type information of the mixed-precision vector instruction to be executed by the mixed-precision processing unit 13, and the instruction type information of the N most recently executed mixed-precision vector instructions by the mixed-precision processing unit 13, into the trained circuit activity model to obtain the target circuit activity intensity corresponding to the mixed-precision vector instruction to be executed by the mixed-precision processing unit 13, output by the circuit activity model. Since circuit activities are temporally correlated, using a circuit activity model trained based on a neural network to predict the circuit activity intensity of the power network 14 corresponding to the next mixed-precision vector instruction to be executed, based on the historically executed mixed-precision vector instructions, can effectively ensure the accuracy of the predicted circuit activity intensity corresponding to the mixed-precision vector instruction. This allows for more precise adjustment of the execution timing of the mixed-precision vector instructions based on the circuit activity intensity, thereby more effectively mitigating the circuit activity fluctuations of the mixed-precision processing unit 13 in the time dimension and effectively suppressing the power current fluctuations of the power network 14.
[0044] In an optional embodiment of this application, the activity prediction unit 12 is further configured to acquire circuit parameters of the power network 14 during the execution cycles of the M most recently executed instructions of the mixed-precision processing unit 13, determine a reference circuit activity intensity of the power network 14 based on the circuit parameters, and correct the target circuit activity intensity based on the reference circuit activity intensity to obtain the corrected target circuit activity intensity. Here, M is a positive integer, and the circuit parameters include current and / or voltage.
[0045] In some embodiments, a circuit parameter acquisition device connected to the power network 14 can be provided to acquire circuit parameters during the operation of the power network 14. The activity prediction unit 12 can obtain the circuit parameters of the power network 14 within the execution cycles of the M most recently executed instructions of the mixed precision processing unit 13 through the circuit parameter acquisition device, so as to determine the reference circuit activity intensity of the power network 14 based on the circuit parameters, and correct the target circuit activity intensity based on the reference circuit activity intensity to obtain the corrected target circuit activity intensity.
[0046] Optionally, the circuit parameter is current. The circuit parameter acquisition device can be a current sensor array installed on key nodes of the power network 14, used to periodically sample the current during the operation of the power network 14. The activity prediction unit 12 can extract the physical characteristic quantity indicating the intensity of circuit activity by performing digital signal processing on multiple currents acquired by the circuit parameter acquisition device within the execution cycle of M instructions, and obtain the reference circuit activity intensity. In one optional case, the digital signal processing can perform first derivative calculation on multiple currents according to the sampling period of the current to obtain the rate of change corresponding to each current; the activity prediction unit 12 can extract the peak value from the rate of change corresponding to each current to obtain the reference circuit activity intensity. In another optional case, the digital signal processing can calculate the short-time energy within each sampling period based on the sampling period of the current and multiple currents; the activity prediction unit 12 can extract the peak value from the short-time energy within each sampling period to obtain the reference circuit activity intensity.
[0047] Similarly, alternatively, the circuit parameter can be voltage. The circuit parameter acquisition device can be a voltage sensor array installed on key nodes of the power network 14 to periodically sample the voltage during the operation of the power network 14. The activity prediction unit 12 can also extract the physical feature quantity indicating the intensity of circuit activity by performing digital signal processing on the multiple voltages acquired by the circuit parameter acquisition device within the execution cycle of M instructions, and obtain the reference circuit activity intensity.
[0048] In some embodiments, M can be 1. That is, the activity prediction unit 12 can obtain the circuit parameters of the power network 14 in the execution cycle of the previous instruction, determine the reference circuit activity strength of the power network 14 based on the circuit parameters, and correct the target circuit activity strength based on the reference circuit activity strength to obtain the corrected target circuit activity strength. Since the circuit activity strength of the power network 14 corresponding to the instruction to be executed by the mixed precision processing unit 13 changes based on the physical state of the power network 14 in the execution cycle of the previous instruction, the circuit activity strength of the power network 14 corresponding to the instruction to be executed by the mixed precision processing unit 13 will be greatly affected by the circuit activity strength of the power network 14 corresponding to the instruction previously executed by the mixed precision processing unit 13. The reference circuit activity strength determined based on the circuit parameters of the power network 14 in the execution cycle of the previous instruction can effectively provide contextual information about the physical state of the power network 14. Therefore, the target circuit activity strength can be corrected more accurately using this reference circuit activity strength to obtain a more precise target circuit activity strength.
[0049] In some embodiments, the activity prediction unit 12 is further configured to perform weighted fusion processing on the reference circuit activity intensity and the target circuit activity intensity to obtain the corrected target circuit activity intensity.
[0050] In an optional configuration, the activity prediction unit 12 can normalize the reference circuit activity intensity, and then perform a weighted summation of the normalized reference circuit activity intensity and the target circuit activity intensity to obtain the corrected target circuit activity intensity. That is, the corrected target circuit activity intensity F1 satisfies: F1=α·normalize(F phy )+(1-α) ·F pred-dynamic α represents the weight of the activity intensity of the reference circuit; 1-α represents the weight of the activity intensity of the target circuit; normalize() represents the normalization process; F phy Indicates the activity level of the reference circuit; F pred-dynamic This represents the target circuit activity intensity. Alternatively, the activity prediction unit 12 can also directly perform a weighted summation of the reference circuit activity intensity and the target circuit activity intensity to obtain the corrected target circuit activity intensity.
[0051] For example, after obtaining the instruction decoding information of the mixed-precision vector instruction processed by the instruction parsing unit 11, the activity prediction unit 12 can obtain the circuit parameters of the power network 14 in the execution cycle of the instruction executed by the mixed-precision processing unit 13 in the previous execution cycle. Based on the circuit parameters, the reference circuit activity intensity of the power network 14 is determined. The target operation type, first precision and second precision from the instruction decoding information of the mixed-precision vector instruction, as well as the instruction type information of the N most recently executed mixed-precision vector instructions by the mixed-precision processing unit 13, are input into the circuit activity model to obtain the target circuit activity intensity. Then, the target circuit activity intensity is corrected based on the reference circuit activity intensity to obtain the corrected target circuit activity intensity.
[0052] In this embodiment, the reference circuit activity strength is data determined by the power network 14 based on circuit physical parameters that reflect the real-time circuit activity strength within the most recently executed historical instruction cycle of the mixed-precision processing unit 13. The target circuit activity strength is the prediction data obtained by inputting the instruction type information of the N most recently executed mixed-precision vector instructions of the mixed-precision processing unit 13 into the behavior learning model (circuit activity model). Clearly, in this embodiment, the activity prediction unit 12 provides a dynamic circuit activity strength prediction system that combines real-time circuit physical feedback from the power network 14 with a behavior learning model. This system obtains the reference circuit activity strength by detecting the circuit physical parameters of the power network 14, predicts the target circuit activity strength using the behavior learning model, and then corrects the target circuit activity strength based on the reference circuit activity strength to obtain an accurately predicted circuit activity strength. This system replaces the static circuit activity prediction mechanism that uses a pre-configured circuit activity lookup table. It can effectively abandon the fixed, pre-programmed estimation of circuit activity intensity and instead adopt a closed-loop, adaptive circuit activity prediction framework. This framework combines a baseline circuit activity intensity determined by the circuit physical parameters of the power network 14 based on real-time detection, with the instruction type information of the N most recently executed mixed-precision vector instructions of the mixed-precision processing unit 13 required for the target circuit activity intensity to be predicted by the behavior learning model. This comprehensive approach aims to predict a more accurate circuit activity intensity of the power network 14 in the next mixed-precision vector instruction execution cycle of the mixed-precision processing unit 13.
[0053] This dynamic circuit activity intensity prediction system can continuously learn to adapt to changes in circuit switching characteristics caused by process deviations, voltage and temperature variations, and even transistor aging, in order to predict circuit activity intensity. Compared to static circuit activity prediction mechanisms that use pre-configured circuit activity lookup tables, it can provide more accurate and robust circuit activity intensity prediction, thereby more effectively achieving fine-tuning of the execution timing of mixed-precision vector instructions and effectively suppressing power current fluctuations and voltage noise fluctuations in the power supply network 14. The activity prediction unit 12, in conjunction with the mixed-precision processing unit 13, realizes a closed-loop data processing chain of "circuit activity intensity prediction - mixed-precision vector instruction execution timing adjustment," effectively improving the computational efficiency of the vector processor.
[0054] In an optional embodiment of this application, the mixed precision processing unit 13 is further configured to adjust the execution timing of the mixed precision vector instruction according to the target circuit activity intensity according to the target circuit activity intensity in accordance with a smooth adjustment strategy when the target circuit activity intensity is greater than the intensity threshold, and execute the mixed precision vector instruction based on the adjusted execution timing.
[0055] Optionally, after determining the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction decoding information of the mixed precision vector instruction, the mixed precision processing unit 13 can determine whether the target circuit activity intensity is greater than an intensity threshold, so as to determine whether the voltage / current fluctuation caused by the power network 14 due to the execution of the mixed precision vector instruction by the mixed precision processing unit 13 exceeds the requirements. This intensity threshold can be a threshold for adjusting the trigger timing set according to the actual circuit requirements. If the target circuit activity intensity is greater than the intensity threshold, the mixed precision processing unit 13 adjusts the execution timing of the mixed precision vector instruction according to the target circuit activity intensity using a smooth adjustment strategy, and executes the mixed precision vector instruction based on the adjusted execution timing.
[0056] Optionally, the mixed-precision processing unit 13 may not adjust the execution timing of the mixed-precision vector instruction if the target circuit activity intensity is less than or equal to the intensity threshold, and execute the mixed-precision vector instruction based on the original execution timing. By setting the intensity threshold, the execution timing of the mixed-precision vector instruction is adjusted only when the target circuit activity intensity corresponding to the mixed-precision vector instruction is greater than the intensity threshold, thereby extending the execution duration of the mixed-precision vector instruction. When the target circuit activity intensity corresponding to the mixed-precision vector instruction is less than or equal to the intensity threshold, no instruction is required. This reduces unnecessary timing smoothing while maintaining a low circuit activity intensity in the power network 14, improving the power current fluctuation suppression efficiency and thus enhancing the power current fluctuation suppression efficiency of the power network 14.
[0057] In an optional embodiment of this application, the instruction decoding information further includes: a micro-operation sequence of mixed-precision vector instructions. The micro-operation sequence includes: a load micro-operation instruction, a compute micro-operation instruction, and a store micro-operation instruction arranged in execution order. The load micro-operation instruction, also known as the load micro-operation code, is used to load the source data of the mixed-precision vector instruction at a first precision. The compute micro-operation instruction, also known as the compute micro-operation code, is used to convert the data precision of the source data to a second precision and then perform operations on the source data to obtain target data of the second precision. The store micro-operation instruction, also known as the store micro-operation code, is used to convert the data precision of the target data to a first precision and then store the target data of the first precision. In some embodiments, the first precision is a data precision limited by memory (or a cache module).
[0058] Based on this option, such as Figure 2 As shown, the mixed precision processing unit 13 includes a loading and storage module 131 and a mixed precision calculation module 132.
[0059] The loading storage module 131 is used to execute loading micro-operation instructions to load the source data of the first precision of the mixed precision vector instruction and output a data ready signal to the mixed precision calculation module 132.
[0060] The mixed-precision calculation module 132 is used to respond to the data ready signal, adjust the execution timing of the calculation micro-operation instructions according to the activity intensity of the target circuit according to the smooth adjustment strategy, and execute the calculation micro-operation instructions based on the adjusted execution timing to convert the data precision of the source data into the second precision, calculate the target data from the source data, and output the execution completion signal to the loading and storage module 131.
[0061] The loading storage module 131 is also used to execute storage micro-operation instructions in response to the execution completion signal, so as to convert the data precision of the target data into the first precision and then store the target data.
[0062] In some embodiments, the loading micro-operation instruction includes: the memory address of the source data to be read and the device identifier of the first vector register. The loading storage module 131 can execute the loading micro-operation instruction to read the source data byte stream based on the memory address, determine the data bit width and number of bytes of the source data according to the first precision, extract each source data from the read source data byte stream according to the data bit width and number of bytes of the source data; and extend the data bit width of each source data to the data bit width defined by the second precision, reassemble the source data after the data bit width extension to form an intermediate data vector, and write the intermediate data vector into the first vector register, thereby realizing the loading of the source data of the first precision of the mixed precision vector instruction. After the loading micro-operation instruction is executed, the loading storage module 131 can output a data ready signal to the mixed precision calculation module 132. The data ready signal is used to indicate that the loading storage module 131 has completed the execution of the loading micro-operation instruction. Optionally, the device identifier of the first register can be the physical address of the first register, or the device number of the first register, etc., and the device number corresponds to the physical address. For example, the first register can be a register configured by the virtual machine at startup to store the object address of the target object where the assignment operation of a reference type field occurs.
[0063] The computational micro-operation instructions include device identifiers for the first vector register and the second vector register. Responding to the data ready signal output by the load-store module 131, the mixed-precision computation module 132 can adjust the execution timing of the computational micro-operation instructions according to the activity intensity of the target circuit using a gradual adjustment strategy. Based on the adjusted execution timing, it executes the computational micro-operation instructions to read an intermediate data vector from the first vector register, divide the intermediate data vector to obtain individual source data, convert the data precision of each source data to a unified second precision, perform multiplication-addition, dot product, or reduction operations on the source data to obtain at least one second-precision target data, reassemble this at least one second-precision target data into a result data vector, and write this result data vector into the second vector register. After completing the computational micro-operation instructions, the mixed-precision computation module 132 can output an execution completion signal to the load-store module 131. This execution completion signal indicates that the mixed-precision computation module 132 has completed the execution of the computational micro-operation instructions. Optionally, the device identifier of the second register can be the physical address of the second register, or the device number of the second register, etc., where the device number corresponds to the physical address. For example, the second register can be a register configured when the virtual machine starts up.
[0064] The storage micro-operation instruction includes the device identifier of the second vector register and the target memory address. In response to the execution completion signal, the load storage module 131 executes the storage micro-operation instruction to read the result data vector from the second vector register, then segments the result data vector to obtain individual target data. The data width of each target data is truncated to a data width defined by a first precision, resulting in first-precision target data. These first-precision target data are then packaged to form a result data byte stream, which is written to the target memory address. This process converts the data precision of the target data to first precision before storing the target data.
[0065] In some embodiments, the smoothing adjustment strategy is used to limit the execution of the calculation micro-operation instruction after the target cavitation period corresponding to the activity intensity of the target circuit, so as to extend the execution time of the mixed precision vector instruction. Specifically, the mixed precision calculation module 132 is further used to execute the calculation micro-operation instruction according to the smoothing adjustment strategy, based on the target cavitation period of the target circuit activity intensity, so as to convert the data precision of the source data to a second precision after the target cavitation period is delayed, and to calculate the target data from the source data after the data precision conversion.
[0066] The target cavitation period is positively correlated with the activity intensity of the target circuit. Optionally, the mixed-precision calculation module 132 can respond to the data ready signal, determine the target cavitation period corresponding to the activity intensity of the target circuit according to a smooth adjustment strategy, execute the calculation micro-operation instruction after delaying the target cavitation period, convert the data precision of the source data to a second precision after delaying the target cavitation period, calculate the target data from the source data after the data precision conversion, and output an execution completion signal to the loading and storage module 131.
[0067] For example, the circuit activity intensity of the power network 14 corresponds one-to-one with the cavitation period, and the circuit activity intensity is proportional to the cavitation period. The mixed precision calculation module 132 can determine the target cavitation period corresponding to the target circuit activity intensity based on the correspondence between the circuit activity intensity and the cavitation period.
[0068] In some embodiments, such as Figure 3 As shown, the mixed-precision calculation module 132 includes: an instruction scheduling circuit 1321, an execution control circuit 1322, an arithmetic timing circuit 1323, and a clock gating circuit 1324. The clock gating circuit 1324 is used to provide a clock signal to the arithmetic timing circuit 1323.
[0069] The instruction scheduling circuit 1321 is used to respond to the data ready signal, output a cavitation period control signal to the clock gate circuit 1324 according to the correspondence between the circuit activity intensity and the cavitation period, and output a timing control signal to the execution control circuit 1322 after delaying the target cavitation period corresponding to the target circuit activity intensity.
[0070] The clock gate circuit 1324 is also used to stop providing a clock signal to the operation timing circuit 1323 in response to the cavitation period control signal, and to resume providing a clock signal to the operation timing circuit 1323 after the target cavitation period corresponding to the activity intensity of the target circuit.
[0071] The execution control circuit 1322 is used to respond to the timing control signal, decode and calculate the micro-operation instruction to obtain micro-operation information, and trigger the operation timing circuit 1323 to convert the data precision of the source data into the second precision included in the micro-operation information under the control of the clock signal, and then perform operations on the source data to obtain the target data, and output the execution completion signal to the loading and storage module 131.
[0072] The cavitation period control signal is used to control the clock gating circuit 1324 to pause providing clock signals to the arithmetic timing circuit 1323, and the pause duration is the target cavitation period corresponding to the activity intensity of the target circuit. The clock control signal is used to control the execution control circuit 1322 to decode and calculate micro-operation instructions, and to trigger the arithmetic timing circuit 1323 to execute the calculation micro-operation instructions.
[0073] In this optional embodiment, the instruction scheduling circuit 1321, in response to the data ready signal, can determine the cavitation period corresponding to the target circuit activity intensity based on the correspondence between circuit activity intensity and cavitation period, thereby obtaining the target cavitation period corresponding to the target circuit activity intensity; then, based on the target cavitation period, it generates a cavitation period control signal and outputs the cavitation period control signal to the clock gating circuit 1324, so that the clock gating circuit 1324, in response to the cavitation period control signal, stops providing a clock signal to the operation timing circuit 1323, and resumes providing a clock signal to the operation timing circuit 1323 after the target cavitation period corresponding to the target circuit activity intensity.
[0074] After the instruction scheduling circuit 1321 determines the target cavitation period corresponding to the activity intensity of the target circuit in response to the data ready signal, it delays the target cavitation period corresponding to the activity intensity of the target circuit and outputs a timing control signal and a calculation micro-operation instruction to the execution control circuit 1322, so that the execution control circuit 1322 responds to the timing control signal, decodes the calculation micro-operation instruction to obtain micro-operation information, which includes the second precision, the device identifier of the first vector register and the second vector register.
[0075] Based on the micro-operation information, the execution control circuit 1322 triggers the operation timing circuit 1323 to read the intermediate data vector from the first vector register under the control of the clock signal. The intermediate data vector is then divided into independent source data. The precision of each source data is converted to a unified second precision. Multiplication, addition, dot product, or reduction operations are performed on the source data to obtain at least one target data of second precision. This target data of at least one second precision is then reassembled to form a result data vector, which is written into the second vector register. After writing the result data vector into the second vector register, the operation timing circuit 1323 can output an execution completion signal to the load storage module 131.
[0076] In some embodiments, please refer to Figure 3 The sequential operation circuit 1323 includes: a precision segmentation and routing circuit 13231, a multi-precision conversion circuit 13232, a multiplication accumulation tree circuit 13233, and a rounding unit 13234. Among them, the multi-precision conversion circuit 13232 includes multiple conversion sub-circuits.
[0077] The precision segmentation and routing circuit 13231, triggered by the execution control circuit 1322, reads an intermediate data vector from the first vector register, segments the intermediate data vector according to the first precision to obtain independent source data, and distributes each independent source data to multiple conversion sub-circuits in the multi-precision conversion circuit 13232. Each conversion sub-circuit converts the received source data precision to a unified second precision, obtaining source data with the converted second precision, and passes the converted source data with the second precision to the multiplication-accumulation tree circuit 13233. The multiplication-accumulation tree circuit 13233 performs multiplication-addition, dot product, or reduction operations on multiple source data to obtain at least one original calculation result, and passes at least one original calculation result to the rounding unit 13234. The rounding unit 13234 performs rounding processing on each original calculation result to obtain at least one target data with the second precision, reassembles the at least one target data with the second precision to form a result data vector, and writes the result data vector into the second vector register.
[0078] In an optional embodiment of this application, a cavitation insertion scheme based on the circuit activity intensity of the power network 14 is proposed. In this scheme, in the pipeline of execution instructions, a controlled cavitation period positively correlated with the circuit activity intensity is dynamically inserted before the execution of the computation micro-operation instruction of the mixed precision vector instruction according to the circuit activity intensity caused by the power network 14. This causes the clock gating circuit to pause providing clock signals to the operation timing circuit during the cavitation period matched with the circuit activity intensity, and causes the execution control circuit to decode the computation micro-operation instruction after the cavitation period matched with the circuit activity intensity, so as to trigger the execution control circuit to execute the computation micro-operation execution instruction after the cavitation period matched with the circuit activity intensity. Clearly, by inserting a controlled cavitation period positively correlated with the activity intensity of the target circuit before the execution of the computation micro-operation instructions, the execution time of the computation micro-operation instructions in the mixed-precision vector instructions can be effectively delayed, thereby extending the overall execution time of the mixed-precision vector instructions. This reduces the fluctuation of circuit activity in the mixed-precision processing unit in the time dimension, improves the uniformity of circuit activity in the mixed-precision processing unit, and to a certain extent avoids concentrated circuit activity. It effectively reduces the probability of large transient current supply demands in the power network, effectively suppresses power current fluctuations in the power network from the source, effectively performs peak shaving and valley filling, prevents current spikes in the power network from causing dynamic voltage drops in the power supply, and effectively minimizes the impact on computational throughput while ensuring the stable operation of the mixed-precision processing unit.
[0079] It should be noted that the smoothing adjustment strategy can also be other strategies used to extend the execution time of mixed-precision vector instructions. For example, in some embodiments, the smoothing adjustment strategy is used to limit the splitting of computational micro-operation instructions (or mixed-precision vector instructions) into multiple sub-micro-operation instructions, and to distribute these multiple sub-micro-operation instructions into the execution window of low-intensity target mixed-precision vector instructions for execution, thereby extending the overall execution time of the mixed-precision vector instruction. Here, low-intensity target mixed-precision vector instructions refer to mixed-precision vector instructions whose circuit activity intensity is less than or equal to an intensity threshold, and whose execution order difference is less than the target number difference. The smoothing adjustment strategy limits the multiple sub-micro-operation instructions obtained by splitting the computational micro-operation instructions to be distributed into the execution window of the remaining instructions for execution, thereby distributing the switching activities in the mixed-precision vector instruction set in the time dimension, thus meeting the power current requirements of the smoothing power network 14, effectively preventing current spikes in the power network, and ensuring the stable operation of the mixed-precision processing unit. For example, a smoothing adjustment strategy can instruct that the sub-micro-operation instruction used to trigger the multiplication operation of the multiplication-accumulation tree circuit 13233 in the computation micro-operation instruction be inserted into the execution window of the sub-micro-operation instruction used to trigger the addition operation of the multiplication-accumulation tree circuit 13233 in the computation micro-operation instruction of the low-intensity target mixed precision vector instruction. This allows the sub-micro-operation instruction that triggers the multiplication operation of the multiplication-accumulation tree circuit 13233 to occupy the idle execution unit in the execution window, so that the originally concentrated current spikes can be distributed in the time dimension to the cycles corresponding to multiple execution windows, thus smoothing the overall current demand.
[0080] In some embodiments, the activity prediction unit 12 is further configured to add the target circuit activity intensity to the calculation micro-operation instructions at least once. The mixed-precision calculation module 132 is configured to, in response to a data ready signal, extract the target circuit activity intensity from the calculation micro-operation instructions and adjust the execution timing of the calculation micro-operation instructions according to the circuit activity information based on a smooth adjustment strategy.
[0081] Further optionally, the mixed-precision calculation module 132 includes: an instruction scheduling circuit 1321, an execution control circuit 1322, an operation timing circuit 1323, and a clock gating circuit 1324.
[0082] In response to the data ready signal, the instruction scheduling circuit 1321 extracts the target circuit activity intensity from the calculation micro-operation instruction, and outputs a cavitation period control signal to the clock gating circuit 1324 according to the correspondence between the circuit activity intensity and the cavitation period. This causes the clock gating circuit 1324 to stop providing a clock signal to the operation timing circuit 1323 in response to the cavitation period control signal, and resume providing a clock signal to the operation timing circuit 1323 after the target cavitation period corresponding to the target circuit activity intensity.
[0083] While responding to the data ready signal, the instruction scheduling circuit 1321 extracts and calculates the target circuit activity intensity in the micro-operation instruction, determines the target cavitation period corresponding to the target circuit activity intensity, delays the target cavitation period corresponding to the target circuit activity intensity, and outputs a timing control signal to the execution control circuit 1322. This causes the execution control circuit 1322 to respond to the timing control signal, decode and calculate the micro-operation instruction to obtain micro-operation information, and triggers the operation timing circuit 1323 to convert the data precision of the source data into the second precision included in the micro-operation information under the control of the clock signal. Then, it performs operations on the source data to obtain the target data and outputs an execution completion signal to the loading and storage module 131.
[0084] In an optional embodiment of this application, since the loading and storing of micro-operation instructions primarily utilize memory access paths, and these memory access paths typically do not trigger large-area heterogeneous circuit switching structures like those involved in the mixed-precision calculation module 132, current spikes in the power network 14 are not triggered. That is, current spikes in the power network 14 are mainly caused by the execution of computational micro-operations. Therefore, the activity prediction unit 12 adds the target circuit activity intensity only to the computational micro-operation instructions. This facilitates the mixed-precision calculation module 132 in reading the target circuit activity intensity while avoiding the loading and storing of invalid parameters, simplifying the processing operations of the activity prediction unit 12 and improving processing efficiency.
[0085] In an optional embodiment of this application, the activity prediction unit 12 is further configured to, after determining the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information, convert the target circuit activity intensity into an activity intensity level according to a circuit activity intensity level conversion algorithm. This allows the mixed precision processing unit 13 to adjust the execution timing of the mixed precision vector instruction according to the activity intensity level corresponding to the target circuit activity intensity, following a gradual adjustment strategy, and to execute the mixed precision vector instruction based on the adjusted execution timing. The circuit activity intensity level conversion algorithm is used to define the conversion relationship between circuit activity intensity and activity intensity level.
[0086] In some embodiments, the circuit activity intensity range [0, Vmax] can be obtained based on the maximum circuit activity intensity Vmax of the power network 14 when the mixed-precision processing unit 13 executes the mixed-precision vector command, based on testing, simulation, or historical prediction. This circuit activity intensity range is then divided into multiple sub-intervals to obtain multiple activity intensity levels, with each activity intensity level corresponding one-to-one with a sub-interval. A circuit activity intensity level conversion algorithm is used to define the conversion relationship between circuit activity intensity and activity intensity levels based on the correspondence between activity intensity levels and sub-intervals.
[0087] For example, the sub-intervals corresponding to each activity intensity level of the power network 14 can be determined by uniformly dividing the circuit activity intensity range into multiple sub-intervals. Based on this, the activity intensity level L corresponding to the target circuit activity intensity satisfies: L represents the activity intensity level L corresponding to the target circuit activity intensity; Vmax represents the maximum circuit activity intensity of power network 14; Vpred represents the target circuit activity intensity; X represents the number of activity intensity levels. This indicates rounding down. For example, assuming the circuit activity intensity range is [0, 11], the activity intensity level of the power network 14 can be 1-3, a total of three activity intensity levels. Activity intensity level 1 corresponds to the circuit activity intensity range [0, 3]; activity intensity level 2 corresponds to the circuit activity intensity range [4, 7]; and activity intensity level 3 corresponds to the circuit activity intensity range [8, 11]. If the target circuit activity intensity is 9, then the activity intensity level L corresponding to the target circuit activity intensity is 3.
[0088] Optionally, the mixed-precision processing unit 13 includes a loading and storage module 131 and a mixed-precision calculation module 132. The mixed-precision calculation module 132, in response to a data ready signal, adjusts the execution timing of the calculation micro-operation instructions according to the activity intensity level corresponding to the target circuit activity intensity using a smoothing adjustment strategy. Based on the adjusted execution timing, it executes the calculation micro-operation instructions to convert the source data precision to a second precision, then calculates the target data from the source data, and outputs an execution completion signal to the loading and storage module 131. Further optionally, the mixed-precision calculation module 132 is also used to determine, according to the smoothing adjustment strategy and the correspondence between the activity intensity level and the cavitation period, the cavitation period corresponding to the activity intensity level converted from the target circuit activity intensity, thus obtaining the target cavitation period corresponding to the target circuit activity intensity; it delays the execution of the calculation micro-operation instructions based on the target cavitation period, so that after the delay, the source data precision is converted to a second precision, and the target data is calculated from the source data after the precision conversion.
[0089] As an example, the mixed-precision calculation module 132 can store (or retrieve) a correspondence table between activity intensity levels and cavitation periods. In response to a data-ready signal, the mixed-precision calculation module 132 determines, according to the correspondence table and a smoothing adjustment strategy, the cavitation period corresponding to the activity intensity level converted from the activity intensity of the target circuit, thus obtaining the target cavitation period corresponding to the activity intensity of the target circuit.
[0090] In another example, the data type of the operation included in the instruction decoding information of a mixed-precision vector instruction can refer to the precision combination encoding of the mixed-precision vector instruction, which is the encoding information of the first precision and the second precision; the operation type can refer to the target operation type encoding of the mixed-precision vector instruction, which is the encoding information of the target operation type of the mixed-precision vector instruction. For example... Figure 4 As shown, the activity prediction unit 12 includes: a prediction module 121, a level quantization module 122, and a tag embedding module 123.
[0091] The instruction parsing unit 11 is used to read and decode mixed precision vector instructions to obtain the instruction decoding information of the mixed precision vector instructions. The instruction decoding information includes: the precision combination code of the mixed precision vector instruction (i.e., the data type of the operation), the target operation type code (i.e., the operation type), and the micro-operation sequence.
[0092] The prediction module 121 receives instruction decoding information of the mixed-precision vector instruction decoded by the instruction parsing unit 11, extracts the precision combination code (i.e., the data type of the operation) and the target operation type code (i.e., the operation type) of the mixed-precision vector instruction from the instruction decoding information; and uses the precision combination code and the target operation type code as indexes to search the circuit activity lookup table for the circuit activity intensity corresponding to the precision combination code and the target operation type code, and obtains and outputs the target circuit activity intensity to the level quantization module 122. The level quantization module 122 converts the target circuit activity intensity into an activity intensity level according to the level conversion algorithm of the circuit activity intensity, and outputs the activity intensity level to the tag embedding module 123. The tag embedding module 123 is used to add the activity intensity level (as a tag) to the calculation micro-operation instructions, and transmit the micro-operation sequence with the added activity intensity level to the mixed precision processing unit 13. The loading and storage module 131 in the mixed precision processing unit 13 executes the loading micro-operation instructions in the micro-operation sequence to load the source data of the first precision of the mixed precision vector instructions, and outputs a data ready signal to the mixed precision calculation module 132. In response to the data ready signal, the mixed precision calculation module 132 adjusts the execution timing of the calculation micro-operation instructions in the micro-operation sequence according to the target circuit activity intensity using a smooth adjustment strategy, and executes the calculation micro-operation instructions based on the adjusted execution timing to convert the data precision of the source data to the second precision. Then, it performs calculations on the source data to obtain the target data and outputs an execution completion signal to the loading and storage module 131. In response to the execution completion signal, the loading and storage module 131 executes the storage micro-operation instructions to convert the data precision of the target data to the first precision and then stores the target data.
[0093] In an optional embodiment of this application, the activity prediction unit 12 quantifies the circuit activity intensity of the power network 14 into activity intensity levels to reduce the computational and storage requirements related to subsequent circuit activity intensity. For example, the storage requirements for recording the correspondence between activity intensity levels and cavitation periods are lower than the storage requirements for recording information on the correspondence between circuit activity intensity and cavitation periods.
[0094] In an optional embodiment of this application, a mixed precision vector instruction is used to trigger calculations on source data of a first precision to obtain target data of a second precision. For example... Figure 5 As shown, the vector processor 1 also includes a vector control and status register 15. The vector control and status register 15 is used to store the first precision of the source data and the second precision of the target data, as well as precision conversion logic.
[0095] The loading storage module 131 is also used to execute loading micro-operation instructions to load the source data of the mixed precision vector instruction, convert the source data into source data with a data bit width limited by the second precision according to the precision conversion logic, and output a data ready signal to the mixed precision calculation module 132.
[0096] The loading storage module 131 is also used to execute storage micro-operation instructions in response to the execution completion signal, so as to convert the data precision of the target data to the first precision according to the precision conversion logic and then store the target data.
[0097] In this optional embodiment, the vector control and status register 15 can be used to store a precision field and a precision conversion mode field. The precision field carries a first precision of the source data and a second precision of the target data. The precision conversion mode field carries precision conversion logic, which defines the method by which the storage module 131 performs precision conversion.
[0098] In some embodiments, the vector control and status register 15 can be used to store an activity intensity prediction enable field, a scheduling mode definition field, and a rounding conversion module field. The activity intensity prediction enable field carries an activity intensity prediction enable bit, which indicates whether the activity prediction unit 12 predicts the circuit activity intensity corresponding to the mixed-precision vector instruction, and also indicates whether the mixed-precision calculation module 132 performs timing smoothing adjustments on the mixed-precision vector instruction based on the predicted circuit activity intensity to determine whether to extend the execution duration of the mixed-precision vector instruction. The scheduling mode definition field carries a smoothing strategy, for example, a bubble insertion delay strategy or an instruction interleaving execution strategy. The bubble insertion delay strategy limits the execution of the calculation micro-operation instruction after delaying the target bubble period corresponding to the target circuit activity intensity; the instruction interleaving execution strategy limits the calculation micro-operation instruction (or mixed-precision vector instruction) to be split into multiple sub-micro-operation instructions, and these multiple sub-micro-operation instructions are distributed and inserted into the execution window of the low-intensity target mixed-precision vector instruction for execution. The rounding conversion module field is used to carry the rounding conversion logic, which defines the method by which rounder 13234 performs rounding processing.
[0099] Optionally, the activity prediction unit 12 is also used to read the activity intensity prediction enable field in the vector control and status register 15, and when the activity intensity prediction enable bit indicates that the activity prediction unit 12 predicts the circuit activity intensity corresponding to the mixed precision vector instruction, the target circuit activity intensity corresponding to the mixed precision vector instruction is determined according to the instruction type information.
[0100] The mixed-precision calculation module 132 is also used to respond to the data ready signal, read the scheduling mode definition field in the vector control and status register 15, adjust the execution timing of the calculation micro-operation instructions according to the smooth adjustment strategy carried by the scheduling mode definition field and the activity intensity of the target circuit, and execute the calculation micro-operation instructions based on the adjusted execution timing to convert the data precision of the source data into the second precision, calculate the target data from the source data, and output the execution completion signal to the loading and storage module 131.
[0101] The rounder 13234 is also used to read the rounding conversion module field in the vector control and status register 15, perform rounding processing on each original calculation result according to the rounding conversion logic carried in the rounding conversion module field, obtain at least one second-precision target data, reassemble the at least one second-precision target data to form a result data vector, and write the result data vector into the second vector register.
[0102] In optional embodiments of this application, such as Figure 6As shown, the vector processor 1 also includes an exception handling module 16. The exception handling module 16 is used to acquire the current circuit parameters of the power network 14. If the circuit parameters indicate that the power supply voltage is less than a voltage threshold, it controls the loading storage module 131 to suspend the execution of storage micro-operation instructions, triggers the execution of a redundant copy instruction of the mixed-precision vector instruction, and obtains the target data corresponding to the redundant copy instruction. If the target data calculated by the mixed-precision calculation module 132 is consistent with the target data corresponding to the redundant copy instruction, it controls the loading storage module 131 to continue executing the storage micro-operation instructions. If the target data calculated by the mixed-precision calculation module 132 is inconsistent with the target data corresponding to the redundant copy instruction, it triggers instruction exception handling.
[0103] In this optional embodiment, the exception handling module 16 can acquire the current circuit parameters of the power network 14 in real time or periodically, and after each acquisition of the current circuit parameters of the power network 14, determine whether the power supply voltage indicated by the circuit parameters is less than a voltage threshold, so as to determine whether the power network 14 is currently experiencing a large power supply voltage drop. If the power supply voltage indicated by the circuit parameters is greater than or equal to the voltage threshold, the exception handling module 16 may not trigger an operation. When the circuit parameters indicate that the power supply voltage is less than the voltage threshold, the exception handling module 16 can control the loading storage module 131 to suspend the execution of storage micro-operation instructions, thereby suspending the write-back storage operation of the mixed-precision vector instruction. Furthermore, it triggers the execution of a redundant copy instruction of the mixed-precision vector instruction to obtain the target data corresponding to the redundant copy instruction. It then determines whether the target data calculated by the mixed-precision calculation module 132 is consistent with the target data corresponding to the redundant copy instruction, to determine whether the mixed-precision vector instruction currently being executed by the mixed-precision calculation module 132 is executed accurately. If the target data calculated by the mixed-precision calculation module 132 is consistent with the target data corresponding to the redundant copy instruction, the loading storage module 131 is controlled to continue executing the storage micro-operation instructions. If the target data calculated by the mixed-precision calculation module 132 is inconsistent with the target data corresponding to the redundant copy instruction, instruction exception handling is triggered. Optionally, instruction exception handling can be used to locate hardware with errors and trigger an exception handling program to restore the hardware. The circuit parameters of the power network 14 include power supply current and / or power supply voltage.
[0104] In some embodiments, the circuit parameters of power network 14 are power supply voltages. Please refer to [link / reference needed]. Figure 6The anomaly handling module 16 includes a voltage monitoring circuit 161 and an anomaly control circuit 162. The voltage monitoring circuit 161 includes an analog-to-digital converter (ADC) and at least one voltage sensor, with each voltage sensor distributed around the power rail between the power network 14 and the mixed-precision processing unit 13. Each voltage sensor is used to acquire the circuit voltage on the power rail at a fixed sampling frequency fs, obtaining the analog power supply voltage of the power network 14, and outputting this analog power supply voltage to the ADC. The ADC performs analog-to-digital conversion on the analog power supply voltage, obtaining and outputting a digital power supply voltage Vmeasured[t] (circuit parameter) to the anomaly control circuit 162, where t represents the sampling time of the voltage sensor.
[0105] The anomaly control circuit 162 includes an anomaly judgment subcircuit and an anomaly processing subcircuit. The anomaly judgment subcircuit determines whether the digital power supply voltage collected at each sampling moment is less than a voltage threshold. If the digital power supply voltage collected at any sampling moment is less than the voltage threshold, a voltage noise over-limit event signal is generated. This signal is then associated with the instruction identifier of the mixed-precision vector instruction currently being executed by the mixed-precision calculation module 132 (i.e., currently being executed in the pipeline), and output to the anomaly processing subcircuit along with the instruction identifier. In response to the voltage noise over-limit event signal, the anomaly processing subcircuit locates the affected mixed-precision vector instruction currently being executed in the execution pipeline of the mixed-precision calculation module 132, which has not yet been written back, based on the instruction identifier. It then controls the load storage module 131 to suspend the execution of the storage micro-operation instruction and flushes all subsequent instructions that depend on the execution result of the mixed-precision vector instruction. The exception handling sub-circuit is also used to, after the control loading and storage module 131 suspends the execution of storage micro-operation instructions, trigger a backup computing unit that is physically isolated from the mixed-precision computing module 132, or for the mixed-precision computing module 132 to execute a redundant copy of the mixed-precision vector instruction at different timing cycles, to obtain the target data corresponding to the redundant copy instruction; determine whether the target data obtained by the mixed-precision computing module 132 is consistent with the target data corresponding to the redundant copy instruction, so that if the target data obtained by the mixed-precision computing module 132 is consistent with the target data corresponding to the redundant copy instruction, the control loading and storage module 131 continues to execute the storage micro-operation instructions and triggers the resumption of the execution pipeline; if the target data obtained by the mixed-precision computing module 132 is inconsistent with the target data corresponding to the redundant copy instruction, the execution instruction exception handling is triggered.
[0106] This application proposes an optional embodiment of a collaborative fault-tolerant scheme for voltage monitoring and instruction-level redundant execution of a power network 14. This scheme monitors electrical parameters indicating the power supply voltage of the power network 14. If the power supply voltage indicated by these electrical parameters is less than a voltage threshold, indicating that the power network 14 has experienced a voltage drop due to a current spike, the scheme locates the affected mixed-precision vector instruction currently being executed by the mixed-precision calculation module 132 that has not yet been written back. It then initiates the execution of a redundant copy of this mixed-precision vector instruction. Furthermore, it verifies whether the target data obtained from executing the redundant copy instruction is consistent with the target data obtained from executing the mixed-precision vector instruction, thus verifying whether the mixed-precision vector instruction has been executed incorrectly. This facilitates triggering instruction exception handling in the event of an error in the execution of the mixed-precision vector instruction, thereby restoring the execution pipeline. Obviously, this scheme, by constructing a monitoring-location-verification-recovery mechanism to extend the execution time of mixed-precision vector instructions in the front-end mixed-precision calculation module 132, still fails to eliminate power supply noise in the power network 14, causing a power voltage drop. By monitoring the electrical parameters of the power network 14, it can promptly locate the affected mixed-precision vector instructions that have not been completed when there is a large power voltage drop in the power network 14, and start redundant copy instructions to verify the execution accuracy of the mixed-precision vector instructions. In the event of an error in execution, an exception handling mechanism is triggered to restore the execution pipeline, determine the accuracy of mixed-precision calculation, and improve the system-level robustness of the vector processor 1 under extreme conditions.
[0107] In the optional embodiments of this application, please continue to refer to Figure 6 The vector processor also includes a data update module 17. The data update module 17 is used to, when the vector processor 1 is in an idle state, acquire the instruction type information of the mixed-precision vector instruction to be updated, and the first circuit activity intensity corresponding to the instruction type information, and update the circuit activity intensity corresponding to the instruction type information in the circuit activity model to the first circuit activity intensity.
[0108] In this optional embodiment, after receiving the instruction type information of the mixed precision vector instruction to be updated and the first circuit activity intensity corresponding to the instruction type information, the data update module 17 can temporarily store the received instruction type information and the first circuit activity intensity. Then, when the vector processor 1 is in an idle state, it reads the temporarily stored instruction type information and the first circuit activity intensity and controls the activity prediction unit 12 to update the circuit activity intensity corresponding to the instruction type information in the circuit activity model to the first circuit activity intensity.
[0109] For example, the circuit activity model includes a circuit activity lookup table. (e.g.) Figure 7As shown, vector processor 1 runs privileged software 2 (or a dedicated background calibration engine) which triggers data updates to the circuit activity model. This privileged software 2 communicates with data update module 17 via processor configuration port 18.
[0110] When the privileged software 2 needs to update the first circuit activity strength corresponding to the first mixed-precision vector instruction, it submits an update data packet corresponding to the first mixed-precision vector instruction to the processor configuration port 18. This update data packet includes the instruction type information of the first mixed-precision vector instruction and the first circuit activity strength Vnew corresponding to that instruction type information. Upon receiving the update data packet, the processor configuration port 18 sends a lookup table update request to the data update module 17. This lookup table update request includes the update data packet. The data update module 17 can respond to the lookup table update request by parsing it to obtain the update data packet, extracting the instruction type information of the first mixed-precision vector instruction and the first circuit activity strength Vnew corresponding to that instruction type information from the update data packet, and performing security and validity verification on the extracted information. If the verification passes, the data update module 17 temporarily stores the instruction type information of the first mixed-precision vector instruction and the first circuit activity strength Vnew corresponding to that instruction type information in the update data temporary buffer 19. The data update module 17 monitors the operating status of the vector processor 1 and sends an intensity update request to the activity prediction unit 12 when the vector processor 1 is idle. In response to the intensity update request, the activity prediction unit 12 reads the temporarily stored instruction type information and the first circuit activity intensity Vnew, and updates the circuit activity intensity Vold indicated by the instruction type information in the circuit activity lookup table to the first circuit activity intensity Vnew. Furthermore, after completing the update of the circuit activity lookup table, the activity prediction unit 12 returns an update confirmation response for the first mixed-precision vector instruction to the data update module 17 to notify the data update module 17 that the circuit activity lookup table update is complete. Upon receiving the update confirmation response, the data update module 17 can return an update completion response for the first mixed-precision vector instruction to the privileged software 2 to notify the privileged software 2 that the circuit activity intensity corresponding to the first mixed-precision vector instruction in the circuit activity lookup table has been updated. Based on this, the activity prediction unit 12 can subsequently predict the circuit activity intensity corresponding to the mixed-precision vector instruction based on the updated circuit activity lookup table.
[0111] As a further example, the vector control and status register 15 also includes a lookup table update status register, which stores an update flag for the lookup table. This update flag indicates whether the privileged software 2 has submitted an update data packet, thereby instructing the vector processor 1 to initiate the update process for the circuit active lookup table. Each module in the execution pipeline of the vector processor 1 (instruction parsing unit 11, activity prediction unit 12, mixed precision processing unit 13) can determine whether an update process for the circuit active lookup table needs to be initiated by reading the update flag (a hardware control signal) in the lookup table update status register.
[0112] In some embodiments, the vector processor 1 can be a single-core processor or a multi-core processor. When the vector processor 1 is a single-core processor, it includes one processor core 20. The instruction parsing unit 11, activity prediction unit 12, mixed-precision processing unit 13, exception handling module 16, and update data temporary cache 19 can be integrated onto the processor core 20, or independently of it. When the vector processor 1 is a multi-core processor, it includes at least two processor cores 20. Each processor core 20 can integrate the instruction parsing unit 11, activity prediction unit 12, mixed-precision processing unit 13, exception handling module 16, and update data temporary cache 19 to provide the data processing method provided in the embodiments of this application to the configured processor core 20. Alternatively, each processor core 20 on the vector processor 1 can share the instruction parsing unit 11, activity prediction unit 12, mixed-precision processing unit 13, exception handling module 16, and update data temporary cache 19 to provide the data processing method provided in the embodiments of this application to each processor core 20.
[0113] It should be noted that the data update module 17 can also perform editing operations such as deletion and addition on the data in the circuit activity model. The specific implementation process of this editing operation can be referred to the update operation of the circuit activity intensity in the aforementioned circuit activity model. This application embodiment will not elaborate on this.
[0114] In this optional embodiment, an online optimization scheme for a circuit activity model is proposed. Under this scheme, the data update module 17 can edit the circuit activity model when the vector processor 1 is in an idle state, so as to realize the online adjustment and optimization of the circuit activity model, which is a circuit activity intensity prediction model.
[0115] In this embodiment, after reading the mixed-precision vector instruction, the instruction parsing unit can decode the instruction to obtain instruction decoding information. The activity prediction unit can determine the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information in the instruction decoding information. This allows the mixed-precision processing unit to adjust the execution timing of the mixed-precision vector instruction according to the target circuit activity intensity using a smoothing adjustment strategy. The mixed-precision vector instruction is then executed based on the adjusted execution timing to extend its execution duration. This reduces circuit activity fluctuations in the mixed-precision processing unit over time, improves the uniformity of circuit activity, and to some extent avoids concentrated circuit activity. This effectively reduces the probability of large transient current supply demands in the power network, suppresses power network current fluctuations, effectively smooths peaks and fills valleys, prevents current spikes in the power network that could cause dynamic voltage drops, ensures stable operation of the mixed-precision processing unit, and improves the computational efficiency of the vector processor.
[0116] For ease of understanding, the following examples illustrate the vector processor 1 provided in the embodiments of this application, and correspondingly describe the data processing method provided in the embodiments of this application.
[0117] For example, such as Figure 8 As shown, the vector processor 1 runs privileged software 2, and the vector processor 1 includes: an instruction parsing unit 11, an activity prediction unit 12, a mixed precision processing unit 13, a vector control and status register 15, and an exception handling module 16. The instruction parsing unit 11 includes an instruction reading module and an instruction decoding module; the mixed precision processing unit 13 includes an instruction scheduling logic module 133, a load-store module 131, and a mixed precision calculation module 132; the mixed precision calculation module 132 includes an instruction scheduling circuit 1321, an execution control circuit 1322, an operation timing circuit 1323, and a clock gating circuit 1324. The vector control and status register 15 includes: a vector control status register and a voltage noise suppression control register; the vector control status register stores a precision field, a precision conversion mode field, and a rounding conversion module field; the voltage noise suppression control register stores an activity intensity prediction enable field and a scheduling mode definition field. The exception handling module 16 includes: a voltage monitoring circuit 161 and an exception control circuit 162.
[0118] During the configuration phase, privileged software 2 submits register configuration data to the processor's register configuration port via the system bus. This register configuration data includes: the first precision of the source data and the second precision of the target data used by the mixed precision vector instructions, precision conversion logic, activity intensity prediction enable bit, smoothing adjustment strategy, and rounding conversion logic. The register configuration port receives and decodes the register configuration data. It writes the first precision of the source data and the second precision of the target data extracted from the register configuration data into a predefined precision field in the vector control status register; it writes the precision conversion logic extracted from the register configuration data into a predefined precision conversion mode field in the vector control status register; it writes the rounding conversion logic extracted from the register configuration data into a predefined rounding conversion module field in the vector control status register; it writes the activity intensity prediction enable bit extracted from the register configuration data into a predefined activity intensity prediction enable field in the voltage noise suppression control register; and it writes the smoothing adjustment strategy extracted from the register configuration data into a predefined scheduling mode definition field in the voltage noise suppression control register.
[0119] In the instruction execution and computation pipeline, the instruction fetch module in instruction parsing unit 11 reads the binary code of mixed-precision vector instructions sequentially from the instruction buffer and passes the binary code of the mixed-precision vector instructions to the instruction decoding module. The instruction decoding module of instruction parsing unit 11 parses the binary code of the mixed-precision vector instructions to obtain instruction decoding information, which includes: the precision combination code of the mixed-precision vector instructions, the target operation type code, and the micro-operation sequence. The precision combination code is the encoding information for the first and second precisions; the target operation type code is the encoding information for the target operation type of the mixed-precision vector instructions. The micro-operation sequence includes: load micro-operation instructions, compute micro-operation instructions, and store micro-operation instructions arranged in execution order.
[0120] Activity prediction unit 12 receives the precision combination code and target operation type code from the instruction decoding module. Using the precision combination code and target operation type code as indexes, it accesses the circuit activity lookup table stored internally by vector processor 1 to obtain the circuit activity intensity recorded in the circuit activity lookup table corresponding to the precision combination code and target operation type code, thus obtaining the target circuit activity intensity corresponding to the mixed precision vector instruction. After converting the target circuit activity intensity into (or quantizing) an activity intensity level, the activity intensity level (as a label) is added to the reserved bit field in the calculation micro-operation instruction, and the micro-operation sequence with the added activity intensity level is written to the micro-operation queue. The dispatch unit outputs each micro-operation instruction in the micro-operation queue and dispatches it to the reserved station queue of the execution pipeline. The instruction scheduler sends the micro-operation instructions in the reserved station queue to the mixed precision processing unit 13.
[0121] The instruction scheduling logic module 133 in the mixed-precision processing unit 13 reads the activity intensity prediction enable field in the voltage noise suppression control register and determines whether the activity intensity prediction enable bit carried by the activity intensity prediction enable field indicates whether the mixed-precision calculation module 132 performs timing smoothing adjustments on the mixed-precision vector instructions based on the predicted circuit activity intensity. If the activity intensity prediction enable bit indicates whether the mixed-precision calculation module 132 performs timing smoothing adjustments on the mixed-precision vector instructions based on the predicted circuit activity intensity, then an instruction scheduling signal is sent to the load storage module 131 and the mixed-precision calculation module 132.
[0122] The load-store module 131 in the mixed-precision processing unit 13 receives a load micro-operation instruction from the reserved station queue. This instruction includes the memory address of the source data to be read and the device number of the first vector register. In response to an instruction scheduling signal, the load-store module 131 sends the memory address of the source data to the memory controller to receive a stream of source data byte segments read based on that memory address. Furthermore, the load-store module 131 reads the precision field and precision conversion mode field from the vector control status register, and determines the data width and number of bytes of the source data based on the first precision carried in the precision field. It then extracts individual source data segments from the read source data byte stream according to the data width and number of bytes. The load-store module 131 also performs zero-expansion or sign-expansion on the data width of each source data segment based on the precision conversion logic carried in the precision conversion mode field (e.g., precision conversion logic indicating unpacking and expansion processing logic), expanding the data width of each source data segment to the data width defined by the second precision, forming individual high-precision data elements. The loading storage module 131 reassembles the source data after each data bit width is expanded to form an intermediate data vector, writes the intermediate data vector into the first vector register indicated by the loading micro-operation instruction in the vector register file, generates a data ready signal, and outputs the data ready signal to the mixed precision calculation module 132.
[0123] In the mixed-precision calculation module 132 of the mixed-precision processing unit 13, the instruction scheduling circuit 1321, in response to the instruction scheduling signal and the data ready signal, receives the calculation micro-operation instruction from the reserved station queue, reads the activity intensity level in the calculation micro-operation instruction, and reads the scheduling mode definition field in the voltage noise suppression control register. The instruction scheduling circuit 1321 determines whether the activity intensity level is greater than the level threshold (i.e., the activity intensity level corresponding to the intensity threshold). If the activity intensity level is greater than the level threshold, and the scheduling mode definition field carries a bubble insertion delay strategy, then according to the correspondence between the activity intensity level and the bubble period, it determines the bubble period corresponding to the activity intensity level in the calculation micro-operation instruction, and obtains the target bubble period. Then, based on the target bubble period, it generates a bubble period control signal and outputs the bubble period control signal to the clock gating circuit 1324, so that the clock gating circuit 1324, in response to the bubble period control signal, stops providing a clock signal to the operation timing circuit 1323, and resumes providing a clock signal to the operation timing circuit 1323 after the target bubble period corresponding to the activity intensity of the target circuit.
[0124] After responding to the data ready signal and determining the target cavitation period, the instruction scheduling circuit 1321 delays the target cavitation period and outputs a timing control signal and a calculation micro-operation instruction to the execution control circuit 1322. This causes the execution control circuit 1322 to respond to the timing control signal, decode the calculation micro-operation instruction, and obtain micro-operation information, which includes the second precision, the device numbers of the first vector register and the second vector register. Based on this micro-operation information, the execution control circuit 1322 triggers the operation timing circuit 1323 to read the intermediate data vector from the first vector register under the control of the clock signal. The intermediate data vector is then divided to obtain individual source data. The precision of each source data is converted to a unified second precision. Multiplication, addition, dot product, or reduction operations are performed on the source data to obtain at least one target data of second precision. This target data of at least one second precision is reassembled to form a result data vector, which is then written to the second vector register in the vector register file. After writing the result data vector to the second vector register, the operation timing circuit 1323 can output an execution completion signal to the load storage module 131.
[0125] The load-store module 131 in the mixed-precision processing unit 13 receives a storage micro-operation instruction from the reservation station queue. This instruction includes the device identifier of the second vector register and the target memory address. The load-store module 131 reads the precision field and precision conversion mode field from the vector control status register. In response to an execution completion signal, the load-store module 131 executes the storage micro-operation instruction to read the result data vector from the second vector register, then segments the result data vector to obtain individual target data. Based on the first precision carried in the precision field and the precision conversion logic carried in the precision conversion mode field, the load-store module 131 performs least significant bit truncation or saturation processing on each target data to truncate the data width of each target data to the data width defined by the first precision, obtaining first-precision target data. The load-store module 131 packages the first-precision target data into a result data byte stream, sends the result data byte stream and the target memory address to the memory controller, causing the memory controller to perform a write operation, writing the result data byte stream to the target memory address, and returning a storage completion confirmation signal to the load-store module 131 after the write operation is complete.
[0126] During the voltage monitoring and protection phase, the voltage monitoring circuit 161 in the anomaly handling module 16 collects the circuit voltage on the power rail at a fixed sampling frequency fs to obtain the analog power supply voltage of the power network 14. It then performs analog-to-digital conversion on the analog power supply voltage to obtain and output a digital power supply voltage to the anomaly control circuit 162. The anomaly control circuit 162 determines whether the digital power supply voltage collected at each sampling moment is less than a voltage threshold. If the digital power supply voltage collected at any sampling moment is less than the voltage threshold, it locates the affected mixed-precision vector instruction currently being executed by the mixed-precision calculation module 132 that has not yet been written back. It then controls the loading and storage module 131 to suspend the execution of the storage micro-operation instruction and flushes all subsequent instructions that depend on the execution result of the mixed-precision vector instruction. Furthermore, after the exception control circuit 162 controls the loading and storage module 131 to suspend the execution of storage micro-operation instructions, it can also trigger a backup computing unit that is physically isolated from the mixed-precision computing module 132, or the mixed-precision computing module 132 to execute redundant copy instructions of mixed-precision vector instructions at different timing cycles to obtain the target data corresponding to the redundant copy instructions; it determines whether the target data obtained by the mixed-precision computing module 132 is consistent with the target data corresponding to the redundant copy instructions, so that if the target data obtained by the mixed-precision computing module 132 is consistent with the target data corresponding to the redundant copy instructions, it controls the loading and storage module 131 to continue executing storage micro-operation instructions and triggers the resumption of execution pipeline; if the target data obtained by the mixed-precision computing module 132 is inconsistent with the target data corresponding to the redundant copy instructions, it triggers execution instruction exception handling.
[0127] In an optional embodiment of this application, a hybrid precision vector instruction set and microarchitecture co-design scheme for power integrity is proposed. This scheme extends hybrid precision vector instructions to include characters indicating the circuit activity intensity of the power network 14. Within the microarchitecture, four hardware modules are integrated: integrated circuit activity intensity prediction, instruction execution flow scheduling based on activity intensity prediction enable bits, power network monitoring, and instruction compensation based on extending instruction execution time. Through a closed-loop data processing chain from "configuration," "prediction," and "scheduling" to "monitoring" and "compensation," these four modules are linked to establish a complete power noise management system that is software-configurable, hardware-predictable, preventable, and protective. This significantly improves the power signal quality, timing reliability, and overall energy efficiency of the vector processor while effectively ensuring the performance advantages of hybrid precision computing, thus addressing, to some extent, the physical bottlenecks restricting the development of high-performance hybrid precision computing processors.
[0128] In this embodiment, after reading the mixed-precision vector instruction, the instruction parsing unit can decode the instruction to obtain instruction decoding information. The activity prediction unit can determine the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information in the instruction decoding information. This allows the mixed-precision processing unit to adjust the execution timing of the mixed-precision vector instruction according to the target circuit activity intensity using a smoothing adjustment strategy. The mixed-precision vector instruction is then executed based on the adjusted execution timing to extend its execution duration. This reduces circuit activity fluctuations in the mixed-precision processing unit over time, improves the uniformity of circuit activity, and to some extent avoids concentrated circuit activity. This effectively reduces the probability of large transient current supply demands in the power network, suppresses power network current fluctuations, effectively smooths peaks and fills valleys, prevents current spikes in the power network that could cause dynamic voltage drops, ensures stable operation of the mixed-precision processing unit, and improves the computational efficiency of the vector processor.
[0129] Please refer to Figure 9 This document illustrates a flowchart of a data processing method provided in an embodiment of this application. This data processing method is applied to any vector processor provided in the embodiments of this application. Figure 9 As shown, the data processing methods include: Step S901: The instruction parsing unit reads and decodes the mixed-precision vector instruction to obtain instruction decoding information. The instruction decoding information includes instruction type information, which indicates the operation type and data type of the mixed-precision vector instruction. Step S902: The activity prediction unit determines the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information. The target circuit activity intensity indicates the circuit activity intensity of the power supply network that supplies power to the mixed precision processing unit when the mixed precision processing unit executes the mixed precision vector instruction. Step S903: The mixed precision processing unit adjusts the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a smooth adjustment strategy, and executes the mixed precision vector instruction based on the adjusted execution timing. The smooth adjustment strategy is used to extend the execution time of the mixed precision vector instruction.
[0130] In this embodiment, after reading the mixed-precision vector instruction, the instruction parsing unit can decode the instruction to obtain instruction decoding information. The activity prediction unit can determine the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information in the instruction decoding information. This allows the mixed-precision processing unit to adjust the execution timing of the mixed-precision vector instruction according to the target circuit activity intensity using a smoothing adjustment strategy. The mixed-precision vector instruction is then executed based on the adjusted execution timing to extend its execution duration. This reduces circuit activity fluctuations in the mixed-precision processing unit over time, improves the uniformity of circuit activity, and to some extent avoids concentrated circuit activity. This effectively reduces the probability of large transient current supply demands in the power network, suppresses power network current fluctuations, effectively smooths peaks and fills valleys, prevents current spikes in the power network that could cause dynamic voltage drops, ensures stable operation of the mixed-precision processing unit, and improves the computational efficiency of the vector processor.
[0131] In some embodiments, a mixed-precision vector instruction is used to trigger the operation on source data of the first precision to obtain target data of the second precision. The instruction type information includes: target operation type, first precision, and second precision. Step S902, the process by which the activity prediction unit determines the implementation of the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information, may include: The activity prediction unit determines the target circuit activity intensity based on instruction type information and circuit activity model. The circuit activity model describes the relationship between the circuit activity intensity of the power network when the mixed-precision processing unit executes mixed-precision vector instructions and the instruction type information of the mixed-precision vector instructions executed by the mixed-precision processing unit.
[0132] In some embodiments, the circuit activity model includes a circuit activity lookup table, which records the circuit activity intensity of the power network using instruction type information of mixed-precision vector instructions as an index. The process by which the activity prediction unit determines the target circuit activity intensity based on the instruction type information and the circuit activity model may include: The activity prediction unit obtains the target circuit activity intensity by looking up the circuit activity lookup table based on the target operation type, first precision, and second precision.
[0133] In some embodiments, the circuit activity model is a model obtained by training a neural network based on training data. The training data includes: an instruction sequence and the circuit activity intensity of the power network corresponding to each mixed-precision vector instruction in the instruction sequence. The instruction sequence includes: instruction type information of multiple mixed-precision vector instructions arranged in execution order. The process by which the activity prediction unit determines the target circuit activity intensity based on the instruction type information and the circuit activity model may include: The activity prediction unit inputs the target operation type, the first precision and the second precision, as well as the instruction type information of the N most recently executed mixed precision vector instructions from the mixed precision processing unit into the circuit activity model to obtain the target circuit activity intensity, where N is a positive integer.
[0134] In some embodiments, the data processing method further includes: The activity prediction unit acquires the circuit parameters of the power network during the execution cycles of the M most recently executed instructions from the mixed-precision processing unit, determines the reference circuit activity strength of the power network based on the circuit parameters, and corrects the target circuit activity strength based on the reference circuit activity strength to obtain the corrected target circuit activity strength, where M is a positive integer and the circuit parameters include current and / or voltage.
[0135] In some embodiments, the process of correcting the target circuit activity intensity based on the reference circuit activity intensity to obtain the corrected target circuit activity intensity may include: the activity prediction unit performing a weighted fusion process on the reference circuit activity intensity and the target circuit activity intensity to obtain the corrected target circuit activity intensity.
[0136] In some embodiments, the instruction decoding information further includes: a micro-operation sequence of mixed-precision vector instructions, the micro-operation sequence including: load micro-operation instructions, compute micro-operation instructions, and store micro-operation instructions arranged in execution order; the mixed-precision processing unit includes: a load-store module and a mixed-precision compute module; step S903, where the mixed-precision processing unit adjusts the execution timing of the mixed-precision vector instructions according to the target circuit activity intensity using a smooth adjustment strategy, and the process of implementing the mixed-precision vector instructions based on the adjusted execution timing may include: The loading storage module executes the loading micro-operation instruction to load the source data of the first precision of the mixed precision vector instruction, and outputs a data ready signal to the mixed precision calculation module; In response to the data ready signal, the mixed-precision calculation module adjusts the execution timing of the calculation micro-operation instructions according to the activity intensity of the target circuit using a smooth adjustment strategy. Based on the adjusted execution timing, the module executes the calculation micro-operation instructions to convert the data precision of the source data into the second precision, calculates the target data from the source data, and outputs an execution completion signal to the loading and storage module. In response to the completion signal, the loading storage module executes storage micro-operation instructions to convert the target data precision to the first precision before storing the target data.
[0137] In some embodiments, the process of the mixed-precision calculation module responding to a data ready signal, adjusting the execution timing of the calculation micro-operation instructions according to the activity intensity of the target circuit based on a smooth adjustment strategy, and executing the calculation micro-operation instructions based on the adjusted execution timing may include: The hybrid precision calculation module follows a gradual adjustment strategy, delaying the target cavitation period based on the target circuit activity intensity before executing calculation micro-operation instructions. After delaying the target cavitation period, the data precision of the source data is converted to a second precision. The target data is obtained by calculating the source data after the data precision conversion. The target circuit activity intensity is positively correlated with the target cavitation period.
[0138] In some embodiments, the mixed-precision computing module includes: an instruction scheduling circuit, an execution control circuit, an arithmetic timing circuit, and a clock gating circuit, wherein the clock gating circuit is used to provide a clock signal to the arithmetic timing circuit; the implementation process of the mixed-precision computing module executing calculation micro-operation instructions according to a smooth adjustment strategy and delaying the target cavitation period based on the target circuit activity intensity may include: In response to the data ready signal, the instruction scheduling circuit outputs a cavitation period control signal to the clock gating circuit based on the correspondence between the circuit activity intensity and the cavitation period, and outputs a timing control signal to the execution control circuit after delaying the target cavitation period corresponding to the target circuit activity intensity. The clock gating circuit responds to the cavitation period control signal, stops providing clock signals to the operation timing circuit, and resumes providing clock signals to the operation timing circuit after the target cavitation period corresponding to the activity intensity of the target circuit. The execution control circuit responds to the timing control signal, decodes and calculates the micro-operation instructions to obtain micro-operation information, and triggers the operation timing circuit to convert the data precision of the source data into the second precision included in the micro-operation information under the control of the clock signal. Then, it performs operations on the source data to obtain the target data and outputs an execution completion signal to the loading and storage module.
[0139] In some embodiments, the data processing method further includes: an activity prediction unit, further configured to add at least the target circuit activity intensity to the calculation micro-operation instructions; correspondingly, the process by which the mixed-precision calculation module adjusts the execution timing of the calculation micro-operation instructions according to the target circuit activity intensity in response to a data ready signal and follows a smooth adjustment strategy may include: The mixed-precision calculation module is used to extract the target circuit activity intensity from the calculation micro-operation instructions in response to the data ready signal, and adjust the execution timing of the calculation micro-operation instructions according to the circuit activity information based on the smooth adjustment strategy.
[0140] In some embodiments, the vector processor further includes: an exception handling module; the data processing method includes: The exception handling module obtains the current circuit parameters of the power network. If the circuit parameters indicate that the power supply voltage is less than the voltage threshold, it controls the loading and storage module to suspend the execution of storage micro-operation instructions and triggers the execution of redundant copy instructions of mixed precision vector instructions to obtain the target data corresponding to the redundant copy instructions. If the target data obtained by the mixed precision calculation module is consistent with the target data corresponding to the redundant copy instructions, it controls the loading and storage module to continue executing storage micro-operation instructions. If the target data obtained by the mixed precision calculation module is inconsistent with the target data corresponding to the redundant copy instructions, it triggers the execution instruction exception handling.
[0141] In some embodiments, a mixed-precision vector instruction is used to trigger a calculation on source data of a first precision to obtain target data of a second precision; the vector processor further includes: a vector control and status register, which stores the first precision of the source data and the second precision of the target data, as well as precision conversion logic; The process of loading the storage module to execute the load micro-operation instruction to load the source data of the first precision of the mixed-precision vector instruction, and outputting a data ready signal to the mixed-precision calculation module may include: The loading storage module executes loading micro-operation instructions to load the source data of the mixed-precision vector instructions. According to the precision conversion logic, the source data is converted into source data with a data bit width limited by the second precision, and a data ready signal is output to the mixed-precision calculation module. In response to the completion signal, the loading storage module executes storage micro-operation instructions to convert the target data's precision to a first precision. The process of storing the target data may include: In response to the execution completion signal, the loading storage module executes storage micro-operation instructions to convert the target data precision to the first precision according to the precision conversion logic before storing the target data.
[0142] In some embodiments, step S903, where the mixed-precision processing unit adjusts the execution timing of the mixed-precision vector instruction according to the activity intensity of the target circuit using a gradual adjustment strategy, and executes the mixed-precision vector instruction based on the adjusted execution timing, may include: When the activity intensity of the target circuit is greater than the intensity threshold, the mixed precision processing unit adjusts the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a gradual adjustment strategy, and executes the mixed precision vector instruction based on the adjusted execution timing.
[0143] In this embodiment, after reading the mixed-precision vector instruction, the instruction parsing unit can decode the instruction to obtain instruction decoding information. The activity prediction unit can determine the target circuit activity intensity corresponding to the mixed-precision vector instruction based on the instruction type information in the instruction decoding information. This allows the mixed-precision processing unit to adjust the execution timing of the mixed-precision vector instruction according to the target circuit activity intensity using a smoothing adjustment strategy. The mixed-precision vector instruction is then executed based on the adjusted execution timing to extend its execution duration. This reduces circuit activity fluctuations in the mixed-precision processing unit over time, improves the uniformity of circuit activity, and to some extent avoids concentrated circuit activity. This effectively reduces the probability of large transient current supply demands in the power network, suppresses power network current fluctuations, effectively smooths peaks and fills valleys, prevents current spikes in the power network that could cause dynamic voltage drops, ensures stable operation of the mixed-precision processing unit, and improves the computational efficiency of the vector processor.
[0144] This application also provides a RISC-V processor, which includes any of the vector processors provided in this application.
[0145] This application also provides a chip that includes any of the vector processors provided in this application.
[0146] This application also provides an electronic device, which includes any of the vector processors or chips provided in this application.
[0147] This application also provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the data processing method provided in this application when executed by a processor.
[0148] This application also provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implements the data processing method provided in this application.
[0149] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A vector processor, characterized in that, The vector processor includes: an instruction parsing unit, an activity prediction unit, and a mixed precision processing unit; The instruction parsing unit is used to read and decode mixed-precision vector instructions to obtain instruction decoding information. The instruction decoding information includes instruction type information, which indicates the operation type and operation data type of the mixed-precision vector instruction. The activity prediction unit is used to determine the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information. The target circuit activity intensity indicates the circuit activity intensity of the power network supplying power to the mixed precision processing unit when the mixed precision processing unit executes the mixed precision vector instruction. The mixed precision processing unit is configured to adjust the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a smooth adjustment strategy, and execute the mixed precision vector instruction based on the adjusted execution timing. The smooth adjustment strategy is used to extend the execution duration of the mixed precision vector instruction.
2. The vector processor according to claim 1, characterized in that, The mixed precision vector instruction is used to trigger the operation on the source data of the first precision to obtain the target data of the second precision. The instruction type information includes: target operation type, the first precision, and the second precision. The activity prediction unit is further configured to determine the target circuit activity intensity based on the instruction type information and the circuit activity model, wherein the circuit activity model is used to describe the relationship between the circuit activity intensity of the power network when the mixed precision processing unit executes a mixed precision vector instruction and the instruction type information of the mixed precision vector instruction executed by the mixed precision processing unit.
3. The vector processor according to claim 2, characterized in that, The circuit activity model includes a circuit activity lookup table, which records the circuit activity intensity of the power network using the instruction type information of mixed precision vector instructions as an index. The activity prediction unit is further configured to look up the circuit activity lookup table based on the target operation type, the first precision, and the second precision to obtain the target circuit activity intensity.
4. The vector processor according to claim 2, characterized in that, The circuit activity model is a model obtained by training a neural network based on training data. The training data includes: an instruction sequence and the circuit activity intensity of the power network corresponding to each mixed precision vector instruction in the instruction sequence. The instruction sequence includes: instruction type information of multiple mixed precision vector instructions arranged in execution order. The activity prediction unit is further configured to input the target operation type, the first precision and the second precision, and the instruction type information of the N most recently executed mixed precision vector instructions of the mixed precision processing unit into the circuit activity model to obtain the target circuit activity intensity, where N is a positive integer.
5. The vector processor according to any one of claims 2 to 4, characterized in that, The activity prediction unit is further configured to acquire circuit parameters of the power network during the execution cycles of the M most recently executed instructions of the mixed precision processing unit, determine the reference circuit activity intensity of the power network based on the circuit parameters, and correct the target circuit activity intensity based on the reference circuit activity intensity to obtain the corrected target circuit activity intensity, wherein M is a positive integer, and the circuit parameters include current and / or voltage.
6. The vector processor according to claim 5, characterized in that, The activity prediction unit is further configured to perform weighted fusion processing on the activity intensity of the reference circuit and the activity intensity of the target circuit to obtain the corrected activity intensity of the target circuit.
7. The vector processor according to claim 1, characterized in that, The instruction decoding information further includes: a micro-operation sequence of the mixed-precision vector instruction, the micro-operation sequence including: a load micro-operation instruction, a calculation micro-operation instruction, and a store micro-operation instruction arranged in execution order; the mixed-precision processing unit includes: a load-store module and a mixed-precision calculation module; The loading and storage module is used to execute the loading micro-operation instruction to load the source data of the first precision of the mixed precision vector instruction and output a data ready signal to the mixed precision calculation module. The mixed-precision calculation module is used to respond to the data ready signal, adjust the execution timing of the calculation micro-operation instructions according to the target circuit activity intensity based on the smooth adjustment strategy, and execute the calculation micro-operation instructions based on the adjusted execution timing to convert the data precision of the source data into a second precision, calculate the target data from the source data, and output an execution completion signal to the loading and storage module. The loading and storage module is further configured to, in response to the execution completion signal, execute the storage micro-operation instruction to convert the data precision of the target data into the first precision and then store the target data.
8. The vector processor according to claim 7, characterized in that, The hybrid precision calculation module is further configured to execute the calculation micro-operation instruction according to the smooth adjustment strategy, based on the target circuit activity intensity and the target cavitation period, to convert the data precision of the source data into a second precision after delaying the target cavitation period, and to calculate the target data from the source data after the data precision conversion, wherein the target circuit activity intensity is positively correlated with the target cavitation period.
9. The vector processor according to claim 8, characterized in that, The mixed-precision computing module includes: an instruction scheduling circuit, an execution control circuit, an operation timing circuit, and a clock gating circuit, wherein the clock gating circuit is used to provide a clock signal to the operation timing circuit; The instruction scheduling circuit is used to respond to the data ready signal, output a cavitation period control signal to the clock gating circuit according to the correspondence between circuit activity intensity and cavitation period, and output a timing control signal to the execution control circuit after delaying the target cavitation period corresponding to the target circuit activity intensity. The clock gating circuit is also used to respond to the cavitation period control signal, stop providing the clock signal to the operation timing circuit, and resume providing the clock signal to the operation timing circuit after the target cavitation period corresponding to the activity intensity of the target circuit; The execution control circuit is used to respond to the timing control signal, decode the calculation micro-operation instruction to obtain micro-operation information, and trigger the operation timing circuit to convert the data precision of the source data into the second precision included in the micro-operation information under the control of the clock signal, and then perform operations on the source data to obtain target data, and output an execution completion signal to the loading storage module.
10. The vector processor according to claim 7, characterized in that, The activity prediction unit is also used to add the target circuit activity intensity to at least the computational micro-operation instructions; The hybrid precision calculation module is used to respond to the data ready signal, extract the target circuit activity intensity from the calculation micro-operation instructions, and adjust the execution timing of the calculation micro-operation instructions according to the target circuit activity intensity based on the smooth adjustment strategy.
11. The vector processor according to claim 7, characterized in that, The vector processor further includes: an exception handling module; The exception handling module is used to obtain the current circuit parameters of the power network. When the circuit parameters indicate that the power supply voltage is less than the voltage threshold, it controls the loading storage module to suspend the execution of the storage micro-operation instruction, triggers the execution of the redundant copy instruction of the mixed precision vector instruction, and obtains the target data corresponding to the redundant copy instruction. When the target data calculated by the mixed precision calculation module is consistent with the target data corresponding to the redundant copy instruction, it controls the loading storage module to continue executing the storage micro-operation instruction. When the target data calculated by the mixed precision calculation module is inconsistent with the target data corresponding to the redundant copy instruction, it triggers the execution instruction exception handling.
12. The vector processor according to claim 7, characterized in that, The mixed-precision vector instruction is used to trigger the operation on the source data of the first precision to obtain the target data of the second precision; the vector processor further includes: a vector control and status register, which is used to store the first precision of the source data and the second precision of the target data, as well as precision conversion logic; The loading storage module is further configured to execute the loading micro-operation instruction to load the source data of the mixed precision vector instruction, convert the source data into source data with a data bit width limited by the second precision according to the precision conversion logic, and output a data ready signal to the mixed precision calculation module. The loading and storage module is further configured to, in response to the execution completion signal, execute the storage micro-operation instruction to convert the data precision of the target data to the first precision according to the precision conversion logic, and then store the target data.
13. The vector processor according to claim 1, characterized in that, The mixed precision processing unit is further configured to, when the activity intensity of the target circuit is greater than the intensity threshold, adjust the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a gradual adjustment strategy, and execute the mixed precision vector instruction based on the adjusted execution timing.
14. A data processing method, characterized in that, The vector processor is applied to a vector processor, which includes an instruction parsing unit, an activity prediction unit, and a mixed-precision processing unit; the data processing method includes: The instruction parsing unit reads and decodes the mixed-precision vector instruction to obtain instruction decoding information, which includes instruction type information, indicating the operation type and operation data type of the mixed-precision vector instruction. The activity prediction unit determines the target circuit activity intensity corresponding to the mixed precision vector instruction based on the instruction type information. The target circuit activity intensity indicates the circuit activity intensity of the power network supplying power to the mixed precision processing unit when the mixed precision processing unit executes the mixed precision vector instruction. The mixed precision processing unit adjusts the execution timing of the mixed precision vector instruction according to the activity intensity of the target circuit using a smooth adjustment strategy, and executes the mixed precision vector instruction based on the adjusted execution timing. The smooth adjustment strategy is used to extend the execution duration of the mixed precision vector instruction.
15. An electronic device, characterized in that, The electronic device includes the vector processor according to any one of claims 1 to 13.
