CN101727160B - Method and device for switching working modes of coprocessor system and processor system - Google Patents

Method and device for switching working modes of coprocessor system and processor system Download PDF

Info

Publication number
CN101727160B
CN101727160B CN200910237526A CN200910237526A CN101727160B CN 101727160 B CN101727160 B CN 101727160B CN 200910237526 A CN200910237526 A CN 200910237526A CN 200910237526 A CN200910237526 A CN 200910237526A CN 101727160 B CN101727160 B CN 101727160B
Authority
CN
China
Prior art keywords
coprocessor
executable file
original state
internal memory
file
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN200910237526A
Other languages
Chinese (zh)
Other versions
CN101727160A (en
Inventor
李栋梁
艾国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Vimicro Corp
Original Assignee
Wuxi Vimicro Corp
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 Wuxi Vimicro Corp filed Critical Wuxi Vimicro Corp
Priority to CN200910237526A priority Critical patent/CN101727160B/en
Publication of CN101727160A publication Critical patent/CN101727160A/en
Application granted granted Critical
Publication of CN101727160B publication Critical patent/CN101727160B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a method and a device for switching working modes of a coprocessor system and a processor system, which relate to the field of electronic products and solve the problem of long switching time of a coprocessor when the coprocessor is switched to a normal working state from a power saving state in the prior art. The method comprises the following steps: when the coprocessor is switched to the power saving state from the normal working state, keeping a power supply state of a memory so as to reserve a backup file of an initial state of an executable file in the memory; generating the executable file of the initial state according to the backup file of the initial state of the executable file; and when the coprocessor is switched to the normal working state from the power saving state, executing the executable file of the initial state. When the coprocessor is switched to the normal working state from the power saving state, the response speed of the coprocessor can be increased.

Description

The switching method and apparatus of working modes of coprocessor system and processor system
Technical field
The present invention relates to the design of electronic products field, be meant a kind of switching method and apparatus and processor system of working modes of coprocessor system especially.
Background technology
In the present electronic product industry, require the construction cycle of new product shorter and shorter.Like the conceptual design manufacturer of fruit product existing comparatively ripe with fixing hardware structure and software architecture; When putting out a new product; Often main control chip can be do not changed, very big change will be done because the replacing main control chip means the hardware structure of total system and software architecture.When realizing new function, select to use coprocessor (co-processor) to replenish usually.With the mobile phone is example, as shown in Figure 1, is the block diagram that is connected between main control processor in the prior art and the coprocessor.Be connected with interrupt line through data line between main control processor in the system (also being BBP, Baseband CPU) and the coprocessor (co-processor).Wherein, main control processor is the main processing chip in the system.Coprocessor can assist main control processor to accomplish certain function, has the certain calculation executive capability.
In the time of the work of needs coprocessor, the baseband processor turns on the power switch and clock switch, supplies power to coprocessor, and to coprocessor clock is provided.Accomplish the initialization operation of self when coprocessor after, bring into use the coprocessor operation to handle.When not needing coprocessor, the power supply of the coprocessor that breaks, and the clock of the coprocessor that breaks make coprocessor get into electricity-saving state, to save the electric weight that coprocessor consumes.
When waking coprocessor up; Be control coprocessor when electricity-saving state forwards normal operating conditions to, for the complicated coprocessor of function, for example soc chip (System on a Chip; SOC(system on a chip)); If the soc chip functions is very huge, coprocessor itself needs executive routine to accomplish the function request of baseband processor, and corresponding initialization procedure is just very complicated.When starting coprocessor at every turn; Need carry out initialization to the internal memory that is connected with coprocessor; Be specially: the carrying code is to internal memory (for example being sdram) from the storer (for example being nandflash) that is connected with coprocessor; Thereby accomplish the initialization of internal memory, need like this to consume the plenty of time, therefore influence the response speed of system.
Summary of the invention
The technical matters that the present invention will solve provides a kind of switching method and apparatus and processor system of mode of operation of coprocessor system, when coprocessor when electricity-saving state switches to normal operating conditions, can reduce the switching time of coprocessor.
For solving the problems of the technologies described above, embodiments of the invention provide technical scheme following:
On the one hand, a kind of changing method of mode of operation of coprocessor system is provided, said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor, and said method comprises:
When said coprocessor when normal operating conditions switches to electricity-saving state, keep the power supply state of said internal memory, in said internal memory, to keep the backup file of the original state of executable file;
According to the backup file of the original state of said executable file, generate the executable file of original state;
When with said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
Said executable file comprises: text code segment, data initializing variable section and bss uninitialized variable section;
The backup file of said original state according to said executable file, the step that generates the executable file of original state comprises:
With the backup file of the initializing variable section of original state in the said internal memory, copy to the memory address place of said initializing variable section, generate the initializing variable section of original state;
According to the memory address of uninitialized variable section, find said uninitialized variable section;
With the variable zero clearing in the said uninitialized variable section.
Said when said coprocessor when normal operating conditions switches to electricity-saving state; The power supply state that keeps said internal memory; Before the step with the backup file of the original state of reservation executable file in said internal memory, said method also comprises: judge said coprocessor keeps idle condition whether to arrive predetermined amount of time; If for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state;
Saidly judge that said coprocessor keeps idle condition whether to arrive before the step of predetermined amount of time, also comprises:
Before for the first time carrying out the executable file of original state, the memory address of record executable file;
According to the memory address of said executable file, in internal memory, back up the executable file of said original state, generate the backup file of the original state of said executable file.
The step of the memory address of said record executable file comprises:
Write down the memory address of said initializing variable section and the memory address of said uninitialized variable section respectively;
Said in internal memory the executable file of the said original state of backup, the step of backup file that generates the original state of said executable file is specially:
In internal memory, back up said initializing variable section, generate the backup file of the initializing variable section of said original state.
On the other hand, a kind of switching device shifter of mode of operation of coprocessor system is provided, said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor comprise:
Power supply unit, be used for when said coprocessor when normal operating conditions switches to electricity-saving state, keep internal memory to be in power supply state, in said internal memory, to keep the backup file of the original state of executable file; First generation unit is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state; Performance element, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
The switching device shifter of the mode of operation of described coprocessor system is characterized in that, also comprises:
Record cell is used for before carrying out the executable file of original state for the first time, the memory address of record executable file; Second generation unit is used for the executable file in the said original state of internal memory backup, generates the backup file of the original state of said executable file.
On the other hand, a kind of processor system is provided, comprises: main control processor, coprocessor and the internal memory that is connected with said coprocessor is characterized in that said main control processor comprises:
Power supply unit, be used for when said coprocessor when normal operating conditions switches to electricity-saving state, keep internal memory to be in power supply state, in said internal memory, to keep the backup file of the original state of executable file; First generation unit is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state; Performance element, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
On the other hand, a kind of changing method of mode of operation of coprocessor system is provided, said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor, and said method comprises:
When said coprocessor when electricity-saving state switches to normal operating conditions, according to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state;
Carry out the executable file of said original state.
On the other hand, a kind of switching device shifter of mode of operation of coprocessor system is provided, it is characterized in that, comprising:
Generation unit, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, according to the backup file of the original state of executable file in the internal memory, generate the executable file of original state;
Performance element is used to carry out the executable file of said original state.
On the other hand, a kind of processor system is provided, comprises: main control processor, coprocessor and the internal memory that is connected with said coprocessor, said main control processor comprises:
Generation unit, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, according to the backup file of the original state of executable file in the internal memory, generate the executable file of original state;
Performance element is used to carry out the executable file of said original state.
Embodiments of the invention have following beneficial effect:
In the such scheme, judge said coprocessor keeps idle condition whether to arrive predetermined amount of time; If for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state.Internal memory is in power supply state; The backup file that can keep the original state of executable file in the internal memory, therefore, when coprocessor when electricity-saving state switches to normal operating conditions; Need from the storer of coprocessor system, not carry code to internal memory; But in internal memory, directly obtain the executable file of original state, therefore, reduced the switching time of coprocessor.
Fig. 1 is the syndeton synoptic diagram of main control processor and coprocessor in the prior art;
Fig. 2 is the schematic flow sheet of an embodiment of the changing method of the mode of operation of the described coprocessor system of invention;
Fig. 3 is the schematic flow sheet of another embodiment of the changing method of the mode of operation of the described coprocessor system of invention;
The schematic flow sheet that Fig. 4 starts for coprocessor first;
Description of drawings
Fig. 5 switches to the schematic flow sheet of electricity-saving state from normal operating conditions for the main control processor control coprocessor;
Fig. 6 switches to the schematic flow sheet of normal operating conditions from electricity-saving state for the main control processor control coprocessor;
Fig. 7 is the structural representation of switching device shifter one embodiment of the mode of operation of coprocessor system of the present invention;
The structural representation of another embodiment of switching device shifter of the mode of operation of Fig. 8 coprocessor system of the present invention;
Fig. 9 is the structural representation of an embodiment of coprocessor system of the present invention;
Figure 10 is the schematic flow sheet of another embodiment of the changing method of the mode of operation of the described coprocessor system of invention;
Figure 11 is the schematic flow sheet of another embodiment of the changing method of the mode of operation of the described coprocessor system of invention;
Figure 12 is the structural representation of another embodiment of switching device shifter of the mode of operation of coprocessor system of the present invention;
Figure 13 is the structural representation of another embodiment of switching device shifter of the mode of operation of coprocessor system of the present invention;
Figure 14 is the structural representation of an embodiment of coprocessor system of the present invention.
For technical matters, technical scheme and advantage that embodiments of the invention will be solved is clearer, will combine accompanying drawing and specific embodiment to be described in detail below.
Embodiments of the invention in the prior art when coprocessor when electricity-saving state switches to normal operating conditions, the problem that grow the switching time of coprocessor provides a kind of switching method and apparatus and processor system of mode of operation of coprocessor system.
The present invention is used for coprocessor system, and said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor.
The present invention provides a kind of changing method of mode of operation of coprocessor system, and said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor, and said method comprises:
Embodiment
When said coprocessor when normal operating conditions switches to electricity-saving state, keep the power supply state of said internal memory, in said internal memory, to keep the backup file of the original state of executable file;
According to the backup file of the original state of said executable file, generate the executable file of original state;
When with said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
Said executable file comprises: text code segment, data initializing variable section and bss uninitialized variable section;
The backup file of said original state according to said executable file, the step that generates the executable file of original state comprises:
With the backup file of the initializing variable section of original state in the said internal memory, copy to the memory address place of said initializing variable section, generate the initializing variable section of original state;
According to the memory address of uninitialized variable section, find said uninitialized variable section;
With the variable zero clearing in the said uninitialized variable section.
Saidly judge that said coprocessor keeps idle condition whether to arrive before the step of predetermined amount of time, also comprises:
Before for the first time carrying out the executable file of original state, the memory address of record executable file;
According to the memory address of said executable file, in internal memory, back up the executable file of said original state, generate the backup file of the original state of said executable file.
The step of the memory address of said record executable file comprises:
Write down the memory address of said initializing variable section and the memory address of said uninitialized variable section respectively;
Said in internal memory the executable file of the said original state of backup, the step of backup file that generates the original state of said executable file is specially:
In internal memory, back up said initializing variable section, generate the backup file of the initializing variable section of said original state.
As shown in Figure 2, the schematic flow sheet for an embodiment of the changing method of the mode of operation of inventing described coprocessor system comprises:
Step 11 judges said coprocessor keeps idle condition whether to arrive predetermined amount of time.Predetermined amount of time can be provided with according to actual conditions, for example can be 5 seconds, when coprocessor all was in idle condition in 5 seconds, then carries out next step.
Step 12 if for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state.
Step 13 according to the backup file of the original state of executable file in the said internal memory, generates the executable file of original state.
In the such scheme, judge said coprocessor keeps idle condition whether to arrive predetermined amount of time; If for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state.Therefore; When coprocessor when electricity-saving state switches to normal operating conditions, need from the storer of coprocessor system, not carry code, but in internal memory, directly obtain the executable file of original state to internal memory; Therefore, reduced the switching time of coprocessor.
As shown in Figure 3, the schematic flow sheet for another embodiment of the changing method of the mode of operation of inventing described coprocessor system comprises:
Step 21, from storer (for example can be Nand Flash) copy to executable file in internal memory (for example can be sdram) before carrying out the executable file of original state the first time.
Wherein, executable file (for example coprocessor .bin) is by compiler the personal code work compiling to be formed.
Step 22, the memory address of record executable file; Wherein, step 22 is specially: write down the memory address of said initializing variable section and the memory address of said uninitialized variable section respectively.And the record memory address can be record start address and termination address.
Step 23, the executable file of the said original state of backup generates the backup file of the original state of said executable file in internal memory.
Said executable file comprises text code segment, data initializing variable section and bss uninitialized variable section, i.e. .text .data, three sections of .bss.The Text section is execution command; The Data section is the initialized overall situation and static variable; Bss (Block Started by Symbol) section is for to open the block of beginning by symbol.Wherein the .text section takies maximum space, and is not modified in the process of implementation, and .data section and .bss section occupation space are very little..data variable has different initial values in the section, and the variable initial value in the .bss section all is 0.
Wherein, step 23 specifically comprises: in internal memory, back up said initializing variable section, generate the backup file of the initializing variable section of said original state.
Step 24, the said coprocessor executable file that brings into operation.
Step 25 judges said coprocessor keeps idle condition whether to arrive predetermined amount of time.
Step 26 if for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state.Wherein, said coprocessor switches to electricity-saving state, can switch to off-position or low power consumpting state for coprocessor.Internal memory is in power supply state can be in the self-refresh state for internal memory, and the self-refresh state can be saved power consumption, and data in EMS memory can not lost.
Step 27 according to the backup file of the original state of executable file in the said internal memory, generates the executable file of original state; Wherein, step 27 specifically comprises: step 271, with the backup file of the initializing variable section of original state in the internal memory, copy to the memory address place of initializing variable section, and generate the initializing variable section of original state; Step 272 according to the memory address of uninitialized variable section, finds said uninitialized variable section; Step 273 is with the variable zero clearing in the said uninitialized variable section.
Step 28 judges whether said coprocessor receives the instruction of main control processor.
If step 29 is for being then said coprocessor to be switched to normal operating conditions from electricity-saving state.
Step 30 is carried out the executable file of said original state.
In the such scheme, before carrying out the executable file of original state for the first time, the executable file of said original state is backed up; Because internal memory is in power supply state, can keep the backup file of the original state of executable file, at coprocessor when normal operating conditions switches to electricity-saving state; Utilize the backup file of the original state of executable file; Generate the executable file of original state, therefore, when at coprocessor when electricity-saving state switches to normal operating conditions; Can directly carry out the executable file of original state, and not need from storer, to obtain again.
The application scenarios of changing method of the mode of operation of coprocessor system of the present invention is below described.
The schematic flow sheet that Fig. 4 starts for coprocessor first comprises:
Step 41, embedded Bootloader carries out;
Step 42, the sdram of initialization coprocessor;
Step 43, the nand flash controller of initialization coprocessor;
Step 44 is moved executable file to the sdram specified location from nand flash;
Step 45 is preserved among one section internal memory Sdram_reserved that the .data section in the executable file keeps to system;
Step 46, the start address of .data section and .bss section and termination address in the preservation executable file;
Step 47 jumps among the sdram code and begins the place and carry out, and accomplishes initial work.
Fig. 5 comprises for the main control processor control coprocessor switches to the schematic flow sheet of electricity-saving state from normal operating conditions:
Step 51, the coprocessor operation is in normal operating conditions;
Step 52, whether Baseband detects coprocessor not operation for some time;
Step 53, the break clock of arm core in the coprocessor of Baseband, the coprocessor program implementation will suspend;
Step 54, Baseband arrives system corresponding .data fragment position place with the .data section content replication of the preservation among the Sdram_reserved;
Step 55, Baseband is with the variable in the .bss section clear 0;
Step 56, Baseband configuration coprocessor register gets into the sdram self-refresh mode;
Step 57, the break power supply of arm core of Baseband;
Step 58, Baseband the break power supply and the clock of other module except that sdram in the coprocessor system.
Fig. 6 comprises for the main control processor control coprocessor switches to the schematic flow sheet of normal operating conditions from electricity-saving state:
Step 61, Baseband powers up to coprocessor, adds clock;
Step 62, Baseband configuration coprocessor starts register, discharges the reset signal;
Step 63, the sdram of coprocessor brings into operation;
The baseband order is waited for and carried out to step 64, coprocessor.
The present invention also provides a kind of switching device shifter of mode of operation of coprocessor system, and said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor, switching device shifter can be main control processor.Said switching device shifter comprises:
Power supply unit, be used for when said coprocessor when normal operating conditions switches to electricity-saving state, keep internal memory to be in power supply state, in said internal memory, to keep the backup file of the original state of executable file;
First generation unit is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state;
Performance element, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
The switching device shifter of the mode of operation of coprocessor system also comprises:
Record cell is used for before carrying out the executable file of original state for the first time, the memory address of record executable file;
Second generation unit is used for the executable file in the said original state of internal memory backup, generates the backup file of the original state of said executable file.
As shown in Figure 7, the structural representation for switching device shifter 3 one embodiment of the mode of operation of coprocessor system of the present invention comprises:
First judging unit 31 is used to judge said coprocessor keeps idle condition whether to arrive predetermined amount of time, generates first judged result;
First switch unit 32, be used for when said first judged result when being, said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state;
First generation unit 33 is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state.
In the such scheme, judge said coprocessor keeps idle condition whether to arrive predetermined amount of time; If for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state.Therefore; When coprocessor when electricity-saving state switches to normal operating conditions, need from the storer of coprocessor system, not carry code, but in internal memory, directly obtain the executable file of original state to internal memory; Therefore, reduced the switching time of coprocessor.
As shown in Figure 8, the structural representation for switching device shifter 3 another embodiment of the mode of operation of coprocessor system of the present invention also comprises:
Second judging unit 34 is used to judge whether said coprocessor receives the instruction of main control processor, generates second judged result;
Second switch unit 35, be used for when said second judged result when being, said coprocessor is switched to normal operating conditions from electricity-saving state;
Performance element 36 is used to carry out the executable file of said original state.
Record cell 37 is used for before carrying out the executable file of original state for the first time, the memory address of record executable file;
Second generation unit 38 is used for the executable file in the said original state of internal memory backup, generates the backup file of the original state of said executable file.
In the such scheme, before carrying out the executable file of original state for the first time, the executable file of said original state is backed up; Because internal memory is in power supply state, can keep the backup file of the original state of executable file, at coprocessor when normal operating conditions switches to electricity-saving state; Utilize the backup file of the original state of executable file; Generate the executable file of original state, therefore, when at coprocessor when electricity-saving state switches to normal operating conditions; Can directly carry out the executable file of original state, and not need from storer, to obtain again.
The present invention also provides a kind of processor system, comprising: main control processor, coprocessor and the internal memory that is connected with said coprocessor, and said main control processor comprises:
Power supply unit, be used for when said coprocessor when normal operating conditions switches to electricity-saving state, keep internal memory to be in power supply state, in said internal memory, to keep the backup file of the original state of executable file;
First generation unit is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state;
Performance element, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
As shown in Figure 9, the structural representation for an embodiment of coprocessor system 10 of the present invention comprises: the internal memory 60 of main control processor 40, coprocessor 50, coprocessor, and said main control processor 40 comprises:
First judging unit 41 is used to judge said coprocessor keeps idle condition whether to arrive predetermined amount of time, generates first judged result;
First switch unit 42, be used for when said first judged result when being, said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state;
First generation unit 43 is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state.
In the such scheme, judge said coprocessor keeps idle condition whether to arrive predetermined amount of time; If for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state.Therefore; When coprocessor when electricity-saving state switches to normal operating conditions, need from the storer of coprocessor system, not carry code, but in internal memory, directly obtain the executable file of original state to internal memory; Therefore, reduced the switching time of coprocessor.
The present invention also provides a kind of changing method of mode of operation of coprocessor system, and said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor, and said method comprises:
When said coprocessor when electricity-saving state switches to normal operating conditions, according to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state;
Carry out the executable file of said original state.
Shown in figure 10, the schematic flow sheet for another embodiment of the changing method of the mode of operation of inventing described coprocessor system comprises
Step 101 judges whether said coprocessor receives the instruction of main control processor;
If step 102 is for being then said coprocessor to be switched to normal operating conditions from electricity-saving state;
Step 103 according to the backup file of the original state of executable file in the said internal memory, generates the executable file of original state;
Step 104 is carried out the executable file of said original state.
In the such scheme, judge whether said coprocessor receives the instruction of main control processor; If for being then said coprocessor to be switched to normal operating conditions from electricity-saving state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state; Therefore; When coprocessor when electricity-saving state switches to normal operating conditions, need from the storer of coprocessor system, not carry code, but in internal memory, directly obtain the executable file of original state to internal memory; Therefore, reduced the switching time of coprocessor.
Shown in figure 11, the schematic flow sheet for another embodiment of the changing method of the mode of operation of inventing described coprocessor system comprises:
Step 1101, from storer (for example, can be Nand Flash) copy to executable file in internal memory (for example, can be sdram) before carrying out the executable file of original state the first time.
Step 1102, the memory address of record executable file.
Step 1103, the executable file of the said original state of backup generates the backup file of the original state of said executable file in internal memory.
Step 1104, said coprocessor is carried out the executable file of original state.
Step 1105 judges said coprocessor keeps idle condition whether to arrive predetermined amount of time.
Step 1106 if for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state, in internal memory, to keep the backup file of the original state of said executable file.
Step 1107 judges whether said coprocessor receives the instruction of main control processor.
If step 1108 is for being then said coprocessor to be switched to normal operating conditions from electricity-saving state.
Step 1109 according to the backup file of the original state of executable file in the said internal memory, generates the executable file of original state.
Step 1110 is carried out the executable file of said original state.
In the such scheme, before carrying out the executable file of original state for the first time, the executable file of said original state is backed up; Because internal memory is in power supply state; The backup file that can keep the original state of executable file when electricity-saving state switches to normal operating conditions, utilizes the backup file of the original state of executable file at coprocessor; Generate the executable file of original state; Therefore, can directly carry out the executable file of original state, and not need from storer, to obtain again.
The present invention also provides a kind of switching device shifter of mode of operation of coprocessor system, comprising:
Generation unit, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, according to the backup file of the original state of executable file in the internal memory, generate the executable file of original state;
Performance element is used to carry out the executable file of said original state.
Shown in figure 12, the structural representation for an embodiment of the switching device shifter 120 of the mode of operation of coprocessor system of the present invention comprises:
First judging unit 121 is used to judge whether said coprocessor receives the instruction of main control processor, generates first judged result;
First switch unit 122, be used for when said first judged result when being, said coprocessor is switched to normal operating conditions from electricity-saving state;
First generation unit 123 is used for the backup file according to the original state of internal memory executable file, generates the executable file of original state;
Performance element 124 is used to carry out the executable file of said original state.
In the such scheme, judge whether said coprocessor receives the instruction of main control processor; If for being then said coprocessor to be switched to normal operating conditions from electricity-saving state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state; Therefore; When coprocessor when electricity-saving state switches to normal operating conditions, need from the storer of coprocessor system, not carry code, but in internal memory, directly obtain the executable file of original state to internal memory; Therefore, reduced the switching time of coprocessor.
Shown in figure 13, the structural representation for another embodiment of the switching device shifter 120 of the mode of operation of coprocessor system of the present invention also comprises:
Second judging unit 125 is used to judge said coprocessor keeps idle condition whether to arrive predetermined amount of time, generates second judged result;
Second switch unit 126, be used for when said second judged result when being, said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state, in internal memory, to keep the backup file of the original state of said executable file.
Record cell 127, before being used for carrying out the executable file of original state for the first time, the memory address of record executable file;
Second generation unit 128 is used for the executable file in the said original state of internal memory backup, generates the backup file of the original state of said executable file.
In the such scheme, before carrying out the executable file of original state for the first time, the executable file of said original state is backed up; Because internal memory is in power supply state; The backup file that can keep the original state of executable file when electricity-saving state switches to normal operating conditions, utilizes the backup file of the original state of executable file at coprocessor; Generate the executable file of original state; Therefore, can directly carry out the executable file of original state, and not need from storer, to obtain again.
The present invention also provides a kind of processor system, comprising: main control processor, coprocessor and the internal memory that is connected with said coprocessor, and said main control processor comprises:
Generation unit, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, according to the backup file of the original state of executable file in the internal memory, generate the executable file of original state;
Performance element is used to carry out the executable file of said original state.
Shown in figure 14, the structural representation for an embodiment of coprocessor system 140 of the present invention comprises: the internal memory 143 of main control processor 141, coprocessor 142, coprocessor, and said main control processor 141 comprises:
First judging unit 1411 is used to judge whether said coprocessor receives the instruction of main control processor, generates first judged result;
First switch unit 1412, be used for when said first judged result when being, said coprocessor is switched to normal operating conditions from electricity-saving state;
First generation unit 1413 is used for the backup file according to the original state of internal memory executable file, generates the executable file of original state;
Performance element 1414 is used to carry out the executable file of said original state.
In the such scheme, judge whether said coprocessor receives the instruction of main control processor; If for being then said coprocessor to be switched to normal operating conditions from electricity-saving state; According to the backup file of the original state of executable file in the said internal memory, generate the executable file of original state; Therefore; When coprocessor when electricity-saving state switches to normal operating conditions, need from the storer of coprocessor system, not carry code, but in internal memory, directly obtain the executable file of original state to internal memory; Therefore, reduced the switching time of coprocessor.
Executable file of the present invention can be binary executable, sexadecimal executable file etc.The present invention is not only applicable to the soc harmonizing processor chip, and other processor chips of cpu kernel (core) are also arranged applicable to inside.
The present invention has saved coprocessor reads code from storer (for example nand flash) when starting process; And coprocessor visit peripheral hardware especially the speed of nand flash is very slow; So just accelerate the state exchange time of coprocessor, helped to improve the response speed of whole coprocessor system.
In the scheme of the present invention; Make coprocessor the free time, get into electricity-saving state, wake up when needing and make its operation, simultaneously to save electric weight; The internal memory that makes coprocessor (for example; Sdram) get into the executable file that needs when self-refresh is preserved the coprocessor system operation, make system be able to and the reentry mode to move, saved coprocessor is removed code from nandflash toward sdram when starting time.
The invention provides two kinds of handover schemes, a kind of handover scheme is: when operate as normal switches to electricity-saving state, according to the backup file of the executable file of original state in the internal memory of coprocessor, generate the executable file of original state at coprocessor; Another kind of handover scheme is: when electricity-saving state switches to operate as normal and switches, according to the backup file of the executable file of original state in the internal memory of coprocessor, generate the executable file of original state at coprocessor.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the read/write memory medium of a portable terminal; This program is when carrying out; Comprise step, described storage medium etc. like above-mentioned method embodiment.
The above is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle according to the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (6)

1. the changing method of the mode of operation of a coprocessor system, said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor is characterized in that said method comprises:
When said coprocessor when normal operating conditions switches to electricity-saving state, keep the power supply state of said internal memory, in said internal memory, to keep the backup file of the original state of executable file;
According to the backup file of the original state of said executable file, generate the executable file of original state;
When with said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
2. the changing method of the mode of operation of coprocessor system according to claim 1 is characterized in that, said executable file comprises: text code segment, data initializing variable section and bss uninitialized variable section;
The backup file of said original state according to said executable file, the step that generates the executable file of original state comprises:
With the backup file of the initializing variable section of original state in the said internal memory, copy to the memory address place of said initializing variable section, generate the initializing variable section of original state;
According to the memory address of uninitialized variable section, find said uninitialized variable section;
With the variable zero clearing in the said uninitialized variable section.
3. the changing method of the mode of operation of coprocessor system according to claim 2 is characterized in that,
Said when said coprocessor when normal operating conditions switches to electricity-saving state; The power supply state that keeps said internal memory; Before the step with the backup file of the original state of reservation executable file in said internal memory, said method also comprises: judge said coprocessor keeps idle condition whether to arrive predetermined amount of time; If for being, then said coprocessor is switched to electricity-saving state from normal operating conditions, and makes internal memory be in power supply state;
Saidly judge that said coprocessor keeps idle condition whether to arrive before the step of predetermined amount of time, also comprises:
Before for the first time carrying out the executable file of original state, the memory address of record executable file;
According to the memory address of said executable file, in internal memory, back up the executable file of said original state, generate the backup file of the original state of said executable file.
4. the changing method of the mode of operation of coprocessor system according to claim 3 is characterized in that, the step of the memory address of said record executable file comprises:
Write down the memory address of said initializing variable section and the memory address of said uninitialized variable section respectively;
Said in internal memory the executable file of the said original state of backup, the step of backup file that generates the original state of said executable file is specially:
In internal memory, back up said initializing variable section, generate the backup file of the initializing variable section of said original state.
5. the switching device shifter of the mode of operation of a coprocessor system, said coprocessor system comprises: coprocessor and the internal memory that is connected with said coprocessor, it is characterized in that, comprising:
Power supply unit, be used for when said coprocessor when normal operating conditions switches to electricity-saving state, keep internal memory to be in power supply state, in said internal memory, to keep the backup file of the original state of executable file;
First generation unit is used for the backup file according to the original state of said internal memory executable file, generates the executable file of original state;
Performance element, be used for when said coprocessor when electricity-saving state switches to normal operating conditions, carry out the executable file of said original state.
6. the switching device shifter of the mode of operation of coprocessor system according to claim 5 is characterized in that, also comprises:
Record cell is used for before carrying out the executable file of original state for the first time, the memory address of record executable file;
Second generation unit is used for the executable file in the said original state of internal memory backup, generates the backup file of the original state of said executable file.
CN200910237526A 2009-11-11 2009-11-11 Method and device for switching working modes of coprocessor system and processor system Expired - Fee Related CN101727160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910237526A CN101727160B (en) 2009-11-11 2009-11-11 Method and device for switching working modes of coprocessor system and processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910237526A CN101727160B (en) 2009-11-11 2009-11-11 Method and device for switching working modes of coprocessor system and processor system

Publications (2)

Publication Number Publication Date
CN101727160A CN101727160A (en) 2010-06-09
CN101727160B true CN101727160B (en) 2012-10-17

Family

ID=42448142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910237526A Expired - Fee Related CN101727160B (en) 2009-11-11 2009-11-11 Method and device for switching working modes of coprocessor system and processor system

Country Status (1)

Country Link
CN (1) CN101727160B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101950281B (en) * 2010-07-06 2015-11-25 无锡中星微电子有限公司 A kind of method and apparatus controlling coprocessor
CN101916138A (en) * 2010-08-06 2010-12-15 北京中星微电子有限公司 Method and device for switching working state and sleep state of central processing unit
CN103677867A (en) * 2012-09-05 2014-03-26 珠海扬智电子科技有限公司 Electronic device rapidly recovering starting-up state, control unit and control method of electronic device
CN105867564B (en) * 2016-03-22 2019-10-11 上海斐讯数据通信技术有限公司 Multiprocessor power-supply management system, method and intelligent terminal
CN109710321A (en) * 2018-12-14 2019-05-03 云丁网络技术(北京)有限公司 Awakening method, device and the electronic equipment of electronic equipment
CN113287081A (en) * 2018-12-14 2021-08-20 云丁网络技术(北京)有限公司 Electronic equipment control system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1467625A (en) * 2002-07-08 2004-01-14 尹启凤 Quick starting computer system
CN101312570A (en) * 2007-05-21 2008-11-26 大唐移动通信设备有限公司 Method and apparatus implementing terminal wake-up

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1467625A (en) * 2002-07-08 2004-01-14 尹启凤 Quick starting computer system
CN101312570A (en) * 2007-05-21 2008-11-26 大唐移动通信设备有限公司 Method and apparatus implementing terminal wake-up

Also Published As

Publication number Publication date
CN101727160A (en) 2010-06-09

Similar Documents

Publication Publication Date Title
US10664039B2 (en) Power efficient processor architecture
CN101727160B (en) Method and device for switching working modes of coprocessor system and processor system
CN101470509B (en) Computer system control method, computer system and notebook computer
US8762692B2 (en) Single instruction for specifying and saving a subset of registers, specifying a pointer to a work-monitoring function to be executed after waking, and entering a low-power mode
US8775836B2 (en) Method, apparatus and system to save processor state for efficient transition between processor power states
JP4515093B2 (en) CPU power-down method and apparatus therefor
KR100806284B1 (en) High Energy Efficiency Processor Using Dynamic Voltage Scaling
EP1966702A2 (en) Power partitioning memory banks
CN102495756A (en) Method and system for switching operating system between different central processing units
JP2006107507A (en) Controller of instruction word cache and instruction word conversion reference buffer, and control method thereof
US6694442B2 (en) Method for saving power in a computer by idling system controller and reducing frequency of host clock signal used by system controller
US20140013140A1 (en) Information processing apparatus and computer program product
WO2005069148A2 (en) Memory management method and related system
KR20090009018A (en) Computer having flash memory and operating method of flash memory
CN102736928B (en) Fast wake-up computer system method and computer system
KR20100072614A (en) Processor with low power
CN101950281A (en) Method and device for controlling coprocessor
CN103218031A (en) Electronic device and sleep method
CN110121688B (en) Method for judging loader and electronic system
JP2005078197A (en) Power-saving controller
US20240004454A1 (en) Control of power state in computer processor
KR101236393B1 (en) Electric device and control method thereof
CN113467597A (en) Method and medium for low power consumption standby of CPU
CN112162710A (en) Method and device for reducing chip power consumption, computer equipment and storage medium
CN117812682A (en) Method for reducing power consumption of Bluetooth chip and low-power consumption Bluetooth chip

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: WUXI VIMICRO MICROELECTRONICS CO., LTD.

Free format text: FORMER OWNER: BEIJING ZHONGXING MICROELECTRONICS CO., LTD.

Effective date: 20110527

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100083 15/F, SHINING BUILDING, NO. 35, XUEYUAN ROAD, HAIDIAN DISTRICT, BEIJING TO: 214028 610, NATIONAL INTEGRATED CIRCUIT DESIGN PARK (CHUANGYUAN BUILDING), NO. 21-1, CHANGJIANG ROAD, WUXI NEW DISTRICT, JIANGSU PROVINCE, CHINA

TA01 Transfer of patent application right

Effective date of registration: 20110527

Address after: 214028 national integrated circuit design Park, 21-1 Changjiang Road, New District, Jiangsu, Wuxi, China, 610

Applicant after: Wuxi Vimicro Co., Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor

Applicant before: Beijing Vimicro Corporation

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121017

Termination date: 20181111

CF01 Termination of patent right due to non-payment of annual fee