CN105306075B - A kind of three value FPRM circuit power consumption optimum polarity search methods - Google Patents

A kind of three value FPRM circuit power consumption optimum polarity search methods Download PDF

Info

Publication number
CN105306075B
CN105306075B CN201510532191.0A CN201510532191A CN105306075B CN 105306075 B CN105306075 B CN 105306075B CN 201510532191 A CN201510532191 A CN 201510532191A CN 105306075 B CN105306075 B CN 105306075B
Authority
CN
China
Prior art keywords
input
individual
mould
fitness
polarity
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.)
Active
Application number
CN201510532191.0A
Other languages
Chinese (zh)
Other versions
CN105306075A (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.)
Ningbo University
Original Assignee
Ningbo University
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 Ningbo University filed Critical Ningbo University
Priority to CN201510532191.0A priority Critical patent/CN105306075B/en
Publication of CN105306075A publication Critical patent/CN105306075A/en
Application granted granted Critical
Publication of CN105306075B publication Critical patent/CN105306075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of three value FPRM circuit power consumption optimum polarity search methods, three value FPRM logical functions under p polarity are used to be indicated in three value FPRM circuits first, then the multi-input operational contained in three value FPRM logical functions is decomposed, the multiple two input moulds 3 plus door and multiple two inputs moulds 3 obtained under p polarity multiply door, the two input Jia Men of mould 3 and two input moulds 3 are multiplied into power consumption caused by door as the power consumption of three value FPRM circuits under p polarity, build the power estim ation model for obtaining three value FPRM circuits, power consumption optimum polarity search is finally carried out to three value FPRM circuits using Genetic Simulated Annealing Algorithm, obtain the search of power consumption optimum polarity and minimum power consumption;Advantage is to realize that three value FPRM circuit power consumptions optimum polarities are searched for, so as to realize that three value FPRM circuit power consumptions optimize;Random to carry out simulating, verifying using 13 MCNC Benchmark circuits, power consumption optimum polarity and 0 Polarity comparision that the present invention is searched, mould 3 plus door quantity averagely save 57.64%, and mould 3 multiplies a quantity and averagely saves 46.25%, and power consumption averagely saves 73.98%.

Description

A kind of three value FPRM circuit power consumption optimum polarity search methods
Technical field
The present invention relates to a kind of three value FPRM circuit power consumption optimization methods, more particularly, to a kind of three value FPRM circuit power consumptions Optimum polarity search method.
Background technology
With continuing to develop for footprint and integrated level, digital circuit inherently meets with power consumption, area and speed The problems such as.Traditional digital circuit mostly uses two-valued function, but low turn into of binary signal information content restricts integrated electricity The principal element of road development.And MULTI-VALUED LOGIC CIRCUIT adds the ability that single line carries information, space or time can be effectively improved Utilization rate, reduce the line of digital display circuit, save circuit area and cost.The three-valued logic that radix is 3 is in multi valued logic generation Radix is minimum in number system, easily realizes, representative.
Any logical function can be represented with Boolean logic and Reed-Muller (RM) logics, with traditional boolean Logic circuit is compared, and the circuit based on RM logics has the advantage in terms of three below:First, in some functional circuits (as led to Believe circuit, parity checker, computing circuit etc.) in, with the circuit of RM logical expressions in terms of power consumption, area and speed body Big advantage is revealed;Secondly, it is strong with the circuit measurability of RM logical expressions;Finally, with the circuit structure of RM logical expressions It is compacter.RM logical functions are generally using fixed polarity (Fixed-polarity Reed-Muller, FPRM) and mixing pole Property (Mixed-polarity Reed-Muller, MPRM) two kinds of expression ways.Have in three value FPRM logical functions of n variables 3nIndividual fixed polarity, 3nIndividual fixed polarity is to that should have 3nIndividual three different value FPRM expression formulas, three value FPRM expression formulas it is simple with It is no to be determined by its corresponding polarity, and the whether simple power consumption for directly determining three value FPRM circuits of three value FPRM expression formulas and The performance indications such as area, therefore, polarity have a huge impact to performance indications such as power consumption, the areas of FPRM circuits.
Due to multi valued logic and the plurality of advantages of RM logics, domestic and international many experts and scholars are ground to multivalue RM logics Study carefully.But experts and scholars mainly concentrate research multivalue RM logic circuit polarity conversion technologies both at home and abroad, for multivalue RM circuits Low power technology is not studied.In view of this, based on Genetic Simulated Annealing Algorithm, a kind of three value FPRM circuit power consumptions of design are optimal Polarity search method searches for the power consumption optimum polarity of three value FPRM circuits, has important meaning to the optimization of three value FPRM circuit power consumptions Justice.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of three value FPRM circuit power consumption optimum polarity search methods.Should Method can be with fast search to power consumption optimum polarity, so as to realize the optimization of power consumption.
The present invention solve the technical scheme that is used of above-mentioned technical problem for:A kind of three value FPRM circuit power consumption optimum polarities Searching method, comprises the following steps:
1. the power estim ation model of three value FPRM circuits is set up:
1. -1 three value FPRM circuits are expressed as form using three value FPRM logical functions:
Wherein, n is function fp(xn-1,xn-2,…,x0) input variable quantity, xn-1,xn-2,…,x0Representative function fp (xn-1,xn-2,…,x0) n input variable, p representative functions fp(xn-1,xn-2,…,x0) polarity, polarity p ternary shapes Formula is expressed as pn-1pn-2…p0, pj∈ { 0,1,2 }, j=0,1,2 ..., n-1,Mould 3 plus computing are represented, ∑ is summation sign, symbol Number " * " is multiplication symbol, subscript i=0,1,2 ..., 3n- 1, i are expressed as i with ternary formn-1in-2…i0, aiFor FPRM Coefficient;ai∈{0,1,2};∏ represents the multiplication of mould 3,Its expansion be:Wherein ij∈{0, 1,2},Polarity p and subscript i decision variablesRepresentation;
1. three value FPRM logical functions under -2p polarity include two class multi-input operationals, and two class multi-input operationals are respectively Multi input mould 3 plus computing and the multiplication of multi input mould 3, according to three value FPRM logical functions expansions by three value FPRM logical functions Multiple multi input moulds 3 plus computing and multiple multiplications of multi input mould 3 are decomposed into, then each multi-input operational is separately disassembled into Two input computings, obtain two input moulds 3 plus computing and the two input multiplications of mould 3, and specific decomposable process is:
It regard the 1st input variable and the 2nd input variable of multi-input operational as first two input computing two Input variable, obtains the output variable of first two input computing;The output variable and multi input for inputting computing by first two 3rd input variable of computing obtains second two and inputs computing as two input variables of second two input computing Output variable;The output variable and the 4th input variable of multi-input operational for inputting computing using second two are used as the 3rd two Two input variables of computing are inputted, the output variable of the 3rd two input computing is obtained;The rest may be inferred, until all how defeated Enter the input variable of computing as the input variable of two input computings, complete the decomposition of multi-input operational;
Multiple multi input moulds 3 plus computing and multiple multi inputs will be obtained after three value FPRM Logic function decompositions under p polarity The multiplication of mould 3, multi input mould 3 plus computing are also referred to as multi input mould 3 plus door, and the multiplication of multi input mould 3 is also referred to as multi input mould 3 and multiplied Door, N is designated as by the quantity of the multi input mould 3 after three value FPRM Logic function decompositions under p polarity plus door, by three value under p polarity The quantity that multi input mould 3 after FPRM Logic function decompositions multiplies door is designated as W;Obtained after each multi input mould 3 plus computing are decomposed Multiple two input moulds 3 plus computing, obtain multiple two inputs multiplications of mould 3, two inputs after each multiplication of multi input mould 3 is decomposed Mould 3 plus computing are also referred to as two input moulds 3 plus door, and the two input multiplications of mould 3 are also referred to as two input moulds 3 and multiply door;By the H multi input Two input moulds 3 after mould 3 plus door are decomposed add the quantity of door to be designated as NH, H=1,2 ..., N;O-th of multi input mould 3 is multiplied into a decomposition The quantity that two input moulds 3 afterwards multiply door is designated as Wo, o=1,2 ..., W;
1. -3 the Jia Men of mould 3 and two inputs are inputted by obtained after three value FPRM Logic function decompositions under p polarity all two Mould 3 multiplies power consumption caused by door as the power consumption of three value FPRM circuits under p polarity, and two input moulds 3 plus power consumption caused by door are used Its switch activity represents that two input moulds 3 are multiplied power consumption caused by door and represented using its switch activity, the switch activity of gate circuit Property represented with the output variable probability of its output end, two input moulds 3 plus power consumption caused by door use its output end output variable Probability represents that two input moulds 3 are multiplied power consumption caused by door and represented using the output variable probability of its output end;
1. -4 k-th two input moulds 3 after the H multi input mould 3 plus door decomposition are calculated according to formula (2), (3) and (4) Plus the output variable probability of door;K=1,2 ..., NH
P1(k)H=Pky11*Pky20+Pky10*Pky21+Pky12*Pky22 (2)
P2(k)H=Pky12*Pky20+Pky11*Pky21+Pky10*Pky22 (3)
P0(k)H=1-P1(k)H-P2(k)H (4)
Multiply g-th two input moulds 3 after a decomposition according to formula (5), (6) and (7) o-th of multi input mould 3 of calculating and multiply door Output variable probability, g=1,2 ..., Wo
Q1(g)o=Qgr11*Qgr21+Qgr12*Qgr22 (5)
Q2(g)o=Qgr11*Qgr22+Qgr12*Qgr21 (6)
Q0(g)o=1-Q1(g)o-Q2(g)o (7)
Wherein, P1(k)HRepresent that k-th two input moulds 3 plus door output variable after the H multi input mould 3 plus door decomposition are 1 Probability, P2(k)HRepresent the H multi input mould 3 plus door decompose after k-th two input moulds 3 plus door output variable for 2 it is general Rate, P0(k)HRepresent k-th two input moulds 3 after the H multi input mould 3 plus door decomposition plus the probability that door output variable is 0, y1 Represent two input variables of two input moulds 3 plus door with y2, m ∈ { 0,1,2 }, as k=1, Pky1mFor multi input mould 3 plus computing The 1st input variable be m probability, Pky2mThe probability for being m for the 2nd input variable of multi input mould 3 plus computing, works as k>1 When, Pky1mThe probability that mould 3 plus door output variable are m, Pk are inputted for kth -1 twoy2mKth+1 for multi input mould 3 plus door is defeated Enter the probability that variable is m;
Q1(g)oRepresent o-th of multi input mould 3 multiply g-th two input moulds 3 after decomposing multiply an output variable for 1 it is general Rate, Q2(g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 2, Q0 (g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 0, r1 and r2 Represent that two input two input variables that mould 3 multiplies door;As g=1, Qgr1mFor the 1st input variable of the multiplication of multi input mould 3 For m probability, Qgr2mThe probability for being m for the 2nd input variable of the multiplication of multi input mould 3, works as g>When 1, Qgr1mFor g-1 Two input moulds 3 multiply the probability that an output variable is m, Qgr2mMultiply the probability that the g+1 input variable of door is m for multi input mould 3;
Input variable xjFor 1 and 2 probability be by function immediately produce probability to (P1, P2), P0=1-P1-P2;P0, P1 and P2 are respectively some value between 0 to 1, and P0 represents the probability that input variable is 0, and P1 represents the probability that input variable is 1, P2 Represent the probability that input variable is 2;
1. -5 the output variable probability calculation that moulds 3 multiply door is inputted according to two input moulds 3 plus the output variable probability of door and two The power consumption of three value FPRM circuits, the power estim ation model of three value FPRM circuits is expressed as:
Wherein, EswdThe power consumption of three value FPRM circuits under p polarity is represented, N is three value FPRM Logic function decompositions under p polarity Multi input mould 3 afterwards plus the quantity of door, W multiply the number of door for the multi input mould 3 after three value FPRM Logic function decompositions under p polarity Amount;
2. it is used for the fitness function for calculating individual adaptation degree in setting Genetic Simulated Annealing Algorithm:
According to power estim ation model, the fitness function of individual adaptation degree is calculated in setting Genetic Simulated Annealing Algorithm: In Genetic Simulated Annealing Algorithm, fitness is bigger, and the adaptability for representing individual is stronger, but power consumption optimum polarity requires that power consumption is got over It is small better, therefore, combined for the ease of both, reciprocal using power consumption represents fitness, obtains fitness function as follows:
Fitness=α/Eswd
Wherein, symbol "/" represents division operation symbol, and fitness represents the fitness size of individual;EswdIndication circuit work( Consumption;α is amplification coefficient, and value is the natural number more than or equal to 1000;
3. three value FPRM circuits and the corresponding relation of Genetic Simulated Annealing Algorithm are set up:
Genetic Simulated Annealing Algorithm includes following key element:Maximum of individual, the fitness of individual, fitness Body, maximum adaptation degree, crossover operation, mutation operation, annealing selection operation;
The optimization of three value FPRM circuit power consumptions includes following key element:Polarity, the power consumption of corresponding polarity, optimal pole Property, the exchange of minimum power consumption, polarity, polarity mutation, reversal;
Individual is mapped to the optimization of three value FPRM circuit power consumptions, polarity is expressed as;The fitness of individual is mapped to three values FPRM circuit power consumptions optimize, and are expressed as the power consumption of corresponding polarity;The maximum individual of fitness is mapped to three value FPRM circuit work( Consumption optimization, is expressed as optimum polarity;Maximum adaptation degree is mapped to the optimization of three value FPRM circuit power consumptions, minimum power consumption is expressed as; Crossover operation is mapped to the optimization of three value FPRM circuit power consumptions, polarity exchange is expressed as;Mutation operation is mapped to three value FPRM Circuit power consumption optimizes, and is expressed as polarity mutation;Annealing selection operation is mapped to the optimization of three value FPRM circuit power consumptions, pole is expressed as Property conversion;
4. Genetic Simulated Annealing Algorithm relevant parameter is set:
Genetic Simulated Annealing Algorithm need to set 4 parameters:Individual scale w, individual iterations z, gene mutation probability q, Initial temperature T0;The individual scale w=50 of order, individual iterations z=20, gene mutation probability q=0.01, initial temperature T0= 100℃;
5. the maximum individual of fitness and maximum adaptation degree are obtained using Genetic Simulated Annealing Algorithm, fitness maximum individual is For the power consumption optimum polarity of three value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
5. middle use Genetic Simulated Annealing Algorithm obtains the maximum individual tool with maximum adaptation degree of fitness to described step Body process is:
5. -1 the w individuals represented with n ternarys are produced with random function rand (), w individual are designated as P1 respectively, P2 ..., Pw;
5. -2 fitness for calculating v-th of individual Pv by fitness function, v=1,2,3 ..., w obtain individual P1, P2 ..., Pw fitness;
5. -3 compare individual P1, and P2 ..., Pw fitness filters out the maximum individual of fitness maximum as fitness Individual, the maximum individual of record fitness and maximum adaptation degree;
5. -4 couples of individuals P1, P2 ..., Pw carry out crossover operation generation individual F1, F2 ..., Fw:If w is even number, by P1 and P2, P3 and P4 ..., Pw-1 and Pw carry out crossover operation respectively two-by-two;If w be odd number, by P1 and P2, P3 and P4 ..., Pw-2 and Pw-1 carries out crossover operation respectively two-by-two, and Pw is not involved in crossover operation, and Fw directly inherits Pw;Two individual Pe and Pu are intersected Operation produces individual Fe and Fu, and detailed process is:The individual Pe for carrying out crossover operation is assigned to fe, individual Pu is assigned to fu, A n binary codes are randomly generated, the n binary code is designated as A, fe and fu is updated according to binary code A, works as binary system When h of code A are 1, fe h holdings are constant, and fu h holdings are constant;When h of binary code A being 0, H of fe h succession fu, h of fu h succession fe, h=1,2,3 ..., n, after the completion of crossover operation The fu that are designated as after the completion of Fe, crossover operation of fe be designated as Fu;Wherein u=e+1, when w is even number, e=1,3,5 ..., w-1;u =2,4,6 ..., w;When w is odd number, e=1,3,5 ..., w-2;U=2,4,6 ..., w-1;
5. -5 by fitness function calculate v-th of individual Fv fitness, obtain individual F1, F2 ..., Fw adaptation Degree;
5. -6 individual F1, F2 ..., Fw fitness and the maximum individual fitness of current fitness are compared, more The new maximum individual of fitness and maximum adaptation degree;
5. -7 individual F1, F2 ..., Fw are subjected to mutation operation:To Fv each with random function rand () produce Value between one 0 to 1, if this value is less than gene mutation probability q, the corresponding position of this value is exactly Fv change dystopy, right Fv change dystopy is made a variation, and variation rule is " 0 → 1,1 → 2,2 → 0 ";
5. -8 according to step 5. -5~5. -6 couples of individual F1, F2 ..., Fw processing, the fitness after being updated is most Big individual and maximum adaptation degree;
5. -9 according to the size of fitness value to individual P1, P2 ..., Pw is ranked up, according to the size pair of fitness value Individual F1, F2 ..., Fw are ranked up;Fitness value is each selected in individual P1, P2 ..., Pw and individual F1, F2 ..., Fw 2w/3 optimal individual, constitutes one group of new individual, and new individual contains 4w/3 individual;
5. -10 pairs one group new individual carries out many wheel annealing selections:In each round annealing selection, first according to formula (9) An annealing temperature is produced, for the annealing temperature, probability P (c) is selected by what formula (10) calculated each individual successively, together When produce a screening probability t, 0 with random function rand ()<t<1;When individual when being selected probability more than screening probability, The individual is chosen in this wheel annealing selection, and selected individual is no longer participate in next round annealing selection, and other are not chosen The individual selected enters next round annealing selection, is updated until filtering out w individual after individual P1, P2 ..., Pw, annealing selection knot Beam;
Tl=1/ln (l/T0+1) (9)
Wherein, TlRepresent the annealing temperature of l wheels, l=1,2 ...;During first round annealing selection, l=1, the second wheel annealing During selection, l=2, by that analogy;Ln represents log operations;T0Represent initial temperature;P (c) represents individual c probability;F (c) tables Show the fitness value of c-th of individual in new individual;C=1,2,3 ..., 4w/3;D-th of individual in the new individual of f (d) expressions Fitness value;D=1,2,3 ..., 4w/3;
5. -11 according to step 5. -2~individual P1 after 5. 5. -3 pairs of steps are updated in -10, P2 ..., Pw processing, Obtain the maximum individual of fitness and maximum adaptation degree;
5. -12 repeat steps 5. -4~5. -11, until meeting individual iterations z, algorithm terminates, and obtains fitness most Big individual and maximum adaptation degree;
5. the maximum individual of -13 fitness for obtaining last time and maximum adaptation degree are exported, and fitness maximum individual is For the optimum polarity of three value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
Compared with prior art, the advantage of the invention is that three value FPRM circuits are used into three values under p polarity first FPRM logical functions are indicated, and are then decomposed the three input computings contained in three value FPRM logical functions, are obtained under p polarity Multiple two input moulds 3 plus door and multiple two inputs moulds 3 multiply door, and the two input Jia Men of mould 3 and two input moulds 3 are multiplied into power consumption caused by door As the power consumption of three value FPRM circuits under p polarity, the power estim ation model for obtaining three value FPRM circuits is built, finally using mould Intend Annealing-Genetic Algorithm and power consumption optimum polarity search is carried out to three value FPRM circuits, obtain the search of power consumption optimum polarity and least work Consumption;The power estim ation models coupling Genetic Simulated Annealing Algorithms of the method three value FPRM circuits that pass through foundation of the present invention is realized Three value FPRM circuit power consumptions optimum polarities are searched for, so as to realize the optimised power consumption of three value FPRM circuits;It is random to use 13 MCNC Benchmark circuits carry out simulating, verifying, and power consumption optimum polarity and 0 Polarity comparision that the present invention is searched, mould 3 plus door quantity are put down 57.64% is saved, mould 3 multiplies a quantity and averagely saves 46.25%, and power consumption averagely saves 73.98%.
Embodiment
The present invention is described in further detail with reference to embodiments.
Embodiment one:A kind of three value FPRM circuit power consumption optimum polarity search methods, comprise the following steps:
1. the power estim ation model of three value FPRM circuits is set up:
1. -1 three value FPRM circuits are expressed as form using three value FPRM logical functions:
Wherein, n is function fp(xn-1,xn-2,…,x0) input variable quantity, xn-1,xn-2,…,x0Representative function fp (xn-1,xn-2,…,x0) n input variable, p representative functions fp(xn-1,xn-2,…,x0) polarity, polarity p ternary shapes Formula is expressed as pn-1pn-2…p0, pj∈ { 0,1,2 }, j=0,1,2 ..., n-1,Mould 3 plus computing are represented, ∑ is summation sign, symbol Number " * " is multiplication symbol, subscript i=0,1,2 ..., 3n- 1, i are expressed as i with ternary formn-1in-2…i0, aiFor FPRM Coefficient;ai∈{0,1,2};∏ represents the multiplication of mould 3,Its expansion be:Wherein ij∈{0, 1,2},Polarity p and subscript i decision variablesRepresentation;
1. three value FPRM logical functions under -2p polarity include two class multi-input operationals, and two class multi-input operationals are respectively Multi input mould 3 plus computing and the multiplication of multi input mould 3, according to three value FPRM logical functions expansions by three value FPRM logical functions Multiple multi input moulds 3 plus computing and multiple multiplications of multi input mould 3 are decomposed into, then each multi-input operational is separately disassembled into Two input computings, obtain two input moulds 3 plus computing and the two input multiplications of mould 3, and specific decomposable process is:
It regard the 1st input variable and the 2nd input variable of multi-input operational as first two input computing two Input variable, obtains the output variable of first two input computing;The output variable and multi input for inputting computing by first two 3rd input variable of computing obtains second two and inputs computing as two input variables of second two input computing Output variable;The output variable and the 4th input variable of multi-input operational for inputting computing using second two are used as the 3rd two Two input variables of computing are inputted, the output variable of the 3rd two input computing is obtained;The rest may be inferred, until all how defeated Enter the input variable of computing as the input variable of two input computings, complete the decomposition of multi-input operational;
Multiple multi input moulds 3 plus computing and multiple multi inputs will be obtained after three value FPRM Logic function decompositions under p polarity The multiplication of mould 3, multi input mould 3 plus computing are also referred to as multi input mould 3 plus door, and the multiplication of multi input mould 3 is also referred to as multi input mould 3 and multiplied Door, N is designated as by the quantity of the multi input mould 3 after three value FPRM Logic function decompositions under p polarity plus door, by three value under p polarity The quantity that multi input mould 3 after FPRM Logic function decompositions multiplies door is designated as W;Obtained after each multi input mould 3 plus computing are decomposed Multiple two input moulds 3 plus computing, obtain multiple two inputs multiplications of mould 3, two inputs after each multiplication of multi input mould 3 is decomposed Mould 3 plus computing are also referred to as two input moulds 3 plus door, and the two input multiplications of mould 3 are also referred to as two input moulds 3 and multiply door;By the H multi input Two input moulds 3 after mould 3 plus door are decomposed add the quantity of door to be designated as NH, H=1,2 ..., N;O-th of multi input mould 3 is multiplied into a decomposition The quantity that two input moulds 3 afterwards multiply door is designated as Wo, o=1,2 ..., W;
1. -3 the Jia Men of mould 3 and two inputs are inputted by obtained after three value FPRM Logic function decompositions under p polarity all two Mould 3 multiplies power consumption caused by door as the power consumption of three value FPRM circuits under p polarity, and two input moulds 3 plus power consumption caused by door are used Its switch activity represents that two input moulds 3 are multiplied power consumption caused by door and represented using its switch activity, the switch activity of gate circuit Property represented with the output variable probability of its output end, two input moulds 3 plus power consumption caused by door use its output end output variable Probability represents that two input moulds 3 are multiplied power consumption caused by door and represented using the output variable probability of its output end;
1. -4 k-th two input moulds 3 after the H multi input mould 3 plus door decomposition are calculated according to formula (2), (3) and (4) Plus the output variable probability of door;K=1,2 ..., NH
P1(k)H=Pky11*Pky20+Pky10*Pky21+Pky12*Pky22 (2)
P2(k)H=Pky12*Pky20+Pky11*Pky21+Pky10*Pky22 (3)
P0(k)H=1-P1(k)H-P2(k)H (4)
Multiply g-th two input moulds 3 after a decomposition according to formula (5), (6) and (7) o-th of multi input mould 3 of calculating and multiply door Output variable probability, g=1,2 ..., Wo
Q1(g)o=Qgr11*Qgr21+Qgr12*Qgr22 (5)
Q2(g)o=Qgr11*Qgr22+Qgr12*Qgr21 (6)
Q0(g)o=1-Q1(g)o-Q2(g)o (7)
Wherein, P1(k)HRepresent that k-th two input moulds 3 plus door output variable after the H multi input mould 3 plus door decomposition are 1 Probability, P2(k)HRepresent the H multi input mould 3 plus door decompose after k-th two input moulds 3 plus door output variable for 2 it is general Rate, P0(k)HRepresent k-th two input moulds 3 after the H multi input mould 3 plus door decomposition plus the probability that door output variable is 0, y1 Represent two input variables of two input moulds 3 plus door with y2, m ∈ { 0,1,2 }, as k=1, Pky1mFor multi input mould 3 plus computing The 1st input variable be m probability, Pky2mThe probability for being m for the 2nd input variable of multi input mould 3 plus computing, works as k>1 When, Pky1mThe probability that mould 3 plus door output variable are m, Pk are inputted for kth -1 twoy2mKth+1 for multi input mould 3 plus door is defeated Enter the probability that variable is m;
Q1(g)oRepresent o-th of multi input mould 3 multiply g-th two input moulds 3 after decomposing multiply an output variable for 1 it is general Rate, Q2(g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 2, Q0 (g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 0, r1 and r2 Represent that two input two input variables that mould 3 multiplies door;As g=1, Qgr1mFor the 1st input variable of the multiplication of multi input mould 3 For m probability, Qgr2mThe probability for being m for the 2nd input variable of the multiplication of multi input mould 3, works as g>When 1, Qgr1mFor g-1 Two input moulds 3 multiply the probability that an output variable is m, Qgr2mMultiply the probability that the g+1 input variable of door is m for multi input mould 3;
Input variable xjFor 1 and 2 probability be by function immediately produce probability to (P1, P2), P0=1-P1-P2;P0, P1 and P2 are respectively some value between 0 to 1, and P0 represents the probability that input variable is 0, and P1 represents the probability that input variable is 1, P2 Represent the probability that input variable is 2;
1. -5 the output variable probability calculation that moulds 3 multiply door is inputted according to two input moulds 3 plus the output variable probability of door and two The power consumption of three value FPRM circuits, the power estim ation model of three value FPRM circuits is expressed as:
Wherein, EswdThe power consumption of three value FPRM circuits under p polarity is represented, N is three value FPRM Logic function decompositions under p polarity Multi input mould 3 afterwards plus the quantity of door, W multiply the number of door for the multi input mould 3 after three value FPRM Logic function decompositions under p polarity Amount;
2. it is used for the fitness function for calculating individual adaptation degree in setting Genetic Simulated Annealing Algorithm:
According to power estim ation model, the fitness function of individual adaptation degree is calculated in setting Genetic Simulated Annealing Algorithm: In Genetic Simulated Annealing Algorithm, fitness is bigger, and the adaptability for representing individual is stronger, but power consumption optimum polarity requires that power consumption is got over It is small better, therefore, combined for the ease of both, reciprocal using power consumption represents fitness, obtains fitness function as follows:
Fitness=α/Eswd
Wherein, symbol "/" represents division operation symbol, and fitness represents the fitness size of individual;EswdIndication circuit work( Consumption;α is amplification coefficient, and value is the natural number more than or equal to 1000;
3. three value FPRM circuits and the corresponding relation of Genetic Simulated Annealing Algorithm are set up:
Genetic Simulated Annealing Algorithm includes following key element:Maximum of individual, the fitness of individual, fitness Body, maximum adaptation degree, crossover operation, mutation operation, annealing selection operation;
The optimization of three value FPRM circuit power consumptions includes following key element:Polarity, the power consumption of corresponding polarity, optimal pole Property, the exchange of minimum power consumption, polarity, polarity mutation, reversal;
Individual is mapped to the optimization of three value FPRM circuit power consumptions, polarity is expressed as;The fitness of individual is mapped to three values FPRM circuit power consumptions optimize, and are expressed as the power consumption of corresponding polarity;The maximum individual of fitness is mapped to three value FPRM circuit work( Consumption optimization, is expressed as optimum polarity;Maximum adaptation degree is mapped to the optimization of three value FPRM circuit power consumptions, minimum power consumption is expressed as; Crossover operation is mapped to the optimization of three value FPRM circuit power consumptions, polarity exchange is expressed as;Mutation operation is mapped to three value FPRM Circuit power consumption optimizes, and is expressed as polarity mutation;Annealing selection operation is mapped to the optimization of three value FPRM circuit power consumptions, pole is expressed as Property conversion;
4. Genetic Simulated Annealing Algorithm relevant parameter is set:
Genetic Simulated Annealing Algorithm need to set 4 parameters:Individual scale w, individual iterations z, gene mutation probability q, Initial temperature T0;The individual scale w=50 of order, individual iterations z=20, gene mutation probability q=0.01, initial temperature T0= 100℃;
5. the maximum individual of fitness and maximum adaptation degree are obtained using Genetic Simulated Annealing Algorithm, fitness maximum individual is For the power consumption optimum polarity of three value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
In the present embodiment, Genetic Simulated Annealing Algorithm uses ripe algorithm of the prior art.
Embodiment two:A kind of three value FPRM circuit power consumption optimum polarity search methods, comprise the following steps:
1. the power estim ation model of three value FPRM circuits is set up:
1. -1 three value FPRM circuits are expressed as form using three value FPRM logical functions:
Wherein, n is function fp(xn-1,xn-2,…,x0) input variable quantity, xn-1,xn-2,…,x0Representative function fp (xn-1,xn-2,…,x0) n input variable, p representative functions fp(xn-1,xn-2,…,x0) polarity, polarity p ternary shapes Formula is expressed as pn-1pn-2…p0, pj∈ { 0,1,2 }, j=0,1,2 ..., n-1,Mould 3 plus computing are represented, ∑ is summation sign, symbol Number " * " is multiplication symbol, subscript i=0,1,2 ..., 3n- 1, i are expressed as i with ternary formn-1in-2…i0, aiFor FPRM Coefficient;ai∈{0,1,2};∏ represents the multiplication of mould 3,Its expansion be:Wherein ij∈{0, 1,2},Polarity p and subscript i decision variablesRepresentation;
1. three value FPRM logical functions under -2p polarity include two class multi-input operationals, and two class multi-input operationals are respectively Multi input mould 3 plus computing and the multiplication of multi input mould 3, according to three value FPRM logical functions expansions by three value FPRM logical functions Multiple multi input moulds 3 plus computing and multiple multiplications of multi input mould 3 are decomposed into, then each multi-input operational is separately disassembled into Two input computings, obtain two input moulds 3 plus computing and the two input multiplications of mould 3, and specific decomposable process is:
It regard the 1st input variable and the 2nd input variable of multi-input operational as first two input computing two Input variable, obtains the output variable of first two input computing;The output variable and multi input for inputting computing by first two 3rd input variable of computing obtains second two and inputs computing as two input variables of second two input computing Output variable;The output variable and the 4th input variable of multi-input operational for inputting computing using second two are used as the 3rd two Two input variables of computing are inputted, the output variable of the 3rd two input computing is obtained;The rest may be inferred, until all how defeated Enter the input variable of computing as the input variable of two input computings, complete the decomposition of multi-input operational;
Multiple multi input moulds 3 plus computing and multiple multi inputs will be obtained after three value FPRM Logic function decompositions under p polarity The multiplication of mould 3, multi input mould 3 plus computing are also referred to as multi input mould 3 plus door, and the multiplication of multi input mould 3 is also referred to as multi input mould 3 and multiplied Door, N is designated as by the quantity of the multi input mould 3 after three value FPRM Logic function decompositions under p polarity plus door, by three value under p polarity The quantity that multi input mould 3 after FPRM Logic function decompositions multiplies door is designated as W;Obtained after each multi input mould 3 plus computing are decomposed Multiple two input moulds 3 plus computing, obtain multiple two inputs multiplications of mould 3, two inputs after each multiplication of multi input mould 3 is decomposed Mould 3 plus computing are also referred to as two input moulds 3 plus door, and the two input multiplications of mould 3 are also referred to as two input moulds 3 and multiply door;By the H multi input Two input moulds 3 after mould 3 plus door are decomposed add the quantity of door to be designated as NH, H=1,2 ..., N;O-th of multi input mould 3 is multiplied into a decomposition The quantity that two input moulds 3 afterwards multiply door is designated as Wo, o=1,2 ..., W;
1. -3 the Jia Men of mould 3 and two inputs are inputted by obtained after three value FPRM Logic function decompositions under p polarity all two Mould 3 multiplies power consumption caused by door as the power consumption of three value FPRM circuits under p polarity, and two input moulds 3 plus power consumption caused by door are used Its switch activity represents that two input moulds 3 are multiplied power consumption caused by door and represented using its switch activity, the switch activity of gate circuit Property represented with the output variable probability of its output end, two input moulds 3 plus power consumption caused by door use its output end output variable Probability represents that two input moulds 3 are multiplied power consumption caused by door and represented using the output variable probability of its output end;
1. -4 k-th two input moulds 3 after the H multi input mould 3 plus door decomposition are calculated according to formula (2), (3) and (4) Plus the output variable probability of door;K=1,2 ..., NH
P1(k)H=Pky11*Pky20+Pky10*Pky21+Pky12*Pky22 (2)
P2(k)H=Pky12*Pky20+Pky11*Pky21+Pky10*Pky22 (3)
P0(k)H=1-P1(k)H-P2(k)H (4)
Multiply g-th two input moulds 3 after a decomposition according to formula (5), (6) and (7) o-th of multi input mould 3 of calculating and multiply door Output variable probability, g=1,2 ..., Wo
Q1(g)o=Qgr11*Qgr21+Qgr12*Qgr22 (5)
Q2(g)o=Qgr11*Qgr22+Qgr12*Qgr21 (6)
Q0(g)o=1-Q1(g)o-Q2(g)o (7)
Wherein, P1(k)HRepresent that k-th two input moulds 3 plus door output variable after the H multi input mould 3 plus door decomposition are 1 Probability, P2(k)HRepresent the H multi input mould 3 plus door decompose after k-th two input moulds 3 plus door output variable for 2 it is general Rate, P0(k)HRepresent k-th two input moulds 3 after the H multi input mould 3 plus door decomposition plus the probability that door output variable is 0, y1 Represent two input variables of two input moulds 3 plus door with y2, m ∈ { 0,1,2 }, as k=1, Pky1mFor multi input mould 3 plus computing The 1st input variable be m probability, Pky2mThe probability for being m for the 2nd input variable of multi input mould 3 plus computing, works as k>1 When, Pky1mThe probability that mould 3 plus door output variable are m, Pk are inputted for kth -1 twoy2mKth+1 for multi input mould 3 plus door is defeated Enter the probability that variable is m;
Q1(g)oRepresent o-th of multi input mould 3 multiply g-th two input moulds 3 after decomposing multiply an output variable for 1 it is general Rate, Q2(g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 2, Q0 (g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 0, r1 and r2 Represent that two input two input variables that mould 3 multiplies door;As g=1, Qgr1mFor the 1st input variable of the multiplication of multi input mould 3 For m probability, Qgr2mThe probability for being m for the 2nd input variable of the multiplication of multi input mould 3, works as g>When 1, Qgr1mFor g-1 Two input moulds 3 multiply the probability that an output variable is m, Qgr2mMultiply the probability that the g+1 input variable of door is m for multi input mould 3;
Input variable xjFor 1 and 2 probability be by function immediately produce probability to (P1, P2), P0=1-P1-P2;P0, P1 and P2 are respectively some value between 0 to 1, and P0 represents the probability that input variable is 0, and P1 represents the probability that input variable is 1, P2 Represent the probability that input variable is 2;
1. -5 the output variable probability calculation that moulds 3 multiply door is inputted according to two input moulds 3 plus the output variable probability of door and two The power consumption of three value FPRM circuits, the power estim ation model of three value FPRM circuits is expressed as:
Wherein, EswdThe power consumption of three value FPRM circuits under p polarity is represented, N is three value FPRM Logic function decompositions under p polarity Multi input mould 3 afterwards plus the quantity of door, W multiply the number of door for the multi input mould 3 after three value FPRM Logic function decompositions under p polarity Amount;
2. it is used for the fitness function for calculating individual adaptation degree in setting Genetic Simulated Annealing Algorithm:
According to power estim ation model, the fitness function of individual adaptation degree is calculated in setting Genetic Simulated Annealing Algorithm: In Genetic Simulated Annealing Algorithm, fitness is bigger, and the adaptability for representing individual is stronger, but power consumption optimum polarity requires that power consumption is got over It is small better, therefore, combined for the ease of both, reciprocal using power consumption represents fitness, obtains fitness function as follows:
Fitness=α/Eswd
Wherein, symbol "/" represents division operation symbol, and fitness represents the fitness size of individual;EswdIndication circuit work( Consumption;α is amplification coefficient, and value is the natural number more than or equal to 1000;
3. three value FPRM circuits and the corresponding relation of Genetic Simulated Annealing Algorithm are set up:
Genetic Simulated Annealing Algorithm includes following key element:Maximum of individual, the fitness of individual, fitness Body, maximum adaptation degree, crossover operation, mutation operation, annealing selection operation;
The optimization of three value FPRM circuit power consumptions includes following key element:Polarity, the power consumption of corresponding polarity, optimal pole Property, the exchange of minimum power consumption, polarity, polarity mutation, reversal;
Individual is mapped to the optimization of three value FPRM circuit power consumptions, polarity is expressed as;The fitness of individual is mapped to three values FPRM circuit power consumptions optimize, and are expressed as the power consumption of corresponding polarity;The maximum individual of fitness is mapped to three value FPRM circuit work( Consumption optimization, is expressed as optimum polarity;Maximum adaptation degree is mapped to the optimization of three value FPRM circuit power consumptions, minimum power consumption is expressed as; Crossover operation is mapped to the optimization of three value FPRM circuit power consumptions, polarity exchange is expressed as;Mutation operation is mapped to three value FPRM Circuit power consumption optimizes, and is expressed as polarity mutation;Annealing selection operation is mapped to the optimization of three value FPRM circuit power consumptions, pole is expressed as Property conversion;
4. Genetic Simulated Annealing Algorithm relevant parameter is set:
Genetic Simulated Annealing Algorithm need to set 4 parameters:Individual scale w, individual iterations z, gene mutation probability q, Initial temperature T0;The individual scale w=50 of order, individual iterations z=20, gene mutation probability q=0.01, initial temperature T0= 100℃;
5. the maximum individual of fitness and maximum adaptation degree are obtained using Genetic Simulated Annealing Algorithm, fitness maximum individual is For the power consumption optimum polarity of three value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
In the present embodiment, 5. middle use Genetic Simulated Annealing Algorithm obtains the maximum individual of fitness and maximum adaptation degree to step Detailed process be:
5. -1 the w individuals represented with n ternarys are produced with random function rand (), w individual are designated as P1 respectively, P2 ..., Pw;
5. -2 fitness for calculating v-th of individual Pv by fitness function, v=1,2,3 ..., w obtain individual P1, P2 ..., Pw fitness;
5. -3 compare individual P1, and P2 ..., Pw fitness filters out the maximum individual of fitness maximum as fitness Individual, the maximum individual of record fitness and maximum adaptation degree;
5. -4 couples of individuals P1, P2 ..., Pw carry out crossover operation generation individual F1, F2 ..., Fw:If w is even number, by P1 and P2, P3 and P4 ..., Pw-1 and Pw carry out crossover operation respectively two-by-two;If w be odd number, by P1 and P2, P3 and P4 ..., Pw-2 and Pw-1 carries out crossover operation respectively two-by-two, and Pw is not involved in crossover operation, and Fw directly inherits Pw;Two individual Pe and Pu are intersected Operation produces individual Fe and Fu, and detailed process is:The individual Pe for carrying out crossover operation is assigned to fe, individual Pu is assigned to fu, A n binary codes are randomly generated, the n binary code is designated as A, fe and fu is updated according to binary code A, works as binary system When h of code A are 1, fe h holdings are constant, and fu h holdings are constant;When h of binary code A being 0, H of fe h succession fu, h of fu h succession fe, h=1,2,3 ..., n, after the completion of crossover operation The fu that are designated as after the completion of Fe, crossover operation of fe be designated as Fu;Wherein u=e+1, when w is even number, e=1,3,5 ..., w-1;u =2,4,6 ..., w;When w is odd number, e=1,3,5 ..., w-2;U=2,4,6 ..., w-1;
5. -5 by fitness function calculate v-th of individual Fv fitness, obtain individual F1, F2 ..., Fw adaptation Degree;
5. -6 individual F1, F2 ..., Fw fitness and the maximum individual fitness of current fitness are compared, more The new maximum individual of fitness and maximum adaptation degree;
5. -7 individual F1, F2 ..., Fw are subjected to mutation operation:To Fv each with random function rand () produce Value between one 0 to 1, if this value is less than gene mutation probability q, the corresponding position of this value is exactly Fv change dystopy, right Fv change dystopy is made a variation, and variation rule is " 0 → 1,1 → 2,2 → 0 ";
5. -8 according to step 5. -5~5. -6 couples of individual F1, F2 ..., Fw processing, the fitness after being updated is most Big individual and maximum adaptation degree;
5. -9 according to the size of fitness value to individual P1, P2 ..., Pw is ranked up, according to the size pair of fitness value Individual F1, F2 ..., Fw are ranked up;Fitness value is each selected in individual P1, P2 ..., Pw and individual F1, F2 ..., Fw 2w/3 optimal individual, constitutes one group of new individual, and new individual contains 4w/3 individual;
5. -10 pairs one group new individual carries out many wheel annealing selections:In each round annealing selection, first according to formula (9) An annealing temperature is produced, for the annealing temperature, probability P (c) is selected by what formula (10) calculated each individual successively, together When produce a screening probability t, 0 with random function rand ()<t<1;When individual when being selected probability more than screening probability, The individual is chosen in this wheel annealing selection, and selected individual is no longer participate in next round annealing selection, and other are not chosen The individual selected enters next round annealing selection, is updated until filtering out w individual after individual P1, P2 ..., Pw, annealing selection knot Beam;
Tl=1/ln (l/T0+1) (9)
Wherein, TlRepresent the annealing temperature of l wheels, l=1,2 ...;During first round annealing selection, l=1, the second wheel annealing During selection, l=2, by that analogy;Ln represents log operations;T0Represent initial temperature;P (c) represents individual c probability;F (c) tables Show the fitness value of c-th of individual in new individual;C=1,2,3 ..., 4w/3;D-th of individual in the new individual of f (d) expressions Fitness value;D=1,2,3 ..., 4w/3;
5. -11 according to step 5. -2~individual P1 after 5. 5. -3 pairs of steps are updated in -10, P2 ..., Pw processing, Obtain the maximum individual of fitness and maximum adaptation degree;
5. -12 repeat steps 5. -4~5. -11, until meeting individual iterations z, algorithm terminates, and obtains fitness most Big individual and maximum adaptation degree;
5. the maximum individual of -13 fitness for obtaining last time and maximum adaptation degree are exported, and fitness maximum individual is For the optimum polarity of three value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
The power consumption optimum polarity search method of the present invention is in the bit manipulation systems of Windows 7 64, Intel (R) Core (TM) Under i3-2130 CPU 3.40GHZ, 4G RAM running environment, compiled and realized by VC6.0 with C language, it is random to use 13 MCNC Benchmark circuits carry out simulating, verifying, the power consumption optimum polarity that the method using the present invention is searched and 0 polarity It is compared.To calculate the switch activity of three value FPRM circuits, 15 groups of input signal probability are randomly generated:(P1, P2)= (0.21,0.53), (0.49,0.30), (0.33,0.24), (0.68,0.13), (0.15,0.26), (0.57,0.22), (0.18,0.51), (0.71,0.24), (0.08,0.35), (0.57,0.32), (0.46,0.28), (0.17,0.05), (0.32,0.43), (0.14,0.72), (0.25,0.61) }.
The result for carrying out optimum polarity search using the power consumption optimum polarity search method of the present invention is as shown in table 1.In table, The indication circuit title of row 1, row 2 represent input/output variable number;Row 3, row 4 and row 5 represent under 0 polarity that two is defeated respectively successively Enter mould 3 plus door quantity, the two door quantity that multiply of input moulds 3 and circuit power consumption;Row 6, row 7, row 8 and row 9 represent to adopt successively respectively Three value FPRM circuits two input mould 3 plus door quantity, two under the optimum polarity and optimum polarity that are searched with the method for the present invention Input mould 3 multiplies a quantity and power consumption.
The value FPRM circuit optimum polarity search results of table 1 three
Compared with 0 polarity, optimum polarity mould 3 plus door quantity, the door quantity that multiplies of mould 3 and power consumption on the percentage saved Than as shown in table 2.The percentage of door quantity, the door quantity that mould 3 multiplies and Save power consumption that mould 3 adds is defined as follows:
Wherein, SaveMod3-A、SaveMod3-MAnd SavePowerRepresent respectively successively mould 3 plus door quantity, mould 3 multiply a quantity and The saving of power consumption;Mod3-A0、Mod3-M0And Power0Represent respectively successively under 0 polarity mould 3 plus door quantity, mould 3 multiply a quantity and Power consumption size;Mod3-ASAGA、Mod3-MSAGAAnd SASAGARepresent mould 3 under the optimum polarity that the inventive method is searched respectively successively Plus door quantity, mould 3 multiply a quantity and power consumption size.Using the method for the present invention, three value FPRM gates numbers and Save power consumption hundred Divide than as shown in table 2.
The value FPRM gates number of table 2 three and Save power consumption percentage
Knowable to analyze data, the power consumption optimum polarity searched using the method for the present invention effect of optimization compared with 0 polarity Substantially, wherein clpl circuits multiply a quantity and power consumption and save 80.00%, 66.67% and respectively in mould 3 plus door quantity, mould 3 89.78%, 13 test circuits multiply a quantity and power consumption and averagely save 57.64%, 46.25% and in mould 3 plus door quantity, mould 3 73.98%.

Claims (2)

1. a kind of three value FPRM circuit power consumption optimum polarity search methods, it is characterised in that comprise the following steps:
1. the power estim ation model of three value FPRM circuits is set up:
1. -1 three value FPRM circuits are expressed as form using three value FPRM logical functions:
Wherein, n is function fp(xn-1,xn-2,…,x0) input variable quantity, xn-1,xn-2,…,x0Representative function fp(xn-1, xn-2,…,x0) n input variable, p representative functions fp(xn-1,xn-2,…,x0) polarity, polarity p represents with ternary form For pn-1pn-2…p0, pj∈ { 0,1,2 }, j=0,1,2 ..., n-1,Mould 3 plus computing are represented, ∑ is summation sign, symbol " * " For multiplication symbol, subscript i=0,1,2 ..., 3n- 1, i are expressed as i with ternary formn-1in-2…i0, aiFor FPRM coefficients; ai∈{0,1,2};∏ represents the multiplication of mould 3,Its expansion be:Wherein ij∈{0,1,2},Polarity p and subscript i decision variablesRepresentation;
1. three value FPRM logical functions under -2 p polarity include two class multi-input operationals, and how defeated two class multi-input operationals be respectively Enter mould 3 plus computing and the multiplication of multi input mould 3, according to three value FPRM logical functions expansions by three value FPRM Logic function decompositions For multiple multi input moulds 3 plus computing and multiple multiplications of multi input mould 3, each multi-input operational is then separately disassembled into two defeated Enter computing, obtain two input moulds 3 plus computing and the two input multiplications of mould 3, specific decomposable process is:
Inputted the 1st input variable and the 2nd input variable of multi-input operational as two of first two input computing Variable, obtains the output variable of first two input computing;The output variable and multi-input operational for inputting computing by first two The 3rd input variable as second two input computing two input variables, obtain second two input computing output Variable;The output variable and the 4th input variable of multi-input operational for inputting computing using second two are used as the 3rd two input Two input variables of computing, obtain the output variable of the 3rd two input computing;The rest may be inferred, until all multi inputs are transported The input variable of calculation completes the decomposition of multi-input operational as the input variable of two input computings;
Multiple multi input moulds 3 plus computing will be obtained after three value FPRM Logic function decompositions under p polarity and multiple multi input moulds 3 multiply Computing, multi input mould 3 plus computing are also referred to as multi input mould 3 plus door, and the multiplication of multi input mould 3 is also referred to as multi input mould 3 and multiplies door, will The quantity of multi input mould 3 plus door under p polarity after three value FPRM Logic function decompositions is designated as N, by three value FPRM logics under p polarity The quantity that multi input mould 3 after function decomposition multiplies door is designated as W;It is defeated that multiple two are obtained after each multi input mould 3 plus computing are decomposed Enter mould 3 plus computing, multiple two inputs multiplications of mould 3, two input moulds 3 plus fortune are obtained after each multiplication of multi input mould 3 is decomposed Also referred to as two input moulds 3 plus door are calculated, the two input multiplications of mould 3 are also referred to as two input moulds 3 and multiply door;By the H multi input mould 3 plus door The quantity of two input moulds 3 plus door after decomposition is designated as NH, H=1,2 ..., N;O-th of multi input mould 3 is multiplied to two after a decomposition The quantity that input mould 3 multiplies door is designated as Wo, o=1,2 ..., W;
1. -3 multiply all two input Jia Men of mould 3 obtained after three value FPRM Logic function decompositions under p polarity and two input moulds 3 Power consumption caused by door is as the power consumption of three value FPRM circuits under p polarity, and two input moulds 3 plus power consumption caused by door are switched using it Activity represents that two input moulds 3 multiply power consumption caused by door and represent that the switch activity of gate circuit uses it using its switch activity The output variable probability of output end represents that two input moulds 3 add power consumption caused by door using the output variable probability tables of its output end Show, two input moulds 3 are multiplied power consumption caused by door and represented using the output variable probability of its output end;
1. -4 k-th two input moulds 3 plus door after the H multi input mould 3 plus door decomposition are calculated according to formula (2), (3) and (4) Output variable probability;K=1,2 ..., NH
P1(k)H=Pky11*Pky20+Pky10*Pky21+Pky12*Pky22 (2)
P2(k)H=Pky12*Pky20+Pky11*Pky21+Pky10*Pky22 (3)
P0(k)H=1-P1(k)H-P2(k)H (4)
Multiply g-th two input moulds 3 after a decomposition according to formula (5), (6) and (7) o-th of multi input mould 3 of calculating and multiply the defeated of door Go out variable probability, g=1,2 ..., Wo
Q1(g)o=Qgr11*Qgr21+Qgr12*Qgr22 (5)
Q2(g)o=Qgr11*Qgr22+Qgr12*Qgr21 (6)
Q0(g)o=1-Q1(g)o-Q2(g)o (7)
Wherein, P1(k)HRepresent the H multi input mould 3 plus door decompose after k-th two input moulds 3 plus door output variable for 1 it is general Rate, P2(k)HRepresent k-th two input moulds 3 after the H multi input mould 3 plus door decomposition plus the probability that door output variable is 2, P0 (k)HRepresent k-th two input moulds 3 after the H multi input mould 3 plus door decomposition plus the probability that door output variable is 0, y1 and y2 Two input variables of the input moulds 3 of expression two plus door, m ∈ { 0,1,2 }, as k=1, Pky1mFor the of multi input mould 3 plus computing The probability that 1 input variable is m, Pky2mThe probability for being m for the 2nd input variable of multi input mould 3 plus computing, works as k>When 1, Pky1mThe probability that mould 3 plus door output variable are m, Pk are inputted for kth -1 twoy2mFor+1 input of kth of multi input mould 3 plus door Variable is m probability;
Q1(g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 1, Q2 (g)oRepresent that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 2, Q0(g)oTable Show that o-th of multi input mould 3 multiplies g-th two input moulds 3 after a decomposition and multiply the probability that an output variable is 0, r1 and r2 represent two Input mould 3 multiplies two input variables of door;As g=1, Qgr1mIt is m's for the 1st input variable of the multiplication of multi input mould 3 Probability, Qgr2mThe probability for being m for the 2nd input variable of the multiplication of multi input mould 3, works as g>When 1, Qgr1mIt is defeated for g-1 individual two Enter mould 3 and multiply the probability that an output variable is m, Qgr2mMultiply the probability that the g+1 input variable of door is m for multi input mould 3;
Input variable xjFor 1 and 2 probability be by function immediately produce probability to (P1, P2), P0=1-P1-P2;P0, P1 and P2 is respectively some value between 0 to 1, and P0 represents the probability that input variable is 0, and P1 represents the probability that input variable is 1, and P2 is represented Input variable is 2 probability;
1. -5 the value of output variable probability calculation three that moulds 3 multiply door is inputted according to two input moulds 3 plus the output variable probability of door and two The power consumption of FPRM circuits, the power estim ation model of three value FPRM circuits is expressed as:
Wherein, EswdThe power consumption of three value FPRM circuits under p polarity is represented, after N is three value FPRM Logic function decomposition under p polarity The quantity of multi input mould 3 plus door, W multiplies the quantity of door for the multi input mould 3 after three value FPRM Logic function decompositions under p polarity;
2. it is used for the fitness function for calculating individual adaptation degree in setting Genetic Simulated Annealing Algorithm:
According to power estim ation model, the fitness function of individual adaptation degree is calculated in setting Genetic Simulated Annealing Algorithm:In simulation In Annealing-Genetic Algorithm, fitness is bigger, and the adaptability for representing individual is stronger, but power consumption optimum polarity requires that power consumption is smaller more It is good, therefore, combined for the ease of both, reciprocal using power consumption represents fitness, obtains fitness function as follows:
Fitness=α/Eswd
Wherein, symbol "/" represents division operation symbol, and fitness represents the fitness size of individual;EswdIndication circuit power consumption;α For amplification coefficient, value is the natural number more than or equal to 1000;
3. three value FPRM circuits and the corresponding relation of Genetic Simulated Annealing Algorithm are set up:
Genetic Simulated Annealing Algorithm includes following key element:The maximum individual of individual, the fitness of individual, fitness, Maximum adaptation degree, crossover operation, mutation operation, annealing selection operation;
The optimization of three value FPRM circuit power consumptions includes following key element:Polarity, the power consumption of corresponding polarity, optimum polarity, most Low power consumption, polarity exchange, polarity mutation, reversal;
Individual is mapped to the optimization of three value FPRM circuit power consumptions, polarity is expressed as;The fitness of individual is mapped to three value FPRM Circuit power consumption optimizes, and is expressed as the power consumption of corresponding polarity;The maximum individual of fitness is mapped to three value FPRM circuit power consumptions excellent Change, be expressed as optimum polarity;Maximum adaptation degree is mapped to the optimization of three value FPRM circuit power consumptions, minimum power consumption is expressed as;It will hand over Fork operation is mapped to the optimization of three value FPRM circuit power consumptions, is expressed as polarity exchange;Mutation operation is mapped to three value FPRM circuits Optimised power consumption, is expressed as polarity mutation;Annealing selection operation is mapped to the optimization of three value FPRM circuit power consumptions, polarity change is expressed as Change;
4. Genetic Simulated Annealing Algorithm relevant parameter is set:
Genetic Simulated Annealing Algorithm need to set 4 parameters:Individual scale w, individual iterations z, gene mutation probability q, starting Temperature T0;The individual scale w=50 of order, individual iterations z=20, gene mutation probability q=0.01, initial temperature T0=100 ℃;
5. the maximum individual of fitness and maximum adaptation degree are obtained using Genetic Simulated Annealing Algorithm, the maximum individual of fitness is three The power consumption optimum polarity of value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
2. a kind of three values FPRM circuit power consumption optimum polarity search methods according to claim 1, it is characterised in that described The step of 5. it is middle use Genetic Simulated Annealing Algorithm obtain the detailed process of the maximum individual of fitness and maximum adaptation degree for:
5. -1 the w individuals represented with n ternarys are produced with random function rand (), w individual are designated as P1 respectively, P2 ..., Pw;
5. -2 fitness for calculating v-th of individual Pv by fitness function, v=1,2,3 ..., w obtain individual P1, P2 ..., Pw fitness;
5. -3 compare individual P1, and P2 ..., Pw fitness filters out the maximum individual of fitness as the maximum individual of fitness, Record the maximum individual of fitness and maximum adaptation degree;
5. -4 couples of individuals P1, P2 ..., Pw carry out crossover operation generation individual F1, F2 ..., Fw:If w be even number, by P1 and P2, P3 and P4 ..., Pw-1 and Pw carry out crossover operation respectively two-by-two;If w is odd number, by P1 and P2, P3 and P4 ..., Pw-2 and Pw- 1 carries out crossover operation respectively two-by-two, and Pw is not involved in crossover operation, and Fw directly inherits Pw;Two individual Pe and Pu carry out intersection behaviour Make to produce individual Fe and Fu, detailed process is:The individual Pe for carrying out crossover operation is assigned to fe, individual Pu is assigned to fu, with Machine produces a n binary codes, and the n binary code is designated as into A, updates fe and fu according to binary code A, works as binary code When h of A are 1, fe h holdings are constant, and fu h holdings are constant;When h of binary code A being 0, fe H successions h of fu, h of fu inherit fe h, h=1,2,3 ..., n, after the completion of crossover operation The fu that fe is designated as after the completion of Fe, crossover operation is designated as Fu;Wherein u=e+1, when w is even number, e=1,3,5 ..., w-1;U= 2,4,6 ..., w;When w is odd number, e=1,3,5 ..., w-2;U=2,4,6 ..., w-1;
5. -5 by fitness function calculate v-th of individual Fv fitness, obtain individual F1, F2 ..., Fw fitness;
5. -6 individual F1, F2 ..., Fw fitness and the maximum individual fitness of current fitness are compared, update suitable The maximum individual of response and maximum adaptation degree;
5. -7 individual F1, F2 ..., Fw are subjected to mutation operation:To Fv each with random function rand () produce one 0 Value between to 1, if this value is less than gene mutation probability q, the corresponding position of this value is exactly Fv change dystopy, the change to Fv Dystopy enters row variation, and variation rule is " 0 → 1,1 → 2,2 → 0 ";
5. -8 according to step 5. -5~5. -6 couples of individuals F1, F2 ..., Fw processing, maximum of the fitness after being updated Body and maximum adaptation degree;
5. -9 according to the size of fitness value to individual P1, P2 ..., Pw is ranked up, according to the size of fitness value to individual F1, F2 ..., Fw are ranked up;Each select fitness value optimal in individual P1, P2 ..., Pw and individual F1, F2 ..., Fw 2w/3 individual, constitute one group of new individual, new individual contain 4w/3 it is individual;
5. -10 pairs one group new individual carries out many wheel annealing selections:In each round annealing selection, produced first according to formula (9) One annealing temperature, for the annealing temperature, probability P (c) is selected by what formula (10) calculated each individual successively, while with Random function rand () produces a screening probability t, 0<t<1;When individual when being selected probability more than screening probability, this Body is chosen in this wheel annealing selection, and selected individual is no longer participate in next round annealing selection, and other are non-selected Individual enters next round annealing selection, is updated until filtering out w individual after individual P1, P2 ..., Pw, annealing selection terminates;
Tl=1/ln (l/T0+1) (9)
Wherein, TlRepresent the annealing temperature of l wheels, l=1,2 ...;During first round annealing selection, l=1, the second wheel annealing selection When, l=2, by that analogy;Ln represents log operations;T0Represent initial temperature;P (c) represents individual c probability;F (c) represents new Individual in c-th individual fitness value;C=1,2,3 ..., 4w/3;F (d) represents in new individual the suitable of d-th individual Answer angle value;D=1,2,3 ..., 4w/3;
5. -11 according to step 5. -2~individual P1 after 5. 5. -3 pairs of steps are updated in -10, P2 ..., Pw processing obtains The maximum individual of fitness and maximum adaptation degree;
5. -12 repeat steps 5. -4~5. -11, until meeting individual iterations z, algorithm terminates, and obtains maximum of fitness Body and maximum adaptation degree;
5. the maximum individual of -13 fitness for obtaining last time and maximum adaptation degree are exported, and the maximum individual of fitness is three The optimum polarity of value FPRM circuits;Maximum adaptation degree is the minimum power consumption of three value FPRM circuits.
CN201510532191.0A 2015-08-27 2015-08-27 A kind of three value FPRM circuit power consumption optimum polarity search methods Active CN105306075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510532191.0A CN105306075B (en) 2015-08-27 2015-08-27 A kind of three value FPRM circuit power consumption optimum polarity search methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510532191.0A CN105306075B (en) 2015-08-27 2015-08-27 A kind of three value FPRM circuit power consumption optimum polarity search methods

Publications (2)

Publication Number Publication Date
CN105306075A CN105306075A (en) 2016-02-03
CN105306075B true CN105306075B (en) 2017-09-29

Family

ID=55202913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510532191.0A Active CN105306075B (en) 2015-08-27 2015-08-27 A kind of three value FPRM circuit power consumption optimum polarity search methods

Country Status (1)

Country Link
CN (1) CN105306075B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107194023B (en) * 2017-03-30 2019-07-12 宁波大学 A kind of FPRM circuit area and delay Optimization method
CN107748912B (en) * 2017-09-13 2020-11-27 宁波大学 Three-value FPRM circuit delay optimization method utilizing bat algorithm
CN107679326B (en) * 2017-10-10 2019-07-09 宁波大学 A kind of two-value FPRM circuit area and the comprehensive optimization method that is delayed

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450627A (en) * 2003-05-21 2003-10-22 中国科学院计算技术研究所 Method for estimating maximum power comsumption of large scale digital circuit with parallel structure
CN102982205A (en) * 2012-11-21 2013-03-20 宁波大学 Fixed polarity conversion method for design of digital circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450627A (en) * 2003-05-21 2003-10-22 中国科学院计算技术研究所 Method for estimating maximum power comsumption of large scale digital circuit with parallel structure
CN102982205A (en) * 2012-11-21 2013-03-20 宁波大学 Fixed polarity conversion method for design of digital circuit

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
A Novel Quantum Genetic Algorithm for Area Optimization of FPRM Circuits;Jing Dai等;《IEEE Computer Society》;20091231;全文 *
Best polarity searching for ternary FPRM logic circuit area based on whole annealing genetic algorithm;Fei Sun等;《IEEE, International Conference on Asic》;20140508;全文 *
三值FPRM逻辑电路面积最佳极性搜索;孙飞;《中国优秀硕士学位论文全文数据库信息科技辑》;20150315;第2015年卷(第3期);全文 *
基于XNOR/OR的FPRM极性优化研究;张会红;《中国博士学位论文全文数据库信息科技辑》;20110715;第2011年卷(第07期);全文 *
基于整体退火遗传算法的低功耗最佳极性搜索;汪鹏君等;《计算机辅助设计与图形学学报》;20080131;第20卷(第1期);全文 *
基于遗传算法的三值FPRM电路面积优化;孙飞等;《山东大学学报(理学版)》;20130531;第48卷(第5期);全文 *

Also Published As

Publication number Publication date
CN105306075A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
CN104123377B (en) A kind of microblog topic temperature forecasting system and method
CN106294684A (en) The file classification method of term vector and terminal unit
CN105306075B (en) A kind of three value FPRM circuit power consumption optimum polarity search methods
CN112613602A (en) Recommendation method and system based on knowledge-aware hypergraph neural network
CN102750286A (en) Novel decision tree classifier method for processing missing data
Zhang et al. Improved genetic algorithm for high-utility itemset mining
CN104598611A (en) Method and system for sequencing search entries
CN106021577A (en) Information pushing method and device and electronic equipment
CN105160097B (en) A kind of three value FPRM circuit area optimization methods of utilization Population Migration Algorithm
CN105205534B (en) A kind of three value FPRM circuit areas and power consumption optimum polarity search method
CN110162638A (en) A kind of expert&#39;s combination proposed algorithm based on figure vector
CN102982205A (en) Fixed polarity conversion method for design of digital circuit
Jiang Credit scoring model based on the decision tree and the simulated annealing algorithm
Zhang et al. Trapping in scale-free networks with hierarchical organization of modularity
Runfeng et al. Lkpnr: Llm and kg for personalized news recommendation framework
CN109740722A (en) A kind of network representation learning method based on Memetic algorithm
CN104156462B (en) Complex network community method for digging based on cellular Learning Automata
Wang et al. An improved clustering method for detection system of public security events based on genetic algorithm and semisupervised learning
CN105138742B (en) A kind of two-value FPRM circuit area optimum polarity search methods
CN110765730A (en) Method for simplifying combined logic circuit
CN117010373A (en) Recommendation method for category and group to which asset management data of power equipment belong
CN107679326A (en) A kind of two-value FPRM circuit areas and delay comprehensive optimization method
CN105205214B (en) A kind of three value FPRM circuit power consumption optimization methods of the utilization method of exhaustion
Wang et al. AutoTS: Automatic time series forecasting model design based on two-stage pruning
Zheng et al. Group-teaching: Learning robust CNNs from extremely noisy labels

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant