WO2022062580A1 - Control method and apparatus for signal processor, device, and storage medium - Google Patents

Control method and apparatus for signal processor, device, and storage medium Download PDF

Info

Publication number
WO2022062580A1
WO2022062580A1 PCT/CN2021/105786 CN2021105786W WO2022062580A1 WO 2022062580 A1 WO2022062580 A1 WO 2022062580A1 CN 2021105786 W CN2021105786 W CN 2021105786W WO 2022062580 A1 WO2022062580 A1 WO 2022062580A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
unit
target
idle
power supply
Prior art date
Application number
PCT/CN2021/105786
Other languages
French (fr)
Chinese (zh)
Inventor
刘君
Original Assignee
哲库科技(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 哲库科技(北京)有限公司 filed Critical 哲库科技(北京)有限公司
Publication of WO2022062580A1 publication Critical patent/WO2022062580A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors

Definitions

  • the present application relates to the field of wireless communication technologies, and in particular, to a control method, apparatus, device, and storage medium for a signal processor.
  • a signal processor with a Variable Length Instruction Word (VLIW) structure may include a Load (LD) instruction unit, a Store (ST) instruction unit, and an Arithmetic Logic instruction unit (Arithmetic Logic). Unit, ALU) and matrix operation instruction unit.
  • VLIW Variable Length Instruction Word
  • LD Load
  • ST Store
  • Arithmetic Logic instruction unit Arithmetic Logic
  • ALU Arithmetic Logic
  • the LD instruction unit and the ALU instruction unit need to be used for operation.
  • the ST instruction unit and the matrix operation instruction unit are in an idle state; in some cases, the ST instruction needs to be used.
  • the unit and the matrix operation instruction unit operate.
  • the LD instruction unit and the ALU instruction unit are in an idle state. Since the current signal processor cannot adjust the power consumption of each instruction unit according to the usage of the instruction unit, the power consumption efficiency of the signal processor is low.
  • the present application provides a control method, device, device and storage medium for a signal processor, which can improve the power consumption efficiency of the signal processor in a working state, and can achieve the purpose of saving power consumption.
  • an embodiment of the present application provides a control method for a signal processor, the method comprising:
  • the idle information includes the idle length of continuous no operation
  • switch operation is performed on the power supply or the clock corresponding to the target instruction unit.
  • an embodiment of the present application provides a control device for a signal processor, where the control device for the signal processor includes a determination unit and a control unit; wherein,
  • the determining unit is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length; wherein, the idle information includes the idle length of continuous no operation;
  • the control unit is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
  • an embodiment of the present application provides a signal processing device, and the signal processing device includes a memory and a processor; wherein,
  • the memory for storing executable instructions capable of being executed on the processor
  • the processor is configured to execute the method according to the first aspect when executing the executable instructions.
  • an embodiment of the present application provides a chip, where the chip includes a memory and a processor; wherein,
  • the memory for storing executable instructions capable of being executed on the processor
  • the processor is configured to cause the signal processing device on which the chip is installed to execute the method according to the first aspect when the executable instructions are executed.
  • an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and the computer program implements the method according to the first aspect when the computer program is executed by at least one processor.
  • FIG. 1 is a schematic flowchart of a control method of a signal processor provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a logical architecture of a signal processing device according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of another method for controlling a signal processor provided by an embodiment of the present application
  • FIG. 4 is a schematic flowchart of another method for controlling a signal processor provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a control device for a signal processor provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a hardware structure of a signal processing device provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a hardware structure of a chip according to an embodiment of the present application.
  • an embodiment of the present application provides a method for controlling a signal processor, the method comprising:
  • the idle information includes the idle length of continuous no operation
  • switch operation is performed on the power supply or the clock corresponding to the target instruction unit.
  • the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information includes:
  • a switch operation is performed on the clock corresponding to the target command unit.
  • the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information includes:
  • the first delay value represents the instruction delay required by the target command unit to restore power supply
  • the second delay value represents the command delay required by the target command unit to recover the clock
  • the switching operation on the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit includes:
  • a shutdown operation is performed on the power supply corresponding to the target instruction unit.
  • the method further includes:
  • the target instruction unit when the first difference value is smaller than the first preset threshold value, the target instruction unit according to the idle length and the second delay value corresponding to the target instruction unit The corresponding clock is switched on and off, including:
  • the method further includes:
  • the method further includes:
  • the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information is performed.
  • the method further includes:
  • the start instruction count value and the idle length are removed from the memory.
  • the target instruction unit includes at least one of: a load instruction unit, a storeback instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
  • an embodiment of the present application provides a control device for a signal processor, where the control device for the signal processor includes a determination unit and a control unit; wherein,
  • the determining unit is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length; wherein, the idle information includes the idle length of continuous no operation;
  • the control unit is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
  • control unit is configured to switch the power supply corresponding to the target instruction unit according to the idle length corresponding to the target instruction unit; and, according to the idle length corresponding to the target instruction unit, perform a switching operation on The clock corresponding to the target instruction unit performs a switching operation.
  • control unit is configured to switch the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit; and according to the target command unit
  • the corresponding idle length and the second delay value are used to switch the clock corresponding to the target command unit; wherein, the first delay value represents the command delay required by the target command unit to restore power supply, and the The second delay value represents the instruction delay required for the target instruction unit to recover the clock.
  • control device of the signal processor further includes a calculation unit configured to calculate a first difference between the idle length and the first delay value
  • the control unit is further configured to compare the first difference with a first preset threshold; if the first difference is greater than or equal to the first preset threshold, The power supply corresponding to the target command unit performs a shutdown operation.
  • control unit is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the first difference value.
  • the calculating unit is further configured to calculate a second difference between the idle length and the second delay value
  • the control unit is further configured to compare the second difference with a second preset threshold; if the first difference is less than the first preset threshold and the second difference If the value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
  • control unit is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the second difference.
  • control device of the signal processor further includes a buffer unit
  • the determining unit is further configured to determine an instruction count value, start from the instruction count value and count, and obtain an unexecuted instruction sequence of a preset length;
  • the cache unit is configured to store the start instruction count value and the idle length corresponding to the target instruction unit for which the clock or power supply shutdown operation is to be performed in the memory;
  • the control unit is further configured to perform the switching operation of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information when the current instruction count value is the start instruction count value. step.
  • control device of the signal processor further includes a discarding unit configured to, when the current instruction count value is greater than or equal to the sum of the start instruction count value and the idle length in the memory, The start instruction count value and the free length are removed from the memory.
  • the target instruction unit includes at least one of: a load instruction unit, a storeback instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
  • an embodiment of the present application provides a signal processing device, where the signal processing device includes a memory and a processor; wherein,
  • the memory for storing executable instructions capable of being executed on the processor
  • the processor is configured to execute the method according to any one of the first aspects when executing the executable instructions.
  • an embodiment of the present application provides a chip, where the chip includes a memory and a processor; wherein,
  • the memory for storing executable instructions capable of being executed on the processor
  • the processor is configured to cause the signal processing device on which the chip is installed to execute the method according to any one of the first aspects when executing the executable instructions.
  • an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by at least one processor, implements the method according to any one of the first aspects .
  • VLIW Variable Length Instruction Word
  • FLIW Fixed Length Instruction Word
  • a vector signal processor (Vector digital signal processor, VDSP) performs different types of signal processing operations, and different types of signal processing operations use different instruction units.
  • a signal processor with a VLIW structure may include an LD instruction unit, an ST instruction unit, an ALU instruction unit, and a matrix operation instruction unit.
  • the LD instruction unit and the ALU instruction unit need to be frequently used for operation.
  • the ST instruction unit and the matrix operation instruction unit will not operate, that is, in an idle state; and some In this case, the ST instruction unit and the matrix operation instruction unit need to be used.
  • the LD instruction unit and the ALU instruction unit are in an idle state. That is to say, since the current signal processor cannot adjust the power consumption of each instruction unit according to the usage of the instruction unit, the power consumption efficiency of the signal processor is low.
  • a signal processor control method provided by an embodiment of the present application, the basic idea of the method is: based on an unexecuted instruction sequence of a preset length, determine the target instruction unit corresponding to the unexecuted instruction sequence. Idle information; wherein, the idle information includes the idle length of continuous non-operation; according to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit.
  • the power supply or clock corresponding to the target command unit is turned off and restored, which can reduce the invalid power consumption of the signal processor to the greatest extent, thereby improving the working state of the signal processor.
  • the power consumption efficiency can improve the activation power consumption index of the signal processor, and achieve the purpose of saving power consumption.
  • FIG. 1 shows a schematic flowchart of a control method for a signal processor provided by an embodiment of the present application. As shown in Figure 1, the method may include:
  • S101 Determine idle information of a target instruction unit corresponding to the unexecuted instruction sequence based on an unexecuted instruction sequence of a preset length; wherein the idle information includes an idle length of continuous non-operation.
  • the target instruction unit may include at least one of the following: a load instruction unit, a store-back instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit. That is to say, the target instruction unit may be a load instruction unit, a store-back instruction unit, an arithmetic logic instruction unit or a matrix operation instruction unit, etc., which are not specifically limited in this embodiment of the present application.
  • the pre-set value from the current instruction count value can be obtained through the PM.
  • a sequence of unexecuted instructions of set length may be represented by W, where W is an integer greater than 0, but the specific value of W is set according to the actual situation, which is not specifically limited in this embodiment of the present application.
  • the idle information when the target instruction unit is in the idle state continuously can be determined, and the idle information may include the start instruction count value and the idle length of continuous no operation, so that the usage of the target instruction unit in the future period of time can be obtained.
  • an instruction cycle specifically refers to the time to fetch an instruction and execute the instruction, which can generally consist of several machine cycles, and an instruction cycle refers to the total time required from fetching an instruction, analyzing an instruction to executing it. That is to say, taking the idle length as an example, the idle length corresponding to the target instruction unit may also be referred to as the length of the target instruction unit without operations for N consecutive instruction cycles, where N is an integer greater than 0.
  • S102 According to the determined idle information, perform a switching operation on the power supply or the clock corresponding to the target instruction unit.
  • the power supply or clock shutdown and recovery operations corresponding to the target instruction unit can be controlled according to the idle information.
  • the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information may include:
  • a switch operation is performed on the clock corresponding to the target command unit.
  • the power supply corresponding to the target command unit can be turned off and restored according to the idle length corresponding to the target command unit, or the power supply corresponding to the target command unit can be turned off and restored according to the idle length of the target command unit.
  • the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information may include:
  • a switch operation is performed on the clock corresponding to the target command unit.
  • the first delay value represents the instruction delay required by the target command unit to restore power supply
  • the second delay value represents the command delay required by the target command unit to recover the clock
  • the power supply shutdown and recovery operations are related to the idle length and the first delay value corresponding to the target instruction unit
  • the clock shutdown and recovery operations are related to the idle length and the second delay value corresponding to the target instruction unit.
  • the switching operation of the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit may include:
  • a shutdown operation is performed on the power supply corresponding to the target instruction unit.
  • the method may further include:
  • the power supply corresponding to the target command unit can be restored after waiting for the length of the first difference.
  • the The clock corresponding to the target instruction unit performs a switching operation, which may include:
  • the method may further include:
  • the clock corresponding to the target instruction unit can be recovered after waiting for the length of the second difference.
  • the idle length corresponding to the target instruction unit can be represented by N
  • the first delay value can be represented by D2
  • the second delay value can be represented by D1
  • the first preset threshold value can be represented by T2
  • the second preset threshold value may be represented by T1; and T2 is greater than T1, that is, the first preset threshold value is greater than the second preset threshold value.
  • the control device of the signal processor can turn off the power supply corresponding to the target command unit, and wait for N-D2 command cycles to restore the power supply.
  • the control device of the signal processor can turn off the clock corresponding to the target instruction unit and restore the clock after waiting for N-D1 instruction cycles.
  • the usage of the target instruction unit in the future can be counted, that is, the idle information corresponding to the target instruction unit; and then the target instruction unit can be closed and restored according to the idle information. Clock or turn off and restore the power supply, so as to minimize the invalid power consumption of the signal processor and achieve the purpose of saving power consumption.
  • the logic architecture may include a program memory module 201, an execution prediction and control (Execution Statistic & Control, ESC) module 202, a first instruction unit 203, a second instruction unit 204, a third instruction unit 205, and a third instruction unit 205.
  • FIFO First Input First Output
  • the first instruction unit 203 can perform the LD operation
  • the second instruction unit 204 can perform the ST operation
  • the third instruction unit 205 can perform the ALU operation
  • the fourth instruction unit 206 can perform the matrix operation
  • An instruction unit 203 corresponds to the second FIFO queue 208 corresponds to the second instruction unit 204
  • the third FIFO queue 209 corresponds to the third instruction unit 205
  • the fourth FIFO queue 210 corresponds to the fourth instruction unit 206 .
  • the first FIFO queue 207, the second FIFO queue 208, the third FIFO queue 209 and the fourth FIFO queue 210 may also be referred to as special registers (Execution Interval FIFO, EIF) corresponding to each instruction unit.
  • EIF Executiution Interval FIFO
  • the register module can also include a set of prediction control registers (Predict Ctrl Register, PCR) , not shown in Figure 2. That is to say, the logical architecture can be regarded as consisting of an ESC module, an EIF corresponding to each instruction unit, and a set of PCRs.
  • first FIFO queue 207, the second FIFO queue 208, the third FIFO queue 209 and the fourth FIFO queue 210 may be a set of memories (or registers), that is, each FIFO queue corresponds to a memory ( or register); it can also be a memory (or register), that is, the four FIFO queues are in the same memory or register. In the embodiments of the present application, no limitation is made to this.
  • the ESC module 202 is the core of the logic architecture, which can be used to periodically obtain a sequence of unexecuted instructions of a preset length from the program memory module 201 , and then count the consecutive unexecuted instruction sequences of each instruction unit.
  • the idle information of the operation is controlled, and the clock (Clock, CLK) and the power supply (Power, PWR) of the corresponding instruction unit are controlled to be turned off and restored according to the idle information of each instruction unit.
  • the idle information for each instruction unit will be cached in the corresponding EIF, and the ESC module 202 can start and stop the corresponding clock or power supply according to the current PC value and the first register content in the EIF, that is, shut down and resume operations.
  • An embodiment of the present application provides a control method for a signal processor. Based on an unexecuted instruction sequence of a preset length, idle information of a target instruction unit corresponding to the unexecuted instruction sequence is determined; wherein, the idle information includes continuous The idle length of no operation; according to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit. In this way, according to the future use of the target command unit, the power supply or clock corresponding to the target command unit is turned off and restored, which can reduce the invalid power consumption of the signal processor to the greatest extent, thereby improving the working state of the signal processor.
  • the power consumption efficiency can improve the activation power consumption index of the signal processor, and achieve the purpose of saving power consumption.
  • the control device of the signal processor before determining the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length, the control device of the signal processor also needs to For the length of the unexecuted instruction sequence, the idle information corresponding to each instruction unit obtained by statistics is cached in the memory (eg, FIFO queue) corresponding to each instruction unit, so as to switch the power supply or clock corresponding to the target instruction unit.
  • the method may also include:
  • the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information is performed.
  • the method may also include:
  • the start instruction count value and the idle length are removed from the memory.
  • target instruction of the clock or power supply shutdown operation to be executed
  • the idle information corresponding to the unit is stored in the memory.
  • the start instruction count value stored in the memory is 1000 and the idle length is 4, then when the current instruction count value is 1000, the power supply or clock corresponding to the target instruction unit can be switched at this time. ;
  • the current instruction count value is greater than or equal to 1004
  • the stored data can be removed from the memory or discarded, and the data includes the start instruction count value (1000) and the idle length (4).
  • the corresponding value of the target instruction unit can be The power supply is switched on and off, which may specifically include: calculating a first difference between the idle length and the first delay value; comparing the first difference with a first preset threshold; If the first difference value is greater than or equal to the first preset threshold value, a shutdown operation is performed on the power supply corresponding to the target command unit.
  • the current instruction count value is the start instruction count value
  • the first difference value is smaller than the first preset threshold value
  • performing a switching operation on the clock corresponding to the target instruction unit which may specifically include: calculating a second difference between the idle length and the second delay value; The value is compared with a second preset threshold value; if the second difference value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
  • control device of the signal processor caches the idle information corresponding to each instruction unit obtained by statistics to the memory (for example, the FIFO queue corresponding to each instruction unit) according to the unexecuted instruction sequence of the preset length. , to update the EIF.
  • the method may further include:
  • Analyzing the to-be-executed instructions in the unexecuted instruction sequence determining the instruction type of the to-be-executed instruction; and determining the statistical strategy of the to-be-executed instruction according to the determined instruction type;
  • the idle information obtained by statistics of each instruction unit is sequentially buffered to the FIFO queue corresponding to each instruction unit.
  • the instruction types may include: a loop start instruction (Loop start Instruction) type, a loop end instruction (Loop end Instruction) type, a branch instruction (Branch Instruction) type, and a common instruction (Other Instruction) type.
  • FIG. 3 shows a schematic flowchart of a control method of another signal processor provided by an embodiment of the present application.
  • the method may include:
  • the delay arrival also needs to be considered, and the sum of the instruction count value and the delay value can be determined as the acquired instruction count value. For example, if the PC value is equal to 1000, considering the delay arrival situation, the instructions after 1005 can be analyzed, that is, the instruction count value obtained here is equal to 1005.
  • S312 when the to-be-executed instruction is a common instruction type, determine whether the to-be-executed instruction is the same as the current instruction;
  • a corresponding statistical strategy can be selected.
  • the loop end instruction type corresponds to the first statistical strategy
  • the loop start instruction type corresponds to the second statistical strategy
  • the branch instruction type corresponds to the third statistical strategy
  • the common instruction type corresponds to the fourth statistical strategy, as follows:
  • the first statistical strategy composed of S306 and S307 may be selected for execution, and then return to S305 to analyze the next to-be-executed instruction.
  • the second statistical strategy composed of S308 and S309 may be selected for execution, and then return to S305 to analyze the next instruction to be executed.
  • the third statistical strategy composed of S310 and S311 can be selected for execution; the next instruction count value here specifically refers to the PC value that the branch instruction needs to jump to next, and also needs to be considered delay value; then after S311 , the process can be ended, or the operation of judging whether the FIFO queues corresponding to all the instruction units are not full can be performed again after waiting for the instruction count value.
  • a fourth statistical strategy composed of S312, S313 and S314 can be selected for execution, and then return to S305 to analyze the next instruction to be executed.
  • next instruction count value can be set; if the length of the instruction sequence is W, then the next instruction count value is the instruction after the W length. The count value also needs to consider the delay value.
  • the ESC module can count and update the EIF according to the PC value, the register module and the code segment in the program memory (ie, the unexecuted instruction sequence of preset length), that is, write the idle information of each instruction unit into the corresponding FIFO queue. , that is, write the instruction count value of each instruction unit and the corresponding idle length into the corresponding FIFO queue.
  • the idle information of each instruction unit can be obtained by reading the corresponding FIFO queue.
  • the determining the idle information corresponding to the target instruction unit in the instruction sequence may include:
  • the method may further include:
  • the first element is popped from the target FIFO queue.
  • each bit element in the FIFO queue here includes an instruction count value and a corresponding idle length.
  • the target command unit corresponds to the target FIFO queue; for the target command unit, when the current command count value is equal to the command count value in the first element of the target FIFO queue, the first element of the target FIFO queue can be read to obtain the target Idle information corresponding to the instruction unit, so as to switch the power supply or clock corresponding to the target instruction unit according to the idle information. And after reading the first element of the target FIFO queue, if the current instruction count value is greater than or equal to the sum of the instruction count value and the idle length in the first element, it means that the first element has been executed, and the target FIFO queue can be executed at this time. pops up the first element.
  • the method may further include:
  • the clock corresponding to the target instruction unit is controlled to perform shutdown and recovery operations.
  • the current instruction count value and the idle length and instruction count value corresponding to the target instruction unit can be calculated to obtain the corresponding instruction count value of the target instruction unit. Remaining idle count value.
  • the power supply corresponding to the target command unit can be controlled to perform shutdown and recovery operations according to the remaining idle count value and the first delay value; specifically, it may include: calculating the remaining idle count value and the fourth difference between the first delay values; compare the fourth difference with the first preset threshold; if the fourth difference is greater than or equal to the first preset threshold, then The power supply corresponding to the target command unit is turned off, and the power supply corresponding to the target command unit is restored after waiting for the length of the fourth difference.
  • controlling the clock corresponding to the target instruction unit to perform shutdown and recovery operations may include: when the fourth difference value is smaller than the first preset threshold value, calculating the the fifth difference between the remaining idle count value and the second delay value; compare the fifth difference with the second preset threshold; if the fifth difference is greater than or equal to the second If the threshold value is preset, the clock corresponding to the target instruction unit is turned off, and the clock corresponding to the target instruction unit is restored after waiting for the length of the second difference.
  • FIG. 4 it shows a schematic flowchart of a control method for another signal processor provided by an embodiment of the present application. As shown in Figure 4, the process may include:
  • Figure 4 provides an example of the logic flow that the ESC module can control the clock and power supply voltage of each command unit according to the idle information obtained by the command execution statistics in the EIF, and this flow is only given without the for loop control information.
  • An example of the process is illustrated as how it works.
  • S402 if the judgment result is yes, it indicates that the current target FIFO queue is empty, at this time, it can return to S401, and then select the next FIFO queue as the target FIFO queue and continue to execute S402; otherwise, if the judgment If the result is no, it indicates that the current target FIFO queue is not empty.
  • the first element of the target FIFO queue can be read at this time to obtain the idle information corresponding to the target instruction unit (including the PC value and the corresponding idle length L). ).
  • the first delay value is represented by D2
  • the second delay value is represented by D1
  • the first preset threshold value is represented by T2
  • the second preset threshold value is represented by T1; then when L-D2 ⁇ T2 , at this time, the power supply corresponding to the target command unit can be turned off, and the power supply can be restored after waiting for L-D2 command cycles; when L-D2 ⁇ T2 and L-D1 ⁇ T1, the corresponding power supply of the target command unit can be turned off at this time. clock, and wait for L-D1 instruction cycles to recover the clock. Then after S404, continue to return to S401, select the next FIFO queue as the target FIFO queue and continue to execute S402.
  • L represents the idle length in the first element; it is judged whether the current PC value is greater than or equal to the sum of the PC value and L in the first element (current PC ⁇ PC+L in 1st FIFO element) ; If the judgment result is yes, it indicates that the first element has been executed. At this time, S406 can be executed to pop the first element from the target FIFO queue; if the judgment result is no, S407 can be executed at this time, and it is necessary to continue to judge whether the current PC value is less than the first position. PC value in element (current PC ⁇ PC in 1st FIFO element).
  • idle count L-(current PC-PC); assuming that the PC value is equal to 1000, the idle length L is equal to 10, and the current PC value is equal to 1005, this It can be calculated that the idle count is equal to 5.
  • the first delay value is represented by D2, the second delay value is represented by D1, the first preset threshold value is represented by T2, and the second preset threshold value is represented by T1; then when idle When count-D2 ⁇ T2, the power supply corresponding to the target command unit can be turned off at this time, and the power supply can be restored after waiting for idle count-D2 instruction cycles; when idle count-D2 ⁇ T2 and idle count-D1 ⁇ T1, At this time, the clock corresponding to the target instruction unit can be turned off, and the clock can be recovered after waiting for idle count-D1 instruction cycles. Then after S409, continue to return to S401, select the next FIFO queue as the target FIFO queue and continue to execute S402.
  • the current wireless communication system can turn on and off some processing units according to the working state of the modem, or adjust the voltage and clock frequency of the processing units to save power.
  • the processing unit runs at a certain voltage and frequency, the usage of the instruction unit by the internal micro-processing is unbalanced when processing different tasks.
  • the usage of different instruction units in a future period of time can be counted by the instruction code, and the start time and duration of each instruction unit stop working (in an idle state) can be recorded by using the FIFO queue; and can also provide Loop code and branch code instruction unit occupancy information; finally, according to the future use of the instruction unit, the corresponding instruction unit is closed clock operation or safely shut down and restore the power supply, which can minimize the invalid power consumption of the processor; also That is to say, the embodiments of the present application can improve the microscopic power consumption efficiency of the processor in the working state, thereby improving the active power consumption index of the processor.
  • VDSPs can be composed of two parts, a vector control unit (Vector control unit, VCU) and a vector data processing unit (Vector Data unit, VDU).
  • VCU vector control unit
  • VDU vector data processing unit
  • the VCU mainly performs the control work
  • the VDU performs the computation-intensive work
  • the VCU accounts for a small part of the VDSP
  • the VDU accounts for most of the area and power consumption of the VDSP.
  • the VDSP under this structure can realize this function through the VCU.
  • a possible implementation is to insert a fixed piece of code into the instruction code at certain intervals through the compiler. The function of this code is to count the occupancy of the instruction unit of the next running code, and to control the clock and power supply corresponding to the instruction unit. Shut down or resume at a specific time.
  • An embodiment of the present application provides a control method for a signal processor, and the specific implementation of the foregoing embodiment is described in detail through the foregoing embodiment. It can be seen from this that, according to the future use of the target instruction unit, the The corresponding power supply or clock is turned off and restored, which can minimize the invalid power consumption of the signal processor, thereby improving the power consumption efficiency of the signal processor in the working state, and improving the activation power consumption index of the signal processor. And achieve the purpose of saving power consumption.
  • FIG. 5 shows a schematic structural diagram of a control device 50 for a signal processor provided by an embodiment of the present application.
  • the control device 50 of the signal processor may include a determination unit 501 and a control unit 502; wherein,
  • the determining unit 501 is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length; wherein, the idle information includes the idle length of continuous no operation;
  • the control unit 502 is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
  • control unit 502 is specifically configured to switch the power supply corresponding to the target instruction unit according to the idle length corresponding to the target instruction unit;
  • the clock corresponding to the target instruction unit performs a switching operation.
  • control unit 502 is specifically configured to perform a switching operation on the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit; and according to the target command unit
  • the corresponding idle length and the second delay value are used to switch the clock corresponding to the target command unit; wherein, the first delay value represents the command delay required by the target command unit to restore power supply, and the The second delay value represents the instruction delay required for the target instruction unit to recover the clock.
  • control apparatus 50 of the signal processor may further include a calculation unit 503 configured to calculate a first difference between the idle length and the first delay value;
  • the control unit 502 is further configured to compare the first difference value with a first preset threshold value; if the first difference value is greater than or equal to the first preset threshold value, The power supply corresponding to the command unit performs a shutdown operation.
  • control unit 502 is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the first difference.
  • the calculating unit 503 is further configured to calculate a second difference between the idle length and the second delay value
  • the control unit 502 is further configured to compare the second difference with a second preset threshold; if the first difference is less than the first preset threshold and the second difference is greater than or equal to the second preset threshold value, perform a shutdown operation on the clock corresponding to the target instruction unit.
  • control unit 502 is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the second difference.
  • control device 50 of the signal processor may further include a buffer unit 504; wherein,
  • the determining unit 501 is further configured to determine an instruction count value, start from the instruction count value and count, and obtain an unexecuted instruction sequence of a preset length;
  • the cache unit 504 is configured to store the start instruction count value and the idle length corresponding to the target instruction unit for which the clock or power supply shutdown operation is to be performed in the memory;
  • the control unit 502 is configured to perform the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information when the current instruction count value is the start instruction count value.
  • control device 50 of the signal processor may further include a discarding unit 505, configured to be greater than or equal to the starting instruction count value in the memory and the When the free length is the sum, the start instruction count value and the free length are removed from the memory.
  • the target instruction unit includes at least one of: a load instruction unit, a storeback instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular.
  • each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or Said part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product
  • the computer software product is stored in a storage medium and includes several instructions for making a computer device (which can be It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • this embodiment provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by at least one processor, implements the method described in any one of the foregoing embodiments.
  • FIG. 6 shows a schematic diagram of a specific hardware structure of a signal processing device 60 provided by an embodiment of the present application .
  • the signal processing device 60 may include a processor 601, and the processor 601 may call and execute executable instructions from a memory, so as to implement the method described in any one of the foregoing embodiments.
  • the signal processing device 60 may further include a memory 602 .
  • the processor 601 may call and execute executable instructions from the memory 602 to implement the method described in any one of the foregoing embodiments.
  • the memory 602 may be a separate device independent of the processor 601 , or may be integrated in the processor 601 .
  • the signal processing device 60 may further include a transceiver 603, and the processor 601 may control the transceiver 603 to communicate with other devices, specifically, may send information or data to other devices, or receive Information or data sent by other devices.
  • the transceiver 603 may include a transmitter and a receiver.
  • the transceiver 603 may further include an antenna, and the number of the antenna may be one or more.
  • the signal processing device 60 may specifically be the processor or the processing unit described in the foregoing embodiments, or a device integrated with the control apparatus 50 of the signal processor described in any one of the foregoing embodiments.
  • the signal processing device 60 can implement the corresponding processes implemented by the processor in each method of the embodiments of the present application, which is not repeated here for brevity.
  • FIG. 7 shows a schematic diagram of a specific hardware structure of a chip 70 provided by an embodiment of the present application.
  • the chip 70 may include a processor 701, and the processor 701 may invoke and execute executable instructions from the memory to implement the method described in any one of the foregoing embodiments.
  • the chip 70 may further include a memory 702 .
  • the processor 701 may call and execute executable instructions from the memory 702 to implement the method described in any one of the foregoing embodiments.
  • the memory 702 may be a separate device independent of the processor 701 , or may be integrated in the processor 701 .
  • the chip 70 may further include an input interface 703 .
  • the processor 701 can control the input interface 703 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
  • the chip 70 may further include an output interface 704 .
  • the processor 701 can control the output interface 704 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
  • the chip 70 can be applied to the multi-mode terminal described in the foregoing embodiments, and the chip can implement the corresponding processes implemented by the multi-mode terminal in each method of the embodiments of the present application. For the sake of brevity, details are not repeated here. .
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip or a system-on-chip, such as a modem chip or a modem chip set.
  • the processor in the embodiment of the present application may be an integrated circuit chip, which has signal processing capability.
  • each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Double Data Rate SDRAM DDRSDRAM
  • Enhanced Synchronous Dynamic Random Access Memory Enhanced SDRAM, ESDRAM
  • Synchronous link DRAM Synchronous link DRAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), General Purpose Processors, Controllers, Microcontrollers, Microprocessors, Others for performing the functions described herein electronic unit or a combination thereof.
  • the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein.
  • Software codes may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • the idle information of the target instruction unit corresponding to the unexecuted instruction sequence is determined; wherein, the idle information includes the idle length of continuous no operation; according to the determined idle information
  • the idle information of the target command unit is switched on and off for the power supply or clock corresponding to the target command unit. In this way, according to the future usage of the target command unit, the power supply or clock corresponding to the target command unit is turned off and restored, which can reduce the invalid power consumption of the signal processor to the greatest extent, thereby improving the signal processor in the working state.
  • the power consumption efficiency can improve the activation power consumption index of the signal processor, and achieve the purpose of saving power consumption.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Power Sources (AREA)

Abstract

Disclosed are a control method and apparatus for a signal processor, a device, and a storage medium. The method comprises: according to an unexecuted instruction sequence having a preset length, determining the idle information of a target instruction unit corresponding to the unexecuted instruction sequence, wherein the idle information comprises an idle length without continuous operation (S101); and according to the determined idle information, switching on or off a power supply or a clock corresponding to the target instruction unit (S102). Thus, the present application can improve the power consumption efficiency of the signal processor in a working state, and can achieve the purpose of reducing power consumption.

Description

一种信号处理器的控制方法、装置、设备以及存储介质A control method, apparatus, device and storage medium for a signal processor
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2020年09月22日提交中国专利局、申请号为202011000843.3、申请名称为“一种信号处理器的控制方法、装置、设备以及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the China Patent Office on September 22, 2020, the application number is 202011000843.3, and the application name is "a control method, device, equipment and storage medium for a signal processor", all of which are The contents are incorporated herein by reference.
技术领域technical field
本申请涉及无线通信技术领域,尤其涉及一种信号处理器的控制方法、装置、设备以及存储介质。The present application relates to the field of wireless communication technologies, and in particular, to a control method, apparatus, device, and storage medium for a signal processor.
背景技术Background technique
目前的无线通信系统中,矢量信号处理器对信号处理的操作类型不同,而且不同类型的信号处理操作使用到的指令单元也不同。例如在变长指令字(Variable Length Instruction Word,VLIW)结构的信号处理器中,可包括有加载(Load,LD)指令单元、回存(Store,ST)指令单元、算术逻辑指令单元(Arithmetic Logic Unit,ALU)和矩阵操作指令单元。In the current wireless communication system, the vector signal processor has different types of signal processing operations, and different types of signal processing operations use different instruction units. For example, a signal processor with a Variable Length Instruction Word (VLIW) structure may include a Load (LD) instruction unit, a Store (ST) instruction unit, and an Arithmetic Logic instruction unit (Arithmetic Logic). Unit, ALU) and matrix operation instruction unit.
然而,针对VLIW结构的信号处理器,某些情况下需要使用LD指令单元和ALU指令单元进行操作,这时候ST指令单元和矩阵操作指令单元就处于空闲状态;而某些情况下需要使用ST指令单元和矩阵操作指令单元进行操作,这时候LD指令单元和ALU指令单元就处于空闲状态。由于目前的信号处理器不能根据指令单元的使用情况来调节各个指令单元的功耗,从而导致信号处理器的功耗效率低。However, for the signal processor of the VLIW structure, in some cases, the LD instruction unit and the ALU instruction unit need to be used for operation. At this time, the ST instruction unit and the matrix operation instruction unit are in an idle state; in some cases, the ST instruction needs to be used. The unit and the matrix operation instruction unit operate. At this time, the LD instruction unit and the ALU instruction unit are in an idle state. Since the current signal processor cannot adjust the power consumption of each instruction unit according to the usage of the instruction unit, the power consumption efficiency of the signal processor is low.
发明内容SUMMARY OF THE INVENTION
本申请提出一种信号处理器的控制方法、装置、设备以及存储介质,可以提高信号处理器在工作状态下的功耗效率,能够达到节省功耗的目的。The present application provides a control method, device, device and storage medium for a signal processor, which can improve the power consumption efficiency of the signal processor in a working state, and can achieve the purpose of saving power consumption.
为达到上述目的,本申请的技术方案是这样实现的:In order to achieve the above-mentioned purpose, the technical scheme of the present application is achieved in this way:
第一方面,本申请实施例提供了一种信号处理器的控制方法,该方法包括:In a first aspect, an embodiment of the present application provides a control method for a signal processor, the method comprising:
基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;Determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of preset length; wherein, the idle information includes the idle length of continuous no operation;
根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。According to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit.
第二方面,本申请实施例提供了一种信号处理器的控制装置,所述信号处理器的控制装置包括确定单元和控制单元;其中,In a second aspect, an embodiment of the present application provides a control device for a signal processor, where the control device for the signal processor includes a determination unit and a control unit; wherein,
所述确定单元,配置为基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;The determining unit is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length; wherein, the idle information includes the idle length of continuous no operation;
所述控制单元,配置为根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。The control unit is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
第三方面,本申请实施例提供了一种信号处理设备,所述信号处理设备包括存储器 和处理器;其中,In a third aspect, an embodiment of the present application provides a signal processing device, and the signal processing device includes a memory and a processor; wherein,
所述存储器,用于存储能够在所述处理器上运行的可执行指令;the memory for storing executable instructions capable of being executed on the processor;
所述处理器,用于在运行所述可执行指令时,执行如第一方面所述的方法。The processor is configured to execute the method according to the first aspect when executing the executable instructions.
第四方面,本申请实施例提供了一种芯片,所述芯片包括存储器和处理器;其中,In a fourth aspect, an embodiment of the present application provides a chip, where the chip includes a memory and a processor; wherein,
所述存储器,用于存储能够在所述处理器上运行的可执行指令;the memory for storing executable instructions capable of being executed on the processor;
所述处理器,用于在运行所述可执行指令时,使得安装有所述芯片的信号处理设备执行如第一方面所述的方法。The processor is configured to cause the signal processing device on which the chip is installed to execute the method according to the first aspect when the executable instructions are executed.
第五方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and the computer program implements the method according to the first aspect when the computer program is executed by at least one processor.
附图说明Description of drawings
图1为本申请实施例提供的一种信号处理器的控制方法流程示意图;FIG. 1 is a schematic flowchart of a control method of a signal processor provided by an embodiment of the present application;
图2为本申请实施例提供的一种信号处理设备的逻辑架构示意图;FIG. 2 is a schematic diagram of a logical architecture of a signal processing device according to an embodiment of the present application;
图3为本申请实施例提供的另一种信号处理器的控制方法流程示意图;FIG. 3 is a schematic flowchart of another method for controlling a signal processor provided by an embodiment of the present application;
图4为本申请实施例提供的又一种信号处理器的控制方法流程示意图;4 is a schematic flowchart of another method for controlling a signal processor provided by an embodiment of the present application;
图5为本申请实施例提供的一种信号处理器的控制装置的结构示意图;5 is a schematic structural diagram of a control device for a signal processor provided by an embodiment of the present application;
图6为本申请实施例提供的一种信号处理设备的硬件结构示意图;6 is a schematic diagram of a hardware structure of a signal processing device provided by an embodiment of the present application;
图7为本申请实施例提供的一种芯片的硬件结构示意图。FIG. 7 is a schematic diagram of a hardware structure of a chip according to an embodiment of the present application.
具体实施方式detailed description
第一方面,本申请实施例提供了一种信号处理器的控制方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for controlling a signal processor, the method comprising:
基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;Determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of preset length; wherein, the idle information includes the idle length of continuous no operation;
根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。According to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit.
在一些实施例中,所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作,包括:In some embodiments, the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information includes:
根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的供电进行开关操作;According to the idle length corresponding to the target command unit, switch the power supply corresponding to the target command unit;
根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的时钟进行开关操作。According to the idle length corresponding to the target command unit, a switch operation is performed on the clock corresponding to the target command unit.
在一些实施例中,所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作,包括:In some embodiments, the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information includes:
根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作;According to the idle length and the first delay value corresponding to the target command unit, switch the power supply corresponding to the target command unit;
根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作;According to the idle length and the second delay value corresponding to the target command unit, switch the clock corresponding to the target command unit;
其中,所述第一时延值表示所述目标指令单元恢复供电所需的指令时延,所述第二时延值表示所述目标指令单元恢复时钟所需的指令时延。Wherein, the first delay value represents the instruction delay required by the target command unit to restore power supply, and the second delay value represents the command delay required by the target command unit to recover the clock.
在一些实施例中,所述根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作,包括:In some embodiments, the switching operation on the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit includes:
计算所述空闲长度和所述第一时延值之间的第一差值;calculating a first difference between the idle length and the first delay value;
将所述第一差值与第一预设门限值进行比较;comparing the first difference with a first preset threshold;
若所述第一差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。If the first difference value is greater than or equal to the first preset threshold value, a shutdown operation is performed on the power supply corresponding to the target instruction unit.
在一些实施例中,在所述对所述目标指令单元对应的供电执行关闭操作之后,所述方法还包括:In some embodiments, after performing the shutting down operation on the power supply corresponding to the target instruction unit, the method further includes:
若等待时长满足所述第一差值,则对所述目标指令单元的供电执行开启操作。If the waiting time period satisfies the first difference value, a power-on operation is performed on the power supply of the target instruction unit.
在一些实施例中,在所述第一差值小于所述第一预设门限值时,所述根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作,包括:In some embodiments, when the first difference value is smaller than the first preset threshold value, the target instruction unit according to the idle length and the second delay value corresponding to the target instruction unit The corresponding clock is switched on and off, including:
计算所述空闲长度和所述第二时延值之间的第二差值;calculating a second difference between the idle length and the second delay value;
将所述第二差值与第二预设门限值进行比较;comparing the second difference with a second preset threshold;
若所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。If the second difference value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
在一些实施例中,在所述对所述目标指令单元对应的时钟执行关闭操作之后,所述方法还包括:In some embodiments, after performing the shutdown operation on the clock corresponding to the target instruction unit, the method further includes:
若等待时长满足所述第二差值,则对所述目标指令单元的供电执行开启操作。If the waiting time period satisfies the second difference value, a power-on operation is performed on the power supply of the target instruction unit.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
确定指令计数值,从所述指令计数值开始并进行计数,获取预设长度的未执行指令序列;Determine the instruction count value, start from the instruction count value and count, and obtain the unexecuted instruction sequence of preset length;
将待执行时钟或供电关闭操作的所述目标指令单元对应的开始指令计数值与所述空闲长度存储至存储器中;storing the start instruction count value and the idle length corresponding to the target instruction unit for which the clock or power supply shutdown operation is to be performed into a memory;
在当前的指令计数值为所述开始指令计数值的情况下,执行所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作的步骤。When the current instruction count value is the start instruction count value, the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information is performed.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
在当前的指令计数值大于或等于所述存储器中的所述开始指令计数值和所述空闲长度之和时,从所述存储器中去除所述开始指令计数值和所述空闲长度。When the current instruction count value is greater than or equal to the sum of the start instruction count value and the idle length in the memory, the start instruction count value and the idle length are removed from the memory.
在一些实施例中,所述目标指令单元包括下述中的至少一项:加载指令单元、回存指令单元、算术逻辑指令单元和矩阵操作指令单元。In some embodiments, the target instruction unit includes at least one of: a load instruction unit, a storeback instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
第二方面,本申请实施例提供了一种信号处理器的控制装置,所述信号处理器的控制装置包括确定单元和控制单元;其中,In a second aspect, an embodiment of the present application provides a control device for a signal processor, where the control device for the signal processor includes a determination unit and a control unit; wherein,
所述确定单元,配置为基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;The determining unit is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length; wherein, the idle information includes the idle length of continuous no operation;
所述控制单元,配置为根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。The control unit is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
在一些实施例中,所述控制单元,配置为根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的供电进行开关操作;以及根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的时钟进行开关操作。In some embodiments, the control unit is configured to switch the power supply corresponding to the target instruction unit according to the idle length corresponding to the target instruction unit; and, according to the idle length corresponding to the target instruction unit, perform a switching operation on The clock corresponding to the target instruction unit performs a switching operation.
在一些实施例中,所述控制单元,配置为根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作;以及根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作;其中,所述第一时延值表示所述目标指令单元恢复供电所需的指令时延,所述第二时延值表示所述目标指令单元恢复时钟所需的指令时延。In some embodiments, the control unit is configured to switch the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit; and according to the target command unit The corresponding idle length and the second delay value are used to switch the clock corresponding to the target command unit; wherein, the first delay value represents the command delay required by the target command unit to restore power supply, and the The second delay value represents the instruction delay required for the target instruction unit to recover the clock.
在一些实施例中,所述信号处理器的控制装置还包括计算单元,配置为计算所述空闲长度和所述第一时延值之间的第一差值;In some embodiments, the control device of the signal processor further includes a calculation unit configured to calculate a first difference between the idle length and the first delay value;
所述控制单元,还配置为将所述第一差值与第一预设门限值进行比较;若所述第一 差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。The control unit is further configured to compare the first difference with a first preset threshold; if the first difference is greater than or equal to the first preset threshold, The power supply corresponding to the target command unit performs a shutdown operation.
在一些实施例中,所述控制单元,还配置为若等待时长满足所述第一差值,则对所述目标指令单元的供电执行开启操作。In some embodiments, the control unit is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the first difference value.
在一些实施例中,所述计算单元,还配置为计算所述空闲长度和所述第二时延值之间的第二差值;In some embodiments, the calculating unit is further configured to calculate a second difference between the idle length and the second delay value;
所述控制单元,还配置为将所述第二差值与第二预设门限值进行比较;若所述第一差值小于所述第一预设门限值且所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。The control unit is further configured to compare the second difference with a second preset threshold; if the first difference is less than the first preset threshold and the second difference If the value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
在一些实施例中,所述控制单元,还配置为若等待时长满足所述第二差值,则对所述目标指令单元的供电执行开启操作。In some embodiments, the control unit is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the second difference.
在一些实施例中,所述信号处理器的控制装置还包括缓存单元;In some embodiments, the control device of the signal processor further includes a buffer unit;
所述确定单元,还配置为确定指令计数值,从所述指令计数值开始并进行计数,获取预设长度的未执行指令序列;The determining unit is further configured to determine an instruction count value, start from the instruction count value and count, and obtain an unexecuted instruction sequence of a preset length;
所述缓存单元,配置为将待执行时钟或供电关闭操作的所述目标指令单元对应的开始指令计数值与所述空闲长度存储至存储器中;The cache unit is configured to store the start instruction count value and the idle length corresponding to the target instruction unit for which the clock or power supply shutdown operation is to be performed in the memory;
所述控制单元,还配置为在当前的指令计数值为所述开始指令计数值的情况下,执行所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作的步骤。The control unit is further configured to perform the switching operation of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information when the current instruction count value is the start instruction count value. step.
在一些实施例中,所述信号处理器的控制装置还包括丢弃单元,配置为在当前的指令计数值大于或等于所述存储器中的所述开始指令计数值和所述空闲长度之和时,从所述存储器中去除所述开始指令计数值和所述空闲长度。In some embodiments, the control device of the signal processor further includes a discarding unit configured to, when the current instruction count value is greater than or equal to the sum of the start instruction count value and the idle length in the memory, The start instruction count value and the free length are removed from the memory.
在一些实施例中,所述目标指令单元包括下述中的至少一项:加载指令单元、回存指令单元、算术逻辑指令单元和矩阵操作指令单元。In some embodiments, the target instruction unit includes at least one of: a load instruction unit, a storeback instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
第三方面,本申请实施例提供了一种信号处理设备,所述信号处理设备包括存储器和处理器;其中,In a third aspect, an embodiment of the present application provides a signal processing device, where the signal processing device includes a memory and a processor; wherein,
所述存储器,用于存储能够在所述处理器上运行的可执行指令;the memory for storing executable instructions capable of being executed on the processor;
所述处理器,用于在运行所述可执行指令时,执行如第一方面中任一项所述的方法。The processor is configured to execute the method according to any one of the first aspects when executing the executable instructions.
第四方面,本申请实施例提供了一种芯片,所述芯片包括存储器和处理器;其中,In a fourth aspect, an embodiment of the present application provides a chip, where the chip includes a memory and a processor; wherein,
所述存储器,用于存储能够在所述处理器上运行的可执行指令;the memory for storing executable instructions capable of being executed on the processor;
所述处理器,用于在运行所述可执行指令时,使得安装有所述芯片的信号处理设备执行如第一方面中任一项所述的方法。The processor is configured to cause the signal processing device on which the chip is installed to execute the method according to any one of the first aspects when executing the executable instructions.
第五方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现如第一方面中任一项所述的方法。In a fifth aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by at least one processor, implements the method according to any one of the first aspects .
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to explain the related application, but not to limit the application. In addition, it should be noted that, for the convenience of description, only the parts related to the relevant application are shown in the drawings.
需要说明的是,变长指令字(Variable Length Instruction Word,VLIW)是指字长不固定的指令。例如,在某个变长指令集中,指令的字长可以是1个字节、2个字节、3个字节、4个字节,或者更多字节。定长指令字(Fixed Length Instruction Word,FLIW)是指字长固定的指令。例如,在某个定长指令集中,所有指令的字长都为32个字节。通常而言,定长指令字被用于精简指令集计算机中,而变长指令字被用于复杂指令集计算机中。It should be noted that the Variable Length Instruction Word (VLIW) refers to an instruction whose word length is not fixed. For example, in a variable-length instruction set, the word length of an instruction may be 1 byte, 2 bytes, 3 bytes, 4 bytes, or more. A Fixed Length Instruction Word (FLIW) refers to an instruction with a fixed word length. For example, in a fixed-length instruction set, all instructions are 32 bytes long. Generally speaking, fixed-length instruction words are used in reduced instruction set computers, while variable length instruction words are used in complex instruction set computers.
在目前的无线通信系统中,矢量信号处理器(Vector digital signal processor,VDSP)对信号处理的操作类型不同,而且不同类型的信号处理操作使用到的指令单元也不同。例如,在VLIW结构的信号处理器中,可包括有LD指令单元、ST指令单元、ALU指令单元和矩阵操作指令单元。In a current wireless communication system, a vector signal processor (Vector digital signal processor, VDSP) performs different types of signal processing operations, and different types of signal processing operations use different instruction units. For example, a signal processor with a VLIW structure may include an LD instruction unit, an ST instruction unit, an ALU instruction unit, and a matrix operation instruction unit.
然而,针对VLIW结构的信号处理器,某些情况下需要频繁的使用LD指令单元和ALU指令单元进行操作,这时候ST指令单元和矩阵操作指令单元将无操作,即处于空闲状态;而某些情况下需要使用ST指令单元和矩阵操作指令单元,这时候LD指令单元和ALU指令单元就处于空闲状态。也就是说,由于目前的信号处理器不能根据指令单元的使用情况来调节各个指令单元的功耗,从而导致信号处理器的功耗效率低。However, for the signal processor of the VLIW structure, in some cases, the LD instruction unit and the ALU instruction unit need to be frequently used for operation. At this time, the ST instruction unit and the matrix operation instruction unit will not operate, that is, in an idle state; and some In this case, the ST instruction unit and the matrix operation instruction unit need to be used. At this time, the LD instruction unit and the ALU instruction unit are in an idle state. That is to say, since the current signal processor cannot adjust the power consumption of each instruction unit according to the usage of the instruction unit, the power consumption efficiency of the signal processor is low.
基于此,本申请实施例所提供的一种信号处理器的控制方法,该方法的基本思想是:基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。这样,根据目标指令单元的未来使用情况,对该目标指令单元对应的供电电源或者时钟进行关闭和恢复操作,可以最大程度地降低信号处理器的无效功耗,从而提高信号处理器在工作状态下的功耗效率,能够改善信号处理器的激活功耗指标,并且达到节省功耗的目的。Based on this, a signal processor control method provided by an embodiment of the present application, the basic idea of the method is: based on an unexecuted instruction sequence of a preset length, determine the target instruction unit corresponding to the unexecuted instruction sequence. Idle information; wherein, the idle information includes the idle length of continuous non-operation; according to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit. In this way, according to the future use of the target command unit, the power supply or clock corresponding to the target command unit is turned off and restored, which can reduce the invalid power consumption of the signal processor to the greatest extent, thereby improving the working state of the signal processor. The power consumption efficiency can improve the activation power consumption index of the signal processor, and achieve the purpose of saving power consumption.
下面将结合附图对本申请各实施例进行详细说明。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
本申请的一实施例中,参见图1,其示出了本申请实施例提供的一种信号处理器的控制方法流程示意图。如图1所示,该方法可以包括:In an embodiment of the present application, referring to FIG. 1 , it shows a schematic flowchart of a control method for a signal processor provided by an embodiment of the present application. As shown in Figure 1, the method may include:
S101:基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度。S101: Determine idle information of a target instruction unit corresponding to the unexecuted instruction sequence based on an unexecuted instruction sequence of a preset length; wherein the idle information includes an idle length of continuous non-operation.
需要说明的是,本申请实施例的方法应用于信号处理器的控制装置,或者集成有该装置的信号处理器(或者称为信号处理设备)。It should be noted that the methods in the embodiments of the present application are applied to a control device of a signal processor, or a signal processor (or referred to as a signal processing device) integrated with the device.
在本申请实施例中,目标指令单元可以包括下述中的至少一项:加载指令单元、回存指令单元、算术逻辑指令单元和矩阵操作指令单元。也就是说,目标指令单元可以是加载指令单元,也可以是回存指令单元,还可以是算术逻辑指令单元或者矩阵操作指令单元等,本申请实施例不作具体限定。In this embodiment of the present application, the target instruction unit may include at least one of the following: a load instruction unit, a store-back instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit. That is to say, the target instruction unit may be a load instruction unit, a store-back instruction unit, an arithmetic logic instruction unit or a matrix operation instruction unit, etc., which are not specifically limited in this embodiment of the present application.
还需要说明的是,对于预设长度的未执行指令序列,由于操作指令存储在程序存储器(Program Memory,PM)中,可以通过PM获取从当前指令计数值(Program Counter,PC)开始后的预设长度的未执行指令序列。这里,预设长度可以用W表示,W为大于0的整数,但是W的具体取值根据实际情况进行设置,本申请实施例不作具体限定。It should also be noted that, for an unexecuted instruction sequence with a preset length, since the operation instruction is stored in the program memory (Program Memory, PM), the pre-set value from the current instruction count value (Program Counter, PC) can be obtained through the PM. A sequence of unexecuted instructions of set length. Here, the preset length may be represented by W, where W is an integer greater than 0, but the specific value of W is set according to the actual situation, which is not specifically limited in this embodiment of the present application.
这样,在得到预设长度的未执行指令序列后,可以对该预设长度的未执行指令序列进行统计分析,以确定出目标指令单元对应的开始指令计数值以及连续无操作的空闲长度;换句话说,可以确定出目标指令单元连续处于空闲状态时的空闲信息,该空闲信息可以包括开始指令计数值和连续无操作的空闲长度,从而能够得到未来一段时间内目标指令单元的使用情况。In this way, after obtaining the unexecuted instruction sequence of preset length, statistical analysis can be performed on the unexecuted instruction sequence of preset length to determine the start instruction count value corresponding to the target instruction unit and the idle length of continuous non-operation; In other words, the idle information when the target instruction unit is in the idle state continuously can be determined, and the idle information may include the start instruction count value and the idle length of continuous no operation, so that the usage of the target instruction unit in the future period of time can be obtained.
其中,无论是预设长度还是空闲长度,本申请实施例均可以采用指令周期个数表示。这里,一个指令周期具体是指取出一条指令并执行这条指令的时间,一般可以由若干个机器周期组成,而且指令周期是指从取指令、分析指令到执行完成所需的全部时间。也就是说,以空闲长度为例,目标指令单元对应的空闲长度也可以称为目标指令单元连续N个指令周期无操作的长度,N为大于0的整数。Wherein, regardless of the preset length or the idle length, the embodiment of the present application can be represented by the number of instruction cycles. Here, an instruction cycle specifically refers to the time to fetch an instruction and execute the instruction, which can generally consist of several machine cycles, and an instruction cycle refers to the total time required from fetching an instruction, analyzing an instruction to executing it. That is to say, taking the idle length as an example, the idle length corresponding to the target instruction unit may also be referred to as the length of the target instruction unit without operations for N consecutive instruction cycles, where N is an integer greater than 0.
S102:根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。S102: According to the determined idle information, perform a switching operation on the power supply or the clock corresponding to the target instruction unit.
需要说明的是,在得到目标指令单元对应的空闲信息后,可以根据该空闲信息来控 制目标指令单元对应的供电或者时钟的关闭和恢复操作。具体地,在一些实施例中,所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作,可以包括:It should be noted that, after the idle information corresponding to the target instruction unit is obtained, the power supply or clock shutdown and recovery operations corresponding to the target instruction unit can be controlled according to the idle information. Specifically, in some embodiments, the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information may include:
根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的供电进行开关操作;According to the idle length corresponding to the target command unit, switch the power supply corresponding to the target command unit;
根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的时钟进行开关操作。According to the idle length corresponding to the target command unit, a switch operation is performed on the clock corresponding to the target command unit.
还需要说明的是,可以根据目标指令单元对应的空闲长度对目标指令单元对应的供电进行关闭和恢复操作,也可以根据目标指令单元对应的空闲长度对目标指令单元对应的供电进行关闭和恢复操作。然而,由于恢复供电和恢复时钟均会存在一定的指令时延,也就是说,无论是对目标指令单元对应的供电进行开关操作,还是对目标指令单元对应的时钟进行开关操作,均需要考虑时延情况。因此,在一些实施例中,所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作,可以包括:It should also be noted that the power supply corresponding to the target command unit can be turned off and restored according to the idle length corresponding to the target command unit, or the power supply corresponding to the target command unit can be turned off and restored according to the idle length of the target command unit. . However, there will be a certain command delay due to power recovery and clock recovery. That is to say, whether it is switching the power supply corresponding to the target command unit or switching the clock corresponding to the target command unit, it is necessary to consider when delay situation. Therefore, in some embodiments, the switching operation on the power supply or the clock corresponding to the target instruction unit according to the determined idle information may include:
根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作;According to the idle length and the first delay value corresponding to the target command unit, switch the power supply corresponding to the target command unit;
根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作。According to the idle length and the second delay value corresponding to the target command unit, a switch operation is performed on the clock corresponding to the target command unit.
其中,第一时延值表示所述目标指令单元恢复供电所需的指令时延,第二时延值表示所述目标指令单元恢复时钟所需的指令时延。Wherein, the first delay value represents the instruction delay required by the target command unit to restore power supply, and the second delay value represents the command delay required by the target command unit to recover the clock.
也就是说,供电的关闭和恢复操作与目标指令单元对应的空闲长度和第一时延值有关,时钟的关闭和恢复操作与目标指令单元对应的空闲长度和第二时延值有关。That is, the power supply shutdown and recovery operations are related to the idle length and the first delay value corresponding to the target instruction unit, and the clock shutdown and recovery operations are related to the idle length and the second delay value corresponding to the target instruction unit.
在一些实施例中,对于供电电源来讲,所述根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作,可以包括:In some embodiments, for the power supply, the switching operation of the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit may include:
计算所述空闲长度和所述第一时延值之间的第一差值;calculating a first difference between the idle length and the first delay value;
将所述第一差值与第一预设门限值进行比较;comparing the first difference with a first preset threshold;
若所述第一差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。If the first difference value is greater than or equal to the first preset threshold value, a shutdown operation is performed on the power supply corresponding to the target instruction unit.
进一步地,在所述对所述目标指令单元对应的供电执行关闭操作之后,该方法还可以包括:Further, after the power supply corresponding to the target instruction unit is turned off, the method may further include:
若等待时长满足所述第一差值,则对所述目标指令单元的供电执行开启操作。If the waiting time period satisfies the first difference value, a power-on operation is performed on the power supply of the target instruction unit.
需要说明的是,在对目标指令单元对应的供电执行关闭操作的情况下,等待所述第一差值的长度后可以恢复目标指令单元对应的供电。It should be noted that, in the case of performing a shutdown operation on the power supply corresponding to the target command unit, the power supply corresponding to the target command unit can be restored after waiting for the length of the first difference.
在一些实施例中,对于时钟来讲,在所述第一差值小于所述第一预设门限值时,所述根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作,可以包括:In some embodiments, for the clock, when the first difference value is smaller than the first preset threshold value, according to the idle length corresponding to the target instruction unit and the second delay value, the The clock corresponding to the target instruction unit performs a switching operation, which may include:
计算所述空闲长度和所述第二时延值之间的第二差值;calculating a second difference between the idle length and the second delay value;
将所述第二差值与第二预设门限值进行比较;comparing the second difference with a second preset threshold;
若所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。If the second difference value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
进一步地,在所述对所述目标指令单元对应的时钟执行关闭操作之后,该方法还可以包括:Further, after the shutdown operation is performed on the clock corresponding to the target instruction unit, the method may further include:
若等待时长满足所述第二差值,则对所述目标指令单元的供电执行开启操作。If the waiting time period satisfies the second difference value, a power-on operation is performed on the power supply of the target instruction unit.
需要说明的是,在对目标指令单元对应的时钟执行关闭操作的情况下,等待所述第二差值的长度后可以恢复目标指令单元对应的时钟。It should be noted that, in the case of performing a shutdown operation on the clock corresponding to the target instruction unit, the clock corresponding to the target instruction unit can be recovered after waiting for the length of the second difference.
还需要说明的是,目标指令单元对应的空闲长度可以用N表示,第一时延值可以用D2表示,第二时延值可以用D1表示,第一预设门限值可以用T2表示,第二预设门限值可以用T1表示;而且T2大于T1,即第一预设门限值大于第二预设门限值。It should also be noted that the idle length corresponding to the target instruction unit can be represented by N, the first delay value can be represented by D2, the second delay value can be represented by D1, and the first preset threshold value can be represented by T2, The second preset threshold value may be represented by T1; and T2 is greater than T1, that is, the first preset threshold value is greater than the second preset threshold value.
这样,对于目标指令单元来讲,如果N-D2大于或等于T2,那么该信号处理器的控制装置可以关闭该目标指令单元对应的供电,并等待N-D2个指令周期后恢复供电。在N-D2小于T2的情况下,如果N-D1大于或等于T1,那么该信号处理器的控制装置可以关闭目标指令单元对应的时钟,并等待N-D1个指令周期后恢复时钟。In this way, for the target command unit, if N-D2 is greater than or equal to T2, the control device of the signal processor can turn off the power supply corresponding to the target command unit, and wait for N-D2 command cycles to restore the power supply. In the case where N-D2 is less than T2, if N-D1 is greater than or equal to T1, the control device of the signal processor can turn off the clock corresponding to the target instruction unit and restore the clock after waiting for N-D1 instruction cycles.
简言之,基于预设长度的未执行指令序列,可以统计未来一段时间内目标指令单元的使用情况,即目标指令单元对应的空闲信息;然后根据该空闲信息可以对目标指令单元进行关闭和恢复时钟或者关闭和恢复供电电源,从而能够最大程度地降低信号处理器的无效功耗,达到节省功耗的目的。In short, based on the unexecuted instruction sequence of the preset length, the usage of the target instruction unit in the future can be counted, that is, the idle information corresponding to the target instruction unit; and then the target instruction unit can be closed and restored according to the idle information. Clock or turn off and restore the power supply, so as to minimize the invalid power consumption of the signal processor and achieve the purpose of saving power consumption.
参见图2,其示出了本申请实施例提供的一种信号处理设备的逻辑架构示意图。如图2所示,该逻辑架构可以包括程序存储器模块201、执行预测和控制(Execution Statistic & Control,ESC)模块202、第一指令单元203、第二指令单元204、第三指令单元205和第四指令单元206以及第一先进先出(First Input First Output,FIFO)队列207、第二FIFO队列208、第三FIFO队列209和第四FIFO队列210。其中,第一指令单元203可以执行LD操作,第二指令单元204可以执行ST操作,第三指令单元205可以执行ALU操作,第四指令单元206可以执行矩阵操作;而且第一FIFO队列207与第一指令单元203对应,第二FIFO队列208与第二指令单元204对应,第三FIFO队列209与第三指令单元205对应,第四FIFO队列210与第四指令单元206对应。这里,对于第一FIFO队列207、第二FIFO队列208、第三FIFO队列209和第四FIFO队列210也可以称为每一指令单元对应的特殊寄存器(Execution Interval FIFO,EIF)。除此之外,该逻辑架构还可以包括寄存器模块,在寄存器模块中可以存储有指令计数值,比如PC=1000;另外,寄存器模块内还可包括一组预测控制寄存器(Predict Ctrl Register,PCR),图2中未示出。也就是说,该逻辑架构可以看作是由一个ESC模块、每一个指令单元对应的EIF以及一组PCR组成。Referring to FIG. 2 , it shows a schematic diagram of a logical architecture of a signal processing device provided by an embodiment of the present application. As shown in FIG. 2, the logic architecture may include a program memory module 201, an execution prediction and control (Execution Statistic & Control, ESC) module 202, a first instruction unit 203, a second instruction unit 204, a third instruction unit 205, and a third instruction unit 205. Four instruction units 206 and a first first-in, first-out (First Input First Output, FIFO) queue 207, a second FIFO queue 208, a third FIFO queue 209, and a fourth FIFO queue 210. The first instruction unit 203 can perform the LD operation, the second instruction unit 204 can perform the ST operation, the third instruction unit 205 can perform the ALU operation, and the fourth instruction unit 206 can perform the matrix operation; An instruction unit 203 corresponds to the second FIFO queue 208 corresponds to the second instruction unit 204 , the third FIFO queue 209 corresponds to the third instruction unit 205 , and the fourth FIFO queue 210 corresponds to the fourth instruction unit 206 . Here, the first FIFO queue 207, the second FIFO queue 208, the third FIFO queue 209 and the fourth FIFO queue 210 may also be referred to as special registers (Execution Interval FIFO, EIF) corresponding to each instruction unit. In addition, the logic architecture can also include a register module, in which the instruction count value can be stored, such as PC=1000; in addition, the register module can also include a set of prediction control registers (Predict Ctrl Register, PCR) , not shown in Figure 2. That is to say, the logical architecture can be regarded as consisting of an ESC module, an EIF corresponding to each instruction unit, and a set of PCRs.
需要注意的是,对于第一FIFO队列207、第二FIFO队列208、第三FIFO队列209和第四FIFO队列210,可以是一组存储器(或者寄存器),即每一个FIFO队列各自对应一个存储器(或者寄存器);也可以是一个存储器(或者寄存器),即这四个FIFO队列处于同一个存储器或者寄存器中。在本申请实施例中,对此不作任何限定。It should be noted that the first FIFO queue 207, the second FIFO queue 208, the third FIFO queue 209 and the fourth FIFO queue 210 may be a set of memories (or registers), that is, each FIFO queue corresponds to a memory ( or register); it can also be a memory (or register), that is, the four FIFO queues are in the same memory or register. In the embodiments of the present application, no limitation is made to this.
基于图2所示的逻辑架构示例,ESC模块202作为逻辑架构的核心,其可以用于从程序存储器模块201中周期性地获取预设长度的未执行指令序列,然后统计每个指令单元连续无操作的空闲信息,并根据每个指令单元的空闲信息控制对应指令单元的时钟(Clock,CLK)和供电电源(Power,PWR)的关闭和恢复。对于每一个指令单元的空闲信息会缓存至对应的EIF,同时ESC模块202能够根据当前PC值和EIF中首位的寄存器内容进行对应的时钟或者供电电源的启停,即关闭和恢复操作。Based on the example of the logic architecture shown in FIG. 2 , the ESC module 202 is the core of the logic architecture, which can be used to periodically obtain a sequence of unexecuted instructions of a preset length from the program memory module 201 , and then count the consecutive unexecuted instruction sequences of each instruction unit. The idle information of the operation is controlled, and the clock (Clock, CLK) and the power supply (Power, PWR) of the corresponding instruction unit are controlled to be turned off and restored according to the idle information of each instruction unit. The idle information for each instruction unit will be cached in the corresponding EIF, and the ESC module 202 can start and stop the corresponding clock or power supply according to the current PC value and the first register content in the EIF, that is, shut down and resume operations.
示例性地,如图2所示,第一指令单元203对应的EIF中存在有两个执行空缺,包括:从PC=1000开始长度为4个指令周期的执行空缺和从PC=1005开始长度为4个指令周期的执行空缺。如果T1等于2个指令周期,T2等于3个指令周期,D1设置为1,D2设置为3;由于4-D2小于T2但是4-D1大于T1,那么第一指令单元203会在PC为1001时关闭第一指令单元203对应的时钟,在PC为1004时恢复第一指令单元203对应的时钟;然后在PC=1006时关闭第一指令单元203对应的时钟,在PC=1009时恢复第一指令单元203对应的时钟。而第三指令单元205对应的EIF中存在一个执行空缺,从PC=1003开始长度为6个指令周期的执行空缺,即第三指令单元205对应的空闲长度 为6,这时候6-D2大于或等于T2,那么可以关闭供电电源,也就是说,ESC模块202会在PC=1004时关闭第三指令单元205对应的供电电源,在PC=1007时打开第三指令单元205对应的供电电源。Exemplarily, as shown in FIG. 2, there are two execution vacancies in the EIF corresponding to the first instruction unit 203, including: an execution vacancy with a length of 4 instruction cycles starting from PC=1000 and an execution vacancy starting from PC=1005 with a length of 4 instruction cycles. 4 instruction cycle execution vacancies. If T1 is equal to 2 instruction cycles, T2 is equal to 3 instruction cycles, D1 is set to 1, and D2 is set to 3; since 4-D2 is smaller than T2 but 4-D1 is larger than T1, then the first instruction unit 203 will be set when PC is 1001. Turn off the clock corresponding to the first command unit 203, and restore the clock corresponding to the first command unit 203 when the PC is 1004; then turn off the clock corresponding to the first command unit 203 when PC=1006, and restore the first command when PC=1009 The clock corresponding to unit 203 . However, there is an execution vacancy in the EIF corresponding to the third instruction unit 205, an execution vacancy with a length of 6 instruction cycles starting from PC=1003, that is, the idle length corresponding to the third instruction unit 205 is 6, at this time, 6-D2 is greater than or equal to T2, then the power supply can be turned off, that is, the ESC module 202 will turn off the power supply corresponding to the third command unit 205 when PC=1004, and turn on the power supply corresponding to the third command unit 205 when PC=1007.
本申请实施例提供了一种信号处理器的控制方法,基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。这样,根据目标指令单元的未来使用情况,对该目标指令单元对应的供电电源或者时钟进行关闭和恢复操作,可以最大程度地降低信号处理器的无效功耗,从而提高信号处理器在工作状态下的功耗效率,能够改善信号处理器的激活功耗指标,并且达到节省功耗的目的。An embodiment of the present application provides a control method for a signal processor. Based on an unexecuted instruction sequence of a preset length, idle information of a target instruction unit corresponding to the unexecuted instruction sequence is determined; wherein, the idle information includes continuous The idle length of no operation; according to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit. In this way, according to the future use of the target command unit, the power supply or clock corresponding to the target command unit is turned off and restored, which can reduce the invalid power consumption of the signal processor to the greatest extent, thereby improving the working state of the signal processor. The power consumption efficiency can improve the activation power consumption index of the signal processor, and achieve the purpose of saving power consumption.
本申请的另一实施例中,在基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息之前,该信号处理器的控制装置还需要根据预设长度的未执行指令序列,将统计得到的每一指令单元对应的空闲信息缓存至每一指令单元对应的存储器(例如,FIFO队列)中,以对目标指令单元对应的供电或者时钟进行开关操作。在一些实施例中,该方法还可以包括:In another embodiment of the present application, before determining the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length, the control device of the signal processor also needs to For the length of the unexecuted instruction sequence, the idle information corresponding to each instruction unit obtained by statistics is cached in the memory (eg, FIFO queue) corresponding to each instruction unit, so as to switch the power supply or clock corresponding to the target instruction unit. In some embodiments, the method may also include:
确定指令计数值,从所述指令计数值开始并进行计数,获取预设长度的未执行指令序列;Determine the instruction count value, start from the instruction count value and count, and obtain the unexecuted instruction sequence of preset length;
将待执行时钟或供电关闭操作的所述目标指令单元对应的开始指令计数值与所述空闲长度存储至存储器中;storing the start instruction count value and the idle length corresponding to the target instruction unit for which the clock or power supply shutdown operation is to be performed into a memory;
在当前的指令计数值为所述开始指令计数值的情况下,执行所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作的步骤。When the current instruction count value is the start instruction count value, the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information is performed.
进一步地,在一些实施例中,该方法还可以包括:Further, in some embodiments, the method may also include:
在当前的指令计数值大于或等于所述存储器中的所述开始指令计数值和所述空闲长度之和时,从所述存储器中去除所述开始指令计数值和所述空闲长度。When the current instruction count value is greater than or equal to the sum of the start instruction count value and the idle length in the memory, the start instruction count value and the idle length are removed from the memory.
需要说明的是,首先确定指令计数值,比如PC=1000,然后从PC=1000开始并进行计数,获取预设长度的未执行指令序列;再将待执行时钟或供电关闭操作的所述目标指令单元对应的空闲信息(包括有开始指令计数值与空闲长度)存储至存储器中。示例性地,如果存储器中所存储的开始指令计数值为1000,空闲长度为4,那么在当前的指令计数值为1000的情况下,这时候可以对目标指令单元对应的供电或者时钟进行开关操作;最后在当前的指令计数值大于或等于1004的情况下,可以从存储器中去除或者丢弃所存储的数据,该数据包括有开始指令计数值(1000)和空闲长度(4)。It should be noted that, first determine the instruction count value, such as PC=1000, then start from PC=1000 and count to obtain the unexecuted instruction sequence of preset length; then the target instruction of the clock or power supply shutdown operation to be executed The idle information corresponding to the unit (including the start instruction count value and the idle length) is stored in the memory. Exemplarily, if the start instruction count value stored in the memory is 1000 and the idle length is 4, then when the current instruction count value is 1000, the power supply or clock corresponding to the target instruction unit can be switched at this time. ; Finally, when the current instruction count value is greater than or equal to 1004, the stored data can be removed from the memory or discarded, and the data includes the start instruction count value (1000) and the idle length (4).
具体来讲,在当前的指令计数值为所述开始指令计数值的情况下,对于供电电源来讲,可以根据存储器所存储的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作,具体可包括:计算所述空闲长度和所述第一时延值之间的第一差值;将所述第一差值与第一预设门限值进行比较;若所述第一差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。Specifically, in the case that the current instruction count value is the start instruction count value, for the power supply, according to the idle length and the first delay value stored in the memory, the corresponding value of the target instruction unit can be The power supply is switched on and off, which may specifically include: calculating a first difference between the idle length and the first delay value; comparing the first difference with a first preset threshold; If the first difference value is greater than or equal to the first preset threshold value, a shutdown operation is performed on the power supply corresponding to the target command unit.
在当前的指令计数值为所述开始指令计数值的情况下,对于时钟来讲,在所述第一差值小于所述第一预设门限值时,可以根据存储器所存储的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作,具体可包括:计算所述空闲长度和所述第二时延值之间的第二差值;将所述第二差值与第二预设门限值进行比较;若所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。In the case that the current instruction count value is the start instruction count value, for the clock, when the first difference value is smaller than the first preset threshold value, it can be determined according to the idle length and For the second delay value, performing a switching operation on the clock corresponding to the target instruction unit, which may specifically include: calculating a second difference between the idle length and the second delay value; The value is compared with a second preset threshold value; if the second difference value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
还需要说明的是,该信号处理器的控制装置根据预设长度的未执行指令序列,将统计得到的每一指令单元对应的空闲信息缓存至存储器(例如,每一指令单元对应的FIFO队列)中,用以更新EIF。在一些实施例中,以FIFO队列为例,该方法还可以包括:It should also be noted that the control device of the signal processor caches the idle information corresponding to each instruction unit obtained by statistics to the memory (for example, the FIFO queue corresponding to each instruction unit) according to the unexecuted instruction sequence of the preset length. , to update the EIF. In some embodiments, taking the FIFO queue as an example, the method may further include:
确定指令计数值,在所有指令单元对应的FIFO队列均处于未满状态时,从所述指令计数值开始,获取预设长度的未执行指令序列;Determine the instruction count value, and when the FIFO queues corresponding to all the instruction units are in an under-full state, starting from the instruction count value, obtain an unexecuted instruction sequence of a preset length;
对所述未执行指令序列中的待执行指令进行分析,确定所述待执行指令的指令类型;并根据所确定的指令类型,确定所述待执行指令的统计策略;Analyzing the to-be-executed instructions in the unexecuted instruction sequence, determining the instruction type of the to-be-executed instruction; and determining the statistical strategy of the to-be-executed instruction according to the determined instruction type;
根据所确定的统计策略,将每一指令单元统计得到的空闲信息依次缓存至每一指令单元对应的FIFO队列。According to the determined statistics strategy, the idle information obtained by statistics of each instruction unit is sequentially buffered to the FIFO queue corresponding to each instruction unit.
需要说明的是,不同的指令类型对应不同的统计策略。这里,指令类型可以包括:循环开始指令(Loop start Instruction)类型、循环结束指令(Loop end Instruction)类型、分支指令(Branch Instruction)类型和普通指令(Other Instruction)类型。It should be noted that different instruction types correspond to different statistical strategies. Here, the instruction types may include: a loop start instruction (Loop start Instruction) type, a loop end instruction (Loop end Instruction) type, a branch instruction (Branch Instruction) type, and a common instruction (Other Instruction) type.
示例性地,参见图3,其示出了本申请实施例提供的另一种信号处理器的控制方法流程示意图。如图3所示,该方法可以包括:Illustratively, referring to FIG. 3 , it shows a schematic flowchart of a control method of another signal processor provided by an embodiment of the present application. As shown in Figure 3, the method may include:
S301:获取指令计数值;S301: Obtain the instruction count value;
需要说明的是,在获取指令计数值的时候,还需要考虑延迟到达(delay arrive)的情况,可以将指令计数值与delay值之和确定为所获取的指令计数值。例如,如果PC值等于1000,考虑到delay arrive的情况,那么可以分析1005之后的指令,即这里所获取的指令计数值等于1005。It should be noted that, when acquiring the instruction count value, the delay arrival also needs to be considered, and the sum of the instruction count value and the delay value can be determined as the acquired instruction count value. For example, if the PC value is equal to 1000, considering the delay arrival situation, the instructions after 1005 can be analyzed, that is, the instruction count value obtained here is equal to 1005.
S302:判断所有FIFO队列是否处于未满状态;S302: Determine whether all FIFO queues are not full;
S303:若判断结果为否,则设置下一指令计数值;S303: If the judgment result is no, set the next instruction count value;
S304:若判断结果为是,则从程序存储器中获取预设长度的未执行指令序列;S304: if the judgment result is yes, obtain the unexecuted instruction sequence of preset length from the program memory;
需要说明的是,对于S302来说,如果所有指令单元对应的FIFO队列并非处于未满状态,表明该判断结果为否,那么将执行S303;如果所有指令单元对应的FIFO队列处于未满状态,表明该判断结果为是,那么将执行S304。It should be noted that, for S302, if the FIFO queues corresponding to all the instruction units are not in the under-full state, indicating that the judgment result is no, then S303 will be executed; if the FIFO queues corresponding to all the instruction units are in the under-full state, indicating that If the judgment result is yes, then S304 will be executed.
还需要说明的是,在执行S303的时候,由于所有指令单元对应的FIFO队列并非处于未满状态,这时候无法向EIF中缓存信息,需要设置下一指令计数值,即获取PC+1,此时也需要考虑delay值;然后可以结束流程,或者也可以等待获取下一指令计数值,然后根据新的指令计数值,重新执行判断所有指令单元对应的FIFO队列是否处于未满状态的操作。It should also be noted that when S303 is executed, since the FIFO queues corresponding to all the instruction units are not in an under-full state, the information cannot be cached in the EIF at this time, and the next instruction count value needs to be set, that is, PC+1 is obtained. The delay value also needs to be taken into consideration; then the process can be ended, or it can wait to obtain the next instruction count value, and then re-execute the operation of judging whether the FIFO queues corresponding to all instruction units are not full according to the new instruction count value.
S305:对所述指令序列中的待执行指令进行逐一分析;S305: Analyze the instructions to be executed in the instruction sequence one by one;
S306:当所述待执行指令为循环结束指令类型时,将先前统计的空闲信息写入对应的FIFO队列中;S306: when the to-be-executed instruction is a cycle end instruction type, write previously counted idle information into the corresponding FIFO queue;
S307:将循环结束指令写入对应的FIFO队列中,并返回步骤S305;S307: write the loop end instruction into the corresponding FIFO queue, and return to step S305;
S308:当所述待执行指令为循环开始指令类型时,将先前统计的空闲信息写入对应的FIFO队列中;S308: when the to-be-executed instruction is a cycle start instruction type, write previously counted idle information into the corresponding FIFO queue;
S309:将循环开始指令和循环次数写入对应的FIFO队列中,并返回步骤S305;S309: Write the cycle start instruction and the number of cycles into the corresponding FIFO queue, and return to step S305;
S310:当所述待执行指令为分支指令类型时,将先前统计的空闲信息写入对应的FIFO队列中;S310: when the to-be-executed instruction is a branch instruction type, write previously counted idle information into the corresponding FIFO queue;
S311:设置该分支指令待跳转的下一指令计数值;S311: Set the count value of the next instruction to be jumped by the branch instruction;
S312:当所述待执行指令为普通指令类型时,判断待执行指令是否与当前指令相同;S312: when the to-be-executed instruction is a common instruction type, determine whether the to-be-executed instruction is the same as the current instruction;
S313:若判断结果为是,则增加该指令的空闲长度计数值;S313: if the judgment result is yes, increase the idle length count value of the instruction;
S314:若判断结果为否,则将先前统计的空闲信息写入对应的FIFO队列中,并且根据当前指令重新开始统计且空闲长度计数值设置为1,同时返回步骤S305;S314: If the judgment result is no, write the previously counted idle information into the corresponding FIFO queue, restart the count according to the current instruction and set the idle length count value to 1, and return to step S305;
S315:在所述指令序列中的待执行指令全部完成分析时,设置下一指令计数值。S315: When all the to-be-executed instructions in the instruction sequence have been analyzed, set the next instruction count value.
需要说明的是,在S305之后,根据待执行指令的指令类型,可以选择对应的统计策略。例如,循环结束指令类型对应第一统计策略,循环开始指令类型对应第二统计策 略,分支指令类型对应第三统计策略,普通指令类型对应第四统计策略,具体如下:It should be noted that, after S305, according to the instruction type of the instruction to be executed, a corresponding statistical strategy can be selected. For example, the loop end instruction type corresponds to the first statistical strategy, the loop start instruction type corresponds to the second statistical strategy, the branch instruction type corresponds to the third statistical strategy, and the common instruction type corresponds to the fourth statistical strategy, as follows:
如果待执行指令为循环结束指令类型时,那么可以选择S306和S307组成的第一统计策略执行,然后再返回S305进行下一待执行指令的分析。If the to-be-executed instruction is the cycle end instruction type, then the first statistical strategy composed of S306 and S307 may be selected for execution, and then return to S305 to analyze the next to-be-executed instruction.
如果待执行指令为循环开始指令类型时,那么可以选择S308和S309组成的第二统计策略执行,然后再返回S305进行下一待执行指令的分析。If the instruction to be executed is the cycle start instruction type, then the second statistical strategy composed of S308 and S309 may be selected for execution, and then return to S305 to analyze the next instruction to be executed.
如果待执行指令为分支指令类型时,那么可以选择S310和S311组成的第三统计策略执行;这里的下一指令计数值具体是指分支指令下一次需要跳转到的PC值,同时还需要考虑delay值;然后在S311之后,可以结束流程,或者也可以等待到该指令计数值后,重新执行判断所有指令单元对应的先进先出队列是否处于未满状态的操作。If the instruction to be executed is a branch instruction type, then the third statistical strategy composed of S310 and S311 can be selected for execution; the next instruction count value here specifically refers to the PC value that the branch instruction needs to jump to next, and also needs to be considered delay value; then after S311 , the process can be ended, or the operation of judging whether the FIFO queues corresponding to all the instruction units are not full can be performed again after waiting for the instruction count value.
如果待执行指令为普通指令类型时,那么可以选择S312、S313和S314组成的第四统计策略执行,然后再返回S305进行下一待执行指令的分析。If the instruction to be executed is a common instruction type, then a fourth statistical strategy composed of S312, S313 and S314 can be selected for execution, and then return to S305 to analyze the next instruction to be executed.
还需要说明的是,在所述指令序列中的待执行指令全部完成分析时,可以设置下一指令计数值;如果指令序列的长度为W,那么下一指令计数值就是在W长度之后的指令计数值,同时也需要考虑delay值。It should also be noted that when all the to-be-executed instructions in the instruction sequence are analyzed, the next instruction count value can be set; if the length of the instruction sequence is W, then the next instruction count value is the instruction after the W length. The count value also needs to consider the delay value.
如此,ESC模块可以根据PC值、寄存器模块以及程序存储器中的代码段(即预设长度的未执行指令序列)进行统计并更新EIF,即将每一指令单元的空闲信息写入对应的FIFO队列中,也就是说,将每一指令单元的指令计数值和对应的空闲长度写入对应的FIFO队列中。In this way, the ESC module can count and update the EIF according to the PC value, the register module and the code segment in the program memory (ie, the unexecuted instruction sequence of preset length), that is, write the idle information of each instruction unit into the corresponding FIFO queue. , that is, write the instruction count value of each instruction unit and the corresponding idle length into the corresponding FIFO queue.
可以理解地,在将每一指令单元的空闲信息写入对应的FIFO队列中之后,可以通过读取对应的FIFO队列以获得对应指令单元的空闲信息。在一些实施例中,所述确定指令序列中目标指令单元对应的空闲信息,可以包括:It can be understood that after the idle information of each instruction unit is written into the corresponding FIFO queue, the idle information of the corresponding instruction unit can be obtained by reading the corresponding FIFO queue. In some embodiments, the determining the idle information corresponding to the target instruction unit in the instruction sequence may include:
针对所述目标指令单元对应的目标先进先出队列,判断当前的指令计数值是否等于所述目标先进先出队列首位元素中的指令计数值;For the target FIFO queue corresponding to the target instruction unit, determine whether the current instruction count value is equal to the instruction count value in the first element of the target FIFO queue;
若判断结果为是,则读取所述目标先进先出队列首位元素,以得到所述目标指令单元对应的空闲信息。If the judgment result is yes, read the first element of the target FIFO queue to obtain idle information corresponding to the target instruction unit.
进一步地,在一些实施例中,在所述读取所述目标先进先出队列首位元素之后,该方法还可以包括:Further, in some embodiments, after the reading the first element of the target FIFO queue, the method may further include:
在当前的指令计数值大于或等于所述首位元素中的指令计数值与空闲长度的和值时,从所述目标先进先出队列中弹出所述首位元素。When the current instruction count value is greater than or equal to the sum of the instruction count value in the first element and the idle length, the first element is popped from the target FIFO queue.
需要说明的是,这里FIFO队列中的每一位元素均包括有指令计数值和对应的空闲长度。其中,目标指令单元对应目标FIFO队列;对于目标指令单元来讲,在当前的指令计数值等于目标FIFO队列首位元素中的指令计数值时,可以通过读取目标FIFO队列的首位元素,以得到目标指令单元对应的空闲信息,以便根据空闲信息,对目标指令单元对应的供电或者时钟进行开关操作。而且在读取目标FIFO队列的首位元素之后,如果当前的指令计数值大于或等于首位元素中的指令计数值与空闲长度的和值,说明了首位元素已经执行完,这时候可以从目标FIFO队列中弹出首位元素。It should be noted that each bit element in the FIFO queue here includes an instruction count value and a corresponding idle length. The target command unit corresponds to the target FIFO queue; for the target command unit, when the current command count value is equal to the command count value in the first element of the target FIFO queue, the first element of the target FIFO queue can be read to obtain the target Idle information corresponding to the instruction unit, so as to switch the power supply or clock corresponding to the target instruction unit according to the idle information. And after reading the first element of the target FIFO queue, if the current instruction count value is greater than or equal to the sum of the instruction count value and the idle length in the first element, it means that the first element has been executed, and the target FIFO queue can be executed at this time. pops up the first element.
还需要说明的是,针对分支指令的跳转情况,在一些实施例中,该方法还可以包括:It should also be noted that, for the jumping situation of the branch instruction, in some embodiments, the method may further include:
在当前的指令计数值大于所述目标指令单元对应的指令计数值时,计算所述当前的指令计数值和所述目标指令单元对应的指令计数值之间的第三差值;When the current instruction count value is greater than the instruction count value corresponding to the target instruction unit, calculating a third difference between the current instruction count value and the instruction count value corresponding to the target instruction unit;
对所述目标指令单元对应的空闲长度和所述第三差值进行减法运算,得到所述目标指令单元对应的剩余空闲计数值;performing a subtraction operation on the idle length corresponding to the target instruction unit and the third difference to obtain the remaining idle count value corresponding to the target instruction unit;
根据所述剩余空闲计数值和所述第一时延值,控制所述目标指令单元对应的供电电源进行关闭和恢复操作;According to the remaining idle count value and the first delay value, control the power supply corresponding to the target command unit to perform shutdown and recovery operations;
根据所述剩余空闲计数值和所述第二时延值,控制所述目标指令单元对应的时钟进 行关闭和恢复操作。According to the remaining idle count value and the second delay value, the clock corresponding to the target instruction unit is controlled to perform shutdown and recovery operations.
也就是说,在当前的指令计数值大于目标指令单元对应的指令计数值时,这时候可以根据当前的指令计数值以及目标指令单元对应的空闲长度和指令计数值,计算得到目标指令单元对应的剩余空闲计数值。That is to say, when the current instruction count value is greater than the instruction count value corresponding to the target instruction unit, the current instruction count value and the idle length and instruction count value corresponding to the target instruction unit can be calculated to obtain the corresponding instruction count value of the target instruction unit. Remaining idle count value.
在得到剩余空闲计数值后,可以根据该剩余空闲计数值和第一时延值,控制目标指令单元对应的供电电源进行关闭和恢复操作;具体可以包括:计算所述剩余空闲计数值和所述第一时延值之间的第四差值;将所述第四差值与第一预设门限值进行比较;若所述第四差值大于或等于第一预设门限值,则关闭所述目标指令单元对应的供电电源,并等待所述第四差值的长度后恢复所述目标指令单元对应的供电电源。另外,根据该剩余空闲计数值和第二时延值,控制目标指令单元对应的时钟进行关闭和恢复操作;具体可以包括:在第四差值小于第一预设门限值时,计算所述剩余空闲计数值和所述第二时延值之间的第五差值;将所述第五差值与第二预设门限值进行比较;若所述第五差值大于或等于第二预设门限值,则关闭所述目标指令单元对应的时钟,并等待所述第二差值的长度后恢复所述目标指令单元对应的时钟。After the remaining idle count value is obtained, the power supply corresponding to the target command unit can be controlled to perform shutdown and recovery operations according to the remaining idle count value and the first delay value; specifically, it may include: calculating the remaining idle count value and the the fourth difference between the first delay values; compare the fourth difference with the first preset threshold; if the fourth difference is greater than or equal to the first preset threshold, then The power supply corresponding to the target command unit is turned off, and the power supply corresponding to the target command unit is restored after waiting for the length of the fourth difference. In addition, according to the remaining idle count value and the second delay value, controlling the clock corresponding to the target instruction unit to perform shutdown and recovery operations; specifically, it may include: when the fourth difference value is smaller than the first preset threshold value, calculating the the fifth difference between the remaining idle count value and the second delay value; compare the fifth difference with the second preset threshold; if the fifth difference is greater than or equal to the second If the threshold value is preset, the clock corresponding to the target instruction unit is turned off, and the clock corresponding to the target instruction unit is restored after waiting for the length of the second difference.
示例性地,参见图4,其示出了本申请实施例提供的又一种信号处理器的控制方法流程示意图。如图4所示,该流程可以包括:For example, referring to FIG. 4 , it shows a schematic flowchart of a control method for another signal processor provided by an embodiment of the present application. As shown in Figure 4, the process may include:
S401:判断所有FIFO队列是否存在循环控制信息;S401: Determine whether there is loop control information in all FIFO queues;
S402:若判断结果为否,则判断目标FIFO队列是否为空;S402: if the judgment result is no, judge whether the target FIFO queue is empty;
需要说明的是,图4提供了ESC模块可以根据EIF中指令执行统计得到的空闲信息控制各个指令单元的时钟和供电电压的逻辑流程示例,而且该流程只是给出了没有for循环控制信息情况下的流程示例作为工作原理进行说明。It should be noted that Figure 4 provides an example of the logic flow that the ESC module can control the clock and power supply voltage of each command unit according to the idle information obtained by the command execution statistics in the EIF, and this flow is only given without the for loop control information. An example of the process is illustrated as how it works.
也就是说,对于S401来说,如果判断结果为是,即存在循环控制信息,那么可以结束流程;如果判断结果为否,即不存在循环控制信息,这时候可以执行S402,即判断目标FIFO队列是否为空。That is to say, for S401, if the judgment result is yes, that is, there is loop control information, then the process can be ended; if the judgment result is no, that is, there is no loop control information, then S402 can be executed, that is, the target FIFO queue can be judged is empty.
S403:若判断结果为否,则判断当前PC值是否等于目标FIFO队列首位元素中的PC值;S403: If the judgment result is no, then judge whether the current PC value is equal to the PC value in the first element of the target FIFO queue;
需要说明的是,对于S402来说,如果判断结果为是,表明目前的目标FIFO队列为空,这时候可以返回S401,然后选择下一个FIFO队列作为目标FIFO队列并继续执行S402;否则,如果判断结果为否,表明目前的目标FIFO队列不为空,这时候可以执行S403,即判断当前PC值是否等于目标FIFO队列首位元素中的PC值(current PC==PC of 1st FIFO element)。It should be noted that, for S402, if the judgment result is yes, it indicates that the current target FIFO queue is empty, at this time, it can return to S401, and then select the next FIFO queue as the target FIFO queue and continue to execute S402; otherwise, if the judgment If the result is no, it indicates that the current target FIFO queue is not empty. At this time, S403 can be executed, that is, it is judged whether the current PC value is equal to the PC value in the first element of the target FIFO queue (current PC==PC of 1st FIFO element).
S404:若判断结果为是,则获取目标指令单元对应的空闲信息,对目标指令单元对应的供电或者时钟进行开关操作;S404: If the judgment result is yes, obtain idle information corresponding to the target command unit, and perform a switch operation on the power supply or clock corresponding to the target command unit;
需要说明的是,如果当前PC值等于目标FIFO队列首位元素中的PC值,这时候可以读取目标FIFO队列首位元素,以得到目标指令单元对应的空闲信息(包括PC值和对应的空闲长度L)。It should be noted that if the current PC value is equal to the PC value in the first element of the target FIFO queue, the first element of the target FIFO queue can be read at this time to obtain the idle information corresponding to the target instruction unit (including the PC value and the corresponding idle length L). ).
仍然假定第一时延值用D2表示,第二时延值用D1表示,第一预设门限值用T2表示,第二预设门限值用T1表示;那么当L-D2≥T2时,这时候可以关闭该目标指令单元对应的供电电源,并等待L-D2个指令周期后恢复供电电源;当L-D2<T2且L-D1≥T1时,这时候可以关闭目标指令单元对应的时钟,并等待L-D1个指令周期后恢复时钟。然后在S404之后,继续返回S401,选择下一个FIFO队列作为目标FIFO队列并继续执行S402。It is still assumed that the first delay value is represented by D2, the second delay value is represented by D1, the first preset threshold value is represented by T2, and the second preset threshold value is represented by T1; then when L-D2≥T2 , at this time, the power supply corresponding to the target command unit can be turned off, and the power supply can be restored after waiting for L-D2 command cycles; when L-D2<T2 and L-D1≥T1, the corresponding power supply of the target command unit can be turned off at this time. clock, and wait for L-D1 instruction cycles to recover the clock. Then after S404, continue to return to S401, select the next FIFO queue as the target FIFO queue and continue to execute S402.
S405:若判断结果为否,则判断当前PC值是否大于或等于首位元素中的PC值与L的和值;S405: if the judgment result is no, then judge whether the current PC value is greater than or equal to the sum of the PC value and L in the first element;
S406:若判断结果为是,则弹出目标FIFO队列中的首位元素;S406: If the judgment result is yes, pop the first element in the target FIFO queue;
S407:若判断结果为否,则判断当前PC值是否小于首位元素中的PC值;S407: if the judgment result is no, judge whether the current PC value is less than the PC value in the first element;
需要说明的是,对于S405来说,L表示首位元素中的空闲长度;判断当前PC值是否大于或等于首位元素中的PC值与L的和值(current PC≥PC+L in 1st FIFO element);如果判断结果为是,表明首位元素已经执行完,这时候可以执行S406,从目标FIFO队列中弹出首位元素;如果判断结果为否,这时候可以执行S407,需要继续判断当前PC值是否小于首位元素中的PC值(current PC≥PC in 1st FIFO element)。It should be noted that, for S405, L represents the idle length in the first element; it is judged whether the current PC value is greater than or equal to the sum of the PC value and L in the first element (current PC≥PC+L in 1st FIFO element) ; If the judgment result is yes, it indicates that the first element has been executed. At this time, S406 can be executed to pop the first element from the target FIFO queue; if the judgment result is no, S407 can be executed at this time, and it is necessary to continue to judge whether the current PC value is less than the first position. PC value in element (current PC ≥ PC in 1st FIFO element).
S408:若判断结果为否,则计算目标指令单元对应的剩余空闲计数值;S408: if the judgment result is no, calculate the remaining idle count value corresponding to the target instruction unit;
S409:根据所述剩余空闲计数值,对目标指令单元对应的供电或者时钟进行开关操作。S409: According to the remaining idle count value, perform a switch operation on the power supply or the clock corresponding to the target instruction unit.
需要说明的是,对于S407来说,如果判断结果为是,表明当前PC值还没有到目标FIFO队列中的PC值,这时候什么都不执行,继续返回S401;如果判断结果为否,表明当前PC值已经超过目标FIFO队列中的PC值,比如在分支指令跳转的情况下,这时候需要执行S408和S409。It should be noted that, for S407, if the judgment result is yes, it indicates that the current PC value has not reached the PC value in the target FIFO queue. At this time, nothing is executed, and it continues to return to S401; if the judgment result is no, it indicates that the current PC value is not reached. The PC value has exceeded the PC value in the target FIFO queue. For example, in the case of a branch instruction jump, S408 and S409 need to be executed at this time.
具体地,对于剩余空闲计数值(idle count)的计算,可以根据idle count=L-(current PC-PC)得到;假定PC值等于1000,空闲长度L等于10,而当前PC值等于1005,这时候可以计算得到idle count等于5。Specifically, for the calculation of the remaining idle count value (idle count), it can be obtained according to idle count=L-(current PC-PC); assuming that the PC value is equal to 1000, the idle length L is equal to 10, and the current PC value is equal to 1005, this It can be calculated that the idle count is equal to 5.
对于S409来说,仍然假定第一时延值用D2表示,第二时延值用D1表示,第一预设门限值用T2表示,第二预设门限值用T1表示;那么当idle count-D2≥T2时,这时候可以关闭该目标指令单元对应的供电电源,并等待idle count-D2个指令周期后恢复供电电源;当idle count-D2<T2且idle count-D1≥T1时,这时候可以关闭目标指令单元对应的时钟,并等待idle count-D1个指令周期后恢复时钟。然后在S409之后,继续返回S401,选择下一个FIFO队列作为目标FIFO队列并继续执行S402。For S409, it is still assumed that the first delay value is represented by D2, the second delay value is represented by D1, the first preset threshold value is represented by T2, and the second preset threshold value is represented by T1; then when idle When count-D2≥T2, the power supply corresponding to the target command unit can be turned off at this time, and the power supply can be restored after waiting for idle count-D2 instruction cycles; when idle count-D2<T2 and idle count-D1≥T1, At this time, the clock corresponding to the target instruction unit can be turned off, and the clock can be recovered after waiting for idle count-D1 instruction cycles. Then after S409, continue to return to S401, select the next FIFO queue as the target FIFO queue and continue to execute S402.
简言之,目前无线通信系统可以根据调制解调器的工作状态打开和关闭部分处理单元,或者调整处理单元的电压和时钟频率以达到节电目的。但是在处理单元运行在某个电压和频率时,内部的微观处理对指令单元的使用情况在处理不同任务时存在不平衡。而本申请实施例可以利用统计指令代码在未来一段时间内不同指令单元的使用情况,并且使用FIFO队列记录每个指令单元停止工作(处于空闲状态)的起始时间和持续时间;并且还可以提供循环代码和分支代码指令单元占用信息;最后根据指令单元的未来使用情况对相对应的指令单元进行关闭时钟操作或者安全地关闭和恢复供电电源,可以最大程度地降低处理器的无效功耗;也就是说,本申请实施例可以提高处理器在工作状态下的微观功耗效率,从而改善处理器的激活功耗指标。In short, the current wireless communication system can turn on and off some processing units according to the working state of the modem, or adjust the voltage and clock frequency of the processing units to save power. However, when the processing unit runs at a certain voltage and frequency, the usage of the instruction unit by the internal micro-processing is unbalanced when processing different tasks. However, in the embodiment of the present application, the usage of different instruction units in a future period of time can be counted by the instruction code, and the start time and duration of each instruction unit stop working (in an idle state) can be recorded by using the FIFO queue; and can also provide Loop code and branch code instruction unit occupancy information; finally, according to the future use of the instruction unit, the corresponding instruction unit is closed clock operation or safely shut down and restore the power supply, which can minimize the invalid power consumption of the processor; also That is to say, the embodiments of the present application can improve the microscopic power consumption efficiency of the processor in the working state, thereby improving the active power consumption index of the processor.
除此之外,某些VDSP可以由矢量控制单元(Vector control unit,VCU)和矢量数据处理单元(Vector Data unit,VDU)两部分组成。其中,VCU主要进行控制工作,VDU进行计算密集型的工作,而且VCU占VDSP较小的一部分,VDU占VDSP的大部分面积和功耗。这种结构下的VDSP可以通过VCU实现该功能。一种可能的实现方式是通过编译器在指令代码中按照一定间隔插入一段固定代码,这段代码的作用就是统计下一段运行代码的指令单元占用情况,并控制指令单元对应的时钟和供电电源在特定的时间关闭或者恢复。In addition, some VDSPs can be composed of two parts, a vector control unit (Vector control unit, VCU) and a vector data processing unit (Vector Data unit, VDU). Among them, the VCU mainly performs the control work, and the VDU performs the computation-intensive work, and the VCU accounts for a small part of the VDSP, and the VDU accounts for most of the area and power consumption of the VDSP. The VDSP under this structure can realize this function through the VCU. A possible implementation is to insert a fixed piece of code into the instruction code at certain intervals through the compiler. The function of this code is to count the occupancy of the instruction unit of the next running code, and to control the clock and power supply corresponding to the instruction unit. Shut down or resume at a specific time.
本申请实施例提供了一种信号处理器的控制方法,通过上述实施例对前述实施例的具体实现进行了详细阐述,从中可以看出,根据目标指令单元的未来使用情况,对该目标指令单元对应的供电电源或者时钟进行关闭和恢复操作,可以最大程度地降低信号处理器的无效功耗,从而提高信号处理器在工作状态下的功耗效率,能够改善信号处理器的激活功耗指标,并且达到节省功耗的目的。An embodiment of the present application provides a control method for a signal processor, and the specific implementation of the foregoing embodiment is described in detail through the foregoing embodiment. It can be seen from this that, according to the future use of the target instruction unit, the The corresponding power supply or clock is turned off and restored, which can minimize the invalid power consumption of the signal processor, thereby improving the power consumption efficiency of the signal processor in the working state, and improving the activation power consumption index of the signal processor. And achieve the purpose of saving power consumption.
本申请的又一实施例中,基于前述实施例相同的发明构思,参见图5,其示出了本申请实施例提供的一种信号处理器的控制装置50的组成结构示意图。如图5所示,该信号处理器的控制装置50可以包括确定单元501和控制单元502;其中,In yet another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to FIG. 5 , it shows a schematic structural diagram of a control device 50 for a signal processor provided by an embodiment of the present application. As shown in FIG. 5 , the control device 50 of the signal processor may include a determination unit 501 and a control unit 502; wherein,
确定单元501,配置为基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;The determining unit 501 is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of the preset length; wherein, the idle information includes the idle length of continuous no operation;
控制单元502,配置为根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。The control unit 502 is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
在一些实施例中,控制单元502,具体配置为根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的供电进行开关操作;以及根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的时钟进行开关操作。In some embodiments, the control unit 502 is specifically configured to switch the power supply corresponding to the target instruction unit according to the idle length corresponding to the target instruction unit; The clock corresponding to the target instruction unit performs a switching operation.
在一些实施例中,控制单元502,具体配置为根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作;以及根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作;其中,所述第一时延值表示所述目标指令单元恢复供电所需的指令时延,所述第二时延值表示所述目标指令单元恢复时钟所需的指令时延。In some embodiments, the control unit 502 is specifically configured to perform a switching operation on the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit; and according to the target command unit The corresponding idle length and the second delay value are used to switch the clock corresponding to the target command unit; wherein, the first delay value represents the command delay required by the target command unit to restore power supply, and the The second delay value represents the instruction delay required for the target instruction unit to recover the clock.
在一些实施例中,参见图5,该信号处理器的控制装置50还可以包括计算单元503,配置为计算所述空闲长度和所述第一时延值之间的第一差值;In some embodiments, referring to FIG. 5 , the control apparatus 50 of the signal processor may further include a calculation unit 503 configured to calculate a first difference between the idle length and the first delay value;
控制单元502,还配置为将所述第一差值与第一预设门限值进行比较;若所述第一差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。The control unit 502 is further configured to compare the first difference value with a first preset threshold value; if the first difference value is greater than or equal to the first preset threshold value, The power supply corresponding to the command unit performs a shutdown operation.
在一些实施例中,控制单元502,还配置为若等待时长满足所述第一差值,则对所述目标指令单元的供电执行开启操作。In some embodiments, the control unit 502 is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the first difference.
在一些实施例中,计算单元503,还配置为计算所述空闲长度和所述第二时延值之间的第二差值;In some embodiments, the calculating unit 503 is further configured to calculate a second difference between the idle length and the second delay value;
控制单元502,还配置为将所述第二差值与第二预设门限值进行比较;若所述第一差值小于所述第一预设门限值且所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。The control unit 502 is further configured to compare the second difference with a second preset threshold; if the first difference is less than the first preset threshold and the second difference is greater than or equal to the second preset threshold value, perform a shutdown operation on the clock corresponding to the target instruction unit.
在一些实施例中,控制单元502,还配置为若等待时长满足所述第二差值,则对所述目标指令单元的供电执行开启操作。In some embodiments, the control unit 502 is further configured to perform a power-on operation on the power supply of the target instruction unit if the waiting time period satisfies the second difference.
在一些实施例中,参见图5,该信号处理器的控制装置50还可以包括缓存单元504;其中,In some embodiments, referring to FIG. 5 , the control device 50 of the signal processor may further include a buffer unit 504; wherein,
确定单元501,还配置为确定指令计数值,从所述指令计数值开始并进行计数,获取预设长度的未执行指令序列;The determining unit 501 is further configured to determine an instruction count value, start from the instruction count value and count, and obtain an unexecuted instruction sequence of a preset length;
缓存单元504,配置为将待执行时钟或供电关闭操作的所述目标指令单元对应的开始指令计数值与所述空闲长度存储至存储器中;The cache unit 504 is configured to store the start instruction count value and the idle length corresponding to the target instruction unit for which the clock or power supply shutdown operation is to be performed in the memory;
控制单元502,配置为在当前的指令计数值为所述开始指令计数值的情况下,执行所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作的步骤。The control unit 502 is configured to perform the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information when the current instruction count value is the start instruction count value.
在一些实施例中,参见图5,该信号处理器的控制装置50还可以包括丢弃单元505,配置为在当前的指令计数值大于或等于所述存储器中的所述开始指令计数值和所述空闲长度之和时,从所述存储器中去除所述开始指令计数值和所述空闲长度。In some embodiments, referring to FIG. 5 , the control device 50 of the signal processor may further include a discarding unit 505, configured to be greater than or equal to the starting instruction count value in the memory and the When the free length is the sum, the start instruction count value and the free length are removed from the memory.
在一些实施例中,所述目标指令单元包括下述中的至少一项:加载指令单元、回存指令单元、算术逻辑指令单元和矩阵操作指令单元。In some embodiments, the target instruction unit includes at least one of: a load instruction unit, a storeback instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分 可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that, in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular. Moreover, each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or Said part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium and includes several instructions for making a computer device (which can be It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
因此,本实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现前述实施例中任一项所述的方法。Therefore, this embodiment provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by at least one processor, implements the method described in any one of the foregoing embodiments.
本申请的再一实施例中,基于上述信号处理器的控制装置50的组成以及计算机存储介质,参见图6,其示出了本申请实施例提供的一种信号处理设备60的具体硬件结构示意图。如图6所示,该信号处理设备60可以包括处理器601,处理器601可以从存储器中调用并运行可执行指令,以实现前述实施例中任一项所述的方法。In yet another embodiment of the present application, for the composition of the control device 50 based on the signal processor and the computer storage medium, see FIG. 6 , which shows a schematic diagram of a specific hardware structure of a signal processing device 60 provided by an embodiment of the present application . As shown in FIG. 6 , the signal processing device 60 may include a processor 601, and the processor 601 may call and execute executable instructions from a memory, so as to implement the method described in any one of the foregoing embodiments.
可选地,如图6所示,信号处理设备60还可以包括存储器602。其中,处理器601可以从存储器602中调用并运行可执行指令,以实现前述实施例中任一项所述的方法。Optionally, as shown in FIG. 6 , the signal processing device 60 may further include a memory 602 . The processor 601 may call and execute executable instructions from the memory 602 to implement the method described in any one of the foregoing embodiments.
其中,存储器602可以是独立于处理器601的一个单独的器件,也可以集成在处理器601中。The memory 602 may be a separate device independent of the processor 601 , or may be integrated in the processor 601 .
可选地,如图6所示,信号处理设备60还可以包括收发器603,处理器601可以控制该收发器603与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。Optionally, as shown in FIG. 6 , the signal processing device 60 may further include a transceiver 603, and the processor 601 may control the transceiver 603 to communicate with other devices, specifically, may send information or data to other devices, or receive Information or data sent by other devices.
其中,收发器603可以包括发射机和接收机。收发器603还可以进一步包括天线,天线的数量可以为一个或多个。The transceiver 603 may include a transmitter and a receiver. The transceiver 603 may further include an antenna, and the number of the antenna may be one or more.
可选地,信号处理设备60具体可为前述实施例所述的处理器或者处理单元,或者集成有前述实施例中任一项所述信号处理器的控制装置50的设备。这里,并且该信号处理设备60可以实现本申请实施例的各个方法中由处理器实现的相应流程,为了简洁,在此不再赘述。Optionally, the signal processing device 60 may specifically be the processor or the processing unit described in the foregoing embodiments, or a device integrated with the control apparatus 50 of the signal processor described in any one of the foregoing embodiments. Here, and the signal processing device 60 can implement the corresponding processes implemented by the processor in each method of the embodiments of the present application, which is not repeated here for brevity.
本申请的再一实施例中,基于上述信号处理器的控制装置50的组成以及计算机存储介质,参见图7,其示出了本申请实施例提供的一种芯片70的具体硬件结构示意图。如图7所示,芯片70可以包括处理器701,处理器701可以从存储器中调用并运行可执行指令,以实现前述实施例中任一项所述的方法。In yet another embodiment of the present application, for the composition of the control device 50 based on the signal processor and the computer storage medium, see FIG. 7 , which shows a schematic diagram of a specific hardware structure of a chip 70 provided by an embodiment of the present application. As shown in FIG. 7 , the chip 70 may include a processor 701, and the processor 701 may invoke and execute executable instructions from the memory to implement the method described in any one of the foregoing embodiments.
可选地,如图7所示,芯片70还可以包括存储器702。其中,处理器701可以从存储器702中调用并运行可执行指令,以实现前述实施例中任一项所述的方法。Optionally, as shown in FIG. 7 , the chip 70 may further include a memory 702 . The processor 701 may call and execute executable instructions from the memory 702 to implement the method described in any one of the foregoing embodiments.
其中,存储器702可以是独立于处理器701的一个单独的器件,也可以集成在处理器701中。The memory 702 may be a separate device independent of the processor 701 , or may be integrated in the processor 701 .
可选地,该芯片70还可以包括输入接口703。其中,处理器701可以控制该输入接口703与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。Optionally, the chip 70 may further include an input interface 703 . The processor 701 can control the input interface 703 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
可选地,该芯片70还可以包括输出接口704。其中,处理器701可以控制该输出接口704与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。Optionally, the chip 70 may further include an output interface 704 . The processor 701 can control the output interface 704 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
可选地,该芯片70可应用于前述实施例所述的多模终端,并且该芯片可以实现本 申请实施例的各个方法中由多模终端实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip 70 can be applied to the multi-mode terminal described in the foregoing embodiments, and the chip can implement the corresponding processes implemented by the multi-mode terminal in each method of the embodiments of the present application. For the sake of brevity, details are not repeated here. .
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等,比如调制解调器芯片或者调制解调器芯片组等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip or a system-on-chip, such as a modem chip or a modem chip set.
需要说明的是,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be noted that, the processor in the embodiment of the present application may be an integrated circuit chip, which has signal processing capability. In the implementation process, each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
还需要说明的是,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步链动态随机存取存储器(Synchronous link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。应注意,本申请描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should also be noted that, the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous link DRAM (Synchronous link DRAM, SLDRAM) ) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
可以理解地,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It will be appreciated that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), General Purpose Processors, Controllers, Microcontrollers, Microprocessors, Others for performing the functions described herein electronic unit or a combination thereof. For a software implementation, the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein. Software codes may be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this application, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements , but also other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined under the condition of no conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in the several product embodiments provided in this application can be combined arbitrarily without conflict to obtain a new product embodiment.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
工业实用性Industrial Applicability
本申请实施例中,基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。这样,根据目标指令单元的未来使用情况,对该目标指令单元对应的供电电源或者时钟进行关闭和恢复操作,可以最大程度地降低信号处理器的无效功耗,从而提高信号处理器在工作状态下的功耗效率,能够改善信号处理器的激活功耗指标,并且达到节省功耗的目的。In the embodiment of the present application, based on the unexecuted instruction sequence of a preset length, the idle information of the target instruction unit corresponding to the unexecuted instruction sequence is determined; wherein, the idle information includes the idle length of continuous no operation; according to the determined idle information The idle information of the target command unit is switched on and off for the power supply or clock corresponding to the target command unit. In this way, according to the future usage of the target command unit, the power supply or clock corresponding to the target command unit is turned off and restored, which can reduce the invalid power consumption of the signal processor to the greatest extent, thereby improving the signal processor in the working state. The power consumption efficiency can improve the activation power consumption index of the signal processor, and achieve the purpose of saving power consumption.

Claims (20)

  1. 一种信号处理器的控制方法,所述方法包括:A control method of a signal processor, the method comprising:
    基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;Determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of preset length; wherein, the idle information includes the idle length of continuous no operation;
    根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。According to the determined idle information, switch operation is performed on the power supply or the clock corresponding to the target instruction unit.
  2. 根据权利要求1所述的方法,其中,所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作,包括:The method according to claim 1, wherein, according to the determined idle information, performing a switching operation on a power supply or a clock corresponding to the target instruction unit, comprising:
    根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的供电进行开关操作;According to the idle length corresponding to the target command unit, switch the power supply corresponding to the target command unit;
    根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的时钟进行开关操作。According to the idle length corresponding to the target command unit, a switch operation is performed on the clock corresponding to the target command unit.
  3. 根据权利要求1所述的方法,其中,所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作,包括:The method according to claim 1, wherein, according to the determined idle information, performing a switching operation on a power supply or a clock corresponding to the target instruction unit, comprising:
    根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作;According to the idle length and the first delay value corresponding to the target command unit, switch the power supply corresponding to the target command unit;
    根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作;According to the idle length and the second delay value corresponding to the target command unit, switch the clock corresponding to the target command unit;
    其中,所述第一时延值表示所述目标指令单元恢复供电所需的指令时延,所述第二时延值表示所述目标指令单元恢复时钟所需的指令时延。Wherein, the first delay value represents the instruction delay required by the target command unit to restore power supply, and the second delay value represents the command delay required by the target command unit to recover the clock.
  4. 根据权利要求3所述的方法,其中,所述根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作,包括:The method according to claim 3, wherein the switching operation of the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit comprises:
    计算所述空闲长度和所述第一时延值之间的第一差值;calculating a first difference between the idle length and the first delay value;
    将所述第一差值与第一预设门限值进行比较;comparing the first difference with a first preset threshold;
    若所述第一差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。If the first difference value is greater than or equal to the first preset threshold value, a shutdown operation is performed on the power supply corresponding to the target instruction unit.
  5. 根据权利要求4所述的方法,其中,在所述对所述目标指令单元对应的供电执行关闭操作之后,所述方法还包括:The method according to claim 4, wherein after the power supply corresponding to the target instruction unit is turned off, the method further comprises:
    若等待时长满足所述第一差值,则对所述目标指令单元的供电执行开启操作。If the waiting time period satisfies the first difference value, a power-on operation is performed on the power supply of the target instruction unit.
  6. 根据权利要求4所述的方法,其中,在所述第一差值小于所述第一预设门限值时,所述根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作,包括:The method according to claim 4, wherein, when the first difference value is smaller than the first preset threshold value, according to the idle length corresponding to the target instruction unit and the second delay value, the The clock corresponding to the target instruction unit performs a switching operation, including:
    计算所述空闲长度和所述第二时延值之间的第二差值;calculating a second difference between the idle length and the second delay value;
    将所述第二差值与第二预设门限值进行比较;comparing the second difference with a second preset threshold;
    若所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。If the second difference value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
  7. 根据权利要求6所述的方法,其中,在所述对所述目标指令单元对应的时钟执行关闭操作之后,所述方法还包括:The method according to claim 6, wherein after performing the shutting down operation on the clock corresponding to the target instruction unit, the method further comprises:
    若等待时长满足所述第二差值,则对所述目标指令单元的供电执行开启操作。If the waiting time period satisfies the second difference value, a power-on operation is performed on the power supply of the target instruction unit.
  8. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:
    确定指令计数值,从所述指令计数值开始并进行计数,获取预设长度的未执行指令序列;Determine the instruction count value, start from the instruction count value and count, and obtain the unexecuted instruction sequence of preset length;
    将待执行时钟或供电关闭操作的所述目标指令单元对应的开始指令计数值与所述 空闲长度存储至存储器中;The start instruction count value and the idle length corresponding to the target instruction unit of the to-be-executed clock or power supply shutdown operation are stored in the memory;
    在当前的指令计数值为所述开始指令计数值的情况下,执行所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作的步骤。When the current instruction count value is the start instruction count value, the step of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information is performed.
  9. 根据权利要求8所述的方法,其中,所述方法还包括:The method of claim 8, wherein the method further comprises:
    在当前的指令计数值大于或等于所述存储器中的所述开始指令计数值和所述空闲长度之和时,从所述存储器中去除所述开始指令计数值和所述空闲长度。When the current instruction count value is greater than or equal to the sum of the start instruction count value and the idle length in the memory, the start instruction count value and the idle length are removed from the memory.
  10. 根据权利要求1至9任一项所述的方法,其中,所述目标指令单元包括下述中的至少一项:加载指令单元、回存指令单元、算术逻辑指令单元和矩阵操作指令单元。The method according to any one of claims 1 to 9, wherein the target instruction unit includes at least one of the following: a load instruction unit, a store-back instruction unit, an arithmetic logic instruction unit, and a matrix operation instruction unit.
  11. 一种信号处理器的控制装置,所述信号处理器的控制装置包括确定单元和控制单元;其中,A control device of a signal processor, the control device of the signal processor includes a determination unit and a control unit; wherein,
    所述确定单元,配置为基于预设长度的未执行指令序列,确定所述未执行指令序列所对应的目标指令单元的空闲信息;其中,所述空闲信息包括连续无操作的空闲长度;The determining unit is configured to determine the idle information of the target instruction unit corresponding to the unexecuted instruction sequence based on the unexecuted instruction sequence of preset length; wherein, the idle information includes the idle length of continuous no operation;
    所述控制单元,配置为根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作。The control unit is configured to perform switching operations on the power supply or the clock corresponding to the target instruction unit according to the determined idle information.
  12. 根据权利要求11所述的控制装置,其中,所述控制单元,配置为根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的供电进行开关操作;以及根据所述目标指令单元对应的空闲长度,对所述目标指令单元对应的时钟进行开关操作。The control device according to claim 11, wherein the control unit is configured to switch the power supply corresponding to the target command unit according to the idle length corresponding to the target command unit; and according to the target command unit For the corresponding idle length, a switch operation is performed on the clock corresponding to the target instruction unit.
  13. 根据权利要求11所述的控制装置,其中,所述控制单元,配置为根据所述目标指令单元对应的空闲长度和第一时延值,对所述目标指令单元对应的供电进行开关操作;以及根据所述目标指令单元对应的空闲长度和第二时延值,对所述目标指令单元对应的时钟进行开关操作;其中,所述第一时延值表示所述目标指令单元恢复供电所需的指令时延,所述第二时延值表示所述目标指令单元恢复时钟所需的指令时延。The control device according to claim 11, wherein the control unit is configured to switch the power supply corresponding to the target command unit according to the idle length and the first delay value corresponding to the target command unit; and According to the idle length corresponding to the target command unit and the second delay value, the clock corresponding to the target command unit is switched on and off; wherein, the first delay value represents the time required for the target command unit to restore power supply The instruction delay, the second delay value represents the instruction delay required by the target instruction unit to recover the clock.
  14. 根据权利要求13所述的控制装置,其中,所述信号处理器的控制装置还包括计算单元,配置为计算所述空闲长度和所述第一时延值之间的第一差值;The control device according to claim 13, wherein the control device of the signal processor further comprises a calculation unit configured to calculate a first difference between the idle length and the first delay value;
    所述控制单元,还配置为将所述第一差值与第一预设门限值进行比较;若所述第一差值大于或等于所述第一预设门限值,则对所述目标指令单元对应的供电执行关闭操作。The control unit is further configured to compare the first difference with a first preset threshold; if the first difference is greater than or equal to the first preset threshold, The power supply corresponding to the target command unit performs a shutdown operation.
  15. 根据权利要求14所述的控制装置,其中,所述计算单元,还配置为计算所述空闲长度和所述第二时延值之间的第二差值;The control device according to claim 14, wherein the calculation unit is further configured to calculate a second difference between the idle length and the second delay value;
    所述控制单元,还配置为将所述第二差值与第二预设门限值进行比较;若所述第一差值小于所述第一预设门限值且所述第二差值大于或等于所述第二预设门限值,则对所述目标指令单元对应的时钟执行关闭操作。The control unit is further configured to compare the second difference with a second preset threshold; if the first difference is less than the first preset threshold and the second difference If the value is greater than or equal to the second preset threshold value, a shutdown operation is performed on the clock corresponding to the target instruction unit.
  16. 根据权利要求11所述的控制装置,其中,所述信号处理器的控制装置还包括缓存单元;The control device according to claim 11, wherein the control device of the signal processor further comprises a buffer unit;
    所述确定单元,还配置为确定指令计数值,从所述指令计数值开始并进行计数,获取预设长度的未执行指令序列;The determining unit is further configured to determine an instruction count value, start from the instruction count value and count, and obtain an unexecuted instruction sequence of a preset length;
    所述缓存单元,配置为将待执行时钟或供电关闭操作的所述目标指令单元对应的开始指令计数值与所述空闲长度存储至存储器中;The cache unit is configured to store the start instruction count value and the idle length corresponding to the target instruction unit of the clock or power supply shutdown operation to be performed in the memory;
    所述控制单元,还配置为在当前的指令计数值为所述开始指令计数值的情况下,执行所述根据所确定的空闲信息,对所述目标指令单元对应的供电或者时钟进行开关操作的步骤。The control unit is further configured to perform the switching operation of switching the power supply or the clock corresponding to the target instruction unit according to the determined idle information when the current instruction count value is the start instruction count value. step.
  17. 根据权利要求16所述的控制装置,其中,所述信号处理器的控制装置还包括丢弃单元,配置为在当前的指令计数值大于或等于所述存储器中的所述开始指令计数值和所述空闲长度之和时,从所述存储器中去除所述开始指令计数值和所述空闲长度。The control apparatus according to claim 16, wherein the control apparatus of the signal processor further comprises a discarding unit configured to be greater than or equal to the start instruction count value in the memory and the When the free length is the sum, the start instruction count value and the free length are removed from the memory.
  18. 一种信号处理设备,所述信号处理设备包括存储器和处理器;其中,A signal processing device comprising a memory and a processor; wherein,
    所述存储器,用于存储能够在所述处理器上运行的可执行指令;the memory for storing executable instructions capable of being executed on the processor;
    所述处理器,用于在运行所述可执行指令时,执行如权利要求1至10任一项所述的方法。The processor is configured to execute the method according to any one of claims 1 to 10 when executing the executable instructions.
  19. 一种芯片,所述芯片包括存储器和处理器;其中,A chip comprising a memory and a processor; wherein,
    所述存储器,用于存储能够在所述处理器上运行的可执行指令;the memory for storing executable instructions capable of being executed on the processor;
    所述处理器,用于在运行所述可执行指令时,使得安装有所述芯片的信号处理设备执行如权利要求1至10任一项所述的方法。The processor is configured to cause the signal processing device on which the chip is installed to execute the method according to any one of claims 1 to 10 when the executable instructions are executed.
  20. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现如权利要求1至10任一项所述的方法。A computer storage medium, wherein the computer storage medium stores a computer program which, when executed by at least one processor, implements the method according to any one of claims 1 to 10.
PCT/CN2021/105786 2020-09-22 2021-07-12 Control method and apparatus for signal processor, device, and storage medium WO2022062580A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011000843.3 2020-09-22
CN202011000843.3A CN112147931B (en) 2020-09-22 2020-09-22 Control method, device and equipment of signal processor and storage medium

Publications (1)

Publication Number Publication Date
WO2022062580A1 true WO2022062580A1 (en) 2022-03-31

Family

ID=73892631

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/105786 WO2022062580A1 (en) 2020-09-22 2021-07-12 Control method and apparatus for signal processor, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112147931B (en)
WO (1) WO2022062580A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114780006A (en) * 2022-04-06 2022-07-22 青岛海尔科技有限公司 Control method and control terminal for issuing command

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003453B (en) * 2021-10-29 2023-04-07 哲库科技(北京)有限公司 Test method, electronic equipment, system and computer storage medium
CN114356416B (en) * 2021-12-31 2023-04-07 海光信息技术股份有限公司 Processor, control method and device thereof, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658127A (en) * 2004-02-18 2005-08-24 国际商业机器公司 Recording medium ,method and information processor for controlling CPU execution mode
CN101504566A (en) * 2009-01-21 2009-08-12 北京红旗胜利科技发展有限责任公司 Method for reducing CPU power consumption and CPU
CN101581961A (en) * 2009-06-15 2009-11-18 北京红旗胜利科技发展有限责任公司 CPU and method for reducing CPU power consumption
CN101639724A (en) * 2008-07-30 2010-02-03 联想(北京)有限公司 Computer, computer power supply control device and power supply control method
CN104750228A (en) * 2015-03-26 2015-07-01 广东欧珀移动通信有限公司 Method and device for reducing power consumption of multi-core processor
WO2018052733A1 (en) * 2016-09-15 2018-03-22 Xilinx, Inc. Dynamic power reduction in circuit designs and circuits
US9927863B1 (en) * 2011-12-15 2018-03-27 Apple Inc. Power management scheme that accumulates additional off time for device when no work is available and permits additional power consumption by device when awakened

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102841865B (en) * 2011-06-24 2016-02-10 上海芯豪微电子有限公司 High-performance cache system and method
US10149261B2 (en) * 2013-11-04 2018-12-04 Qualcomm Incorporated Methods and systems for mobile device clock management
CN105718320B (en) * 2016-01-18 2020-11-06 华为技术有限公司 Clock task processing method, device and equipment
WO2017190266A1 (en) * 2016-05-03 2017-11-09 华为技术有限公司 Method for managing translation lookaside buffer and multi-core processor
JP7086553B2 (en) * 2017-09-22 2022-06-20 シナプティクス・ジャパン合同会社 How to drive the display driver, display device and display panel
CN111064507A (en) * 2019-12-25 2020-04-24 中国联合网络通信集团有限公司 Method and device for detecting length of optical fiber link and terminal equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658127A (en) * 2004-02-18 2005-08-24 国际商业机器公司 Recording medium ,method and information processor for controlling CPU execution mode
CN101639724A (en) * 2008-07-30 2010-02-03 联想(北京)有限公司 Computer, computer power supply control device and power supply control method
CN101504566A (en) * 2009-01-21 2009-08-12 北京红旗胜利科技发展有限责任公司 Method for reducing CPU power consumption and CPU
CN101581961A (en) * 2009-06-15 2009-11-18 北京红旗胜利科技发展有限责任公司 CPU and method for reducing CPU power consumption
US9927863B1 (en) * 2011-12-15 2018-03-27 Apple Inc. Power management scheme that accumulates additional off time for device when no work is available and permits additional power consumption by device when awakened
CN104750228A (en) * 2015-03-26 2015-07-01 广东欧珀移动通信有限公司 Method and device for reducing power consumption of multi-core processor
WO2018052733A1 (en) * 2016-09-15 2018-03-22 Xilinx, Inc. Dynamic power reduction in circuit designs and circuits

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114780006A (en) * 2022-04-06 2022-07-22 青岛海尔科技有限公司 Control method and control terminal for issuing command
CN114780006B (en) * 2022-04-06 2023-06-09 青岛海尔科技有限公司 Control method and control terminal for command issuing

Also Published As

Publication number Publication date
CN112147931A (en) 2020-12-29
CN112147931B (en) 2022-06-24

Similar Documents

Publication Publication Date Title
WO2022062580A1 (en) Control method and apparatus for signal processor, device, and storage medium
US7836291B2 (en) Method, medium, and apparatus with interrupt handling in a reconfigurable array
JP6030987B2 (en) Memory control circuit
CN101529383B (en) Task processing device
US9436464B2 (en) Instruction-issuance controlling device and instruction-issuance controlling method
US20070124736A1 (en) Acceleration threads on idle OS-visible thread execution units
RU2651238C2 (en) Synchronization of interrupt processing for energy consumption reduction
US20020194466A1 (en) Repeat instruction with interrupt
EP2642368A2 (en) Running state power saving via reduced instructions per clock operation
JPWO2009022371A1 (en) Task processing device
US20100122064A1 (en) Method for increasing configuration runtime of time-sliced configurations
US11392407B2 (en) Semiconductor device
JP2005078640A (en) Thread scheduling mechanism for processor resource power management
CN110806900B (en) Memory access instruction processing method and processor
WO2001038970A2 (en) Buffer memories, methods and systems for buffering having seperate buffer memories for each of a plurality of tasks
AU2006221114A1 (en) Single-cycle low-power CPU architecture
CN116420140A (en) Dynamically configurable over-provisioned microprocessor
US20050216779A1 (en) Device and method for managing a standby state of microprocessor
US6993674B2 (en) System LSI architecture and method for controlling the clock of a data processing system through the use of instructions
US20060149862A1 (en) DMA in processor pipeline
US10180839B2 (en) Apparatus for information processing with loop cache and associated methods
US7421595B2 (en) Device and method for managing a standby state of a microprocessor
JP2008015668A (en) Task management device
US7290153B2 (en) System, method, and apparatus for reducing power consumption in a microprocessor
KR100728899B1 (en) High Performance Embedded Processor with Multiple Register Sets and Hardware Context Manager

Legal Events

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

Ref document number: 21870958

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21870958

Country of ref document: EP

Kind code of ref document: A1