Scaling VLSI Design Debugging with Interpolation
Brian Keng and Andreas Veneris
University of Toronto
Scaling VLSI Design Debugging with Interpolation Brian Keng and - - PowerPoint PPT Presentation
Scaling VLSI Design Debugging with Interpolation Brian Keng and Andreas Veneris FMCAD 2009 FMCAD 2009 University of Toronto Outline Introduction Motivation Contributions Background Debugging with Interpolation Debugging
University of Toronto
Interpolation FMCAD 2009
Interpolation FMCAD 2009
Reduce memory usage
Interpolation FMCAD 2009
Interpolation FMCAD 2009
D Q FF
y
Bug: should be NOR gate
1
x2
1
q1 y0 y1 q2
1 1 Error! Output Mismatch 1
Interpolation FMCAD 2009
x1 x2
D Q FF
y
x1
1,1
x2
1,1
q1,1 y1,1
1 1 1 e1=1 will allow problem to be SAT
y0 x1
1,2
x2
1,2
q1 y1,2 q1,3 y1 d0 w2
1
w1
1
w2 w1 e1
1 1
e1
1
e2
1
e2
Interpolation FMCAD 2009
UNSAT core
Subset of clauses that are unsatisfiable Proof of unsatisfiability
Interpolant P, for subsets A and B, has three properties:
AP B ∧ P is unsatisfiable P only contains common variables of A and B P only contains common variables of A and B
Algorithm to generate an interpolant from proof of
Interpolation FMCAD 2009
Introduction Background Debugging with Interpolation
Suffix Window Debugging UNSAT Suffix Instance Prefix Window Debugging Prefix Window Debugging Scalable Debugging Algorithm Multiple Interpolants Example
Experiments Conclusion
Interpolation FMCAD 2009
Use only a suffix of the error trace Only find errors after 2nd time-frame
Observed error
Interpolation FMCAD 2009
Observed error
Use UNSAT suffix instance to learn information Case 1: UNSAT core contains no initial state
All solutions found No need to analyze rest of error trace
Observed error
Interpolation FMCAD 2009
Observed error
Case 2: UNSAT core has initial state variables
Generate an interpolant from UNSAT instance Erroneous behavior captured by interpolant Interpolant is over-approximation of suffix instance
N ∧
2 3 3 3 2 2 2
Interpolation FMCAD 2009
Observed error Prefix cannot be used directly since erroneous behavior
Use interpolant to properly constrain erroneous behavior May get spurious solutions due to over-approximation
Interpolation FMCAD 2009
Interpolant Interpolant Interpolant Interpolant
Partition error trace into smaller windows Iteratively analyze each window separately
Use current instance to generate interpolant for next iteration Limit # of simultaneous time-frames analyzed
Each interpolant is potentially a weaker approximation than
Interpolation FMCAD 2009
Interpolation FMCAD 2009
D Q FF
x1 x2 y1 y2 x1 e1 e1 x1
1
1 1 SAT when e1=1 Bug: should be buffer
2 time frame error trace Error cardinality: N=1
1
x1 s0 x2 e2 y1 e2 y2 x1 x2
1
y1
1
y2
1
1 1 1 1 1
Interpolation FMCAD 2009
1
y1 e1 e2 x1
1
x2
1
y1
1
y2
1
1 1 1
y1 e2 e1
1
UNSAT with N=1 Generate an interpolant from UNSAT instance
Over-approximation of suffix Retains information about unsatisfiability
e2
Interpolation FMCAD 2009
e2 e1
1
x1 s0 x2 e1 e2 y1 y2
1 1 SAT when e1=1
Use interpolant to constrain prefix with erroneous
Finds all solutions as when modeling the entire error
1
Interpolation FMCAD 2009
Interpolation FMCAD 2009
Interpolation FMCAD 2009
1000 Interpolant Debugging Memory (MB) r=2 r=3 r=4 10 100 1000 Interpolant Debugging Run-time (s) r=2 r=3 r=4
r=4:
57% average reduction in memory 23% average reduction in run-time 2% increase number of solutions returned
100 100 1000 Interpolant Debugging Memory (MB) Orig Debugging Memory (MB) 1 1 10 100 1000 Interpolant Debugging Run-time (s) Orig Debugging Run-time (s)
Interpolation FMCAD 2009
0.5 1 1.5 2 Relative Memory ac972 divider2 mem_ctrl1 spi1 vga2 0.5 1 1.5 2 Relative Runtime ac97 divider2 mem_ctrl1 spi1 vga2 1 2 3 4 Number of Windows
Runtime does not necessarily decrease with r
Peak memory decreases as r increases
1 2 3 4 Number of Windows
Interpolation FMCAD 2009
20 40 60 80 100 120 Number of Solutions single multiple
Instances from largest increase in number of
Improved quality in certain cases
20 divider2 (r=4) mrisc1 (r=4) spi1 (r=4) vga1 (r=4) vga2 (r=4) Instance
Interpolation FMCAD 2009
Interpolation FMCAD 2009
Scalable Debugging Algorithm with Interpolation
Reduces number of simultaneously analyzed clock cycles
Use interpolants as an over-approximation Use multiple interpolants to get a better approximation
Experimental Results Experimental Results
57% average reduction in memory 23% average reduction in run-time 2% increase in suspects
Interpolation FMCAD 2009