Sie sind auf Seite 1von 1

1

Algorithm 1: X-Based TVO + B-Fill


Input: Non-Specified Test Cube Set {T C1 , T C2 , T C3 . . . T Cn } in the order suggested by the Tool.
0
Output: Reordered and Fully Specified Test Vector Set π = {T1 , T2 , T3 . . . Tn } such that peak cost is optimized.
/* X-based TVO */
0 0 0 0 0
1 Let π = {T C1 , T C2 , T C3 . . . T Cn } be an ordering of {T C1 , T C2 , T C3 . . . T Cn } such that the number of X-bits in T Ci is
0
less than or equal to the number of X-bits in T Ci+1 , for all 1 ≤ i ≤ n − 1;
2 if n is even then
0 0 0 0 0 0 0 0 0
3 π = {T1 , T2 . . . Tn } = {T C1 , T Cn , T C2 , T Cn−1 , T C3 , T Cn−2 . . . T Cn/2 , T Cn−(n/2−1) };
4 end
5 else
0 0 0 0 0 0 0 0 0 0
6 π = {T1 , T2 . . . Tn } = {T C1 , T Cn , T C2 , T Cn−1 , T C3 , T Cn−2 . . . T Cbn/2c , T Cn−(bn/2c−1) , T Cdn/2e } ;
7 end
/* B-Fill */
8 for i = 2 → n − 1 do
9 for j = 1 → N umber of bits in T est V ector do
10 switch (Tj,i−1 , Tj,i , Tj,i+1 ) do
11 case (0, X, 0) Tj,i ← 0;
12 case (0, X, X) Tj,i ← 0;
13 case (1, X, 1) Tj,i ← 1;
14 case (1, X, X) Tj,i ← 1;
15 case (X, X, 0) Tj,i ← 0;
16 case (X, X, 1) Tj,i ← 1;
17 otherwise
18 Tj,i ← Tj,i ;
19 end
20 end
21 end
22 end
23 for i = 2 → n do
24 Counti ← 0;
25 for j = 1 → N umber of bits in T est V ector do
26 if (Tj,i−1 , Tj,i ) = (0, 1)or(1, 0) then
27 Counti ← Counti +1;
28 end
29 end
30 end
31 for i = 2 → n − 1 do
32 for j = 1 → N umber of bits in T est V ector do
33 if (Tj,i−1 , Tj,i , Tj,i+1 ) = (0, X, 1) or (1, X, 0) then
34 if Counti ≤ Counti+1 then
35 Tj,i ← Tj,i+1 ;
36 Counti ← Counti +1;
37 end
38 else
39 Tj,i ← Tj,i−1 ;
40 Counti+1 ← Counti+1 +1;
41 end
42 end
43 end
44 end
45 Perform MT-fill for leftover X-bits;

Das könnte Ihnen auch gefallen