Background technology
Multi-mode video coding generally be directed to dissimilar and different resolution video image (visible ray, infrared and
Digital photo etc.) carry out the real-time coding of various code rate, meet the application demand of different illumination conditions and transmission bandwidth, just
Emergency processing in accident (such as vehicle accident, natural disaster etc.).Improving constantly however as system complexity,
The requirement of low-power consumption is determined pursuing high performance while by embedded system, and power consumption control becomes one needs solution
One of key issue.Power problems research worker for embedded system has been done substantial amounts of work and has obtained certain
Achievement in research, the most representational is DVFS (Dynamic voltage and frequency scaling) technology, it
Different to the demand calculating resource according to distinct program, dynamically adjust running frequency and the running voltage of processor, thus real
The now control to energy consumption.Document [1] proposes to coordinate power consumption and performance by change input voltage and clock frequency.For standard
The true power consumption efficiency describing asymmetric multinuclear flush bonding processor and extension trend, document [2] proposes a kind of novelty
Power consumption-behavior extension method, they summarize the rule of power consumption-behavior extension, be contacted by with multinuclear autgmentability by DVFS
Get up.Document [3] combines the multitask particular configuration at multinuclear processing platform, dynamically regulates the frequency of processor, reaches fall
The purpose of low-power consumption.Document [4] proposes the DVFS framework of a kind of software management based on embedded gpu, by analyzing
GPU processes the change of load thus confirms DVFS availability on GPU.
In recent years, a lot of researchs were absorbed in and were realized energy efficient, the task scheduling of this kind of power consumption sensitive by task scheduling
Adjust voltage and frequency dynamically according to different tasks, provide feasible scheme for effective energy efficient.Document [5]
In conjunction with dynamic memory management and DVFS technology, by real-time monitoring mechanism control DVFS Developing Tactics frequency and
Voltage, reduces system power dissipation.Document [6] is for ARM embedded system, it is proposed that a kind of based on the DVFS calculating density
Algorithm, the method adjusts optimum frequency according to application program to the situation of memory access.The results show the method is with existing
Embedded system in consumption control method compare there is certain advantage.When considering the execution of task in actual applications
Between suffer from the impact of the factor such as operation platform, input data set and be rendered as a kind of probability distribution, document [7] is for many
Business processor system proposes a kind of schedule by probability mode method of power consumption sensitive, and the method research is meeting certain time probability
In the case of, how to weigh power consumption and execution time.
According to current achievement in research, DVFS technology can effectively control the power consumption of embedded system, but for
For some flush bonding processor, the work clock of its part peripheral interface has processor frequencies frequency dividing to obtain, therefore
The excessive reduction of processor frequencies will affect the transmission of system normal data.The present invention is (following with TMS320C6678
It is called for short C6678) it is processing platform, when processing multi-mode video, owing to task load is different, use DVFS strategy
Can by control processor frequencies reduce power consumption, but the frequency of too much reduction C6678 will to other resources (as
EMIF interface, shared storage management etc.) produce impact, even cannot meet the demand of data transmission, ask for this
Topic, herein towards multi-mode video coding knot, in conjunction with C6678 processor characteristic and DVFS technology propose a kind of based on
The power consumption control method of task-sensitive (Task-aware Power Control Method based on DVFS,
TAPCM-DVFS)。
List of references
[1].Nakai,M.,et al.,Dynamic voltage and frequency management for a low-power
embedded microprocessor.Solid-State Circuits,IEEE Journal of,2005.40(1):p.28-35.
[2].Yoo,S.,An empirical validation of power-performance scaling:DVFS vs.multi-core
scaling in big.LITTLE processor.IEICE ELECTRONICS EXPRESS,2015.12(201502368).
[3].Li,S.and F.Broekaert,Low-power scheduling with DVFS for common RTOS on
multicore platforms.ACM SIGBED Review,2014.11(1):p.32-37.
[4].You,D.and K.Chung,Dynamic voltage and frequency scaling framework for low-power
embedded GPUs.Electronics letters,2012.48(21):p.1333-1334.
[5].Anagnostopoulos,I.,et al.,Power-Aware Dynamic Memory Management on Many-Core
Platforms Utilizing DVFS.ACM TRANSACTIONS ON EMBEDDED COMPUTING
SYSTEMS,2013.131(40).
[6].Cho,S.J.,S.H.Yun and J.W.Jeon,A powersaving DVFS algorithm based on Operational
Intensity for embedded systems.IEICE ELECTRONICS EXPRESS,2015.12(201411283).
[7]Deng Z,Zeng G and Wang W.Energy consumption analysis satisfying
time-energy-probability constraints for modern DVFS microprocessor[J].IETE Technical
Review,2015,32(4):260-272.
Summary of the invention
The technical problem to be solved: the present invention is with TMS320C6678 (hereinafter referred to as C6678) for processing
Other, towards multi-mode video coding system, will be provided by platform for the reduction operating frequency using DVFS technology too much
Source (such as EMIF interface, sharing storage management etc.) produces impact, the problem that even cannot meet the demand of data transmission,
Propose the power consumption control method that a kind of task based access control is sensitive, when the little time of task, system merit can be reduced further
Consumption.
The technology of the present invention solution: the power consumption control method that a kind of task based access control is sensitive, with TMS320C6678 process
Device is hardware platform, according to the task amount control system power consumption of multi-mode video coding, it is achieved step is as follows:
Step (1), abstract extraction multi-mode video coding parameter, video coding system needs to support L kind encoding tasks mould
Formula, every kind of mission mode uses seven tuples to describe, and i.e. i-th kind mission mode is expressed as
Mi=< hi,wi,bi,ci,fi,Ti,τi>, wherein 1≤i≤L, hi, wi, bi, ciRepresent the resolution of video respectively
Rate height, resolution width, code check, pixel bit wide, referred to as video coding parameter;fiRepresent video frame rate;TiRepresent single frames
The average long process time of Video coding, its value is determined by the video frame rate in mission mode, i.e. Ti=1/fi;τiFor
The average processor of single frame video coding processes the cycle, represents the task amount of i-th kind of pattern, in actual applications by real
The processor process cycle of Shi Tongji continuous n frame Video coding averages again;
Step (2), different according to different mode Video coding task amount, set up the processor resource of a kind of task-sensitive
Distribution model, the model describes the relation between task amount and processor working frequency and processor work check figure;
Step (3), distributes model according to the processor resource of task-sensitive, designs adaptive power eonsumption controller, logical
Cross the mission mode of real-time monitoring system, dynamically adjust processor frequencies, voltage and processor work check figure, control system
Power consumption.
In described step (2), task amount with the relation of processor working frequency is:
Wherein F is processor working frequency;
τiIt is the system real-time statistics value when task i, specific size and video coding parameter, encryption algorithm and video content
Factor is relevant;fiBeing video frame rate, its value is determined by encoding tasks pattern;η and λ is respectively the processor that user sets
Utilization rate value and range of error.
In described step (2), task amount with the relation of processor work check figure is:
Wherein NjIt is expressed as under Video coding mode based on parallel data processing, the work of DSP when forwarding task j to from task i
Make check figure;WithThe general assignment amount of processor when task i of being respectively and task j, whereinRepresent and round downwards,
1≤Nj≤ 8,1≤Ni≤ 8 and Nj, NiBelong to set of integers.
The automatic state machine model of the described adaptive power eonsumption controller in step (3), usesTable
Show, wherein:
(1) state setWherein S0State is detected in real time, in real time detection pattern switching life for event
According to command context, order, judges that entering processor process performance adjusts state, S1Show that being carrying out resource adjusts, for appointing
The mode of operation that business amount is bigger distributes more processor resource, improves processor process performance so that it is meet task needs,
S2Show that being carrying out resource adjusts, and on the basis of meeting mission requirements, reduces the process performance of processor, saves energy
Consumption;
(2) event setsx1And x2Represent that the system that detects is appointed to big from little task amount respectively
The order that business cut-to-measure is changed with system switches to little task amount from big task amount is effective, x3And x4Represent that processor performance adjusts behaviour
Complete;
(3) operational setr1And r2Show that performing processor resource adjusts operation, i.e. according to task need
Seek the process performance improving or reducing processor;
(4) state transition functionShow that controller is determined according to the type of current state and event
Fix the state at a moment;
(5) output functionShow that controller could be made that different operations under different conditions, specifically fixed
Justice is φ (S1)=r1, φ (S2)=r2。
Power eonsumption controller original state is S0, when event x1Or x2State S is entered during generation1Or S2, and make corresponding
Control dynamic r1Or r2, work as r1Or r2After execution terminates, controller automatically returns to state S0, S1And S2For momentary status,
They terminate automatically along with the end of control action, operational motion r1Represent the process performance improving processor;Operational motion
r2Represent the process performance reducing processor.
Described operational motion r1Specific operation process be:
If work at present check figure NcurWhen the check figure that works less than 8 and after adjustment is less than or equal to 8, the work check figure of DSP
N need to be adjusted toadj, the operating frequency of DSP is 800MHz;The work of DSP when check figure is more than 8 if worked after Tiao Zhenging
Check figure need to be adjusted to 8, formula (1) operating frequency obtaining DSP is adjusted to Fadj;If work at present check figure is more than
In 8 time, the work check figure of DSP is 8, formula (1) operating frequency obtaining DSP is adjusted to Fadj。
Described operational motion r2Specific operation process be:
If present operating frequency more than 800MHz and adjust after operating frequency more than or equal to 800MHz time, DSP's
Work check figure need to be adjusted to 8, formula (1) operating frequency obtaining DSP is adjusted to Fadj;If after DSP adjusts
Operating frequency less than during 800MHz by formula (2) the work check figure of DSP is adjusted to Nadj, the operating frequency of DSP is
800MHz;If present operating frequency is equal to 800MHz, formula (2) the work check figure obtaining DSP is adjusted to Nadj,
The operating frequency of DSP is 800MHz.
Present invention advantage compared with prior art is:
(1) present invention passes through analysis video encoding tasks, establishes the relational model between task amount and processor performance,
Control to improve foundation for system power dissipation.
(2) according to the difference of Video coding task amount, the dynamically operating frequency of regulation DSP and work check figure, than tradition
Use DVFS strategy only regulation processor frequencies compare can further control system power consumption.
(3) present invention realizes simply, the hardware designs that different increases are extra, and is conveniently transplanted to can dynamically regulate work
On other processors of working frequency and work check figure.
Detailed description of the invention
The power consumption control method of task based access control of the present invention sensitivity is made up of two parts: (1) is by abstract extraction multimode
Formula video coding parameter, sets up the processor resource distribution model of a kind of task-sensitive, the model describes task amount and place
Relation between reason device utilization rate, provides technical foundation for system power dissipation control method.(2) according to the place of task-sensitive
Reason device resource allocator model, designs a kind of adaptive power eonsumption controller, by the mission mode of real-time monitoring system, dynamic
State adjusts processor frequencies, voltage and processor work check figure, reaches to save the purpose of system power dissipation.
The power consumption control method of task based access control of the present invention sensitivity is specific as follows:
From the power consumption characteristics of cmos circuit, DVFS technology is used to realize the master that optimised power consumption is processor
Wanting power save mode, it reduces frequency and the voltage of little load processor within the specific limits so that meeting performance requirement
On the basis of, reduce energy consumption.The embedded multi-core processor that TMS320C6678 saves as frequency-adjustable, can be by reducing
Processor frequencies and minimizing work check figure reduce power consumption of processing unit.It is as shown in the table, at the average utilization processing core is
80%, operating temperature is 50 DEG C, under conditions of only opening DDR3 controller, SRIO and sharing storage resource,
The performance of TMS320C6678 processor difference dominant frequency condition, power dissipation ratio are relatively.
The performance of table 1 C6678 processor difference dominant frequency condition and power consumption
Therefore, the present invention combines the task amount of different disposal pattern and dynamically adjusts the frequency of DSP and the nuclear volume that works, and is expiring
On the basis of foot task processing requirements, it is to avoid DSP utilization rate is the least and the power wastage that causes, it is achieved reduce system power dissipation
Target.
As it is shown in figure 1, the present invention is with TMS320C6678 as hardware platform, according to the task amount of multi-mode video coding
Control system power consumption, is embodied as follows:
The first step, multi-mode task description
It is assumed for convenience of description that video coding system needs to support L kind encoding tasks pattern, every kind of mission mode can be used
One seven tuple describes, and i.e. i-th (1≤i≤L) plants mission mode and be represented by
Mi=< hi,wi,bi,ci,fi,Ti,τi>, wherein hi, wi, bi, ciRepresent respectively video resolution (high, wide),
Code check, pixel bit wide, this article is called video coding parameter;fiRepresent video frame rate;TiRepresent single frame video coding
The average long process time, its value is determined by the video frame rate in mission mode, i.e. Ti=1/fi;τiCompile for single frame video
The average DSP of code processes the cycle, can represent the task amount of i-th kind of pattern, in actual applications by real-time statistics even
The DSP process cycle of continuous n frame Video coding averages again.Notice that the value of n can affect statistical accuracy and configuration
The time delay adjusted, needs to carry out compromise process.For from little task amount tupe to the adjustment of big task amount tupe,
In order to avoid the overweight problem of system load caused because of statistics task amount, in actual applications, can be by this case
System configuration be first adjusted to peak performance, on the basis of ensureing systemic-function and performance, then carry out configuration and adjust.
On the basis of obtaining task amount, the average handling time t of single frame video coding in i-th kind of patterniIt is represented by:
Wherein F is the operating frequency of DSP.
Second step, the resource distribution model of task-sensitive
Assume that the utilization rate of DSP is η within the execution cycle of task ii, convolution (3) can have:
Wherein τiIt is system real-time statistics value, the factor such as specific size and video coding parameter, encryption algorithm and video content
Relevant;fiBeing video frame rate, its value is determined by encoding tasks pattern.Utilization rate η of DSP is understood by formula (4)iWith DSP
Dominant frequency between inversely.In actual applications, owing to video content is continually changing, can in conjunction with Video coding principle
Knowing, the process cycle that the more violent video that moves is consumed is more, i.e. task amount is relatively big, and the video consumption moving mild
The process cycle less, i.e. task amount is less, and therefore under same video task pattern, the utilization rate of DSP is not one
Fixing value.The power wastage caused in order to avoid DSP utilization rate is the lowest, needs dynamically to adjust according to the change of task amount
Its utilization rate is controlled in a metastable scope by joint DSP process performance, it may be assumed that | ηi-η |≤λ, wherein η and λ divides
The DSP utilization rate value not set for user and range of error.In order to ensure to meet the demand of all tasks, can be according to maximum
Task load set η and λ.Therefore can have:
Can be obtained by formula (5):
Result of calculation according to formula (6) selects the dominant frequency of DSP to be adjusted from table, processes merit to meet task
Can, if there being multiple qualified DSP dominant frequency, then select bigger being adjusted.
According to circuit dynamic power consumption characteristic, when task i of execution, the dominant frequency of DSP is the biggest, and its power consumption is the highest, instead
As the same.But, when the dominant frequency of DSP is 800MHz, if the utilization rate of DSP is the most too small, it is contemplated that right
The quantity of processor work core is adjusted, and i.e. reduces system power dissipation further by close portion divisional processing core.Due to DSP
The change of work nuclear volume can affect the handling process of algorithm, therefore to reduce power consumption control method complexity as far as possible, under
It is video coding algorithm based on data parallel that face work core adjusts the foundation of model.
Under Video coding mode based on parallel data processing, video data is by the quantity according to polycaryon processor work core
Video is divided into corresponding data block be assigned to each process core encode.It is assumed that within the execution cycle of task i
Utilization rate η of DSPiMeet | ηi-η | work check figure during≤λ condition is Ni(1≤Ni≤ 8), each work core appoint
Business amount isThen general assignment amountWhen mission mode is adjusted to task j, the task of each work core
Amount is(assume), then on the basis of meeting Video coding mission requirements, in order to reduce DSP further
The power consumption penalty that free time causes, can adjust the work check figure of DSP so that the utilization of DSP according to the change of task amount
Rate ηjAppoint and so meet | ηj-η|≤λ。
Because TMS320C6678 is isomorphism polycaryon processor, the performance of each work core is identical, and based on data
Under parallel Video coding processing mode, the data volume distributing to each work core is essentially identical, therefore holding in task i
The average task amount of each core in line periodWhen mission mode is adjusted to j by i, the total of DSP appoints
Business amount reduced valueSo the work check figure that can reduce isWhereinRepresent to
Under round.So in sum, when mission mode is j, DSP works check figure NjFor:
Wherein 1≤Nj≤ 8,1≤Ni≤ 8 and Nj, NiBelong to set of integers.From formula (7), by adjusting
The work nuclear volume of DSP can change the utilization rate of DSP.ηjCan be obtained by formula (4), in actual applications, in order to
After ensureing to adjust, the process performance of DSP can meet the demand of systemic-function, selects to meet in feasible solution
|ηj-η | the maximum functional check figure under the conditions of≤λ.
3rd step, its design of task-sensitive power consumption control
In order to realize automatically controlling of system power dissipation, need to combine the Video coding of different mode and power consumption control modelling
One self-adapted power consumption controller, can be with real-time monitoring system mission mode by this controller, and according to different mode
Mission requirements dynamically adjust DSP frequency and work nuclear volume, reduce the purpose of power consumption.Controller automatic state machine mould
Type is as in figure 2 it is shown, can useRepresent.Specific as follows:
1) state setWherein S0Detect state for event in real time, detect mode handover command in real time,
Judge that entering DSP process performance adjusts state according to command context.S1Show that being carrying out resource adjusts, for task amount
Bigger mode of operation distributes more DSP resource, improves DSP process performance so that it is meet task needs.S2Table
The bright resource that is carrying out adjusts, and on the basis of meeting mission requirements, reduces the process performance of DSP, saves energy consumption;
2) event setsx1And x2Respectively represent detect system from little task amount to big task
The order that cut-to-measure is changed with system switches to little task amount from big task amount is effective.x3And x4Represent the operation of DSP adjusting performance
Complete;
3) operational setr1And r2Show that performing DSP resource adjusts operation, i.e. comes according to mission requirements
Improve or reduce the process performance of DSP;
4) state transition functionShow controller according to the type decided of current state and event next
The state carved;
5) output functionShow that controller could be made that different operations under different conditions, be specifically defined as
φ(S1)=r1, φ (S2)=r2。
The state of automata machine model of Fig. 1 controller, power eonsumption controller original state is S0, when event x1(or x2)
State S is entered during generation1(or S2), and make the dynamic r of corresponding control1(or r2).Work as r1(or r2) perform knot
Shu Hou, controller automatically returns to state S0。S1And S2For momentary status, they are tied automatically along with the end of control action
Bundle.
Operational motion r1Represent the process performance improving DSP, as shown in Figure 3;Operational motion r2Represent the place reducing DSP
Rationality energy, as shown in Figure 4.It is described in detail below.
Experimental comparison and interpretation of result
1) experimental program
In conjunction with the mission requirements of multi-mode real time video coding systems, its conventional mode of operation includes 7 kinds, i.e. L=7.
Specific tasks attribute description is as shown in table 2.Under high definition visible light video real time processing conditions, owing to needing to be processed regarding
Frequency amount is maximum, so on the basis of using identical encryption algorithm, it is desirable to the process performance of DSP is the highest.Video coding
Task amount τiNeed to be obtained by system test, in the present invention by the DSP of the continuous 50 frame Video codings of real-time statistics
The process cycle averages again.
Table 2 multi-mode Video Coding task attribute describes
As shown in Table 2, according to different mission modes, in conjunction with C6678 optimised power consumption characteristic, task treatability is being met
On the basis of energy, power consumption control can be carried out by two ways: first, when performing task, detection DSP state in real time,
When it is idle, reduce frequency and the resource distribution of DSP;Second, different according to mission mode, dynamically adjust DSP
Frequency and resource distribution, improve DSP utilization rate, it is to avoid idle condition.Analyzing theoretically, both modes can
Control DSP power consumption.But when concrete operations, decision processor duty transfer point is power consumption control method accurately
The key effectively realized.For first kind of way, the DSP free time generally occurs in frame data and has processed and next frame
Between starting to process, due to during this period of time at Millisecond, and frequently occur, if adjusting DSP frequency and money frequently
Source can introduce the most extra expense, and therefore first kind of way is impracticable in engineering design;For the second way, only
Have the adjustment carrying out DSP frequency when mission mode switches because the execution cycle of every kind of mission mode is long, short then
A few minutes, long then several hours, and task switching realized by control command, the time point of switching easily determines,
Convenient to operate, therefore select the second processing mode proper.
Experiment porch selects multi-mode Video Coding based on C6678 autonomous Design to process plate, builds special test
Environment, sets up multi-mode video picture coding as shown in Figure 5 and processes plate experiment porch.This platform include special transmission board,
Multi-mode Video Coding processes plate and receives plate, and the most special transmission board sends the video data of different mode in real time,
Multi-mode Video Coding processes plate Real-time Collection video data and carries out coded treatment, is finally passed by the code stream after coding
Enter to receive plate and be decoded display.When carrying out multi-mode Video Coding and processing plate design, the power supply of C6678 selects
The UCD series of power managing chip of TI is controlled and monitors in real time, so the power consumption measuring DSP can be with the use of
The Fusion Digital Power Designer software of PMBus interface facility and TI completes.
2) interpretation
The major parameter of every kind of mission mode includes video resolution, frame per second, pixel bit wide and code check etc..Coded treatment is adopted
With up-to-date HEVC video coding algorithm, perform on C6678 after optimizing.In order to verify the power consumption that this article proposes
The effect of control method, under the same conditions, respectively to not using power consumption control method, using DVFS method and use
This article method is tested, and table 3 is the experimental result without and with DVFS power consumption control method, and table 4 is for using
The experimental result of the power consumption control method of this article.According to experimental evaluation, set η and λ difference 0.7 and 0.1.
From experimental result, when not using power consumption control method, average power consumption produced by different task pattern also has
Institute is different, and as when carrying out HD video coding, power consumption is the highest.When system just powers up, without task status power consumption
Low, the average power consumption of remaining several mission mode is also not quite similar, but is totally more or less the same, and main reason is that CMOS
The dynamic power consumption of circuit is relevant with the number of times of level upset in circuit, when lacking without task or need data volume to be processed, and DSP
Load will be little, so the power consumption produced is relatively low.For using the experimental result of power consumption control method, it can be seen that its merit
Consumption substantially reduces, and under without task status, uses TAPCM-DVFS method in this paper, by dsp processor core
Closing, decrease system idle condition to the full extent, its average power consumption reduces 47.1% when controlling than idle.?
Process minimum load mission mode M7Time power dissipation ratio process maximum load mission mode M2Power consumption save 37%.No
When considering without mission mode, idle control method and the TAPCM-DVFS power consumption control method used herein, process
The average energy consumption of single frame video saves 23.7%.The power consumption control method processor frequencies using DVFS strategy is 800MHz
Above, and need work check figure be at full capacity time with this article method there is close effect.But it is as load further
Reduce, be not easy to regulating frequency again due to C6678, and now use method minimizing work check figure that this invention proposes with
Reduce system power dissipation further.
Table 3 is without and with DVFS power consumption control method experimental result
Table 4 uses the power consumption control method experimental result of TAPCM-DVFS
There is provided above example to be only used to describe the purpose of the present invention, and be not intended to limit the scope of the present invention.This
Bright scope is defined by the following claims.Various equivalents made without departing from spirit and principles of the present invention and repairing
Change, all should contain within the scope of the present invention.