Algorithm Search⌘K

Techniquecore

Built-in self-test

Also called BIST, logic BIST.

Puts a pattern generator, usually an LFSR, and a response compactor such as a MISR on the chip, so the circuit tests itself at speed.

Built-in self-test, or BIST, puts the test equipment for a digital circuit on the chip itself. A test pattern generator, usually a linear feedback shift register (LFSR), feeds the circuit under test with a long pseudorandom sequence, and a response compactor, usually a multiple-input signature register (MISR), folds all the outputs into a short signature. At the end, the chip compares the signature with the one computed for the good circuit and reports pass or fail. The test runs at the clock rate of the chip, needs no stored vectors, and can run again in the field. It has two costs that a designer must measure: random patterns miss some faults, and compaction can alias, so that a faulty circuit ends with the good signature. For a kk-bit signature and the model in which every error stream is equally likely, the aliasing probability is just under 2−k2^{-k}. This is an EDA page. The LFSR here only needs a long period and good spread of patterns. Its weakness as a cipher, on the cryptographic LFSR page, does not matter for test.

In plain words

A tester is an expensive machine that stores test inputs and the right outputs. BIST puts a small tester inside the chip.

A shift register with XOR feedback makes a long stream of patterns that look random. The circuit runs on them at full speed. Its outputs go into a second shift register, which mixes them into a short code, the signature. At the end, the chip checks the signature against the right one and gives one bit: pass or fail.

Two things can go wrong. Some faults are hard to hit with random patterns. And a bad circuit can, by chance, end with the right signature. With a 32-bit signature and a simple model of errors, that chance is about one in four billion.

When it applies

  • The chip must be tested at its own clock rate, or many times in its life, for example at each power-on in a safety system, or there are many cores and few tester pins.
  • The circuit under test is combinational, or it has full scan design, so that each pattern is independent of the ones before it.
  • No line of the circuit can take an unknown value XX in test mode. An XX that enters the signature register makes the final signature unknown.
  • Random patterns reach a high enough fault coverage, or the faults that they miss get test points, special seeds or stored patterns from ATPG.

The template

  1. BIST(CUT, the LFSR polynomial p and seed s, the MISR polynomial q, N, the good signature S*)
  2. 1state ← s; r ← 0
  3. 2for t ← 1 to N do
  4. 3x ← the bits of state, or of a phase shifter fed by state
  5. 4w ← CUT(x)
  6. 5r ← (x · r + w) mod q
  7. 6state ← the next state of the LFSR by p
  8. 7if r = S* then return pass else return fail

The holes are the pattern generator in lines L1, L3 and L6, the compactor in line L5, the number of patterns NN, and the polynomials. The good signature S∗S^* comes from a simulation of the good circuit with the same seed and the same NN, before the chip is made.

The pattern generator. An LFSR with nn stages and a primitive feedback polynomial of degree nn goes through all 2n−12^n - 1 nonzero states and then repeats, as shown on the LFSR page. So within one period it applies each nonzero vector once, in a fixed order that looks random. It never gives the all-zero vector.

The compactor. Line L5 reads the register rr as a polynomial over GF(2) of degree less than k=deg⁡qk = \deg q. For one output bit ww per clock, this is a single-input signature register, and the step r←(xr+w) mod qr \leftarrow (x r + w) \bmod q is one step of long division by shift and XOR, as in GF(2) polynomial arithmetic. By induction on tt, after the bits b0,b1,…,bm−1b_0, b_1, \ldots, b_{m-1} the register holds

r=R(x) mod q(x),R(x)=∑i=0m−1bi xm−1−i,r = R(x) \bmod q(x), \qquad R(x) = \sum_{i=0}^{m-1} b_i\, x^{m-1-i},

since rt+1=xrt+bt mod qr_{t+1} = x r_t + b_t \bmod q. So the signature is the remainder of the response stream divided by qq, the same computation as a cyclic redundancy check. With kk outputs, ww is a vector of kk bits that is added into the kk stages at each step, and the register is a MISR.

Aliasing. Let the faulty stream be R+ER + E with an error polynomial E≠0E \ne 0 of degree less than mm. The map from streams to signatures is linear, so the faulty signature is the good one exactly when E mod q=0E \bmod q = 0, that is, when qq divides EE. The multiples of qq with degree less than mm are quq u with deg⁡u<m−k\deg u < m - k, so there are 2m−k−12^{m-k} - 1 nonzero ones. If all 2m−12^m - 1 nonzero error streams are equally likely, as in Smith (1980), the aliasing probability is

Palias=2m−k−12m−1<2−k,P_{\text{alias}} = \frac{2^{m-k} - 1}{2^m - 1} < 2^{-k},

and it tends to 2−k2^{-k} as mm grows. The same count works for a MISR. Over mm clocks with kk inputs, the map from the mkmk error bits to the kk signature bits is linear and onto, since the last input word is added straight into the register, so 2mk−k−12^{mk - k} - 1 nonzero errors alias. The result holds for every qq of degree kk, primitive or not. Two more facts follow from the division. If qq has the term 1 and k≥1k \ge 1, then qq has no common factor with xjx^j, so qq divides xjB(x)x^j B(x) only when qq divides B(x)B(x). A burst of errors no longer than kk bits is E=xjB(x)E = x^j B(x) with B≠0B \ne 0 of degree less than kk, which qq cannot divide. So every single-bit error and every burst of at most kk bits is detected.

Example. Take the circuit g=NAND(a,b)g = \mathrm{NAND}(a, b), h=NAND(b,c)h = \mathrm{NAND}(b, c), z=NAND(g,h)z = \mathrm{NAND}(g, h), so z=ab+bcz = ab + bc, with 8 lines and 16 single stuck-at faults. The pattern generator is the LFSR with the recurrence st+3=st+1⊕sts_{t+3} = s_{t+1} \oplus s_t, whose polynomial x3+x+1x^3 + x + 1 is primitive, and the seed s0s1s2=100s_0 s_1 s_2 = 100. The pattern at time tt is (a,b,c)=(st,st+1,st+2)(a, b, c) = (s_t, s_{t+1}, s_{t+2}). The compactor is a single-input signature register with q=x3+x+1q = x^3 + x + 1.

tt 0 1 2 3 4 5 6
abcabc 100 001 010 101 011 111 110
zz 0 0 0 0 1 1 1
rr after the step 000 000 000 000 001 011 111

The 7 patterns are all the nonzero vectors, and the good signature is S∗=111S^* = 111. Each of the 16 faults changes the output stream, and none of them ends with 111, so all 16 are detected. Some faults share a signature: bb/0 and zz/0 give the stream 0000000, and gg/0, hh/0 and zz/1 give 1111111. Both streams give the signature 000. For the second one, the stream is x6+x5+⋯+1=(x7+1)/(x+1)x^6 + x^5 + \cdots + 1 = (x^7 + 1)/(x + 1), and x3+x+1x^3 + x + 1 divides it, since it divides x7+1x^7 + 1 and has no common factor with x+1x + 1. This does not change pass or fail, but it means that the signature cannot tell these faults apart in diagnosis.

Aliasing shows up with other error streams. The stream 0001100 differs from the good stream 0000111 in the bits 3, 5 and 6, so E=x3+x+1=qE = x^3 + x + 1 = q, and its signature is 111, the good one. Of the 127 nonzero error streams of length 7, exactly 24−1=152^4 - 1 = 15 alias, a fraction of 15/127≈0.11815/127 \approx 0.118, just under 2−3=0.1252^{-3} = 0.125.

Classic examples

  • Logic BIST of scan designs. In the STUMPS design of Bardell and McAnney, one LFSR feeds many scan paths at once through a phase shifter, the circuit captures one response per pattern, and a MISR takes the outputs of all paths. This is test-per-scan: each pattern costs a full shift.
  • BILBO. The register of Könemann, Mucha and Zwiehoff (1979) works as a normal register, as a shift register, as an LFSR pattern generator or as a MISR. Two such registers around a block of logic test it, and then swap roles to test the next block.
  • Fault grading. Fault simulation of the pseudorandom patterns gives the coverage and the list of missed faults. The result depends on the fault list, so state whether it is the full or the collapsed list.
  • Memory BIST. Embedded memories are tested by on-chip controllers that run deterministic march sequences of writes and reads, not random patterns, since memory faults follow the layout of the cell array.
  • Signature checks outside test. The same polynomial division checks data on links and disks as a cyclic redundancy check.

Variations

  • Test points. A line that random patterns rarely set gets a control point, an extra gate that forces it in test mode with a higher probability. A line that is rarely observed gets an observation point into the compactor. The SCOAP measures and their probability forms point to the lines.
  • Weighted random patterns. Bias each input to 1 with a probability other than 1/2, chosen per input, so that wide AND and OR gates are hit more often.
  • Reseeding. For each missed fault, ATPG finds a test cube, and the seed that makes the LFSR produce it is the solution of a linear system over GF(2), since each LFSR output bit is a linear function of the seed. The chip stores the seeds, which are much shorter than the patterns.
  • Exhaustive and pseudo-exhaustive test. If each output depends on at most ww inputs, apply all 2w2^w vectors to each cone. A counter does it, or an LFSR with an extra NOR term that adds the all-zero state, which gives a de Bruijn sequence of period 2w2^w.
  • Other compactors. Counting the ones or the transitions in a stream needs less hardware but misses more errors than polynomial division. Space compactors of XOR trees cut the number of outputs before the MISR.
  • Error models. Williams, Daehn, Gruetzner and Starke (1988) study the model where each bit is wrong with probability pp, independently. There the aliasing probability depends on qq and on pp, and primitive polynomials alias much less in general than non-primitive ones.

Pitfalls

  • Faults that random patterns miss. The output of a 16-input AND gate stuck at 0 needs all 16 inputs at 1, a probability of 2−162^{-16} per uniform random pattern. Then NN patterns detect it with probability 1−(1−2−16)N1 - (1 - 2^{-16})^N, which is 0.142 for N=104N = 10^4 and 0.783 for N=105N = 10^5, and a 95% chance needs about 196 000 patterns. An LFSR that feeds exactly these 16 inputs covers all nonzero vectors in 65 535 patterns. But in a real design the LFSR feeds many inputs and its period is far longer than the test, so the uniform model is the right guide.
  • The missing all-zero vector. For z=NOR(a,b,c)z = \mathrm{NOR}(a, b, c) fed by the 3-stage LFSR of the example, the faults zz/0, aa/1, bb/1 and cc/1 all need the vector 000, which the LFSR never gives. So 4 of the 8 faults are missed after the full period.
  • Unknown values. One XX into the MISR makes every later signature bit unknown. Memories, analog blocks, bus contention and uninitialized latches must be blocked or masked in test mode.
  • The aliasing number is a model value. The bound 2−k2^{-k} assumes equally likely error streams. A real fault gives a structured error, often the same error in many cycles. Fault simulation of the actual signature, not the model, decides which faults alias.
  • Correlated scan paths. Neighbor stages of one LFSR give shifted copies of one sequence. If they feed neighbor scan paths directly, the paths get the same bits one cycle apart, and some patterns can never occur. A phase shifter of XOR gates mixes the stages first.
  • The good signature must match the netlist. S∗S^* is computed by simulation of the exact gates, seed and pattern count. Any change to the netlist, the seed or NN needs a new S∗S^*.
  • Faults in the BIST logic. A fault in the comparator or in the pass flag can pass every chip. Test the BIST hardware through scan, or make the chip output the signature itself.
  • Power. Random patterns switch far more lines per clock than normal operation, and at full speed this can cause supply droop and false failures.

Exercises

  1. From the seed 100 and the recurrence st+3=st+1⊕sts_{t+3} = s_{t+1} \oplus s_t, list the 7 patterns of the example, and check that the next pattern is 100 again.
  2. Prove that a signature register whose polynomial qq of degree kk has the term 1 detects every burst of errors of length at most kk.
  3. Count the aliasing error streams of length 8 for q=x3+x+1q = x^3 + x + 1, and check that there are 25−1=312^5 - 1 = 31 of the 255 nonzero ones.
  4. For z=NOR(a,b,c)z = \mathrm{NOR}(a, b, c), change the 3-stage LFSR so that it also gives the vector 000, and check that it then detects all 8 faults.

References

  1. B. Könemann, J. Mucha and G. Zwiehoff, Built-in logic block observation techniques, Digest of Papers, 1979 Test Conference, 37 to 41, 1979, the BILBO register, which works as a normal register, a shift register, a pattern generator or a signature register
  2. J. E. Smith, Measures of the effectiveness of fault signature analysis, IEEE Transactions on Computers C-29(6), 510 to 514, 1980, the probability that a signature register misses an error when all error streams are equally likely
  3. T. W. Williams, W. Daehn, M. Gruetzner and C. W. Starke, Bounds and analysis of aliasing errors in linear feedback shift registers, IEEE Transactions on Computer-Aided Design 7(1), 75 to 83, 1988, aliasing under independent bit errors, and the comparison of primitive and non-primitive feedback polynomials
  4. Paul H. Bardell, William H. McAnney and Jacob Savir, Built-In Test for VLSI, Pseudorandom Techniques, Wiley-Interscience, 1987, the chapters Pseudorandom Sequence Generators, Test Response Compression Techniques, Shift-Register Polynomial Division and Random Pattern Built-In Test
  5. Michael L. Bushnell and Vishwani D. Agrawal, Essentials of Electronic Testing for Digital, Memory and Mixed-Signal VLSI Circuits, Kluwer, 2000, the chapter Built-In Self-Test (pattern generators, response compaction, aliasing, BIST architectures)
  6. Miron Abramovici, Melvin A. Breuer and Arthur D. Friedman, Digital Systems Testing and Testable Design, IEEE Press, 1994, the chapters Compression Techniques and Built-In Self-Test

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • five exercises