Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 150 - Spring 2007 – Lec. #20: Testing - 1 Testing of Logic Circuits zFault Models zTest Generation and Coverage zFault Detection zDesign for Test.

Similar presentations


Presentation on theme: "CS 150 - Spring 2007 – Lec. #20: Testing - 1 Testing of Logic Circuits zFault Models zTest Generation and Coverage zFault Detection zDesign for Test."— Presentation transcript:

1 CS 150 - Spring 2007 – Lec. #20: Testing - 1 Testing of Logic Circuits zFault Models zTest Generation and Coverage zFault Detection zDesign for Test

2 CS 150 - Spring 2007 – Lec. #20: Testing - 2 Fault Model zStuck-At Model yAssume selected wires (gate input or output) are “stuck at” logic value 0 or 1 yModels certain kinds of fabrication flaws that short circuit wires to ground or power, or broken wires that are floating xWire w stuck-at-0: w/0 xWire w stuck-at-1: w/1 yOften assume there is only one fault at a time—even though in real circuits multiple simultaneous faults are possible and can mask each other yObviously a very simplistic model!

3 CS 150 - Spring 2007 – Lec. #20: Testing - 3 Fault Model zSimple example: zGenerate a test case to determine if a is stuck at 1 yTry 000 yIf a stuck at 1, expect to see f = 0, but see 1 instead w1w2w3w1w2w3 a/1 b c d f 000000 0 see 1 but should be 0

4 CS 150 - Spring 2007 – Lec. #20: Testing - 4 Fault Model zSimple example w1w2w3w1w2w3 abcabc d f Test w1 w2 w3 000 001 010 011 100 101 110 111 a/0 X X X a/1 X X X b/0 X b/1 X c/0 X c/1 X d/0 X d/1 XX f/0 X X X X X f/1 X X X Fault Detected Test Set

5 CS 150 - Spring 2007 – Lec. #20: Testing - 5 Problems with Fault Model zIn general, n-input circuits require much less than 2 n test inputs to cover all possible stuck-at-faults in the circuit zHowever, this number is usually still too large in real circuits for practical purposes zFinding minimum test cover is an NP-hard problem too

6 CS 150 - Spring 2007 – Lec. #20: Testing - 6 Path Sensitization zWire-at-time testing too laborious zBetter to focus on wiring paths, enabling multi-wire testing at the same time z“Activate” a path so that changes in signal propagating along the path affects the output

7 CS 150 - Spring 2007 – Lec. #20: Testing - 7 Path Sensitization zSimple Example: To activate the path, set inputs so that w 1 can influence f E.g., w 2 = 1, w 3 = 0, w 4 = 1 AND gates: one input at 1 passes the other input NOR gates: one input at 0 inverts the other input To test: w 1 set to 1 should generate f = 0 if path ok faults a/0, b/0, c/1 cause f = 1 w 1 set to 0 should generate f = 1 if path ok faults a/1, b/1, c/0 cause f = 0 One test can capture several faults at once! w1w2w1w2 b f c a w3w3 w4w4 1 0 1

8 CS 150 - Spring 2007 – Lec. #20: Testing - 8 Path Sensitization zGood news: one test checks for several faults yNumber of paths much smaller than number of wires yStill an impractically large number of paths for large-scale circuits zPath idea can be used to “propagate” a fault to the output to observe the fault ySet inputs and intermediate values so as to pass an internal wire to the output while setting inputs to drive that internal wire to a known value yIf propagated value isn’t as expected, then we have found a fault on the isolated wire

9 CS 150 - Spring 2007 – Lec. #20: Testing - 9 Fault Propagation w1w2w1w2 b f c g w3w4w3w4 h k w1w2w1w2 f w3w4w3w4 b/0 0 1 1 1111 D D 0000 D

10 CS 150 - Spring 2007 – Lec. #20: Testing - 10 Fault Propagation w1w2w1w2 b f c g w3w4w3w4 h k w1w2w1w2 f D w3w4w3w4 g/1 1 1 0000 0000 D D D

11 CS 150 - Spring 2007 – Lec. #20: Testing - 11 Tree Structured Circuits z To test inputs stuck-at-0 at given AND gate ySet inputs at other gates to generate AND output of zero yForce inputs at selected gate to generate a one yIf f is 1 then circuit ok, else fault z To test inputs stuck-at-1 at given AND gate yDrive input to test to 0, rest of inputs driven to 1 yOther gates driven with inputs that force gates to 0 yIf f is 0 then fault, else OK w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f

12 CS 150 - Spring 2007 – Lec. #20: Testing - 12 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 111010000111010000 000000 Stuck-at-0 0

13 CS 150 - Spring 2007 – Lec. #20: Testing - 13 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 010111110010111110 000000 Stuck-at-0 0

14 CS 150 - Spring 2007 – Lec. #20: Testing - 14 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 000101111000101111 000000 Stuck-at-0 0

15 CS 150 - Spring 2007 – Lec. #20: Testing - 15 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 011110110011110110 100100 Stuck-at-1 1

16 CS 150 - Spring 2007 – Lec. #20: Testing - 16 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 011110110011110110 010010 Stuck-at-1 1

17 CS 150 - Spring 2007 – Lec. #20: Testing - 17 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 011110110011110110 001001 Stuck-at-1 1

18 CS 150 - Spring 2007 – Lec. #20: Testing - 18 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 101100011101100011 100100 Stuck-at-1 1

19 CS 150 - Spring 2007 – Lec. #20: Testing - 19 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 101100011101100011 001001 Stuck-at-1 1

20 CS 150 - Spring 2007 – Lec. #20: Testing - 20 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 110011000110011000 010010 Stuck-at-1 1 Any other stuck-at-1 cases covered?

21 CS 150 - Spring 2007 – Lec. #20: Testing - 21 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 100101011100101011 010010 Stuck-at-1 1 Any other stuck-at-1 cases covered? Was that case already covered?

22 CS 150 - Spring 2007 – Lec. #20: Testing - 22 Tree Structured Circuits w1w3w4w1w3w4 w2w3w4w2w3w4 w1w2w3w1w2w3 f 1234567812345678 w110001110w110001110 w311010100w311010100 w410011000w410011000 w201111010w201111010 w311010100w311010100 w401100111w401100111 w101110001w101110001 w201111010w201111010 w300101011w300101011 w110001110w110001110 w201111010w201111010 w300101011w300101011 w401100111w401100111 Stuck-at-0 Stuck-at-1 Product Term Test 000001101000001101 001001 Stuck-at-1 1 All inputs stuck-at-1’s covered now

23 CS 150 - Spring 2007 – Lec. #20: Testing - 23 Random Testing zSo far: deterministic testing zAlternative: random testing yGenerate random input patterns to distinguish between the correct function and the faulty function Number of Tests Probability Fault Detected Small number of tests has reasonable probability of finding the fault

24 CS 150 - Spring 2007 – Lec. #20: Testing - 24 Announcements zDiscussion Section Friday 10-11 AM CANCELLED due to low attendance (still have Thursday 4-5 and Friday 11-noon though) zCheckpoint #4 Lab Lecture this Friday zNo Lab Lecture during Week #11 zSpecification of Final Report during Week #12

25 CS 150 - Spring 2007 – Lec. #20: Testing - 25 Project zWeek #11 (this week): Finish Checkpoint #3 yHard deadline in your lab week of April 9 y20% late penalty after that zWeek #12 (next week): Start Checkpoint #4 yEarly Demo Hard Deadline Monday, 16 April y10% Extra credit for early completion! zWeek #13: Finish Checkpoint #4 yStandard Demo Deadline Monday, 23 April y20% Late Penalty plus partial credit for partial functionality y20% Extra credit cap zWeek #14: Final Report yHard Deadline Monday, 30 April yThere will be no late reports

26 CS 150 - Spring 2007 – Lec. #20: Testing - 26 Sequential Testing zDue to embedded state inside flip-flops, it is difficult to employ the same methods as with combinational logic zAlternative approach: design for test yScan Path technique: FF inputs pass through multiplexer stages to allow them to be used in normal mode as well as a special test shift register mode

27 CS 150 - Spring 2007 – Lec. #20: Testing - 27 Scan Path Technique z Configure FFs into shift register mode (red path) z Scan in test pattern of 0s and 1s z Non-state inputs can also be on the scan path (think synchronous Mealy Machine) z Run system for one clock cycle in “normal” mode (black path)— next state captured in scan path z Return to shift register mode and shift out the captured state and outputs Combinational Logic

28 CS 150 - Spring 2007 – Lec. #20: Testing - 28 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs z Y1Y2Y1Y2 D Q Q 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 0 D Q Q

29 CS 150 - Spring 2007 – Lec. #20: Testing - 29 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 1 0 0 D Q Q D Q Q

30 CS 150 - Spring 2007 – Lec. #20: Testing - 30 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 1 0 1 0 D Q Q D Q Q

31 CS 150 - Spring 2007 – Lec. #20: Testing - 31 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs yNormal w=0 z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 1 0 1 0 0 D Q Q D Q Q

32 CS 150 - Spring 2007 – Lec. #20: Testing - 32 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs yNormal w=0 yOutput z=0, Y1=0, Y2=0 z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 1 0 0 0 0 0 D Q Q D Q Q

33 CS 150 - Spring 2007 – Lec. #20: Testing - 33 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs yNormal w=0 yOutput z=0, Y1=0, Y2=0 yObserve z directly z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 0 0 0 0 0 0 D Q Q D Q Q

34 CS 150 - Spring 2007 – Lec. #20: Testing - 34 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs yNormal w=0 yOutput z=0, Y1=0, Y2=0 yObserve z directly yScan out Y1, Y2 z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 0 0 0 0 D Q Q D Q Q

35 CS 150 - Spring 2007 – Lec. #20: Testing - 35 Scan Path Example zw,y1,y2 test vector 001 yScan 01 into y1, y2 FFs yNormal w=0 yOutput z=0, Y1=0, Y2=0 yObserve z directly yScan out Y1, Y2 z Y1Y2Y1Y2 0 1 0 1 y1y2y1y2 w Scan-in Scan-out G/S 0 0 0 D Q Q D Q Q

36 CS 150 - Spring 2007 – Lec. #20: Testing - 36 Built-in Self-Test (BIST) zTest Vector Generator yPseudorandom tests with a feedback shift register ySeed generates a sequence of test patterns yOutputs combined using the same technique yGenerates a unique signature that can be checked to determine if the circuit is correct Test Vector Generator Circuit Under Test Response Compressor x 0. x n-1 P 0. P m-1 Signature

37 CS 150 - Spring 2007 – Lec. #20: Testing - 37 Linear Feedback Shift Register D Q Q D Q Q D Q Q D Q Q D Q Q D Q Q D Q Q D Q Q P Signature Random Test Pattern Input from circuit under test

38 CS 150 - Spring 2007 – Lec. #20: Testing - 38 Linear Feedback Shift Register zStarting with the pattern 1000, generates 15 different patterns in sequence and then repeats zPattern 0000 is a no-no D Q Q D Q Q D Q Q D Q Q x3x3 x2x2 x1x1 x0x0 x3x2x1x0fx3x2x1x0f f 1000110001 1100111001 1110111101 1111011110 0111101111 1011010110 0101101011 1010110101 1101011010 0110001100 0011100111 1001010010 0100001000 0010000100 0001100011 1000110001 … … Initial Configuration

39 CS 150 - Spring 2007 – Lec. #20: Testing - 39 Linear Feedback Shift Register zMulti-input Compressor D Q Q D Q Q P3P3 P2P2 D Q Q P1P1 D Q Q P0P0 Signature Circuit Under Test Outputs

40 CS 150 - Spring 2007 – Lec. #20: Testing - 40 Complete Self-Test System Combinational Circuit FFs and Muxes MIC SIC Scan out PRBSG Scan in MUXMUX PRBSG Normal Inputs Random Test Sequences Multi-input Compressor Random Test Sequences Single-input Compressor Pseudo Random Binary Sequence Generator

41 CS 150 - Spring 2007 – Lec. #20: Testing - 41 Built-in Logic Block Observer (Bilbo) zTest generation and compression in a single circuit! yM 1, M 2 = 11: Regular mode yM 1, M 2 = 00: Shift register mode yM 1, M 2 = 10: Signature generation mode yM 1, M 2 = 01: Reset mode DQ Q DQ Q DQ Q DQ Q M1M1 P3P3 P2P2 P1P1 P0P0 M2M2 Q3Q3 Q2Q2 Q1Q1 Q0Q0 S in G/S Normal/Scan 0 1 S out

42 CS 150 - Spring 2007 – Lec. #20: Testing - 42 Bilbo Architecture zScan initial pattern in Bilbo1, reset FFs in Bilbo2 zUse Bilbo1 as PRBS generator for given number of clock cycles and use Bilbo2 to produce signature zScan out Bilbo2 and compare signature; Scan in initial test pattern for CN2; Reset the FFs in Bilbo1 zUse Bilbo2 as PRBS generator for a given number of clock cycles and use Bilbo1 to produce signature zScan out Bilbo1 and compare signature; Combinational Network CN1 Combinational Network CN2 BILBO1 BILBO2 Scan-in Scan-out

43 CS 150 - Spring 2007 – Lec. #20: Testing - 43 Summary zFault models yApproach for determining how to develop a test pattern sequence yWeakness is the single fault assumption zScan Path yTechnique for applying test inputs deep within the system, usually for asserting state yTechnique for getting internal state to edges of circuit for observation zBuilt-in Test yFounded on the approach of random testing yGenerate pseudo random sequences; compute signature; determine if signature generated is same as signature of a correctly working circuity

44 CS 150 - Spring 2007 – Lec. #20: Testing - 44 Midterm II Results zMean: 31/Standard Deviation: 7 zMin: 10/Max: 42.5 31 +1  +2  -2  -1  -3  10% A 9 15% A- 16 20% B+ 21 20% B 24 20% B- 21 15% C+ 16 10% C/C- 9 116


Download ppt "CS 150 - Spring 2007 – Lec. #20: Testing - 1 Testing of Logic Circuits zFault Models zTest Generation and Coverage zFault Detection zDesign for Test."

Similar presentations


Ads by Google