250 likes | 446 Views
Using a Formal Specification and a Model Checker to Monitor and Guide Simulation Verifying the Multiprocessing Hardware of the Alpha 21364 Microprocessor. Serdar Tasiran
E N D
Using a Formal Specification and a Model Checker to Monitor and Guide SimulationVerifying the Multiprocessing Hardware of the Alpha 21364 Microprocessor Serdar Tasiran Koç University, Istanbul, Turkey(formerly Compaq/HP Systems Research Center) Yuan Yu(Microsoft Research, formerly Compaq)Brannon Batson(Intel, formerly Compaq)
But first Formal Methods(i.e. mathematical, algorithmic)for Software and Hardware Designsor“Why should you care?”
French Guyana, June 4, 1996 $800 million software failure
Mars, July 4, 1997 Lostcontactduetoreal-time priority inversion bug
Faulty division algorithm (Intel Pentium) $475 million replacement cost Faulty floppy disk controller (Toshiba) $2.1 billion court settlement
$4 billion development effort > 50% system integration & validation cost
400 horses 100microprocessors
Cost of Finding Flaws Late Comp 302, Spring 2003
ANALYSIS SCIENCE Natural Systems ENGINEERING Artificial Systems PURE Abstract Systems THEORY Veri/Falsification APPLIED Concrete Systems EXPERIMENT DESIGN
DESIGN VERI/FALSIFICATION • by simulation • by test INFORMAL (ad hoc) Poor coverage High recovery cost • by proof • by algorithm FORMAL (systematic)
Register Transfer Level (RTL) System (Behavioral) Level Transistor Level Layout Level Gate Level Typical Abstraction Layers for a Hardware Design
Design Process • Design :specify and enter the design intent Verify: verify the correctness of design and implementation Implement: refine the design through all phases
Register Transfer Level (RTL) System (Behavioral) Level Transistor Level Layout Level Gate Level Flavors of Verification Design Verification:Does the design make sense? If I implemented it as designed, would it satisfy the design requirements? Implementation Verification:Is the implementation at the lower layer of abstraction consistent with the higher level?
Systems Design and Verification Challenges • Heterogeneity (analog, digital, HW/SW) • Complexity (~billion transistors, ~millions of lines of code) • Time-to-market
Processor Complexity Avg. Human IQ 180 160 140 120 100 80 50 Role of Computer-Aided Design and Verification Tools: Helping humans cope Intelligence Quotient Transistors PPC603 10M Pentium 80486 Pentium Pro 1M PPC601 80386 68020 MIPS R4000 68040 68000 100K 8086 10K 4004 8080 1K 100 10 1 1975 1980 1985 1990 1995
p q Formal Verification Tools • Description of system • to be verified: • Finite state machine • Code written in a hardware • description language • Specification: • Temporal logic formula • Algorithm- or protocol-level description for design G(p Þ F q) Verifier No Yes Error trace
Simulation Not complete Need to generate expected behavior Difficult to cover corner cases CPU intensive have to run billions of cycles Can handle large systems Formal Verification Complete wrt specification No need to generate expected behavior Corner cases are automatically taken care of Most of the state-of-the-art methods are memory intensive Memory usage is strongly related with the size of systems to be verified Simulation vs. Formal Verification
Exploring the State Space of an FSM • Implicit methods: Representsets of states with decision • diagrams • Representation size not • proportional to number of states • But still memory limited
11 10 stars 7 10 transistors 100,000 10 states
The Moral … • Verification is a serious problem • Formal verification methods are great, but not practical yet on complex systems • Simulation is practical, but can’t provide strong enough guarantees • Next part of talk: A hybrid technique: • Simulation + formal verification