an iterative heuristic for state justification in sequential automatic test pattern generation aiman...

49
An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-Maleh Sadiq M. Sait Syed Z. Shazli Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran, Saudi Arabia

Upload: reynold-gray

Post on 13-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation

Aiman H. El-Maleh Sadiq M. Sait Syed Z. Shazli

Department of Computer Engineering

King Fahd University of Petroleum and Minerals

Dhahran, Saudi Arabia

Page 2: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Outline

• Motivation• Test Pattern Generation for Sequential Circuits• Genetic Algorithms (GA)• Problem Definition• The Proposed Approach • Experiments and Results• Contributions• Future Directions

Page 3: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Present and Future*

Transistors/sq. cm 4 - 10M 18 - 39M

Pin count 100 - 900 160 - 1475

Clock rate (MHz) 200 - 730 530 - 1100

Power (Watts) 1.2 - 61 2 - 96

Feature size (micron) 0.25 - 0.15 0.13 - 0.10

1997 -2001 2003 - 2006

* SIA Roadmap, IEEE Spectrum, July 1999

Page 4: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Testing Principle

Page 5: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Complexity of Sequential Circuits

• A sequential circuit has memory in addition to combinational logic.

• Test for a fault in a sequential circuit is a sequence of vectors, which

• Initializes the circuit to a known state• Activates the fault, and• Propagates the fault effect to a primary output

Page 6: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

• Basic Idea: Population improves with each generation.• Construction of initial population

• Fitness criteria

• Parent selection

• Crossover and mutation

• Replacement policy

Genetic Algorithms (GAs)

Page 7: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

GAs for Test Generation

• Population: A set of input vectors or vector sequences.

• Fitness function: Based on Fault or Logic simulation of candidate vectors or sequences

• Regeneration rules (heuristics): Members with higher fitness function values are selected to produce new members via transformations like mutation and crossover.

Page 8: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Problem Definition

• State Justification: Process of finding a sequence of inputs that will drive the state machine from the reset (or unknown) state to the present state required by the test.

• The most time consuming step in sequential ATPG

Page 9: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Existing Solutions

• Deterministic Algorithms:– State justification involves backtracking

– More effective for control-dominant circuits

– Able to identify redundant faults

• Simulation-based Approaches:– Processing occurs in forward direction only

– More effective for data-dominant circuits

– Unable to identify redundant faults

Page 10: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Existing Solutions

• A Hybrid Approach is needed– Deterministic algorithms for fault activation and propagation

– State justification using Simulation-based approaches

Page 11: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Approach used in [Hsiao 98]

• Test sequences are generated randomly and each chromosome in the GA corresponds to a sequence of TVs

• Each vector in a sequence is logic simulated to get the state reached. This is compared with all the desired flip-

flop assignments

Page 12: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Approach used in [Hsiao 98]

• Objective:– To engineer a state justification sequence by ‘genetically’

combining candidate sequences

• If a sequence was found, it was appended to the test set

• Else, search was aborted and the next target state was picked

Page 13: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Approach used in [Hsiao 98]Desired state 10x10x

0110

V1

0011001100

V2

1011

V3

0101

V4

Fit (P1) = 3 / 4

1110

V1

1010010100

V2

0011

V3

1101

V4

Fit (P2) = 3 / 4

0110

V1

1011010100

V2

0011

V3

0101

V4

Fit (Child) = 1

Page 14: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Approach used in [Hsiao 98]

• Length of the sequence is a multiple of the sequential depth of the circuit

• The fitness function matches only the last state reached, with the desired state.

Page 15: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Drawbacks of the approach

• Fixed length sequences

• Length of the sequence depends on structural sequential depth of the circuit

• Quality of intermediate states reached is not considered while justifying a target state

Page 16: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Proposed Approach

• We apply GA while moving from a state to a state

• Hence, the chromosome consists of a single vector instead of a sequence of vectors

• State justification sequences are genetically engineered vector-by-vector

Page 17: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Proposed Approach

Reset state 0000

C1: 010011

C2: 110101

0001 Fit(P1) = 0 / 3

0010 Fit(P2) = 1 / 3

Target state 11x0

C3: 010101 0110 Fit(C) = 2 / 3

010101 is added to the state justification sequence

0110 becomes the new reset state

Page 18: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Select Target Fault

Fault simulate

generated sequence

Run Deterministic

ATPG

Justify state using

Genetic Algorithm

Fault detected

N

Y

Proposed Hybrid FrameworkProposed Hybrid Framework

Page 19: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Proposed Approach

• A minimum limit (Nlimit) on the number of states to be traversed for reaching an objective state is fixed

• A backtrack limit is also fixed

• Search continues for a state if either the state is found or one of the above limits exceeds

Page 20: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Proposed Approach

• A Tabu List containing the last visited states is maintained.

• This is done to disallow moves which can result in a recycle

• Fault simulator HOPE was used and simulations were run on SUN ULTRA 10 stations

Page 21: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

START

Select a targetstate

num-states=0

Generate achromosome

num-chr=0num-gen=0

Logic simulate

Find Fitness

Fitness=1

state reached.append

chromosome tofinal sequence

drop additionalstates reached

num-chr<pop-size

Select parentsnum-gen++

Apply crossover,mutation

Logic simulate thechild

Find fitness

Fitness=1

num-gen<G

Apply replacementpolicy

sort thechromosomest=0; c=0; bt=0

Pick thenext vector

c=c+1;

statereached is

tabu

c<pop-size

bt<BTLIMIT

Stop

bt=bt+1

t=t+1t<TLS

remove firstelement from

tabu

Add stateto tabu

Appendchromosome tofinal sequence

s=s+1;

s<NLimit

Yes

No

No

Yes

Yes

NoYes

No

Yes

Yes

No

Yes

No

No

Yes

No

No

Yes

go toprevious

state

Page 22: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Benchmarks used

Page 23: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Obtaining the list of desired states

• To obtain the list of required states, we ran HITEC for 109 backtracks for all the circuits to remove redundant faults.

• Aborted faults are converted to full-scan equivalents

• TV is obtained which detects the fault

• State relaxation

Page 24: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

The Parameters used

• The initial population is randomly generated

• Rate of crossover is 1

• Mutation rate is 0.01

• Single point crossover

• Roulette-wheel used for selecting parents

• Three replacement strategies were explored

Page 25: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

(n+1) replacement strategy

• In the first strategy, the worst member of the previous generation was replaced by the new chromosome if the new chromosome was fitter.

• Average fitness monotonically increased in every generation

Page 26: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Random-Elitist strategy

• N/2 crossovers in every generation

where N is the pop. size

• Half of the chromosomes were transferred directly to the next generation

• The other half was selected randomly

• Time taken was more than the first strategy

Page 27: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Roulette Elitist strategy

• N/2 crossovers in every generation

• Half of the chromosomes were transferred directly to the next generation

• The other half was selected by roulette wheel

• Time taken was more than the second strategy

Page 28: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Replacement Policies

Page 29: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Average and Best Fitness

00.20.40.60.8

11.2

1 7

13 19 25 31 37

No. of generations

Fitn

ess

Avg. Fitness

Best Fitness

Page 30: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Quality of the states reached

00.20.40.60.8

11.2

1 6

11 16 21 26 31 36 41

States Traversed

Fitn

ess

Page 31: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Quality of the states reached

0

0.20.4

0.60.8

11

13

25

37

49

61

73

85

97

10

9

12

1

States Traversed

Fitn

es

s

Page 32: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of population size

Page 33: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of population size

Page 34: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of no. of generations

Page 35: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of no. of generations

Page 36: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of no. of generations

Page 37: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of TLS

Page 38: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of Nlimit

Page 39: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Effect of BT Limit

Page 40: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Best results obtained

Page 41: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Recommended Parameters

• Population size 32

• Generations 400

• Nlimit 1.5 * (#DFF)

• TLS 15

• BT Limit 10

Page 42: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Recommended vs. Best

Page 43: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Genetic Parameters used in [Hsiao 98]

• Two-point uniform crossover has been used.• The probability of crossover is 1.• Any vector in the chrome is replaced with another

random vector in mutation• The probability of mutation is 0.01• Tournament selection mechanism is applied• A population size of 32 gave the best results• Length of sequence = 4*seq.depth

Page 44: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Comparison with [Hsiao 98]

Page 45: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Comparison with [Hsiao 98]

Page 46: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Comparison with [Hsiao 98]

Page 47: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Contributions

• A hybrid ATPG approach for sequential circuits, where both deterministic and GA-based state justification are involved

• A novel state justification procedure based on GA

• Genetic engineering of a sequence ‘vector by vector’.– Advantage of dynamically determining the length of

justification sequence

– Benefit of taking quality of intermediate states into account

Page 48: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Contributions

• Comparison of three replacement strategies– (n+1) replacement strategy gave better results

• Use of Tabu List to prevent the algorithm from visiting previously visited state

• Sensitivity analysis of the parameters used

Page 49: An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department

Future Directions

• Experimenting with other heuristics (like Tabu Search)

• Parallelization of the algorithm (for eg. Fitness evaluation)