Automatic Abstraction of Microprocessors for Verification

Slides:



Advertisements
Similar presentations
Functional Decompositions for Hardware Verification With a few speculations on formal methods for embedded systems Ken McMillan.
Advertisements

Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Bounded Model Checking of Concurrent Data Types on Relaxed Memory Models: A Case Study Sebastian Burckhardt Rajeev Alur Milo M. K. Martin Department of.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
IMPACT Second Generation EPIC Architecture Wen-mei Hwu IMPACT Second Generation EPIC Architecture Wen-mei Hwu Department of Electrical and Computer Engineering.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Automated Method Eliminates X Bugs in RTL and Gates Kai-hui Chang, Yen-ting Liu and Chris Browy.
Give qualifications of instructors: DAP
Sim-alpha: A Validated, Execution-Driven Alpha Simulator Rajagopalan Desikan, Doug Burger, Stephen Keckler, Todd Austin.
6/14/991 Symbolic verification of systems with state machines David L. Dill Jeffrey Su Jens Skakkebaek Computer System Laboratory Stanford University.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Randal E. Bryant Carnegie Mellon University SRC ‘07 Word-Level Modeling and Verification of Systems Using Selective Term-Level Abstraction Sanjit A. Seshia.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
Levels in Processor Design
Microprocessors Introduction to ia64 Architecture Jan 31st, 2002 General Principles.
1 Selective Term-Level Abstraction with Type-Inference Bryan Brady Advisor: Sanjit Seshia In collaboration with: Randy Bryant, Daniel Kroening, Joel Ouaknine,
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Formal Verification of SpecC Programs using Predicate Abstraction Himanshu Jain Daniel Kroening Edmund Clarke Carnegie Mellon University.
Overview Part 1 – Design Procedure 3-1 Design Procedure
Dr. Abdel-Rahman Al-Qawasmi
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Automatic Abstraction Refinement for GSTE Yan Chen, Yujing He, and Fei Xie Portland State University Jin Yang Intel Nov 13, 2007.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Lecture 12 – Design Procedure.
David O’Hallaron Carnegie Mellon University Processor Architecture Overview Overview Based on original lecture notes by Randy.
Word-level Sequential Memory Abstraction for Model Checking Per Bjesse November 19, 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Digitaalsüsteemide verifitseerimise kursus1 Digitaalsüsteemide verifitseerimine IAF0620, 5.0 AP, E Jaan Raik IT-208,
1 Chapter 4: Selection Structures. In this chapter, you will learn about: – Selection criteria – The if-else statement – Nested if statements – The switch.
What is an And Gate? It is a digital circuit that produce logical operations The logical operations are call Boolean logical Boolean operation consist.
FPGA-Based System Design: Chapter 6 Copyright  2004 Prentice Hall PTR Topics n Design methodologies.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
1 IAF0620, 5.0 AP, Exam Jaan Raik ICT-524, , Digital systems verification.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CS 598 Scripting Languages Design and Implementation 9. Constant propagation and Type Inference.
1  2004 Morgan Kaufmann Publishers No encoding: –1 bit for each datapath operation –faster, requires more memory (logic) –used for Vax 780 — an astonishing.
Abstraction and Abstract Interpretation. Abstraction (a simplified view) Abstraction is an effective tool in verification Given a transition system, we.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Software Testing.
15-740/ Computer Architecture Lecture 3: Performance
Combinational Logic Design&Analysis.
ECE 353 Lab 3 Pipeline Simulator
Definition CASE tools are software systems that are intended to provide automated support for routine activities in the software process such as editing.
Elementary Microarchitecture Algebra
CSCI-235 Micro-Computer Applications
Hardware Verification
COMBINED PAGING AND SEGMENTATION
UNIVERSITY OF MASSACHUSETTS Dept
Chap 7. Register Transfers and Datapaths
Computer Architecture & Operations I
Morgan Kaufmann Publishers
A Review of Processor Design Flow
CSCI1600: Embedded and Real Time Software
Levels in Processor Design
Topic 5: Processor Architecture Implementation Methodology
Chapter 3 – Combinational Logic Design
Learning Conditional Abstractions (CAL)
Topic 5: Processor Architecture
HIGH LEVEL SYNTHESIS.
Levels in Processor Design
Levels in Processor Design
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Control unit extension for data hazards
Computer Architecture
Levels in Processor Design
Control unit extension for data hazards
Chapter 11 Processor Structure and function
October 9, 2003.
Chapter 13: I/O Systems.
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Automatic Abstraction of Microprocessors for Verification Bryan Brady CS252

Processor Verification How to verify? Two options: Simulation Formal Verification simulation: advantages: can test actual design, no verification model needed disadvantages: misses corner cases, takes too long to fully test formal verification: advantages: can mathematically prove correctness, implicitly tests all inputs disadvantages: requires a separate verification model, computationally hard example: pentium FDIV. certain inputs result in inaccurate results for fdiv. 1.14*10^-10 of input space. missing entry in lookup table OpenSPARC T1 Microarchitecture Specification, Sun Microsystems, Inc., 2006

Bridge the Gap Two extremes: Manually Automatically Tedious, error prone process Time consuming Automatically Abstract away everything Model precisely, abstract nothing Somewhere in between HDL Verification Model

Goals Remove the burden of creating a verification model Develop a scalable approach to large scale processor verification Not limited to processors

Correspondence Checking SImpl Sspec Verify that the spec can simulate (mimic) the pipelined implementation Compare shared state before and after the spec and implementation execute PC, RF, MEM Old Impl State Flush, Project Old Spec State Execute 1 cycle Execute 1 cycle New Impl State New Spec State Flush, Project S’Impl S’spec Automatic Verification of Pipelined Microprocessor Control, Burch and Dill, CAV 1994

Abstraction Experiment: Y86 5 stage pipeline single-threaded in-order execution simplified x86 R. E. Bryant and D. R. O’Hallaron. Computer Systems: A Programmer’s Perspective. Prentice-Hall 2002

Abstraction Experiment: Y86 Compare runtimes between various encodings of Y86 Term-level Bit-vector, uninterpreted Bit-vector, partially interpreted Bit-vector, “fully” interpreted We still represent memory and the register file as a mutable function

Abstraction Experiment: Y86

Semi-Automatic, Selective Abstraction via Type-Inference Designer partially annotates Verilog with abstraction information Type-qualifiers Format strings Our algorithm Determine the level of abstraction for non-annotated variables using type-inference Generate abstracted verification model Types: bit-vector, term, interpreted, uninterpreted

Type-Qualifiers Initially: All variables are terms (except Booleans) All operations are uninterpreted Except purely Boolean operations (control) Want to use as much abstraction as possible, model precisely only when we need to

Type-Qualifiers How do we represent “some_func”? input [7:0] a; //bit-vector input [7:0] b; wire [7:0] c; wire d; assign c = d ? a : b; a : BITVEC[8]; b : TERM; c := some_func(a,b,d); input [7:0] a; //bit-vector input [7:0] b; wire [7:0] c; wire d; assign c = d ? a : b; //interpret a : BITVEC[8]; b : TERM; c := some_func(a,b,d); How do we represent “some_func”?

Type-Inference b(term) a(bit-vector) d ? b(term) a(bit-vector) d ? input [7:0] a; //bit-vector input [7:0] b; wire [7:0] c; wire d; assign c = d ? a : b; input [7:0] a; //bit-vector input [7:0] b; wire [7:0] c; wire d; assign c = d ? a : b; //interpret 1 b(term) a(bit-vector) d ? 1 b(term) a(bit-vector) d ? c(bit-vector) f c(bit-vector) What if “b” is a different size than bit-vector “c” ?

Type-Inference Type reconciliation “Type-cast” terms to bit-vectors Propagate through circuit Only need to do this when function is interpreted Use a term2bv function If term is smaller, pad with zeros or sign-extend If term is bigger, extract low-order bits? UCLID’s decision procedure figures out the smallest size for terms Generate run-time warning

Type-Inference d a(bit-vector) c(term) ? b(term) d a(bit-vector) input [7:0] a; //bit-vector input [7:0] b; wire [7:0] c; //term wire d; assign c = d ? a : b; //interpret 1 b(term) a(bit-vector) d ? c(term) bv2term 1 b(term) a(bit-vector) d ? c(term) bv2term

Format Strings If we have a term and need to extract bits, but don’t want to represent it precisely... input [7:0] flit; //term modx modx(flit[7:4],flit[3:0]); s/flit[7:4]/flit_7_4/; s/flit[3:0]/flit_3_0/;

Summary Semi-automatic algorithm to generate term-level abstractions of industrial scale designs Eliminate human-introduced errors in verification modeling Reduce verification time, improve verification efficiency Integrate verification with design

Progress Originally wanted to work on OpenSPARC Too big to do by hand Identified what needs to be done to automate the modeling process Working on chip multiprocessor router by hand to further show that selective abstraction is useful (developed by Li-Shiuan Peh at Stanford)

Questions/Comments

Abstraction Experiment: Y86

Modeling with Abstraction Abstract details of data encodings and operations Keep control logic precise Assume functional units are correct, verify overall correctness

Data Abstraction  View data as symbolic words Arbitrary integers, no assumptions on size or encoding x0 x1 x  x2 xn-1

What do we do about logic functions? Data Abstraction Control Logic Data Path Com. Log. 1 Com.Log. 2 Data Path Com. Log. 1 ? What do we do about logic functions?

Function Abstraction Replace blocks that transform or evaluate data with generic, unspecified function Assume only functional consistency a = x  b = y  f (a, b) = f (x, y) conservative approximation, ignores detailed functionality ALU f

Data Selection If-then-else operator Its a multiplexor Allows control-dependent data flow 1 x y p ITE(p, x, y)

Data-Dependent Control Model with Uninterpreted Predicate Yields arbitrary Boolean value for each control + data combination Functional consistency holds Branch? Cond Adata p Branch Logic Bdata

Memories as Mutable Functions Memory M modeled as a function M(a): Value in memory location a Initially Arbitrary state Modeled by uninterpreted function m0 M a M a m0