Disclosure of Invention
The embodiment of the application provides a fault scan chain shielding method based on a compression environment, which solves the problems of complex logic circuit, occupied hardware resources and low fault diagnosis precision in the process of diagnosing the fault of a scan chain. The method comprises the following steps:
S1, detecting and determining the total number of scanning chains and the maximum fault scanning chain number of a chip through an ATPG algorithm, and generating a vector set to be detected and a shielding signal, wherein the shielding signal acts on a scanning chain shielding signal decoder and is used for shielding a selected target scanning chain;
S2, sequentially selecting test vectors from a vector set to be tested, performing fault shielding diagnosis on the scanning chain according to all fault arrangement combinations formed by the shielding signals and the fault scanning chain, and determining a target scanning chain for shielding;
S3, updating the shielding signals according to the target scanning chain, and determining all target test vectors and corresponding target shielding signals when the detection fault coverage rate meets a system set threshold value to generate a target test vector set and a target shielding signal set;
S4, the shielding signal decoder performs shielding test on the target scan chain according to the target test vector and the target shielding signal, and performs diagnosis analysis on the scan chain fault according to the compression response output of the scan chain compressor.
Specifically, step S1 further includes:
and respectively sequencing all the scanning chains and the fault scanning chains in number, and determining all fault arrangement combinations of the fault scanning chains according to the number and the number of the fault scanning chains, wherein the fault arrangement combinations are used for positioning the positions of the fault scanning chains and determining a fault shielding sequence.
Specifically, step S2 includes:
S21, sequentially extracting a test vector from the vector set to be tested in each detection period, and moving the test vector into the test vector set;
s22, calculating a single shielding weight coefficient WC of each fault scanning chain in each fault arrangement combination, and calculating a shielding weight value WT of the corresponding fault arrangement combination according to a shielding weight function, wherein the shielding weight function is as follows:
WT=Wc1+Wc2+…+Wcm
wherein m represents the total number of fault scan chains, and Wc1 to Wcm represent single-mask weight coefficients of all fault scan chains under one fault permutation and combination;
S23, calculating fault detection weights WFD of all scanning chains based on the residual test vectors in the vector set to be tested, and determining the target scanning chain according to accumulated shielding weight values of all fault arrangement combinations in all periods.
Specifically, the masking weight value is used for measuring the difficulty level of the masking signal for the fault diagnosis of the scan chain, the single masking weight coefficient is used for measuring the influence level of the compressed response output of the single fault scan chain after being masked on the fault diagnosis, and the single masking weight coefficient WC is calculated by the following formula:
Wci=A+αB
Wherein A is an optimal detection value, which indicates the number of times that only the fault scan chain is observed under the action of a shielding signal, B is an auxiliary detection value, which indicates the number of times that only two fault scan chains including the fault scan chain are observed under the action of the shielding signal, alpha is an auxiliary detection parameter, and when more than two fault scan chains are observed, the fault diagnosis information contained in the compression response output is lower than the diagnosable range, and the single shielding weight coefficient is 0.
Specifically, step S23 includes:
Generating a weight score sorting table according to the value of the fault detection weight;
Marking the scanning chains of the previous target proportion in the weight fraction sorting table, and not performing shielding diagnosis;
determining the minimum accumulated shielding weight value in all fault arrangement combinations as a target arrangement combination, and generating a scanning chain list according to the occurrence times of each fault scanning chain in the combination and marked scanning chains, wherein the scanning chain list does not contain marked scanning chains;
and determining the most occurrence number in the scan chain list as a target scan chain.
Specifically, the fault detection weight is used for measuring the fault detection capability of the test vector generated by the ATPG algorithm on the scan chain, and the calculation formula is as follows:
Wherein m represents the total number of fault scan chains, Dm represents the sum of the number of times that all test vectors in the set of vectors to be tested detect a target error, WFD(Lij) represents the sum of the reciprocal of the values that all k errors on the jth scan chain Lj are detected by all test vectors in the set of vectors to be tested.
Specifically, step S3 includes:
Setting the level bit corresponding to the target scanning chain in the shielding signal to be low level 0 to generate the target shielding signal, wherein the test vector and the shielding signal are in one-to-one correspondence;
And calculating the current fault coverage rate according to the detected fault scanning chain, and generating the target test vector set and the target shielding signal set based on all the determined target test vectors and the corresponding target shielding signals when the fault coverage rate exceeds a set threshold value.
Specifically, when the fault coverage rate does not exceed a set threshold value, detecting the residual test vectors in the vector set to be tested;
when the vector set to be tested contains the residual test vectors, entering the next detection period, selecting one detection vector from the test vectors, and moving the detection vector into the test vector set to carry out shielding diagnosis;
specifically, when the to-be-tested vector set does not contain the residual test vectors, generating additional test vectors and corresponding shielding signals for the residual undetected faults through an ATPG algorithm, and adding the additional test vectors and the corresponding shielding signals into the test vector set;
And continuously calculating a single shielding weight coefficient and a shielding weight value corresponding to the fault arrangement combination according to the newly added test vector set and the shielding signal, and executing a shielding diagnosis process until the fault coverage rate meets the requirement, and generating the target test vector set and the target shielding signal set.
Specifically, the set of vectors to be tested of the scan chain and the mask signal corresponding to each test vector are automatically generated according to the ATPG algorithm and the mask signals initially generated by different test vectors are different.
The technical scheme provided by the embodiment of the application has the advantages that the scanning chains are subjected to preliminary scanning test by being compatible with the existing ATPG algorithm to generate test vectors and shielding signals, then the test vectors are selected and the single shielding weight coefficient of each scanning chain under each combination and the shielding weight value of the corresponding combination are evaluated one by one through the fault arrangement and combination form of the fault scanning chains, and further the order of the scanning chains needing to be observed preferentially and shielded preferentially can be determined according to the shielding weight value and the fault detection weight calculated by the residual test vectors in the vector set to be tested. And according to the scan chain with higher fault detection weight which needs to be observed preferentially, the scan chain with higher occurrence number in the combination with lower shielding weight value needs to be shielded, sequentially determining a target test vector and a target scan chain, and updating the level bit of the corresponding shielding signal. And finally, generating a target test vector set and a target shielding signal set under the condition that the fault coverage rate meets the setting.
Therefore, the target scan chain is subjected to shielding test, test vectors can be reduced, a small number of test vectors are used, and diagnosis and analysis are performed on the scan chain faults according to the compression response output of the scan chain compressor, so that fault diagnosis time is greatly shortened.
By the fault analysis strategy, other logic circuits and software analysis modes are not required to be introduced, excessive hardware resources are not required to be occupied, and the phenomenon that output response is disordered due to mutual interference in multi-fault diagnosis is avoided. The scheme not only can be compatible with the existing ATPG algorithm, considers the condition that a plurality of scanning chains have faults at the same time, but also can be applied to the scene of diagnosing the multiple faults of the compression structure multiple scanning chains.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
References herein to "a plurality" means two or more. "and/or" describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate that there are three cases of a alone, a and B together, and B alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The test cost of VLSI circuits tested using a scan chain architecture depends on the time of the test and the amount of data required by an integrated circuit Automatic Tester (ATE). To reduce the amount of data required for testing, the industry has applied ATPG-based diagnostic algorithms and compression response testing in the field of chip-assisted testing. Test response compression is typically accomplished using Multiple Input Signature Registers (MISRs) that can be used for spatial and temporal compression or XOR trees (XOR trees) that can be used for spatial compression.
As shown in fig. 1, a schematic diagram of a structure for fault detection using a classical space compressor is provided. In the classical space compressor basic structure, the system mainly comprises a scanning chain, a scanning chain shielding signal selector and a scanning chain compressor, wherein the responses of multiple scanning chains are compressed by an exclusive-OR gate tree to generate a compressed response output. Typically, and gate-based masking circuits are used to mask unknown states from entering the space compressor. Thus, for chains that require masking, the scan chain selection logic sends 0 to the corresponding AND gate and 1 to the other AND gates. This single chain mode is said if for one test vector only the response of one scan chain enters the spatial compressor, while the other chains are masked. In the test flow, the scan chain integrity test is typically performed in a single chain mode to be able to identify the failed scan chain and the failure type, but the scan chain integrity test vector cannot pinpoint which scan cells failed, and the ATPG algorithm is required to generate the test vector for further diagnosis.
In EDA detection, the set of test vectors generated by the automatic test machine has a large amount of redundancy in fault detection, i.e., a particular fault on a scan chain can be detected by multiple test vectors, so shielding a small number of scan chains does not have a significant impact on fault coverage.
As shown in fig. 2, the symbol marked X in the scan chain is a fault point on the chain, and when a plurality of faulty scan chains are observed by one compressor, a problem may occur in that the fault is cancelled at the compressed response output. As can be seen from fig. 2, chain 2 has a stuck-at-1 failure at element 5 and chain 3 has a stuck-at-1 failure at element 2. During unloading, all upstream units of chain 2 unit 5 and chain 3 unit 2 are affected. After spatial compression, some of them cancel each other, completely disturbing the compressed response, resulting in difficulty in fault diagnosis. As such, while chain 2 and chain 3 have been identified as faulty in previous scan chain integrity tests, it is still not possible to accurately determine which scan cells are faulty. At this time, if the No. 2 chain is shielded, the fault unit on the No. 3 chain is possibly diagnosed, and if the No. 3 chain is shielded, the fault unit of the No. 2 chain is more possibly diagnosed, so that the problem of disordered output occurs. Aiming at the possible problems, the scheme provides a method for shielding the fault scan chain so as to avoid the problem that effective diagnosis cannot be carried out due to the error shielding.
As shown in fig. 3, a flowchart of a fault scan chain shielding method based on a compression environment according to an embodiment of the present application includes the following steps:
s1, detecting and determining the total number of scanning chains and the maximum fault scanning chain number of a chip through an ATPG algorithm, and generating a vector set to be detected and a shielding signal.
The total number of scan chains and the maximum number of failed scan chains are determined by conventional ATPG algorithm testing, test vectors (TEST PATTERN) and also by ATPG algorithm are generated based on detection errors, and mask model is generated for mask model decoder, and test vectors are in one-to-one correspondence. While the test vectors generated by the conventional ATPG algorithm can satisfy the fault coverage in number, a huge set of test vectors is required, resulting in various increases in cost, since various algorithms need to be introduced to optimize this.
After the test vector, all the scan chains and the fault scan chains have been determined, the serial numbers of all the scan chains and the fault scan chains are respectively ordered, and all fault permutation and combination of the fault scan chains are determined according to the number and the serial numbers of the fault scan chains. This is because the number and error units on different faulty scan chains cannot be identical, and the responses obtained by compressing the different scan chain combinations are confused during spatial compression, which affects the diagnostic analysis. The fault permutation and combination can locate the fault scan chain and determine the fault masking order.
In one possible implementation, assuming that the total number of test vectors of the chip is n, the number of maximum fault scan chains is m, the generated set of vectors to be tested is T, and the corresponding set of initial mask signals is R (the mask signals and the test vectors in R are in a one-to-one correspondence). After numbering the faulty scan chain, it is unknown which m of the n chains is the faulty scan chain in the actual test, so all possible combinations need to be considered when generating the mask signal. The number of possible combinations of m chain failures in the n chains isI.e. maximum fault arrangement combined as
S2, selecting a test vector from the vector set to be tested, performing fault shielding diagnosis on the scan chain according to all fault arrangement combinations formed by the shielding signals and the fault scan chain, and determining a target scan chain for shielding.
The step is to extract test vectors from T one by one, and perform fault diagnosis (pre-diagnosis) on all fault arrangement combinations according to the extracted test vectors and corresponding shielding signals, wherein the pre-diagnosis aims at selecting proper test vectors from the test vectors, and sequentially selecting target fault scan chains from all fault scan chains according to output corresponding results, and the sequence of the sequential selection of the target fault scan chains is the sequence of the shielding diagnosis. Performing the fault diagnosis in this order can obtain a relatively accurate fault diagnosis result with the minimum test vectors selected. And the target fault scanning chain is obtained by calculation according to the shielding weight value and the fault detection weight. Specifically, S2 further includes the following steps:
s21, sequentially extracting a test vector from the vector set to be tested in each detection period, and shifting the test vector into the test vector set.
Because the vector set to be tested contains a large number of test vectors, the test vectors need to be screened, the test vector set is a vector set participating in diagnostic analysis, and in each test period, one test vector in the vector set to be tested needs to be selected and moved into the test vector set. The test vector set in this embodiment is T′.
S22, calculating a single mask weight coefficient WC of each fault scanning chain in each fault arrangement combination, and calculating a mask weight value WT of the corresponding fault arrangement combination according to a mask weight function.
In order to improve fault diagnosis capability, the scheme adopts a strategy of shielding additional scan chains, and the strategy can be applied to any test vector generated for the fault scan chains, so that the compression response output of the compression unit is ensured to be influenced by one specific scan chain as much as possible. The masking strategy is performed only on the compressor side and not on the decompressor side, so for a test vector that detects only one faulty scan chain, anomalies in the compressed response output result from:
1) Loading errors on the masked failed scan chain;
2) Loading errors on unshielded failed scan chains;
3) Unloading errors on unshielded failed scan chains.
But loading errors on the masked failed scan chain affect only a few bits of the compressed response output, while unloading errors on the unmasked failed scan chain affect almost the entire bit stream of the compressed response output. Thus, even if there is a loading error on the masked failed scan chain, the scan chain diagnostic method based on the compressed response can successfully identify the failed scan chain.
However, the above-mentioned mask signal initially generated by the ATPG algorithm is a chip test phase earlier than a phase in which the test vector diagnoses and fault simulates the chip, so that it is not known which scan chains have faults when generating the mask signal, which will have a negative effect on the generation of the mask signal. So in solving this problem, a single mask weight coefficient WC and a mask weight value WT are introduced for judgment. The masking weight value WT is used for measuring the difficulty level of the masking signal for the fault diagnosis of the scanning chain, and the single masking weight coefficient WC is used for measuring the influence level of the compressed response output of the single fault scanning chain after being masked on the fault diagnosis. For a determined fault permutation and combination, WT is calculated according to the mask weight function, and the formula is as follows:
WT=Wc1+Wc2+…+Wcm
Where m represents the total number of failed scan chains, and Wc1 to Wcm represent the single mask weight coefficients of all failed scan chains in one failure permutation and combination.
The single mask weight coefficient WC is calculated by the following formula:
Wci=A+αB
Wherein A is the optimal detection value, which indicates the number of times that only the fault scan chain is observed under the action of a shielding signal, B is the auxiliary detection value, which indicates the number of times that only two fault scan chains including the fault scan chain are observed under the action of the shielding signal, and alpha is the auxiliary detection parameter.
Illustratively, assuming that the total number of scan chains input into a single compressor is n, and the maximum number of failed scan chains observable in a single compressor is m, there is a mask signal selector between the scan chains and the compressor, then the mask signal will determine which scan chains can be masked. Considering that if one failed scan chain is observed alone more times (no other failed scan chain), that failed scan chain is more easily diagnosed, a single mask weight function Wci =a+αb for a single failed scan chain is defined. Therefore, A is expressed as the number of times that only the failed scan chain is observed (the remaining m-1 failed scan chains are all masked) and B is the number of times that two failed scan chains, including the failed scan chain, are simultaneously observed (the remaining m-2 failed scan chains are all masked).
The first part (A) is a basic part, only one fault scanning chain is observed and is the best mode for diagnosing the fault scanning chain, the second part (alpha B) is an auxiliary part, two fault scanning chains including the fault scanning chain are simultaneously observed, and the compression response output of the compressor also comprises a part of information for diagnosing the fault scanning chain, but the diagnosis effect is poor. In practical applications, the value of the parameter α is between 0.2 and 0.3. As the number of concurrently observed failed scan chains increases, the information available in the compressed response output to diagnose the failed scan chains decreases exponentially. When the number of the fault scan chains observed at the same time is greater than or equal to three, there is little useful information for diagnosis in the compressed response output, and at this time, the fault diagnosis information contained in the compressed response output is lower than the diagnosable range, and the single mask weight coefficient Wci is 0. When the mask signal is determined, each of the m fault scan chains has a single mask weight coefficient Wci for the single fault scan chain, and summing Wci to obtain a mask weight value WT for the fault permutation and combination.
S23, calculating fault detection weights of all scanning chains based on the residual test vectors in the vector set to be tested, and determining target scanning chains according to accumulated shielding weight values of all fault arrangement combinations in all periods.
The ATPG mainly comprises the following steps of 1, selecting errors to be tested 2, generating a test vector set 3, and comparing the results to diagnose the errors. In general, in step 1, more than actually possible errors are often selected, and in step 2, each test vector is generated for a portion of all possible errors, each test vector may diagnose one or more errors, and each error may be diagnosed by one or more test vectors. Step 3 is to compare the expected output with the actual output to determine which errors exist in the whole circuit. Therefore, when a set of vectors T to be tested is generated, the number of faults that it can diagnose is determined, and then the fault detection weight WFD can be calculated.
In this scheme, a fault detection weight WFD is used to measure the fault detection capability of the test vector generated by the ATPG algorithm on the scan chain. In the fault permutation and combination, the determination of the target scan chain is based on the following principle:
1) The higher the fault detection weight, the more the scan chain needs to be observed preferentially;
2) The higher the number of occurrences of scan chains in a combination with lower mask weight values, the more required the masking.
The calculation formula of the fault detection weight WFD is as follows:
m represents the total number of faulty scan chains, Dm represents the sum of the number of times a particular error is detected by all test vectors in the set of vectors under test, WFD(Lij) represents the sum of the reciprocal of the values of all k errors on the jth scan chain Lj detected by all test vectors in the set of vectors under test.
It is specifically explained that it is assumed that one test vector Ti in one test vector set T′ can detect k errors on the jth scan chain Lj in the n scan chains, i.e., the test vector Ti has a detection capability for k errors in the scan chain Lj. One of the k errors fm(m=1,…,k),fm detected by Ti in Lj may be detected not only by one of the test vectors Ti in T′, but also possibly by the other test vectors Tn in T′. The number of times that all test vectors T1~tn in T′ detected error fm is counted as Dm. The value of Dm is large if an error fm in the scan chain is detected by multiple test vectors, and the value of Dm is small if an error fm in the scan chain is detected by only a few test vectors, including ti. Therefore, the fault detection weight WFD(Lij of scan chain Lj is defined as the sum of the inverse of the number Dm of times that k errors in the scan chain are detected by all test vectors.
Based on the above definition, for one test vector Ti in the test vector set T′, if an error in one scan chain Lj is detected by only a small portion of test vectors including Ti, the fault detection weight WFD(Lij) is high, and masking the scan chain adversely affects the fault coverage, so that the scan chain is preferentially observed. Similarly, if an error in a scan chain Lj is detected by most test vectors, including ti, then the fault detection weight WFD(Lij) is low, and after the scan chain is masked, the error in the scan chain is diagnosed by other test vectors ti (j+.i), even if it cannot be diagnosed by test vector ti. Thus, when selecting a mask scan chain, the scan chain with the higher failure detection weight WFD(Lij) needs to be observed preferentially.
The process specifically comprises the following steps:
And A, generating a weight fraction sorting table according to the numerical value of the fault detection weight.
And B, marking the scan chains ranked in the front target proportion in the weight fraction ranking table, and not performing shielding diagnosis.
During each cycle of detection, a weight fraction ranking table needs to be generated and the scan chains with the front order need to be marked, and the scan chains need to be temporarily shielded, i.e. cannot be observed first, otherwise the diagnosis of the output response is affected. In one possible implementation, the top 15% of the scan chains are marked, no mask diagnosis is performed, and the rest are judged normally.
However, it should be noted that, in the next cycle of detection, these flags need to be cleared, the weight score ranking table is also cleared correspondingly, and the above-mentioned process is performed again according to the selected test vector set.
And C, determining the minimum accumulated shielding weight value in all fault arrangement combinations as a target arrangement combination, and generating a scan chain list according to the occurrence times of each fault scan chain in the combination and the marked scan chain.
The accumulated mask weight value is the sum of mask weight values of the same fault arrangement combination in the history period, when the target arrangement combination is determined and the scan chain list is generated, the marked scan chain is required to be removed, so the scan chain list generated in the step does not contain the marked scan chain.
And D, determining the most occurrence number in the scan chain list as a target scan chain.
And S3, updating the shielding signals according to the target scan chain, and determining all target test vectors and corresponding target shielding signals when the detection fault coverage rate meets the system set threshold value to generate a target test vector set and a target shielding signal set.
There is a one-to-one correspondence between the number of scan chains and the respective level bits of the mask signal, e.g., a spatial compression circuit of 4 scan chains, with initial mask signals for the two test vectors t1 and t2 being 1110 and 1111 (the most significant bit corresponding to scan chain 1, the least significant bit corresponding to scan chain 4).
And setting the level bit of the corresponding target scanning chain in the shielding signal to be low level 0 for the target scanning chain to be shielded, and generating the target shielding signal.
After the multi-period cyclic test, when the current fault coverage rate is calculated by the detected fault scanning chain to exceed the set threshold value, the determined sequence of the target scanning chain is indicated to be capable of meeting the diagnosis requirement, and the target test vector set and the target shielding signal set can be generated based on all the determined target test vectors and the corresponding target shielding signals. The target test vector set is a test vector selected through a plurality of periods, and the target shielding signal set is a target shielding signal which corresponds to the test vector and is updated.
When the fault coverage rate does not exceed the set threshold value, detecting the residual test vectors in the vector set to be tested;
when the vector set to be tested contains the residual test vectors, the next detection period is entered, one detection vector is selected from the test vectors, and the detection vector is moved into the test vector set for shielding diagnosis.
When the vector set to be tested does not contain the residual test vectors, generating additional test vectors and corresponding shielding signals for the residual undetected faults through an ATPG algorithm, adding the additional test vectors and the corresponding shielding signals into the test vector set, continuously calculating a single shielding weight coefficient and shielding weight values of corresponding fault arrangement and combination according to the newly added test vector set and the shielding signals, and executing a shielding diagnosis process until the fault coverage rate meets the requirement, and generating a target test vector set and a target shielding signal set.
S4, the shielding signal decoder performs shielding test on the target scan chain according to the target test vector and the target shielding signal, and performs diagnosis analysis on the scan chain faults according to the compression response output of the scan chain compressor.
FIG. 4 is a flowchart of an algorithm for generating a set of target test vectors and a set of target mask signals, comprising the steps of:
S401, determining the total number of scanning chains, the number of fault scanning chains, a vector set to be tested and an initial shielding signal;
s402, numbering all the scan chains, and determining possible fault arrangement combinations of all the fault scan chains;
S403, extracting test vectors from the vector set to be tested, adding the test vectors into the test vector set, and calculating the Wc values of each fault scanning chain and the WT values of all fault permutation and combination according to the test vector set and the shielding signals;
s404, calculating fault detection weights of all scanning chains based on a vector set to be detected, generating a score sorting table, and marking the scanning chains sorted in the previous target proportion without shielding diagnosis;
s405, determining a fault arrangement combination with the minimum WT value, and generating a scan chain list (the exclusion of the mark) according to the occurrence times of each fault scan chain;
S406, setting a shielding signal corresponding to a target scanning chain with the largest occurrence number in the scanning chain list to 0, and updating the shielding signal;
s407, detect if the fault coverage meets the set threshold?
When the fault coverage rate is not satisfied with the set threshold, jumping to S409, otherwise executing S408;
s408, outputting the test vector set and the corresponding shielding signals, and ending.
S409, detect if there are any remaining test vectors in the set of test vectors?
When there are remaining test vectors in the set of test vectors, the loop jumps to S403 to continue execution, otherwise S410 is continued to be executed.
S410, generating additional test vectors for the residual undetected faults, adding the additional test vectors into the test vector set, and continuing to jump to S410.
The algorithm flow and the fault scan chain shielding method are described in the following by adopting a specific embodiment.
Consider a spatial compression circuit that includes 4 scan chains, where 3 of the chains fail, and two test vectors t1 and t2 are generated by the normal ATPG algorithm, with initial mask signals of t1 and t2 being 1110 and 1111 (highest corresponding to scan chain 1 and lowest corresponding to scan chain 4). The active masking algorithm optimizes the fault diagnosis process by first generating all possible combinations, selecting a=0.2, calculating the Wci value for each scan chain, and the WT value for each combination, and updating the list according to the input masking signal.
Test vector t1 is first introduced, whose initial mask signal is 1110, scan chains 1, 2, 3 can be observed. Taking the example of the third combination, the fault chains assumed by the third combination are chains 1, 3 and 4. For scan chain 1, test vector t1 cannot directly observe chain 1, but can jointly observe chain 1 and chain 3 once, so Wc1 =0.2, and for scan chain 3, therefore Wc2 =0.2, and for scan chain 4, test vector t1 cannot directly observe chain 4, therefore Wc3 =0. As can be seen from FIG. 5, the minimum WT value of a combination is selected to mask the scan chain that appears most frequently in a combination. Further assuming that the failure detection weight WFD(L11 for chain 1 is highest, chain 1 is not masked, so one of the scan chains in chain 2 or chain 3 is selected for masking, chain 2 is selected for masking, the mask signal is updated to 1010, and then the value of WT is updated based on the new mask signal.
Under the condition that the fault coverage rate does not meet the set requirement, the test vector t2 is continuously introduced, the initial shielding signal is 1111, as can be seen from fig. 5, the WT value of the combination one and the combination three is minimum, and the number of times of occurrence of the scan chain 1 and the scan chain 3 is the largest in the two combinations, so that one of the scan chains is selected to shield, namely the scan chain 3 is shielded, and the shielding signal of the test vector t2 is updated to 1101. The WT value for each combination is updated, where t1 observes chain 1 and chain 3, t2 observes chains 1, 2,4, and for example, for combination four, chain 2 is not independently observed, chain 2 and chain 4 are jointly observed 1 time by t2, thus accumulating Wc1 = 0.2 (0+0.2), chain 3 is independently observed 1 time by t1, thus accumulating Wc2 = 1 (1+0), chain 4 is not independently observed, chain 2 and chain 4 are jointly observed 1 time by t2, thus accumulating Wc3 = 0.2 (0+0.2), and calculating accumulated WT = 1.4. When the test vectors are all introduced and the fault rate coverage requirement is not met, additional test vectors are required to be generated through an ATPG algorithm.
The test vector t3 newly generated by the ATPG algorithm has an initial mask signal of 1111, and as can be seen from fig. 5, the cumulative WT value of the combination one and three is the smallest, the scan chain 1 is the scan chain with the largest occurrence number, the mask is masked, the mask signal of the test vector t3 is updated to 0111, and the cumulative WT value of each combination is updated. Assuming that the target condition is finally reached, a new test vector set T′={t1,t2,t3 is generated as a test vector set for subsequent fault diagnosis and fault simulation, and a mask signal set r= {1010,1101,0111} is generated as a mask signal for the test vector set T′.
In summary, the application performs a preliminary scan test on scan chains by using the existing ATPG algorithm to generate test vectors and shielding signals, then selects test vectors by using a fault arrangement combination form of fault scan chains, evaluates single shielding weight coefficients of each scan chain under each combination and shielding weight values of corresponding combinations one by one, and further can determine the order of the scan chains needing to be observed and shielded preferentially according to the shielding weight values and fault detection weights calculated by the rest test vectors in the set of vectors to be tested. And according to the scan chain which is required to be observed first when the fault detection weight is higher, the scan chain which is required to be observed more frequently when the number of occurrence is lower in the combination of the shielding weight value is lower, the target test vector and the target scan chain are determined in sequence, and the level bit of the corresponding shielding signal is updated. And finally, generating a target test vector set and a target shielding signal set under the condition that the fault coverage rate meets the setting.
Therefore, the target scan chain is subjected to shielding test, test vectors can be reduced, a small number of test vectors are used, and diagnosis and analysis are performed on the scan chain faults according to the compression response output of the scan chain compressor, so that fault diagnosis time is greatly shortened. By the fault analysis strategy, other logic circuits and software analysis modes are not required to be introduced, excessive hardware resources are not required to be occupied, and the phenomenon that output response is disordered due to mutual interference in multi-fault diagnosis is avoided. The scheme not only can be compatible with the existing ATPG algorithm, considers the condition that a plurality of scanning chains have faults at the same time, but also can be applied to the scene of diagnosing the multiple faults of the compression structure multiple scanning chains.
The foregoing describes preferred embodiments of the present invention; it is to be understood that the invention is not limited to the specific embodiments described above, in which the apparatus and structures not described in detail are to be understood as being embodied in a manner commonly understood in the art, and that any and all possible variations and modifications, or equivalent embodiments modified to equivalent variations, may be made by those skilled in the art without departing from the technical solution of the invention, which does not affect the spirit of the invention, and therefore, any simple modifications, equivalent variations and modifications to the above embodiments made in accordance with the technical solution of the invention, all fall within the scope of the technical solution of the invention.