Upload
honey
View
23
Download
0
Embed Size (px)
DESCRIPTION
It Is Better to Run Iterative Resynthesis on Parts of the Circuit. Petr Fišer , Jan Schmidt Faculty of Information Technology Czech Technical University in Prague [email protected], [email protected]. Outline. Preliminaries Iterative resynthesis Motivation Circuit resynthesis by parts - PowerPoint PPT Presentation
Citation preview
It Is Better to Run Iterative It Is Better to Run Iterative Resynthesis on Parts of the Resynthesis on Parts of the
CircuitCircuit
Petr Fišer, Jan SchmidtFaculty of Information Technology
Czech Technical University in [email protected], [email protected]
IWLS’10IWLS’10 22
OutlineOutline
PreliminariesIterative resynthesisMotivationCircuit resynthesis by partsExperimentsConclusions
IWLS’10IWLS’10 33
PreliminariesPreliminaries
Synthesis (optimization) of circuits (networks) will be discussedJust for simplicity: Combinational circuits are assumed Mapping into arbitrary 2-input gates
Cost (optimality criterion, quality) = # of gates
IWLS’10IWLS’10 44
Iterative ResynthesisIterative Resynthesis
Iterative resynthesis = improving the result quality by repetitive application of a single synthesis process, in order to improve the result qualityPossible assumption: the synthesis process cannot make the circuit worseNeeds not be always true
IWLS’10IWLS’10 55
Iterative Resynthesis in ABCIterative Resynthesis in ABC
ABC naturally supports iterative resynthesisEmphasized by “choices”Many possible processesSuggested: repeating {choice; map}Superchoice:
fraig_store; resynfraig_store; resyn2fraig_store; resyn2rsfraig_store; sharefraig_store; fraig_restore
IWLS’10IWLS’10 66
Iterative Resynthesis in ABCIterative Resynthesis in ABC
0 200 400 600 800 10000
500
1000
1500
2000
2500
3000
3500
4000
too_large
Gat
es
Iteration
IWLS’10IWLS’10 77
How Many Iterations suffice?How Many Iterations suffice?228 of IWLS’93 benchmarks examined
Iterations to converge # of cases< 20 19420 – 100 27100 – 500 4500 – 1000 1 (t481)> 1000 2 (seq, too_large)
IWLS’10IWLS’10 88
MotivationMotivationImagine:
e64 IWLS’93 circuit (65 inputs, 65 outputs, 649 2-input gates)
Case 1 – synthesis of the circuit, as it is:Case 1 – synthesis of the circuit, as it is: 530 gates 2.33s runtime
Case 2 – split the circuit into two halves, synthesize Case 2 – split the circuit into two halves, synthesize them separately, then merge the resultsthem separately, then merge the results
522 gates 1.73s total runtime
Where is the problem?What’s wrong?
IWLS’10IWLS’10 99
Circuit Resynthesis by PartsCircuit Resynthesis by Parts Resynthesize(Network N, opt) {do {
(W, NR) = Extract_Window(N, opt);W’ = resynthesize_by_ABC(W);N’ = NR W’;if (cost(N’) ≤ cost(N)) N = N’;
} while (!end());}
IWLS’10IWLS’10 1010
Window ExtractionWindow Extraction
PI1
PI2
PI5
PI4
PI3
PO1
PO3PO2
PO4
W
IWLS’10IWLS’10 1111
Window ExtractionWindow ExtractionConnected circuits are always extractedMethod 0 – Random selection
1. Randomly select one “pivot” gate2. Incrementally add randomly selected adjoining gates
Method 1 – Minimize_fanin1. Randomly select one “pivot” gate2. Incrementally add adjoining gates, so that the number of window primary
inputs is minimized (in a greedy way)Method 2 – Minimize_fanout
1. Randomly select one “pivot” gate2. Incrementally add adjoining gates, so that the number of window primary
outputs is minimized (in a greedy way)Method 3 – Minimize_fanin+fanout
1. Randomly select one “pivot” gate2. Incrementally add adjoining gates, so that the sum of numbers of window
primary inputs and outputs is minimized (in a greedy way)
These methods allow for arbitrary window size scaling
IWLS’10IWLS’10 1212
Window ExtractionWindow ExtractionMethod 4 – RadiusSelect
1. Randomly select one “pivot” gate2. Add all adjoining gates (i.e., all fan-in and fan-out gates)3. For each gate in the window, do (2.), up to the given radius
Method 5 – Windowing-like selectionSimilar to the window selection algorithm in the resubstitution process in
ABC1. Randomly select one “pivot” gate2. Find the minimum level of its transitive fan-in to a given depth3. Generate transitive fan-out of the pivot, to a given depth4. For these fan-out nodes, include all transitive fan-in nodes up to the
computed level into the window
The window size is partially determined by the circuit structure
IWLS’10IWLS’10 1313
Experimental SetupExperimental Setup
228 of IWLS’93 benchmarks processedResynthesis using ABC, using the “superchoice” script, followed by technology mapping into 2-input gatesIterated 1000-times (recall – this should be more than enough)100% circuit resynthesis yielded 19.97% improvement in the average
IWLS’10IWLS’10 1414
Comparison of MethodsComparison of Methods
Gates (size 20%)
Time (size 20%)
Method 0 Method 1 Method 2 Method 3100
105
110
115
120
125
Gat
es
Method 0 Method 1 Method 2 Method 30
20
40
60
80
100
120
Tim
e [s
]
IWLS’10IWLS’10 1515
Comparison of MethodsComparison of Methods
M. 4, radius 3
M. 4, radius 4
M. 4, radius 5
M. 4, radius 6
M. 4, radius 7
M. 4, radius 8
M. 4, radius 9
M. 5, depth 3
M. 5, depth 4
M. 5, depth 5
M. 5, depth 6
M. 5, depth 7
M. 5, depth 8
M. 5, depth 980
90
100
110
120
Gat
es
M. 4, radius 3
M. 4, radius 4
M. 4, radius 5
M. 4, radius 6
M. 4, radius 7
M. 4, radius 8
M. 4, radius 9
M. 5, depth 3
M. 5, depth 4
M. 5, depth 5
M. 5, depth 6
M. 5, depth 7
M. 5, depth 8
M. 5, depth 90
2
4
6
8
10
12
14
Tim
e [s
]
IWLS’10IWLS’10 1616
ResultsResultsMethod 0 (Random select), improvement vs. ABC iterated 1000-times
10% 30% 50% 70% 90%
-6,0
-4,0
-2,0
0,0
2,0
4,0
6,0
8,0
10,0Im
prov
emen
t vs.
AB
C [%
]
Window size
IWLS’10IWLS’10 1717
ResultsResultsMethod 4 (Radius select), improvement vs. ABC iterated 1000-times
3 4 5 6 7 8 9 10 11
-6,0
-4,0
-2,0
0,0
2,0
4,0
6,0
8,0Im
prov
emen
t vs.
ABC
[%]
Radius
IWLS’10IWLS’10 1818
Why This Happens - Example CasesWhy This Happens - Example Cases
Behavior of one of the “good for us” circuits (e64)Method 0 (random selection)
0 100 200 300 400 500 6000
100
200
300
400
500
600
e64
Gat
es
Window size
IWLS’10IWLS’10 1919
Why This Happens - Example CasesWhy This Happens - Example Cases
Behavior of one of the “bad for us” circuits (clip)Method 0 (random selection)
0 50 100 150 200 250 300 3500
50
100
150
200
250
300
350
clip
Gat
es
Window size
IWLS’10IWLS’10 2020
Convergence, Maybe?Convergence, Maybe?
0 200 400 600 800 10000
100
200
300
400
500
600
700
e64
Resynthesis of 50%
Resynthesis of 100%
Gat
es
Iteration
IWLS’10IWLS’10 2121
Convergence, Maybe?Convergence, Maybe?
0 200 400 600 800 10000
50
100
150
200
250
300
350clip
Resynthesis of 50%
Resynthesis of 100%
Gat
es
Iteration
IWLS’10IWLS’10 2222
ConclusionsConclusions
Sometimes it is better to resynthesize circuits by parts, rather than as wholeIn cases where not, probably it is due to random fluctuations caused by random part selectionsResynthesis by parts converges slower, but yields better resultsWhy?
IWLS’10IWLS’10 2323
QuestionsDiscussion
Stoning to death…