two-level boolean minimizer boom-ii petr fišer, hana kubátová department of computer science and...

23
Two-Level Boolean Two-Level Boolean Minimizer BOOM-II Minimizer BOOM-II Petr Fi Petr Fi š š er, Hana Kub er, Hana Kub átová átová Department of Computer Science and Department of Computer Science and Engineering Engineering Czech Technical University Czech Technical University Karlovo nam. 13, 121 35 Prague 2 Karlovo nam. 13, 121 35 Prague 2 e-mail: [email protected], e-mail: [email protected], [email protected] [email protected]

Upload: lionel-jenkins

Post on 05-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

Two-Level Boolean Minimizer Two-Level Boolean Minimizer BOOM-IIBOOM-II

Petr FiPetr Fiššer, Hana Kuber, Hana Kubátováátová

Department of Computer Science and EngineeringDepartment of Computer Science and EngineeringCzech Technical UniversityCzech Technical University

Karlovo nam. 13, 121 35 Prague 2Karlovo nam. 13, 121 35 Prague 2e-mail: [email protected], [email protected]: [email protected], [email protected]

Page 2: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

OutlineOutline

IntroductionIntroductionProblem StatementProblem StatementDescription of BOOM-IIDescription of BOOM-IIThe Individual PhasesThe Individual PhasesExperimental ResultsExperimental ResultsConclusionsConclusions

Page 3: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

IntroductionIntroduction

BOOM-II is a heuristic multiple-outputBOOM-II is a heuristic multiple-outputtwo-level Boolean minimizertwo-level Boolean minimizer

Composition of two minimizers – a general Composition of two minimizers – a general purpose minimizerpurpose minimizer

Page 4: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

Problem StatementProblem Statement

GivenGiven::

n-n-input, input, mm-output function given by a truth -output function given by a truth table (PLA)table (PLA)

FF11(x(x11, x, x22, … x, … xnn)), , FF22(x(x11, x, x22, … x, … xnn)), … , … FFmm(x(x11, x, x22, … x, … xnn))

The function is specified by on-set andThe function is specified by on-set and

off-setoff-set

Our Aim:Our Aim:

to minimize it, the result is a set of SOP to minimize it, the result is a set of SOP formsforms

Page 5: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM-IIBOOM-II

Composition of BOOM and FC-MinComposition of BOOM and FC-Min

BOOM is good for functions with many BOOM is good for functions with many inputsinputs

FC-Min is good for functions with many FC-Min is good for functions with many outputsoutputs

Iterative minimization – both the Iterative minimization – both the minimizers are being alternatedminimizers are being alternated

Page 6: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM-IIBOOM-IIS TA RT

F C :B O O M

B O O M(C D -S , IE , IR )

F C -M in(F C , F I, IE )

S T O P ?

C P S o lu tio n

E N D

Y E S

N O

B O O M F C -M in

Page 7: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOMBOOM

CD-SearchCD-Search Implicant Expansion (IE)Implicant Expansion (IE) Implicant Reduction (IR)Implicant Reduction (IR) CP Solution (CP)CP Solution (CP)

Page 8: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM – CD-SearchBOOM – CD-Search

Just for single-output functions – the Just for single-output functions – the multiple-output function has to be dividedmultiple-output function has to be divided

Implicants are generated top-down – by Implicants are generated top-down – by reducing the universal hypercubereducing the universal hypercube

We add literals to a term, until it becomes We add literals to a term, until it becomes an implicantan implicant

Based on a frequency of occurrence inBased on a frequency of occurrence inon-seton-set

Page 9: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM - IEBOOM - IE

Implicant ExpansionImplicant Expansion

The implicants from CD-search are The implicants from CD-search are expanded into PIsexpanded into PIs

Page 10: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM - IRBOOM - IR

Implicant ReductionImplicant Reduction

Reduces PIs into group implicantsReduces PIs into group implicants

Very time-consuming for functions Very time-consuming for functions with with many outputsmany outputs

Page 11: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM - CPBOOM - CP

Covering problem solutionCovering problem solution

Selects an irredundant set of Selects an irredundant set of implicants implicants covering the on-setcovering the on-set

greedy heuristic is usedgreedy heuristic is used

Page 12: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

FC-MinFC-Min Completely different approach to minimizationCompletely different approach to minimization First, the cover of the on-set is found, then the First, the cover of the on-set is found, then the

implicants are generated for this coverimplicants are generated for this cover No PIs are produced, just the group implicantsNo PIs are produced, just the group implicants Generates Generates onlyonly the necessary set of group the necessary set of group

implicants – fast, low memory demandsimplicants – fast, low memory demands

Find-CoverageFind-Coverage Generate ImplicantsGenerate Implicants Expand ImplicantsExpand Implicants

Page 13: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

FC-Min – Find CoverageFC-Min – Find Coverage

Generates rectangle Generates rectangle cover of the on-setcover of the on-set

Determines the number Determines the number of product terms in the of product terms in the solution, not their solution, not their structurestructure

Independent on literalsIndependent on literals

{y -y0 4

Page 14: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

FC-Min – Find Implicants PhaseFC-Min – Find Implicants Phase

Main Idea:

When a term (cube) should cover a particular output vector, the corresponding input vector must be contained in this cube

Thus the minimum term for ti must be constructed as a minimum supercube of all the input vectors corresponding to rows of ti

Page 15: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

FC-Min – Find Implicants PhaseFC-Min – Find Implicants Phase

PLA:

0 11010 100001 10000 111002 01001 011003 01111 010104 00110 001115 01110 000006 10110 000117 00001 011018 10101 101119 11100 10100

t1 covers 4, 6 and 8 001101011010101-01--

Page 16: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

FC-Min – Find Implicants PhaseFC-Min – Find Implicants Phase

t1: -01-- 00011t2: --00- 01100t3: 1-10- 10100t4: 01111 01010t5: 1-0-0 10000t6: 00--- 00101

All the implicants: SOP Forms:

y0 = t3 + t5 = x0 x2 x3' + x0 x2' x4’

y1 = t2 + t4 = x2'x3' + x0' x1 x2 x3 x4

y2 = t2 + t3 + t6 = x2'x3' + x0 x2 x3' + x0' x1'

y3 = t1 + t4 = x1'x2 + x0' x1 x2 x3 x4

y4 = t1 + t6 = x1'x2 + x0' x1'

Page 17: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

FC-Min – Expand ImplicantsFC-Min – Expand Implicants

The The minimum implicantsminimum implicants can be further can be further expandedexpanded

Literals are removed from the obtained Literals are removed from the obtained PLA matrix, until some term intersects PLA matrix, until some term intersects off-setoff-set

Page 18: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

BOOM-IIBOOM-II

Most of the phases are randomized heuristicsMost of the phases are randomized heuristics Thus, repeated runs of the minimization process Thus, repeated runs of the minimization process

could yield different solutionscould yield different solutions We repetitively run the minimizers, while We repetitively run the minimizers, while

alternating them and put all the implicants into a alternating them and put all the implicants into a common poolcommon pool

Then we solve CPThen we solve CP The ratio of FC-Min & BOOM runs can be The ratio of FC-Min & BOOM runs can be

adjusted – according to the nature of the problemadjusted – according to the nature of the problem

Page 19: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

Experimental ResultsExperimental Results

Random problem:Random problem:

100 inputs100 inputs

15 outputs15 outputs

125 care terms125 care terms

LiteralsLiterals OcOc TermsTerms SpeedupSpeedup

ESPRESSOESPRESSO 657657 700700 110110 11

BOOMBOOM 765765 359359 122122 5252

BOOM-II (1:1)BOOM-II (1:1) 674674 377377 102102 6969

FC-MinFC-Min 650650 374374 9999 137137

Page 20: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

Experimental ResultsExperimental Results

Random problem:Random problem:

25 inputs25 inputs

1 output1 output

500 care terms500 care terms

LiteralsLiterals OcOc TermsTerms SpeedupSpeedup

ESPRESSOESPRESSO 881881 111111 111111 11

BOOMBOOM 793793 9898 9898 3333

BOOM-II (1:1)BOOM-II (1:1) 852852 106106 106106 1919

FC-MinFC-Min 981981 124124 124124 1515

Page 21: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

Structure of the SolutionStructure of the Solution

Page 22: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

Structure of the SolutionStructure of the Solution

1 - BOOM PIs 2 - Common PIs 3 - FC-Min PIs 4 - BOOM non-PIs 5 - Common non-PIs 6 - FC-Min non-PIs

0.41%0.21%1.6%1.6%3%

93%

1 - BOOM PIs 2 - Common PIs 3 - FC-Min PIs 4 - BOOM non-PIs 5 - Common non-PIs 6 - FC-Min non-PIs

4.5%3.3%

9.1%

6.4%

19%

58%

• BOOM is better for PIs

• FC-Min is better for group implicants

• BOOM IR phase can be omitted

All implicants Solution implicants

Page 23: Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,

ConclusionsConclusions

BOOM-II has been presentedBOOM-II has been presented Combination of two different approaches to Combination of two different approaches to

implicant generationimplicant generation Universal Boolean minimizerUniversal Boolean minimizer Very scalable (tradeoff between solution quality Very scalable (tradeoff between solution quality

& runtime)& runtime) Useful for extremely large problems, very fastUseful for extremely large problems, very fast Can be downloaded from Can be downloaded from http://service.felk.

cvut.cz/vlsi/prj/BOOM