Abstract:
Apparatus is disclosed for testing an electrical circuit by means of signature analysis. Responses to a sequence of test patterns from the circuit under test are supplied to a linear feedback signature register (LFSR) which produces a signature signal at its output representing its current state in dependence upon its prior state and the received response signal. A programmed read-only-memory is addressed by these state signals of the LFSR and produces, at its output, a logical &#34;1&#34; signal if the current signature represents a permissible state of the LFSR and a logical &#34;0&#34; if the state is not permissable. This checking occurs throughout and during the testing sequence in contrast to conventional signature analysis wherein the comparison only occurs at the end of the testing sequence.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to apparatus for either on-line or off-line testing of an electrical circuit. More particularly, the invention relates to circuit testing apparatus employing a linear feedback shift register (&#34;LFSR&#34;) for signature analysis. 
     Methods and apparatus for testing electrical circuits by &#34;signature analysis&#34; are well known. Commercial devices such as the Hewlett Packard HP 5004A signature analyzer have been available for a number of years. Publications describing such devices and methods of testing include &#34;Hexadecimal Signatures Identify Trouble Spots in Microprocessor Systems&#34; by G. Gordon et al., Electronics Magazine, Mar. 3, 1977, pp. 89-96; &#34;Die Signatur-Analyse&#34; by K. Heine, Elektronik Magazine (1979), Volume 1, pp. 48-51; &#34;Logic-state and Signature Analysis Combine for Fast, Easy Testing&#34; by I. Spector, Electronics Magazine, June 8, 1978, pp. 140-145. 
     With the signature analysis method of testing, an electrical circuit having an input and an output is connected at its output to a linear feedback shift register (LFSR) and connected at its input to an automatic test pattern generator (ATG). The ATG applies test patterns sequentially to the input of the circuit under test (CUT) for a prescribed number of test cycles. The output signals produced during this test sequence causes the LFSR to pass through a succession of specific states so that, after completion of the test, the LFSR contains a prescribed, known &#34;signature&#34; (bit pattern) if the ATG, the CUT and the LFSR are working properly. 
     Upon the completion of the test, the bit pattern in the LFSR is compared to the known bit pattern of the correct signature (i.e., the signature of a properly-working CUT) to determine whether any of the elements of the test system (ATG, CUT and LFSR) is faulty. 
     During the test, the contents of the LFSR change from one &#34;signature&#34; to the next as the LFSR moves through its successive states. For a 16-bit LFSR, for example, there are 2 16  different possible signatures. Normally, however, the LFSR passes through only a small percentage of this maximum number of signatures during a given test. 
     Even assuming that the ATG and the LFSR hardware itself is functioning properly, the signature analysis method of circuit testing has two basic problems: 
     (1) It is difficult, if not impossible, to determine when (during which test cycle) the error appeared in the CUT from the final LFSR signature at the completion of the test sequence (assuming that the final signature is incorrect). 
     (2) It is possible for the LFSR to land in the correct state at the conclusion of a test sequence, indicating the correct signature, even though the CUT is faulty and produces multiple errors. 
     To understand the latter problem, it is necessary to analyze the error detection capabilities of the LFSR using probabilistic mathematics. It will be assumed, throughout this analysis, that all output symbols produced by the CUT are equally likely and there is no correlation between them. It will be assumed also (1) that the LFSR is designed to produce a maximal length random number sequence if continually presented with null symbols; (2) that the LFSR cannot get into a particular state from two different states upon receipt of the same input symbol and, similarly, (3) that the LFSR can only make a transition from one specific state to another upon receipt of one specific symbol. 
     Consider a test symbol with an ATG, CUT and LFSR connected together, which passes through N test cycles. The CUT therefore produces a string of N output symbols during the testing procedure which could be a correct sequence a or, in the alternative, an i symbol error sequence, b. b is thus a sequence of N symbols which differs from the sequence a in exactly i positions. It is assumed, in this regard, that all i symbol errors (for any particular value of i) are equally likely. 
     During the test sequence the LFSR starts in some initial state, S 0 , and compresses the string a or b of N symbols. In compressing these symbols, the LFSR will pass through N+1 states in total (including the initial and final states). However, since it is possible that states may be revisited, the number of distinct states may be less than this. We let A i  denote the average number of distinct states visited when a string of i symbols is compressed; we let M denote the total number of LFSR states (e.g., 2 16  for a 16-bit LFSR). 
     Now, therefore: 
     
         A.sub.0 =1 
    
     (i.e., the initial state) 
     
         A.sub.i+1 =A.sub.i +P, 
    
     where P is the probability that the (i+1) st  symbol causes a transition to a state which has not previously been visited. Since all symbols are equally likely, it follows that all next states are equally likely. 
     
         P=(M-A.sub.i)/M; 
    
     i.e., the number of unvisited states divided by the total number of states. 
     
         A.sub.i+1 =A.sub.i +(M-A.sub.i)/M=A.sub.i (M-1)/M+1 
    
     Let 
     
         α=(M-1)/M; 
    
     and 
     
         A.sub.i+1 =αA.sub.i +1 
    
     Hence, 
     
         A.sub.0 =1, A.sub.1 =α+1, A.sub.2 =α.sup.2 +α+1, 
    
     
         A.sub.i =α.sup.i +α.sup.i-1 + . . . +α.sup.2 +α+1. 
    
     This geometric series can be summed to yield: 
     
         A.sub.i =(1-α.sup.i+1)/(1-α) 
    
     It follows that the fraction of states visited (on the average) during the compression of i symbols can be written as A i  /M. 
     In considering the error coverage of the LFSR, it is necessary to define some additional notation: 
     a i  =the i th  symbol in a; and likewise 
     b i  =the i th  symbol in b; 
     S i  (a)=the LFSR state after processing the first i symbols of a; and 
     S F  (a)=the LFSR state after a has been completely compressed. 
     Furthermore, 
     P i  =the probability that the LFSR detects an i-symbol error (i.e., an erroneous sequence yields an incorrect signature); and 
     R i  =the probability that the LFSR does not detect an i-symbol error (i.e., an erroneous sequence yields the correct signature). By definition P i  =1-R i . 
     We wish to determine P i  and R i  for i≧1. 
     Case 1: Consider a 1-symbol error sequence. Let b differ from a in the j th  symbol. 
     
         S.sub.j-1 (a)=S.sub.j-1 (b) 
    
     Since the j th  symbols differ, it follows that 
     
         S.sub.j (a)≠S.sub.j (b). 
    
     Now since the string match on all remaining symbols, it follows that 
     
         S.sub.k (a)≠S.sub.k (b), 
    
     for all k≧j, and hence 
     
         S.sub.F (a)≠S.sub.F (b) 
    
     
         P.sub.1 =1 and R.sub.1 =0 
    
     Case 2: Consider 2-symbol errors. Let the errors be in positions k and l and assume without loss of generality that k≦l. 
     
         S.sub.k-1 (a)=S.sub.k-1 (b) 
    
     
         S.sub.k (a)≠S.sub.k (b) 
    
     
         S.sub.j (a)≠S.sub.j (b), 
    
     for k≦j≦l. 
     Now since a and b match in all symbols after the l th  symbol, in order for the erroneous string to be accepted (produce the correct final signature), we must have: 
     
         S.sub.l (a)=S.sub.l (b). 
    
     The probability of this occuring given that S l-1  (a)≠S l-1  (b) and a l  ≠b l  is (1/M), where M is the total number of states (symbols) of the LFSR (input alphabet), so that: 
     
         P.sub.2 =(M-1)/M, R.sub.2 =1/M. 
    
     It should be noted that this result is independent of the relative positions of the errors. 
     Case 3: Consider the general case of i-symbol errors, for i≧2. Let the last two symbol errors be in positions k and l, with k≦l. Two subcases must be considered. 
     Case A: S k  (a)=S k  (b). 
     After compressing the string up to and including the (i-1) st  erroneous symbol, the LFSR state matches the corresponding state for the correct sequence. 
     Hence, it follows that: 
     
         S.sub.l (a)≠S.sub.l (b) 
    
     and, since there are no more errors, it follows that 
     
         S.sub.F (a)≠S.sub.F (b). 
    
     Hence i-symbol errors of this form will always be detected. 
     Case B: S k  (a)≠S k  (b). 
     Given this condition, the probability of having S F  (a)=S F  (b) is 1/M, (i.e., the last error may &#34;correct&#34; the state), but the probability that S k  (a)=S k  (b) is simply P i-1  (i.e., the probability that an (i-1) symbol error is detected): 
     
         R.sub.i =P.sub.i-1 /M and P.sub.i =1-P.sub.i-1 /M. 
    
     It is then a relatively simple matter to show that: ##EQU1## 
     For M≧1, this can be solved to yield: ##EQU2## 
     For an eight (or more) bit LFSR, P i  can be approximated by: ##EQU3## 
     It has thus been shown that the signature analysis method of testing an electrical circuit is guaranteed to detect all erroneous strings which differ in exactly one symbol from the correct string. The probability that the LFSR will detect other erroneous string has also been determined and shown to be practically independent of the number of erroneous symbols (once there are more than one) and independent of the relative positions of the erroneous symbols. 
     There is therefore a finite probability that the LFSR will arrive at a correct final state, although the circuit under test is, in fact, faulty. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide apparatus for testing an electronic circuit using the signature analysis technique which is able to determine, with high probability, when the CUT produces an incorrect output symbol in response to a test stimulus. 
     It is a further object of the present invention to provide apparatus of the above-noted type for which the probability of error detection is substantially increased as compared to signature analysis apparatus of the prior art. 
     These objects, as well as other objects which will become apparent in the discussion that follows, are achieved, according to the present invention, by connecting the address input of a programmed, read-only-memory (ROM) to the output of the LFSR so that the successive state signals produced by the LFSR during the test sequence become addresses for the ROM. The ROM is programmed to produce a first signal at its data output upon receipt of a state signal if the state signal indicates a permissible state of the LFSR during a test of the electrical circuit, and to produce a second signal at its data output upon receipt of a state signal if this state signal does not represent a permissible state of the LFSR. 
     According to a preferred feature and embodiment of the invention, a second programmed read-only-memory (ROM) is directly connected to the output of the electrical circuit under test (CUT). This second ROM is programmed to produce a first signal at its data output upon receipt of a permissible test response of the CUT, to produce a second signal at the data output upon receipt of a test response which is not a permissible response of the CUT. 
     The foregoing, as well as other objects, features and advantages of the present invention will become apparent from the following, more particular description of the preferred embodiments of the invention, as illustrated in the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a simple signature analyzer of the type known in the prior art. 
     FIG. 2 is a block diagram of an automatic signature analyzer of the type known in the prior art. 
     FIG. 3 is schematic diagram of a typical LFSR. 
     FIG. 4 is a block diagram of a signature analyzer according to a preferred embodiment of the present invention. 
     FIG. 5 is a block diagram of an automatic test pattern generator for use in the analyzer of FIG. 4. 
     FIG. 6 is a state diagram illustrating possible states of an LFSR. 
     FIG. 7 is a graph showing the probability of error detection using a signature analyzer of the prior art. 
     FIG. 8 is a graph showing the probability of error detection using the signature analyzer according to the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The preferred embodiments of the present invention will now be described with reference to FIGS. 1-8 of the drawings. Identical elements in the various figures are designated with the same reference numerals. 
     FIG. 1 illustrates a simple signature analyzer of the type known in the prior art. With this analyzer, an automatic test pattern generator (ATG) 10 applies a sequence of test patterns (stimuli) to the circuit under test (CUT) 12. The response to each test pattern is passed to a linear feedback shift register (LFSR) 14 which changes its state upon receipt of each response. The state of the LFSR 14 is reflected by a &#34;signature&#34;: namely, the distinct bit pattern appearing at the parallel output lines 16 of the LFSR. This signature is passed to a digital display device 18 which displays a unique set of characters defined by each different signature. Both the CUT 12 and the LFSR 14 are brought to their initial state at the beginning of the test by a pulse on an input line 20. Each stimulus and response is clocked into the CUT and the LFSR, respectively, by a clock pulse on and input line 22. 
     In practice, the operator of the signature analyzer shown in FIG. 1 notes the displayed signature only at the conclusion of each test sequence. He then compares this signature with the correct signature noted in a test manual to determine if the CUT is operating properly. 
     The manual comparison step may be eliminated by replacing the display device 18 with a comparator 24 as shown in FIG. 2. This comparator compares the final signature provided by the LFSR at the conclusion of a test sequence with the correct signature stored in a memory or register 26. If the two signatures are equal, an output pulse is clocked into a &#34;D&#34; type flip-flop 28. If the signatures are not the same, the flip-flop remains in its original, reset state. A timing pulse indicating the final test is received from the ATG on a separate line 30. 
     The automatic test apparatus of FIG. 2 thus produces a signal on the &#34;good&#34; (&#34;G&#34;) output of the flip-flop 28 if the CUT test is operating properly. Otherwise, a signal will be produced on the &#34;bad&#34; (&#34;B&#34;) output of this flip-flop. 
     FIG. 3 illustrates a typical 8-bit LFSR. This circuit receives digital signals on one or more of the input lines D 0  -D 7  and produces a unique &#34;signature&#34; on output lines Q 0  -Q 7 . The &#34;initialize&#34; and &#34;clock&#34; inputs are also shown in this schematic. 
     FIG. 4 illustrates signature analysis apparatus which employs the principles and concepts of the present invention. The apparatus in FIG. 4 is similar to the testing apparatus of FIGS. 1 and 2 except that the output of either the LFSR 14 or the CUT 12, or both, is supplied as an address to a read-only-memory (ROM) 32 or 34, respectively. The ROM&#39;s 32 and 34 are bit-wise addressable; that is, the contents of each address is only a single bit which is passed to a single data output terminal 36 or 38, respectively. 
     In the case of the ROM 32, the single bit locations having addresses corresponding to all of the permissible states of the LFSR which occur during a test sequence in response to the application of each input bit contain a &#34;1&#34;; all other locations of this ROM contain a &#34;0&#34;. Similarly, the bit locations of the ROM 34 at addresses which correspond to permissible responses of the CUT 12 contain a &#34;1&#34;; all other locations contain a &#34;0&#34;. Consequently, when the ROM 32 or ROM 34 is addressed, the signal appearing at the output terminal 36 or 38 will indicate whether the state as indicated by its state signal (of the LFSR) or response (of the CUT) is a permissible state or response, respectively. 
     As may be seen in FIG. 4, the ROM&#39;s 32 and 34 may also receive a portion of their respective addresses from the ATG 10 via bus lines 40. This digital number defines the specific test or stimulus which is being applied to the CUT 12. The use of these address lines, of course, increases the memory space requirement of the ROM 32 and/or 34, thus considerably increasing the cost of the test apparatus. 
     The provision of the additional address lines 40 makes it possible to identify the correctness of each and every CUT response and/or each and every LFSR signature for the particular test conducted. Since the actual CUT responses and LFSR state signals visited by the apparatus during an entire test sequence are only a small proportion (e.g., 1:100) of the total number of conceivable responses and possible state signals, the considerable saving in memory space achieved by eliminating the address lines 40 may well be worth the inconsiderable reduction in the probability of error detection. 
     Accordingly, the application of address bus 40 to ROM&#39;s 32 and 34 is optional and may be practical for only relatively short addresses and/or test sequences. However, in view of the complexity of a typical CUT 12 the occassion for such a short sequence would be for a very limited number of cases. 
     FIG. 5 illustrates the internal construction of the automatic test pattern generator (ATG) 10. This devices includes a ROM 42 in which is stored, at successive word locations, the test bit patterns for successive cycles of a test sequence. In fact, the ROM 42 may contain the test patterns for a large number of different test sequences, for example for different types of tests for a particular circuit 12 or for different test sequences for different circuits. The initial address for a test pattern sequence is selected by the operator by inserting this address in a register 44. Subsequent addresses are generated during each clock cycle by an adder 46 which receives a sequence of consecutive numbers from a counter 48. 
     This counter is manually reset by the operator at the start of each test by means of a push-button 50 and is then incremented automatically by a clock 52. The counter 48 counts upward from zero until all of the bit pattern stimuli of a test sequence have been addressed in the ROM 42. At the conclusion of the final test, the counter 48 reaches a number which the operator has stored in a separate register 56. When the outputs of the counter 48 and register 56 are equal, a comparator 54 presents a pulse at its output 58 which freezes the output of the adder 46. 
     In operation, the test apparatus of FIGS. 4 and 5 corrects the problem, illustrated in the state diagram of FIG. 7, that the LFSR may arrive at its correct final state at the conclusion of a test sequence, notwithstanding the fact that errouneous responses were received from the circuit under test. In FIG. 7, the states indicated in the left-hand vertical column represent the states of the LFSR resulting from correct responses of the CUT in a given test sequence. At the start of the test, the LFSR is initialized to the &#34;0&#34; state. If there is no error in the CUT response (indicated by &#34;NE&#34;), the LFSR will move to another state, which may be state &#34;5&#34; for example. After each response of the CUT, the LFSR moves to another state as is indicated by the arrows in FIG. 7. It is possible, of course, for the LFSR to occupy the same state (e.g., state &#34;3&#34;) more than once during the test sequence. 
     If one error occurs, the LFSR will move from one sequence of states (the left-hand column in FIG. 7) to another sequence of states (the middle column). If there is only one error, then the LFSR will remain in this second sequence so that its final state (e.g., state &#34;11&#34; in FIG. 7) will be different than the final state (e.g., state &#34;3&#34;) that would appear if there were no errors in the CUT responses. The problem arises, as is illustrated in FIG. 7, when two or more errors occur in the CUT responses. In this case, there is a small probability (approximately 1/M were M is the total number of LFSR states) that the LFSR will return to a state in the correct state sequence indicating that all test responses have been correct. Thus, in the example shown in FIG. 7, the LFSR may go from state &#34;4&#34; to state &#34;6&#34; via path 60 if two errors have occurred. Also, the LFSR may go from state &#34;10&#34; to state &#34;8&#34; via path 62 if three errors have occurred. In either case, the LFSR would end up in the proper state &#34;3&#34; at the conclusion of the test sequence. 
     The present invention serves to identify any states visited by the LFSR which are not permissible. In the diagram of FIG. 7, the states &#34;0&#34;, &#34;2&#34;, &#34;3&#34;, &#34;4&#34;, &#34;5&#34;, &#34;6&#34; and &#34;8&#34; are permissible. Thus, if the LFSR were to enter state &#34;12&#34;, for example, the ROM 32 would flag an error in the circuit under test. 
     FIGS. 8 and 9 provide a comparison of the error detecting capability of the prior art signature analysis apparatus with respect to the apparatus of the present invention. On the abscissas of these diagrams are indicated the number of errors for a given test sequence and on the ordinates are indicated the probability of detecting these errors. FIG. 8 shows that the probability is one, in the prior art apparatus, for detecting one error but the probability drops to approximately 255/256 (for a 8-bit LFSR) in the case of two or more errors, assuming that the errors are independent. With the apparatus of the present invention, however, as is shown in FIG. 9 the probability of detecting errors drops initially to approximately 255/256, in the case of two errors, but then increases again asymptotically to one as the number of errors increases. 
     There has thus been shown and described a novel apparatus for testing an electrical circuit which fulfills all the objects and advantages sought therefor. Many changes, modifications, variations and other uses and applications of the subject invention will, however, become apparent to those skilled in the art after considering this specification and the accompanying drawings which disclose preferred embodiments thereof. All such changes, modifications, variations and other uses and applications which do not depart from the spirit and scope of the invention are deemed to be covered by the invention which is limited only by the claims which follow.