View
215
Download
0
Category
Tags:
Preview:
Citation preview
1
Non-uniform Crossover in Non-uniform Crossover in Genetic Algorithm Methods to Genetic Algorithm Methods to
Speed up the Generation of Test Speed up the Generation of Test Patterns for Sequential CircuitsPatterns for Sequential Circuits
Non-uniform Crossover in Non-uniform Crossover in Genetic Algorithm Methods to Genetic Algorithm Methods to
Speed up the Generation of Test Speed up the Generation of Test Patterns for Sequential CircuitsPatterns for Sequential Circuits Michael Dimopoulos - Panagiotis
Linardis
Department of InformaticsAristotle University of Thessaloniki
Greece
2
Digital CircuitsDigital Circuits
CombinationalLogic: :
inputs outputs
: :M
emory
Sequential Circuit
output = f (inputs,time)
3
Test GenerationTest GenerationTest GenerationTest Generation
Apply a sequence of inputs to a circuit. Observe the output response and compare the
response with a precomputed or “expected” response. Any discrepancy is said to constitute an error, the
cause of which is a physical fault.
TEST GENERATION
TESTING
In the faulty circuit, a single line/wire is S-a-0 or S-a-1.
STUCK-AT Fault Model
4
Test Problem FormulationTest Problem Formulation
FSM good M=(I,O,S,δ,λ)
Problem Formulation
FSM faulty Mf=(I,Of,Sf,δf,λf)
For a given list of stuck-at faults : F={f1,f2,…,fn}
Find a sequence of input vectors V
(Test Sequence) that detects the faults in F.
outp
uts
CombinationalLogicin
put
s
: :
Memory
: :
?
outp
uts
CombinationalLogicin
put
s
: :
Memory
: :
5
ATPG MethodsATPG Methods
Stuck-at Fault Model
ATPG Methods for Sequential Circuits
Deterministic
Simulation-based (random)
Automatic Test Pattern Generation (ATPG)
Genetic Algorithms
Optimum Test Set: NP-Complete problem.
6
A Simple GA for ATPGA Simple GA for ATPGA Simple GA for ATPGA Simple GA for ATPG
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
Test
seq.
Test seq.
Crossover0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 1
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
1 0 11
01
01
01
00
10
11
11
10
10
11
01
10
01
01
01
01
01
00
10
11
11
10
10
11
01
10
10
11
Mutation
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
Random Population
Initial
(A)(B)
(E)
End
Ngen <
MAX_GENERATIONS
Ngen = Ngen+1
1 1 0 1
If (Ngen%2) == 0
Expand seq.
(F)
Age = Ngen
(C)
(D)
7
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
0 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 00 1 0 10 1 0 01 0 1 11 1 1 01 0 1 10 1 1 0
Population
Encoding of the IndividualsEncoding of the IndividualsEncoding of the IndividualsEncoding of the Individuals
0 1 0 1 0 1 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0n-input vector
Sequence of m vectors
n x m bit string
8
Crossover:Crossover: Effect on Sequ Circuits Effect on Sequ Circuits
Crossover operation degrades to mutationCrossover operation degrades to mutation
k-th vector
1st vector
LV vector
Detecting properties
arepreserved
Detecting properties
may be completely
lost
parents offsprings
Vectors after the k-th, strongly depend on those before the k-th
9
Biased CrossoverBiased Crossover
k-th vector
1st vector
LV vector
Detecting properties
arepreserved
Detecting properties
may be completely
lostparents offsprings
10
GA Test Generation Policy
Slowly increase test sequ sizeSlowly increase test sequ size• Gradually expand candidate test sequences
• Append one new vector every {three} generations
Direct crossover to tail of test sequDirect crossover to tail of test sequ• Try to optimize newly appended vectors
• Use non Uniform selection probability with emphasis on tail
11
Proposed Distribution(NonUni)
0
0.2
0.4
0.6
0.8
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Vector selection (norm)
P
Square probability distribution (normalized) for crossover selection
12
GATPG AlgorithmGATPG AlgorithmGATPG AlgorithmGATPG Algorithm
Create_random_population For each individual Evaluate_fsimulation(individual) Sort_population /* with descending fit. value */ ngen=0 /* generation num. */ do { for (j=0, i=0; i<ncross; j +=2, i++) /**** crossover ****/ { cross_over(Individual[j], Individual[j+1], child1, child2) Evaluate_ fsimulation (child1) Evaluate_ fsimulation (child2) } for (i=0; i<nmut; i +=2) /**** mutation ****/ { mutation(Individual[0], child1) mutation(Individual[1], child2) Evaluate_ fsimulation (child1) Evaluate_ fsimulation (child2) } Sort_population If ( (ngen % 3) == 0 ) { Expand_sequence(EXPAND_STEP) Evaluate_fsim(Individual[0]) /* check best */ } ngen++ } while (ngen<MAX_GENERATIONS)
13
Fitness FunctionFitness FunctionFitness FunctionFitness Function
fitnessfitness = if (ngen < 0.25*MAX_GENERATIONS) f1 else f2 = if (ngen < 0.25*MAX_GENERATIONS) f1 else f2
where: f1 = 20 . R1 + R2 . R3 f2 = 20 . R1 + R3 + R2 . R4 . R5
and
R1 = fdetected
R2 = (sequ_length – eff_length) / sequ_length
R3 = factivated / (fremaining+1)
R4 = (faults propagated to FFs) / (num_FF . factive . seq_length)
R5 = (faults propagated to outputs) / (num_ouputs . factive . sequ_length)
14
POPULATION = 32 MAX_GENERATIONS = 300PCROSSOVER = 0.6PMUTATION = 0.2 EXPAND_STEP = 1
POPULATION = 32 MAX_GENERATIONS = 300PCROSSOVER = 0.6PMUTATION = 0.2 EXPAND_STEP = 1
Experimental ResultsExperimental ResultsExperimental ResultsExperimental Results
ISCAS’89 Benchmark CircuitsISCAS’89 Benchmark Circuits
a/a circuit i / o / ff / gates Total Faults
1 s298 3 / 6 / 14 / 119 265
2 s344 9 / 11 / 15 / 160 329
3 s349 9 / 11 / 15 / 161 335
4 s382 3 / 6 / 21 / 158 364
5 s386 7 / 7 / 6 / 159 314
6 s400 3 / 6 / 21 / 164 384
7 s444 3 / 6 / 21 / 181 424
a/a circuit i / o / ff / gates Total Faults
1 s298 3 / 6 / 14 / 119 265
2 s344 9 / 11 / 15 / 160 329
3 s349 9 / 11 / 15 / 161 335
4 s382 3 / 6 / 21 / 158 364
5 s386 7 / 7 / 6 / 159 314
6 s400 3 / 6 / 21 / 164 384
7 s444 3 / 6 / 21 / 181 424
GATGATPGPG parameters: parameters:
15
Uniform Sqr (GATPG)
Crossover Probability DistributionCrossover Probability Distribution
Circuit Det. Vec. Time (gen)s298 265 89 282s344 329 61 225s349 335 59 287s382 332 91 272s386 286 52 233s400 347 79 227s444 383 76 272
Sum: 2277 507 1798
Circuit Det. Vec. Time (gen)s298 264 79 242s344 327 56 266s349 332 51 295s382 316 88 284s386 254 39 284s400 329 86 293s444 360 91 258
Sum: 2182 490 1922
GATPG vs UniformGATPG vs UniformGATPG vs UniformGATPG vs Uniform
16
Experimental ResultsExperimental ResultsExperimental ResultsExperimental Results
Comparison with other methodsComparison with other methods
Circuit f.c Vec. f.c Vec. f.c Vec. f.c Vec. f.c Vec.
s298 1,000 89 0,955 476 1,000 161 1,000 232 1,000 306s344 1,000 61 0,997 115 1,000 95 1,000 120 0,997 142s349 1,000 59 1,000 95 1,000 137
s382 0,912 91 0,753 246 0,953 281 0,997 2047 0,997 4931
s386 0,911 52 0,930 1230 0,939 154 1,000 311s400 0,904 79 0,930 758 0,951 280 0,995 2162 0,997 4309s444 0,903 76 0,936 519 0,958 275 1,000 1970 0,976 2240
Average:
fault cov. 0,947 0,917 0,972 0,998 0,995
test seq. 72 557 192 1306 1768
GATPG CRIS IGATERudnick HITEC
17
Circuit GATPG HITEC Rudnick95
P-133 Sun Sparc SLC Sun Sparc II
s298 12,6m 266,4m 6,05ms344 11,5m 79,8m 5,85ms349 14,0m 52,2m 5,83ms382 15,0m 720m 8,91ms386 16,8m 1,03m 3,45m
s400 13,0m 726m 9,45ms444 14,0m 966m 10,5m
Time (CPU)
Circuit GATPG HITEC Rudnick95
P-133 Sun Sparc SLC Sun Sparc II
s298 12,6m 266,4m 6,05ms344 11,5m 79,8m 5,85ms349 14,0m 52,2m 5,83ms382 15,0m 720m 8,91ms386 16,8m 1,03m 3,45m
s400 13,0m 726m 9,45ms444 14,0m 966m 10,5m
Time (CPU)
Experimental Results Experimental Results (con’t)(con’t)Experimental Results Experimental Results (con’t)(con’t)
18
Experimental Results Experimental Results (con’t)(con’t)Experimental Results Experimental Results (con’t)(con’t)
Sequence LengthsSequence Lengths
89306
161 61142
95 59137
9591
4931
281
52
311154
79
4309
280
76
2240
275
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
s298 s344 s349 s382 s386 s400 s444
GATPG HITEC Rudnick
19
Hybrid Methods
HYBRID GATPG
0
50
100
150
200
250
300
350
0 100 200 300 400 500
Time (sec)
Faul
ts
HYBRID
GATPG
0
50
100
150
200
250
300
350
400
450
0 500 1000 1500 2000 2500
Time (sec.)Fa
ults
(b) circuit s400 (a) circuit s386
20
Conclusion
Non uniform (biased) probability distribution for cut-point Non uniform (biased) probability distribution for cut-point
selection in crossover operatorselection in crossover operator
Crossover operation degrades to mutationCrossover operation degrades to mutation
GGAA for ATPG of Sequential for ATPG of Sequential CCircuitsircuits::
GATPG:GATPG:
Slowly increase test sequ sizeSlowly increase test sequ size
Direct crossover to tail of test sequDirect crossover to tail of test sequ
Recommended