1 / 27

Symbolic Simulation with Approximate Values

Symbolic Simulation with Approximate Values. Chris Wilson, David L. Dill Computer Systems Laboratory Stanford University. Randal E. Bryant CS Dept. Carnegie-Mellon University. Bug rate. Directed testing Random testing. Many “easy”. Model checking Emulation Semi-formal methods. fewer

gaston
Download Presentation

Symbolic Simulation with Approximate Values

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Symbolic Simulation with Approximate Values Chris Wilson, David L. DillComputer SystemsLaboratory Stanford University Randal E. BryantCS Dept. Carnegie-Mellon University

  2. Bug rate Directed testing Random testing Many “easy” Model checking Emulation Semi-formal methods fewer “hard” time Verification Bottleneck

  3. Symbolic simulation Our Approach Bug rate time

  4. Symbolic Simulation • Efficiency • 1 symbolic test <=> many directed tests. • Ease of use • short tests => easy to write, debug. • Low Risk • User controls number of symbolic variables. • Blow up • BDDs too unpredictable. How to prevent blow up?

  5. Our Contribution • Approximate values • Simulator chooses amount of approximation. • Function of node/time. • Adaptive variable classification • Low effort at start. • Increase effort as necessary. • Efficient BDD overflow handling. • Automatically trade time for memory. • Set relevant variables to constants. • SAT-based case splitting.

  6. Related Work • Symbolic Trajectory Evaluation [BryantSeger95] • Approximate values allowed on inputs. • Simulator has no flexibility in creating BDDs. • Innologic • Commercial symbolic simulator. • Based on STE. • Sets random variable to constant on BDD overflow. • Quasi-Symbolic Simulation [DAC00] • Scalar values/SAT-based case splitting. • Fast/no memory overflow. • Exponential simulation time in number of control variables.

  7. <d1,d2,d3,d4> 23 pass/ fail datain = dataout <a1,a2,a3,a4> 408 address 0 interrupt 5 <c1,c2,c3> req valid dly =0 counter request DUT “read” 0 1 “write” 0 Symbolic System Simulation Symbolic test = directed test with symbolic values

  8. A B exact approximate 0 0 0 00 1 0 01 0 0 X1 1 1 X A & B Approximate Values Simulator Values are functions of symbolic variables.

  9. BDDs with Approximate Values • Ternary MTBDDs • Leaf nodes = {0,1,X} • Modify BDD apply algorithm. Apply(F,G) find top variable V compute L=left(F,G), R=right(F,G) if node(V,L,R) exists, return it else create node(V,L,R) return node

  10. BDDs with Approximate Values • Generic Approximate BDD apply algorithm. Approx_Apply(F,G) find top variable V compute L=left(F,G), R=right(F,G) if node(V,L,R) exists, return itelse if (want_exact(V,L,R)) create node (V,L,R) return nodeelse /* approximate */ return X

  11. Exact Approximate Variable Types Data Control Don’t care

  12. Variable Classification • Goal: simulation effort function of variable type • Control variables  high. • Data variables  medium. • can be done very cheaply! • Don’t care variables  low effort.

  13. Classification Algorithm • Simulator’s classification • Care • Don’t Care • Algorithm • Initially, all variables are Don’t Care. • Simulate using sub-domain values only. • Re-classify 1 variable as Care. • Repeat until sufficient variables classified.

  14. Sub-Domains • Sub-domain • Limited set of values. • Small representation. • Fast evaluation. • Approximate values are combinations of… • Exact BDD nodes. • Sub-domain values. • Exact nodes ordered above sub-domain nodes. • Example: Quasi-symbolic sub-domain. • Note: paper describes different sub-domain.

  15. b a a Etc. X 0 1 1 0 0 1 1 0 Quasi-Symbolic Values • Quasi-symbolic sub-domain • {0,1,X,a,~a,b,~b,…} • If computed value not in domain… • Return X. Exact value allowed ifl,rare both constants.

  16. Associated variable (c) Propagate care variables (a) (a) Final associated variable= care variable (b) (b) Variable Classification 0 1 & C 1 (a) A X & & A B 1 & B

  17. BDDs with Approximate Values • Approximation using: • quasi-symbolic values and … • Variable classification. Approx_Apply(F,G) find top variable V compute L=left(F,G), R=right(F,G) if node (V,L,R) exists, return itelseif (V is care variable OR L,R are constants) create node (V,L,R) return node else /* approximate */ return X

  18. a a b b b b c X X X X d e f X 0 1 Unmarked variables in BDDs A B C D E F marked care unmarked

  19. Observations • BDD size function of care variables only. • Data variables limited to exactly one node in BDD. • Don’t care nodes quickly become X.

  20. BDD Overflow • No room to create new BDD node. • Handle using approximation rule. Approx_Apply(F,G) find top variable V compute L=left(F,G), R=right(F,G) if node (V,L,R) exists, return itelse if (want_exact(V,L,R) AND space in BDD node table) create node (V,L,R) return node else /* approximate */ return X

  21. X A=1 A=0 X B=0 B=1 0 0 BDD Overflow Handling • Set care variables to constants. • variable classification algorithm selects variable. • SAT-based case splitting for completeness.

  22. Experiments • Evaluate scalability • Increase number of care variables in a test. • Plot total simulation time. • Maximum BDD size. • Total BDD nodes used.

  23. Datatransfer Test Design 150K gates, 2500 latches 16 control 10 data ~300 don’t care Pentium Pro bus MCU Synfinity Interconnect

  24. Simulation Time Time(sec.) Number of Care Variables

  25. Maximum BDD Size BDDnodes Number of care variables

  26. Total BDD Nodes BDDnodes Number of care variables

  27. Summary • Want to improve system level verification. • Use symbolic simulation. • Many don’t cares. • Control logic more important than data. • Use approximate BDDs • Exact values on care nodes. • Approximate values on don’t care nodes. • Variable classification determines approximation. • BDD overflow handled using approximation.

More Related