Вы находитесь на странице: 1из 29

Chapter 3

Testability Measures

Jin-Fu Li
Advanced Reliable Systems (ARES) Lab.
Lab
Department of Electrical Engineering
N ti
Nationall Central
C t lU University
i it
Jhongli, Taiwan
Outline
† Purpose
† Controllability and Observability
† SCOAP Measures
† S
Summary

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 2


Purpose
† Assessments
„ Difficulty
y of setting
g internal circuit lines to 0 or
1 by setting primary circuit inputs
„ Difficulty of observing internal circuit lines by
observing primary outputs
† Uses
„ Analysis of difficulty of testing internal circuit
parts – redesign or add special test hardware
„ Guidance for algorithms computing test
patterns – avoid using hard-to-control lines
„ Estimation of fault coverage
„ Estimation of test length

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 3


Testability
† Definition
„ A fault is testable if there exists a well-specified
p
procedure to expose it, which is implementable
with a reasonable cost using current
t h l i
technologies. A circuit
i it iis ttestable
t bl with
ith respectt
to a fault set when each and every fault in this
set is testable
† Testability
„ Controllability
C t ll bilit
„ Observability

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 4


Testability Analysis
† Involves circuit topological analysis, but no
test vectors and no search algorithm
g
„ Static analysis
† Linear computational complexity
„ Otherwise, is pointless-since we can use
automatic
auto at c test pattern
patte generation
ge e at o to caculate
cacu ate
† Exact fault coverage
† Exact test vectors

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 5


Testability Measures
† Testability (controllability/observability)
measures
„ TMEAS
„ SCOAP
„ TESTSCREEN
„ C
CAMELOT
O
„ VICTOR
„ COMET

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 6


SCOAP
† SCOAP
„ Sandia Controllability
y Observability
y Analysis
y
Program
„ Metrics:
† higher numbers indicate more difficult to control or
observe
„ Combinational meas
measures
es
† CC0 – difficulty of setting circuit line to logic 0
† CC1 – difficulty of setting circuit line to logic 1
† CO – difficulty of observing a circuit line
„ Sequential
q measures
† SC0 – difficulty of setting circuit line to logic 0
† SC1 – difficulty of setting circuit line to logic 1
† SO – difficulty of observing a circuit line
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 7
SCOAP Measures
† Range of metrics
„ Controllability – 1 (easiest) to infinity (hardest)
„ Observability – 1 (easiest) to infinity (hardest)
† Controllability calculation
„ Proceed from the inputs to the outputs
„ Controllability measures of primary inputs
(i l di
(including b
branches)
h ) are all
ll equall to
t 1
† Observability calcaulation
„ St
Startt from
f the
th mostt observable
b bl nodes,
d the
th
primary outputs, and proceed backward to the
primary
p a y inputs
puts
† Initially, all testability measures are set to
infinity
y
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 8
An Example for Combinational Ckt
† Consider a 3-input AND gate as shown
below
„ CC1(Y)=CC1(A)+CC1(B)+CC1(C)+1
„ CC0(Y)=min{CC0(A),CC0(B),CC0(C)}+1
( ) { ( ), ( ), ( )}
A
B Y
C
„ The result is incremented by 1 so that the value
reflects the distance to the PIs
„ Working breadth-first from primary inputs (PIs)
toward primary outputs (POs), we calculate the
CC of the output line of each logic cell as a
function of the CCs of its input lines

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 9


SCOAP Measures
† Summary
„ If a logic
g g gate output
p is produced
p by
y setting
g
only one input to a controlling value
† Output controllability=min(input controllabilities)+1
„ If a logic gate output can only be produced by
setting all inputs to a non-controlling value
† Output
O t t controllability=Sum(input
t ll bilit S (i t controllabilities)+1
t ll biliti ) 1
„ Controlling value & non-controlling value

A A
B Y B Y
C C

Controlling value = 0 Controlling value = 1


Non-controlling value = 1 Non-controlling value = 0

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 10


Controllability Examples
a z CC0(z)=min (CC0(a), CC0(b))+1
b CC1(z)=CC1(a)+CC1(b)+1

a z CC0(z)=CC0(a)+CC0(b)+1
b CC1(z)=min (CC1(a), CC1(b))+1

a z CC0(z)=min (CC0(a)+CC0(b), CC1(a)+CC1(b))+1


b CC1(z)=min (CC1(a)+CC0(b), CC0(b)+CC1(b))+1

a z CC0(z)=CC1(a)+CC1(b)+1
CC0(z) CC1(a)+CC1(b)+1
b CC1(z)=min (CC0(a), CC0(b))+1

a z CC0(z) min (CC1(a),


CC0(z)=min (CC1(a) CC1(b))+1
b CC1(z)=CC0(a)+CC0(b)+1

a z CC0(z)=min (CC0(a)+CC1(b), CC1(a)+CC0(b))+1


b CC1( )
CC1(z)=min
i (CC0(a)+CC0(b),
(CC0( ) CC0(b) CC1(b)
CC1(b)+CC1(b))+1
CC1(b)) 1

z CC0(z)=CC1(a)+1
a
CC1( ) CC0( ) 1
CC1(z)=CC0(a)+1

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 11


Observability Examples
† To observe a gate input
„ Observe output
p and make other input
p values
non-controlling
CO(a)=CO(z)+CC1(b)+1 a z
CO(b)=CO(z)+CC1(a)+1 b
CO(a)=CO(z)+CC0(b)+1 a z
CO(b)=CO(z)+CC0(a)+1 b
CO(a)=CO(z)+min
CO(a) CO(z)+min (CC0(b)
(CC0(b), CC1(b))+1 a z
CO(b)=CO(z)+min (CC0(a), CC1(a))+1 b
CO(a)=CO(z)+CC1(b)+1 a z
CO(b) CO( ) CC1( ) 1
CO(b)=CO(z)+CC1(a)+1 b
CO(a)=CO(z)+CC0(b)+1 a z
CO(b)=CO(z)+CC0(a)+1 b
CO(a)=CO(z)+min (CC0(b), CC1(b))+1 a z
CO(b)=CO(z)+min (CC0(a), CC1(a))+1 b
z
CO( ) CO( ) 1
CO(a)=CO(z)+1 a
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 12
Observability Examples
† To observe a fanout stem
„ Observe it through
g branch with best
observability
z1
z2
CO(a)=min (CO(a), CO(b), …, CO(zn)) a

zn

„ CO(stem)=min(CO(branches))
( ) ( ( ))

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 13


Controllability Calculation
(1,1) (1,1) (CC0, CC1)
PI1
(1,1)
((1,1)
, )
PI2 (1 1)
(1,1)
PO0
((2,2)
, )
level1 PO1
(1,1) (2,2) PO2
PI3

(1,1) (1,1)
PI1
(1,1)
(1,1)
PI2 (1,1)
PO0
level2
(2,2) (3,5)
PO1
(3,5)
((1,1)
, ) ((2,2)
, ) PO2
PI3
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 14
Controllability Calculation
(1 1)
(1,1) (1,1)
(1 1)
PI1 (CC0, CC1)
(1,1)
(2,6)
(1,1)
PI2 ((1,1)
, )
(2,7)
PO0
(2,2) (3,5)
(2 7)
(2,7) PO1
level3 (3,5)
(1,1) (2,2) PO2
PI3

(1,1) (1,1)
PI1
(1,1)
(2 6)
(2,6)
(1,1)
PI2 (1,1)
(2,7)
PO0
level4
(2,2) (3,5) (5,7)
(2,7) PO1
(3,5)
((1,1)
, ) ((2,2)
, ) PO2
PI3
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 15
Observability Calculation
(1,1) (1,1)
PI1
(1,1) (2,6)
(1,1) 3
PI2 (1,1)
(2,7) 0
PO0
(2,2) (3,5)
((5,7)
, )
(2 7)
(2,7) PO1
level1 0
(3,5) 3
(1,1) (2,2) PO2
PI3 0

(1,1) (1,1) 8
PI1
(1,1) 8 (2,6)
(1,1)
6 3
PI2 (1,1)
6 (2,7) 0
2 PO0
level2
(2,2) (3,5)
(5,7)
(2,7) PO1
0
(3,5) 3
(1,1) (2 2)
(2,2) PO2
PI3 0
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 16
Observability Calculation
(1,1) (1,1) 8
PI1
(1,1) 8 (2,6)
(1,1)
6 3
PI2 (1,1)
6 (2,7) 0
2 PO0
(2,2) (3,5)
((5,7)
, )
3 (
(2,7)
) PO1
level3 3 0
(3,5)
(1,1) (2,2) PO2
PI3 0
3

(1,1) (1,1) 8
PI1
4 (1,1) 8 (2,6)
(1,1)
6 3
PI2 (1,1)
6 (2,7) 0
2 PO0
level4
4 (2,2) (3,5)
(5,7)
3 (2,7) PO1
3 0
(3,5)
(1,1) 4 (2 2)
(2,2) O
PO2
PI3 0
3
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 17
Sequential Measure Difference
† Combinational
„ Increment CC0,, CC1,, CO whenever y you pass
p
through a gate, either forwards or backwards
† Sequential
q
„ Increment SC0, SC1, SO only when you pass
through
g a flip-flop, either forwards or
backwards, to Q, Q’, D, C, SET, or RESET
† Both
„ Must iterate on feedback loops until
controllabilities stabilize

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 18


D Flip-Flop Examples
† Consider a D flip flop as shown below
D Q

C
RESET
† Th
The combinational
bi ti l andd sequential
ti l
difficulties of controlling Q to a 1 are
„ CC1(Q)
CC1(Q)=CC1(D)+CC1(C)+CC0(C)+CC0(RESET)
CC1(D) CC1(C) CC0(C) CC0(RESET)
„ SC1(Q)=SC1(D)+SC1(C)+SC0(C)+SC0(RESET)
+1
„ CC1 measures how many lines in the circuit
must be set to make Q as 1
„ SC1 measures how many flip-flops in the circuit
must be clocked to set Q to 1
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 19
D Flip-Flop Examples
† Set Q to a 0
„ CC0(Q)=min
(Q) ((CC1(RESET)+CC0(C),
( ) ( ), CC0(D)+
( )
CC1(C)+CC0(C)+CC0(RESET))
„ SC0(Q)=min (SC1(RESET)+SC0(C), SC0(D)+
SC1(C)+SC0(C)+SC0(RESET)+1
† Observability of D
„ CO(D)=CO(Q)+CC1(C)+CC0(C)+CC0(RESET)
„ SO(D)=SO(Q)+SC1(C)+SC0(C)+SC0(RESET)+
( ) (Q) ( ) ( ) ( )
1
† Observability
y of RESET
„ CO(RESET)=CO(Q)+CC1(Q)+CC0(C)+CC1(RES
ET)

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 20


D Flip-Flop Examples

„ SO(RESET)= CO(Q)+CC1(Q)+CC0(C) +
CC1(RESET)+1
† Observability of C
„ CO(C)
CO(C)=min
min [CO(Q)+CC0(RESET)+CC1(C)+
CC0(C)+CC0(D)+CC1(Q), CO(Q)+CC1(RESET)
+CC1(C)+CC0(C)+CC1(D)]
„ SO(C)=min [SO(Q)+SC0(RESET)+SC1(C)+
( ) ( ) (Q),
SC0(C)+SC0(D)+SC1(Q),
SO(Q)+SC1(RESET)+SC1(C)+SC0(C)+SC1(D)]
+1

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 21


Algorithm
1. For all PIs, CC0=CC1=1 and SC0=SC1=0
2 For all other nodes,
2. nodes CC0=CC1=SC0=SC1=infinity
3. Go from PIs to POs, using CC and SC equations to
get controllabilities -- iterate on loops until SC
stabilizes -- convergence guaranteed
4. For all POs,, set CO = SO =infinity y
5. Work from POs to PIs, Use CO, SO, and
controllabilities to get observabilities
6. Fanout stem (CO, SO) = min branch (CO, SO)
7. If a CC or SC (CO or SO) is infinity, that node is
uncontrollable (unobservable)

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 22


Sequential SCOAP Measures
† Initialization
(CC0,CC1)
(1,1)
(1 1) (1,1)
(1 1) [SC0 SC1]
[SC0,SC1]
[0,0] [0,0]
R

(1,1)
Z
[0 0]
[0,0]
DQ (inf,inf)
[inf,inf]

(inf,inf) (inf,inf)
DQ
[inf,inf] [inf,inf]

CL
(1,1)
[0,0]

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 23


Sequential SCOAP Measures
† After one iteration
(1,1)
(1 1) (1,1)
(1 1)
[0,0] [0,0] (2,inf) (4,inf)
R [0,inf]
[0,inf]
(4,inf)
(4 inf)
[0,inf]

(1,1)
Z
[0 0]
[0,0] (2,2) (inf,inf)
[0,0]
DQ
[inf,inf]
(1,1)
(inf,inf) [
[0,0]
]
(3,inf) DQ (inf,inf)
[inf,inf] (inf,inf) [inf,inf]
[0,inf]
[inf,inf]

CL (1,1)
[0,0] (1,1)
(7,inf)
[0,0]
[0,inf]

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 24


Sequential SCOAP Measures
† After two iterations
(1,1)
(1 1) (1,1)
(1 1)
(2,14) (4,inf)
[0,0] [0,0]
R [0,1] [0,inf]

(4,inf)
(4 inf)
[0,inf]

(1,1)
Z
[0 0]
[0,0] (2,2) (9,inf)
[0,0]
DQ
[1,inf]
(1,1)
(5,inf) [
[0,0]
]
(3,9) DQ (5,inf)
[1,inf] (inf,6) [1,inf]
[0,1]
[inf,1]

CL (1,1)
[0,0] (1,1)
(7,10)
[0,0]
[0,1]

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 25


Sequential SCOAP Measures
† After three iterations
(1,1)
(1 1) (1,1)
(1 1)
(2,14) (4,27)
[0,0] [0,0]
R [0,1] [0,3]

(4,27)
(4 27)
[0,3]

(1,1)
Z
[0 0]
[0,0] (2,2) (9,17)
[0,0]
DQ
[1,2]
(1,1)
(5,11) [
[0,0]
]
(3,9) DQ (5,11)
[1,2] (12,6) [1,2]
[0,1]
[2,1]

CL (1,1)
[0,0] (1,1)
(7,15)
[0,0]
[0,1]

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 26


Sequential SCOAP Measures
† After stabilization
(1,1)
(1 1) (1,1)
(1 1)
(2,14) (4,27)
[0,0] [0,0]
R [0,1] [0,3]

(4,27)
(4 27)
[0,3]

(1,1)
Z
[0 0]
[0,0] (2,2) (9,17)
[0,0]
DQ
[1,2]
(1,1)
(5,11) [
[0,0]
]
(3,9) DQ (5,11)
[1,2] (12,6) [1,2]
[0,1]
[2,1]

CL (1,1)
[0,0] (7,15) (1,1)
[0,1] [0,0]

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 27


Sequential SCOAP Measures
† Observability measures
(1,1)
(1 1) 26 (1,1)
(1 1)53
53
(2,14)40 (4,27) 0
[0,0] 3 [0,0] 3
R [0,1] 2 [0,3] 0

(4,27)
(4 27) 0
[0,3] 0

(1,1) 26
Z
18
[0 0] 3
[0,0] (2,2) 25
2 (9,17)10
[0,0] 3
DQ
[1,2] 1
(1,1) 36
[0 0] 4
[0,0]
(5,11)22
(3,9) 24 DQ (5,11)22
[1,2] 2 [1,2] 2
(12,6)21 [0,1] 3
[2,1] 2
CL (1,1) 36
[0,0] 4 (1,1) 38
18 (7,15)12
[0,0] 5
2 [0,1] 2

Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 28


Summary
† Testability approximately measures
„ Difficulty
y of setting
g circuit lines to 0 or 1
„ Difficulty of observing internal circuit lines
† Uses
„ Analysis of difficulty of testing internal circuit
parts
† Redesign circuit hardware or add special test
hardware where measures show bad controllability or
obse abilit
observability
„ Guidance for algorithms computing test
patterns – avoid using hard
hard-to-control
to control lines
„ Estimation of test vector length
„ Estimation of fault coverage – 3-5 % error
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 29

Вам также может понравиться