1 Introduction
-
The search space explosion problem in FD approaches based on formal methods can be solved using counterexample resulting from failed verification passed to semi-supervised learning model for classifying stuck-at-faults, which might be causes for failing verification. In this way, multiple calls of SAT solvers can be avoided.
-
Instead of reducing SAT instances by SAT encoding algorithms for detecting faults using SAT solvers, Deep Sparse Auto-Encoders, as unsupervised model, can be implemented on test patterns directly to extract robust latent features. Therefore, conjunction between multiple clauses can be dispensed.
-
Exact debuggers using Max-SAT approach for detecting the main reason of faults existed in circuit is replaced by ATALANTA tool for generating multiple patterns for each stuck-at-fault with high fault coverage. Therefore, dataset can be helpful to avoid repetitive generation of multiple unsatisfiable cores caused by single fault.
2 Background
2.1 Fault Classes
Fault Type | Functional Faults | Verification Faults | Manufacturing Faults | Circuit or Electrical Faults |
---|---|---|---|---|
Occurred in | - Design implementation (RTL or gate -level implementation) | - Behavioral specification (testbenches or assertions) Also, called as testbench bugs | - IC manufacturing phase Classified into Gross area defects and spot defects | - Pre-or post-silicon verification - operating region such as frequency, voltage, and temperature |
Caused by | - Change in specification -Human factor - Automated synthesis tools with software bugs | - Incorrect transformation of a behavioral specification to a verification code (testbench or assertions) | - Out of tolerance steps (macro level variations) - Scratches from wafer mishandling (global faults) - Missing patterns or extra patterns (spot bugs) | - Undesired interaction between a design and an electrical state such as: Crosstalk, Power -supply noise, Thermal effects and Process variations |
-
Missing/extra inverter at the gate output mapped from s/1 and s/0 faults on two or more gate inputs.
-
Replacement faults: AND→OR, OR→NAND, NAND→NOR and NOR→AND results by s/1 faults at one or more gate inputs.
-
Replacement faults: AND→NOR, OR→AND, NAND→OR and NOR→NAND mapped from s/0 faults are one or more gate inputs.
2.2 Logical Design Debugging
2.3 Fault Detection Based on AI
2.4 Autoencoders
-
Code size is the number of nodes in the middle layer. The smaller size of the code layer, the more compression we can get.
-
Number of layers in the encoder and decoder:The more layers exist in the encoder, the deeper autoencoder can be formed.
-
Number of nodes per layer: There are many types of autoencoders such as stacked autoencoder where layers are stacked one after another.
-
Loss function: There are two types of loss function which set according to a type of input data.
-
Data-specific:autoencoders are capable of compressing data that is similar to training data. Therefore, autoencoders are Not as standard data compression (like gzip) as the features learned by autoencoders are specific to the given training data.
-
Lossy:autoencoders are not the way for lossless compression as the output of autoencoders will be close to the input but not the same (it is degraded representation).
-
Unsupervised or self-supervised:as the training process of autoencoders does Not need any explicit labels for the input data, autoencoder is considered an unsupervised learning technique. Also, they can be called self-supervised because they can produce their labels from the training data.
Type of AE | Definition | Advantages | Drawbacks |
---|---|---|---|
Sparse Autoencoder (SAE) | - It has hidden nodes greater than input nodes -Sparsity is obtained by additional terms in the loss function during the training process (either by comparison between the probability distribution and low desired value or by zeroing all but the strongest hidden unit activations manually) | - Preventing overfitting by applying sparsity penalty on the hidden layer in addition to the reconstructed fault - Preventing autoencoder to use all of the hidden nodes - Forcing a lessened number of hidden nodes | - The individual activated nodes should be data dependent - Different inputs will activate different nodes through the network |
Deep Autoencoder | - It consists of two identical deep belief networks for encoding and decoding -It uses unsupervised layer by layer pre-training for this model - Layers are the building blocks of deep-belief networks | - The final layer of encoding is fast and compact - It can be used for datasets with real-valued data | - Overfitting may be occurred as a result of high parameters other than input data - Lower learning rate lead training data being a nuance |
3 State of the Art for Fault Debugging
3.1 Fault Detection Algorithms based on AI
3.2 Fault Detection Approaches Based on Satisfiability
-
Every gate in the circuit is transformed to the equivalent CNF equation according to number of inputs. In [6], we show the equivalent CNF equation for every logic gate.
-
The equivalent CNF equation of a given circuit is combined to form conjunction of clauses.
-
Test patterns with correct outputs are combined to the equivalent CNF formula of a given circuit. The following equation is generated$$\varphi =I.{O}_{c}.CNF({C}_{f})$$(4)
-
The final CNF equation is considered to be unsatisfiable, so number of MCSes and MUSes should be extracted to find all possible faulty components.
Method | Description |
---|---|
- It is iteratively excluding irrelative clauses on infeasibility of a given CNF instance - The best extraction of MUS requires O(m) where m is the number of clauses in SAT instance - Extensive consuming time for finding MUSes, especially with large digital circuits | |
CAMUS Approach [26] | - Computing all minimal correction subsets (MCSes) - Searching for MUS into the complete set of MCSes - No Extra calls for SAT solvers for finding MUS |
ExcludeMUS Routine [9] | - Based on the previous method - Enhancing MCSes enumeration for improving MUS generation - Can handle a large amount of MCSes - Some parts of codes are implemented on multicores for eliminating the negative impact of large sized instances (Complex Circuits) |
Shrink Routine [32] | - A recursive method of computing MUSes directly from the input formula - Critical constraints are the main core of this process - No need to compute MCSes - The number of calling SAT solver is reduced then the destructive algorithm to be \(O(\left|\varphi \right|-\left|crits\right|)\) - Still repetitive process of satisfiability check is the hardest part |
Improved Shrink routine [9] | - It is based on the previous method for avoiding time and cost of computing the complete set of MCSes - It tries to reduce the number of SAT solver calls for computing MUS - It performs two processes: classification and reduction processes consequently for reducing the number of calls of SAT solvers - It speeds up the computation using GPUs algorithms |
4 The Proposed Implementation
-
Tracking the effect of all test patterns and their corresponding correct outputs on all lines on the circuit for finding the location of faults or the root cause of errors.
-
Solve the problem of search space process which make the fault detection and diagnosing more complex for large-sized digital systems.
4.1 Dataset Description
4.2 Unsupervised Feature Dimension Reduction
-
With the complexity of line connections, stuck-at fault detection requires best representation for inputs and outputs for detection. Therefore, AE is used for reduce the complexity of values with high accuracy for reconstructions.
-
A higher validation accuracy means that AE can reconstruct test patterns better by finding the important input values and observing stuck-at faults. Therefore, our model can extract the starting points of all potential stuck-at faults (the root cause of faults).
-
The used data set are test patterns for primary inputs and corresponding correct outputs for primary outputs corresponding to a specific fault mask.
-
In our proposed model, we used the trained encoder layers and bottleneck layer of the autoencoder for the next classification phase. Therefore, we need to train the proposed autoencoders to find the appropriate weights on encoder layers and code layer for reducing the unimportant features (noisy data).
4.3 The Complete Semi-supervised FD Model
-
The concatenated training layers of encoders are combined with binary classifier with sigmoid activation as the output layer and use the binary cross-entropy as loss function. The labels of this supervised learning are the fault mask.
-
Also, three different classifiers in machine learning models are used which are Decision Tree (DT) and Random Forest (RF) and Gradient Boosting (GB) classifiers.
4.4 Example
-
The Data set used on our model are (X,Y) where X matrix represents features of our model which are number of test patterns with corresponding correct output and Y matrix represents Labels which are the corresponding possible fault mask for every test pattern
-
The Fault mask can be mapped to the fault list which contains all possible fault lines on a given circuit (see Fig. 12).
-
Our main goal is to learn the connection between faulty lines which lead to the faulty outputs.
-
Dimensionality reduction of test patterns with golden responses is applied on the best test vectors for given circuit.
-
The validation accuracy of Autoencoder is measured to find the best type for dimensionality reduction with best sparsity constraint.
-
The trained encoder layers and bottleneck layer is combined with classifier layer which is the last layer on our model.
-
The sigmoid function is used in the last layer as an activation layer. And the number of neurons in this layer equals to all possible faults in circuit.
-
For training model, optimizer is chosen to be “adam” and loss function is “binary cross entropy” which is explained in page 3 Eq. (1)
5 Experimental Results
5.1 Data Preprocessing
Circuit | #gates | Sum of #Inputs and #outputs | #Faults | # Test Vectors | Fault Coverage% |
---|---|---|---|---|---|
c17 | 6 | 7 | 22 | 54 | 100 |
c432 | 160 | 43 | 524 | 8950 | 98.8 |
c499 | 202 | 73 | 758 | 13,066 | 95.5 |
c880 | 383 | 86 | 942 | 15,357 | 100 |
c1355 | 546 | 73 | 1574 | 25,824 | 96.8 |
c1908 | 880 | 58 | 1879 | 34,216 | 99.2 |
c2670 | 1193 | 373 | 2747 | 39,725 | 94.1 |
c3540 | 1669 | 72 | 3428 | 55,752 | 95.9 |
c5315 | 2307 | 301 | 5350 | 88,978 | 98.7 |
c6288 | 2406 | 64 | 7744 | 114,101 | 80.8 |
c7552 | 3512 | 315 | 7550 | 134,093 | 94.1 |
5.2 Feature Reduction and Classifier
5.2.1 Extracting Features Using Different AE
CNF Type | SAE1 | SAE2 | SAE3 | SAE4 | ||||
---|---|---|---|---|---|---|---|---|
#N | VA% | #N | VA% | #N | VA% | #N | VA% | |
c17 | 5,3,2 | 71.4 | 6,5,3 | 69.74 | 5,4,2 | 68.06 | 4,2,1 | 62.18 |
c432 | (40,30,20) | 99% | (30,20,10) | 97.5% | (20,10,5) | 92.52% | (25,15,10) | 96.19% |
c499 | (60,30,20) | 98.91% | (50,30,20) | 98.50% | (40,30,20) | 98.4% | (40,15,10) | 95.78% |
c880 | (70,50,30) | 99.56% | (70,40,20) | 98.9% | (50,30,20) | 98.6% | (30,20,10) | 95.78% |
c1355 | (60,30,20) | 98.1% | (70,50,20) | 98.87 | (70,30,10) | 95.16 | 50,20,10 | 94.58 |
c1908 | (50,30,20) | 98.8% | (40,20,10) | 94.98 | (50,30,10) | 95.36 | 50,40,15 | 96.4 |
c2670 | (200,150,50) | 99.94 | (200,100,20) | 99.82 | (150,50,10) | 99.55 | 100,30,10 | 99.26 |
c3540 | (50,30,20) | 98.2% | (60,40,20) | 97.99 | (60,50,20) | 96.55 | 50,40,15 | 95.72 |
c5315 | (200,100,50) | 99.93 | (150,50,20) | 99.79 | (100,50,20) | 99.7% | 130,30,10 | 99.08 |
c6288 | (55,35,20) | 99.13 | (60,30,15) | 98.23 | (50,30,20) | 97.3 | 55,25,5 | 96.09 |
Circuit | # hidden neurons | VA% using simple AE | VA% using Deep AE | Sparsity Constraints |
---|---|---|---|---|
c432 | 30,20,10 | 95.4 | 97.5 | 10e-6 |
c499 | 50,30,20 | 98.2 | 98.50 | 10e-9 |
c880 | 50,30,20 | 98.3 | 98.6 | 10e-6 |
c1355 | 70,50,20 | 97.44 | 98.87 | 10e-9 |
c1908 | 50,30,20 | 97.8 | 98.8 | 10e-6 |
c2670 | 200,150,50 | 99.9 | 99.94 | 10e-9 |
c3540 | 50,30,20 | 97.3 | 98.2 | 10e-6 |
c5315 | 100,50,20 | 98.9 | 99.7 | 10e-9 |
c6288 | 50,30,20 | 97.9 | 99.3 | 10e-6 |
c7552 | 200,100,20 | 99.5 | 99.6 | 10e-9 |
Circuit | #gates | Sum of #Inputs and #outputs | #Faults | # Test Vectors | Architecture (L1, L2, L3) | VA% of SSAE | VA% of Deep AE |
---|---|---|---|---|---|---|---|
S1196 | 529 | 64 | 1242 | 16,391 | (40,30,20) | 98.5 | 97.55 |
S1238 | 508 | 64 | 1355 | 16,797 | (30,20,10) | 94.8 | 96.8 |
S1423 | 657 | 170 | 1515 | 24,359 | (70,50,30) | 99.7 | 98.98 |
S1488 | 653 | 39 | 1486 | 8627 | (20,10,5) | 93.1 | 96.6 |
S1494 | 647 | 39 | 1506 | 8630 | (30,20,10) | 97.9 | 97.45 |
S9234.1 | 5597 | 497 | 6927 | 92,055 | (300,200,100) | 99.95 | 99.8 |
S5378 | 2836 | 427 | 4551 | 67,991 | (300,200,70) | 99.93 | 99.71 |
s13207.1 | 7979 | 1,490 | 9815 | 9661 | (300,100,10) | 99.88 | 99.75 |
s15850.1 | 9775 | 1,295 | 11,322 | 11,725 | (300,100,10) | 99.84 | 99.77 |
5.2.2 The Complete Semi-supervised FD
Circuit | Architecture (L1, L2, L3) | VA% |
---|---|---|
c432 | 30,20,10 | 97.7 |
c499 | 50,30,20 | 91.1 |
c880 | 50,30,20 | 97.3 |
c1355 | 70,50,20 | 90.68 |
c1908 | 50,30,20 | 96.5 |
c2670 | 200,100,50 | 99.6 |
c3540 | 50,30,20 | 98 |
c5315 | 100,50,20 | 97.8 |
c6288 | 50,30,20 | 97.9 |
c7552 | 200,100,20 | 98.41 |
Circuit | Sum of #Inputs and #outputs | Architecture (L1, L2, L3) | Testing time (sec) | VA% |
---|---|---|---|---|
S1196 | 64 | (40,30,20) | 0.172 | 97.55 |
S1238 | 64 | (30,20,10) | 0.161 | 96.8 |
S1423 | 170 | (70,50,30) | 0.249 | 99 |
S1488 | 39 | (20,10,5) | 0.0969 | 96.6 |
S1494 | 39 | (30,20,10) | 0.0882 | 97.45 |
S9234.1 | 497 | (300,200,100) | 0.0014 | 99.8 |
S5378 | 427 | (300,200,70) | 0.895 | 99.7 |
s13207.1 | 1,490 | (300,100,10) | 0.225 | 99.75 |
s15850.1 | 1,295 | (300,100,10) | 0.266 | 99.8 |
5.3 Comparsion to Fault Detection Based on SAT Domain
Circuit | FD-based on SAT (time in sec) | FD-based on DL | |
---|---|---|---|
Testing time in sec | Training time in sec | ||
C432 | 2.18 | 0.0754 | 68 |
C499 | 4.89 | 0.109 | 24.9 |
C880 | 10.14 | 0.146 | 45.1 |
C1908 | 41.69 | 0.277 | 111 |
S1196 | 21.12 | 0.147 | 39.7 |
S1238 | 29.62 | 0.144 | 52.4 |
S1423 | 29.62 | 0.234 | 52.6 |
S1488 | 34.16 | 0.0767 | 10.8 |
S1494 | 36.13 | 0.0765 |