Docsity

Interval Property Checking , Thesis of Digital Systems Design

Toggle sidebar
bg1
System-on-Chip Protocol Compliance Verification
Using Interval Property Checking
Verifikation von System-on-Chip-Protokollimplementierungen
durch intervallbasierte Eigenschaftspr¨
ufung
Vom Fachbereich Elektrotechnik und Informationstechnik
der Technischen Universit¨
at Kaiserslautern
zur Erlangung des akademischen Grades
Doktor der Ingenieurwissenschaften (Dr.-Ing.)
genehmigte Dissertation
von
M.Sc. Duc-Minh Nguyen
geb. in Hanoi, Vietnam
D 386
Dekan: Univ.-Prof. Dr. Steven Liu
Gutachter: Prof. Dr.-Ing. Wolfgang Kunz,
Technische Universit¨
at Kaiserslautern
Prof. Dr.-Ing. Hans Eveking,
Technische Unversit¨
at Darmstadt
Datum der Disputation: 16 Januar 2009
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Interval Property Checking and more Thesis Digital Systems Design in PDF only on Docsity!

System-on-Chip Protocol Compliance Verification

Using Interval Property Checking

Verifikation von System-on-Chip-Protokollimplementierungen

durch intervallbasierte Eigenschaftspr¨ufung

Vom Fachbereich Elektrotechnik und Informationstechnik

der Technischen Universit¨at Kaiserslautern

zur Erlangung des akademischen Grades

Doktor der Ingenieurwissenschaften (Dr.-Ing.)

genehmigte Dissertation

von

M.Sc. Duc-Minh Nguyen

geb. in Hanoi, Vietnam

D 386

Dekan: Univ.-Prof. Dr. Steven Liu

Gutachter: Prof. Dr.-Ing. Wolfgang Kunz, Technische Universit¨at Kaiserslautern Prof. Dr.-Ing. Hans Eveking, Technische Unversit¨at Darmstadt

Datum der Disputation: 16 Januar 2009

ii

To my parents

Contents

Contents

  • 1 Introduction Acknowledgments iii
    • 1.1 Hardware Verification of System-on-Chip Designs
      • 1.1.1 Equivalence Checking
      • 1.1.2 Property Checking
      • 1.1.3 Block-based Verification of SoC Designs
    • 1.2 Motivation and Thesis Overview
  • 2 Fundamentals
    • 2.1 Graphs and Graph Algorithms
      • 2.1.1 Definitions
      • 2.1.2 Graph Algorithms
    • 2.2 Representations of Boolean Functions
      • 2.2.1 Boolean Functions
      • 2.2.2 Combinational Circuits
      • 2.2.3 Reduced Ordered Binary Decision Diagrams
      • 2.2.4 Conjunctive Normal Forms
  • 3 Model Checking
    • 3.1 Models and Properties of Sequential Systems
      • 3.1.1 Models of Sequential Systems
      • 3.1.2 Property Languages
    • 3.2 Symbolic Model Checking
      • 3.2.1 Introduction of Model Checking
      • 3.2.2 Symbolic Model Checking
      • 3.2.3 State Space Explosion Problem
    • 3.3 Improvements of Symbolic Model Checking
      • 3.3.1 Improvement of Image Computation
      • 3.3.2 Approximate FSM Traversal
      • 3.3.3 Abstraction Refinement
    • 3.4 Bounded Model Checking
  • 4 Interval Property Checking Contents
    • 4.1 Properties in Interval Property Checking
      • 4.1.1 Operational Interval Properties
      • 4.1.2 Interval Properties Based on the Main-FSM
    • 4.2 Interval Property Checking
  • 5 Transition by Transition FSM Traversal
    • 5.1 Decomposition of State Space and Transition Relation
      • 5.1.1 Definition of the Main-FSM
      • 5.1.2 Decomposition Using the Main-FSM
    • 5.2 Decomposing Using Sub-FSMs
      • 5.2.1 Partitioning the Design into Sub-FSMs
      • 5.2.2 Traversing Sub-FSMs
    • 5.3 SAT-based Implementation of TBT
      • 5.3.1 SAT-based Constrained Image Calculation
      • 5.3.2 SAT-based Constrained Support Set Calculation
    • 5.4 TBT Traversal in IPC-based Verification Flow
    • 5.5 Comparison with Previous Work
      • 5.5.1 Comparison with Improvements in Image Computation
      • 5.5.2 Comparison with Approximative Reachability Analysis Methods
      • 5.5.3 Comparison with Abstraction Refinement Methods
      • 5.5.4 Comparison with BMC-based Methods
    • 5.6 Experimental Results
      • 5.6.1 Design Characteristics
      • 5.6.2 Performance Measurements for TBT Traversal
      • 5.6.3 Effect of Generated Reachability Constraints on IPC
        • proximation or Abstraction 5.6.4 Comparison with Other Model Checking Techniques Using Ap-
        • gorithms 5.6.5 Comparison with Other Approximative Reachability Analysis Al-
  • 6 Reuse Methodology for Protocol Compliance Verification
    • 6.1 Introduction
      • 6.1.1 Related Work
      • 6.1.2 Contribution of this Chapter
    • 6.2 Recorder-FST and ITL Properties
      • 6.2.1 Recorder-FST
      • 6.2.2 ITL Properties
    • 6.3 Methodology
    • 6.4 Experiments
      • 6.4.1 Recorders
      • 6.4.2 Properties
        • ability Analysis 6.4.3 Verifying Compliance Based on a Recorder using IPC and Reach-
  • 7 Summary and Future Work
    • 7.1 Summary
      • 7.1.1 Approximate TBT FSM Traversal for IPC Verification Flow
      • 7.1.2 Re-usable Properties and Generic Recorder
    • 7.2 Future Work
      • 7.2.1 Identifying Reachability Invariants
      • 7.2.2 Applying Approximate FSM Traversal in Abstraction Refinement
  • 8 Zusammenfassung (in Deutsch)
    • 8.1 Approximative TBT FSM-Traversierung f¨ur IPC
    • 8.2 Wiederverwendbare Eigenschaften und generischer Recorder

Contents

viii

Chapter 1. Introduction

after several modification or optimization steps are applied. Those modifications and optimization steps are done either manually by a designer or automatically by a synthesis tool. This can introduce errors into the design because of human mistakes or due to bugs of the automatic tools. Hence, it must be verified that the transformations of the design have not changed the function of the design after each design step. The task of equivalence checking is to guarantee the correctness of all automatic or manual transformation steps that are applied to the design. Formal equivalence checking techniques have been well studied and developed for recent decades [Kun93, JMF95, Mat96, KK97, SWWK04]. One of the first successful techniques is proposed by Kunz [Kun93] for combinational designs and is extended by Stoffel [SWWK04] for sequential designs. This technique is based on the fact that there are many similarities between the structures of the golden model and the modified model. The similarities are exploited to analyze and to prove the equivalence between two mod- els. The formal equivalence checking techniques are successfully applied to verify large designs that consist of millions of gates. Now, they are standard components in most industrial design flows.

1.1.2 Property Checking

Property Checking is used to verify the intended behavior of a design. At the beginning of the design process, an initial model of the design is created from the informal specifi- cation. From this specification a designer can also formulate properties that he wants the design to fulfill. The properties are verified to be valid for the initial model of the design. Property checking cannot only find bugs in the initial phase of the design process; it can also help to avoid misunderstandings of the specification by the designer. Therefore, bugs can be detected in an earlier phase of the design process with less cost. Properties can be checked against the design models using theorem proving or model checking. In contrast to theorem proving that needs human interaction, model checking is a fully automated formal verification method. Hence, it requires less manual efforts than theorem proving. Because this thesis will focus on improvements in model checking, in the following, the incoming data and the core algorithms of model checking will be described briefly.

Design Models and Property Languages

The two incoming data models for property checking algorithms are mathematical models of the properties and the design. The mathematical models of the design are used to describe the combinational or se- quential behavior of the design. The combinational behavior of the design is the functional relation among the inputs and outputs of the design at a certain time. The sequential be- havior of the designs is the functional relation among the inputs and outputs of the design over time. The combinational behavior can be described by propositional logic in terms of input and output variables of the design. In a concrete hardware design, where input

2

1.1 Hardware Verification of System-on-Chip Designs

and output variables are encoded by Boolean signals, the theory of Boolean (switching) algebra is often used. In order to describe the sequential behavior of the design, the finite state machine (FSM) model is used. The FSM model of the design can be translated to a state transition graph (STG) or a labeled STG, i.e., a so-called Kripke model. In order to describe the ordering of desired events happening during the operation of the design, the properties can be formulated as an automaton (for example, B¨uchi automaton) or in a temporal logic language such as Computation Tree Logic (CTL) defined by Clarke and Emerson [CE81] or Linear Temporal Logic (LTL) defined in [Kur94]. Two typically desired types of properties are safety property and liveness property. A safety property requires that the design never exhibit any bad behaviors. A liveness property is to check that the design eventually exhibits an intended behavior.

Core Approaches

Model checking [CE81] is used to verify properties that are expressed in temporal logic against a design described as a Kripke model. The method is an iterative fixed-point computation which traverses the state transition graph of the Kripke model and checks the property in each state of the graph until the whole graph is traversed, i.e., the fixed point is reached. The algorithm calculates the set of reachable states of the design starting from the initial states or from the property states, i.e., the states in which the property is satisfied. As proposed by Clarke in [CE81], it is a graph traversal algorithm where the state sets are enumerated and stored explicitly. This is obviously infeasible when the number of states is large. In general, the state space to be traversed grows exponentially with the number of state components in the design. This is a serious problem which is known as state explosion problem. This problem limits the size of the design that can be verified in practice. Therefore, efficient data structures of the mathematical models as well as data manipulation operations are crucial for the success of model checking approaches.

Data Structures and Decision Algorithms

Binary decision diagrams (BDDs) , proposed by Bryant [Bry86], are efficient, canonical representations of Boolean functions. In other words, many practically relevant Boolean functions can be represented by compact BDDs and every distinct function has exactly one unique BDD representation. Moreover, the manipulation operations on BDDs have polynomial complexity in terms of the size of BDDs. Such properties make BDDs a useful data structure for model checking approaches. McMillan proposed Symbolic Model Checking (SMC) [McM93] where the sets of states are calculated and stored implicitly by BDDs. Instead of enumerating state sets, the characteristic functions of the sets of states as well as of the sets of transitions among states are represented by BDDs symbolically. By introducing symbolic model checking, larger designs with more than 1020 reachable states can be automatically verified. This improvement in the capability of model checking enables it to be applied in real indus-

3

1.1. Hardware Verification of System-on-Chip Designs

in well-known Counterexample-Guided Abstraction Refinement (CEGAR) approaches.

The incompleteness problem of BMC can be solved by induction proofs [SSS00]. In induction proofs, the property is proven in two steps: base step and inductive step. In the base step, the property is proven to hold for k time frames starting from initial states. The inductive step proves that if the property holds for k time frames starting from any arbitrary state, then it also holds for time frame k + 1.

Another SAT-based model checking technique called interval property checking (IPC) is applied very successfully in industrial practice. It has its origin already in the mid 1990s in the Siemens company and is commercially available [One09]. In the IPC methodology, bounded behaviors of the design are specified using the so called Interval Language (ITL). ITL properties are checked against the time frame expansion model of the design starting from an arbitrary state.

1.1.3 Block-based Verification of SoC Designs

In spite of continuous progress in formal verification technology, a complete SoC de- sign clearly remains beyond the capacity of a state-of-the-art formal property checker. Therefore, formal property checking is usually applied at the block level (block-based verification) and is used to achieve high quality IP blocks. In this way, also simulation at the chip level becomes less expensive since it can concentrate on the global system behavior and is relieved from hunting bugs in the individual SoC modules. In an SoC design, IP blocks (modules) such as hardware accelerators, I/O controllers, or programmable blocks such as digital signal processors and standard processor cores are connected via sophisticated communication infrastructures. These communication struc- tures usually use some standard protocols, e.g., ARM’s Advanced Microcontroller Bus Architecture (AMBA) Advanced High-performance Bus (AHB) [ARM99]. These proto- cols are used to create common interfaces between modules and ensure proper behavior of the entire chip.

Consequently, verification of IP blocks can be divided into two different tasks: com- putational verification and communicational verification.

Computational verification is to assure the correctness of individually intended be- haviors of a module, for example, the module computes data correctly. Communicational verification is to verify the communication interface of the IP block. When it comes to en- suring system integrity, it is of great importance to verify that the components connected to the system busses comply with the respective protocols. This certifies that the verified IP block does not compromise the on-chip communication when connected to the on-chip communication infrastructure. Communicational verification is also called protocol com- pliance verification. Such a certification becomes especially important when IP blocks from third-party vendors are used. While computational verification for arithmetic data path has made fast progress recently [WSBK07], communicational verification is still a major area of potential innovation in industrial SoC verification.

5

Chapter 1. Introduction

1.2 Motivation and Thesis Overview

Even though the state-of-the-art in formal verification technology provides a rich set of methods and tools to verify the interfaces between SoC modules formally, severe prob- lems still occur in practice. Since the control designs for standard SoC protocols typically contain thousands of state variables all methods that rely on an exact traversal of the state space are pro- hibitively expensive. More advanced methods are available that decompose the state space and/or perform abstractions on it. However, most of these methods are of generic nature and have been developed for a general spectrum of property checking applications. Unfortunately, they tend to fail in industrial practice when being applied specifically to the interfaces of modules. Either their state space approximation is too coarse resulting in false negatives of the property checker, or they run out of computational resources. BMC, in principle, can handle the complexity of SoC module interfaces, however, proofs on bounded time intervals often remain incomplete when it considers the design starting from initial states. Provided enough resources, IPC can provide a complete proof of a property. It has been proven very efficient for a wide range of computational verification tasks. However, it has to cope with the problem of identifying reachability information while handling communicational verification. Because IPC deals with the time frame expansion model of the design, starting from arbitrary states it can produce false negatives. The false negatives correspond to runs of the design starting from unreachable states. If this happens, the model needs to be augmented with important reachability information in order to rule out the spurious counterexamples. In the present-day IPC methodology flow, invariants have to be identified manually by the verification engineer by analyzing the counterexamples and the source code of the design. This requires tedious and time-consuming manual effort, and, reduces the productivity of the formal verification process. Additionally, in present-day verification methodology flows, verification engineers try to construct a correct and complete set of properties. A property can be erroneous if it specifies an unrealizable behavior of the design. An incomplete property set fails to cover all indented behaviors of the design and then fails to identify bugs in uncovered behaviors. Therefore, constructing a set of properties is also a challenging task, and reduces produc- tivity of the formal verification process. However, protocol compliance verification has some special characteristics when compared to general computational verification. In principle, the properties for protocol compliance can be formulated independently of the particular design under verification so that they can be re-used for other designs as well. It is therefore beneficial to have a generic, reusable set of protocol compliance properties. Because of the two problems being addressed above, applying formal property check- ing still requires a significant amount of manual effort that sometimes hampers adoption of the formal verification methodology flow by industry.

Therefore, the purpose of this thesis is to improve the productivity of the industrial, IPC-based formal verification methodology. First, this thesis proposes a decomposition- based reachability analysis to solve the problem of identifying reachability information

6

Chapter 1. Introduction

Chapter 2

Fundamentals

In the first section of this chapter, basic graph algorithms are reviewed because they serve as primary algorithms from which most algorithms in this thesis are derived. In the sec- ond section, the basic notations of Boolean functions and its common representations are briefly introduced. The graph algorithms are summarized of graph chapters in [CLR94]. For a more detailed introduction into the Boolean functions and their representations, the reader may refer to a standard textbook, e.g., [HS96].

2.1 Graphs and Graph Algorithms

2.1.1 Definitions

In formal verification of hardware designs, many problems can be modeled by graphs and the algorithms on these problems are based on graph algorithms. For example, the circuit of a design can be modelled as a directed graph whose vertices are electronic gates. The sequential behavior of a design can be modeled as a state transition graph. Traversing a circuit or analyzing the state transition graph of the design is a graph traversal. The con- cepts of graphs and graph algorithms are fundamental to all subjects that will be presented in this thesis.

Definition 2.1. ( Graph ) A graph G is a tuple (V, E) , where

  • V is a set of vertices (or nodes),
  • E ⊂ V × V is a set of edges,

E is a binary relation on V_. Each edge_ e ∈ E connects two nodes u, v ∈ V , i.e., e = (u, v). If the edge set E consists of unordered pairs of vertices, G is an undirected graph, otherwise G is a directed graph. 2

In a directed graph, given an edge e = (u, v), the node u is the immediate predecessor of v, and the node v is called the immediate successor of u. The set of all immediate successors of a given node u is also referred to as the fanout of the node, which is denoted

9

2.1 Graphs and Graph Algorithms

1: BFS (V, E, s) { 2: for each u ∈ V ∧ u 6 = s { 3: color[u] ← WHITE ; 4: d[u] ← ∞; 5: π[u] ← ∅; 6: } 7: color[s] ← GRAY ; 8: d[s] ← 0 ; 9: π[s] ← ∅; 10: Q ← {s}; 11: while Q 6 = ∅ { 12: u ← head[Q]; { 13: for each v ∈ Adj[u] { 14: if color[v] = WHITE { 15: color[v] ← GRAY ; 16: d[v] ← d[u] + 1; 17: π[v] ← u; 18: ENQUEUE (Q, v); 19: } 20: } 21: DEQUEUE (Q); 22: color[u] ← BLACK ; 23: } 24: }

Figure 2.1: Breadth-first search algorithm

Chapter 2. Fundamentals

1: DFS (V, E) {

2: for each u ∈ V { 3: color[u] ← WHITE ; 4: π[u] ← ∅; 5: } 6: time ← 0 ; 7: for each u ∈ V { 8: if color[u] = WHITE { 9: DFS VISIT (V, E, u); 10: } 11: } 12: }

13: DFS VISIT (V, E, u) { 14: color [u] ← GRAY ; 15: d[u] ← time ← time + 1 { 16: for each v ∈ Adj[u] { 17: if color[v] = WHITE { 18: π[v] ← u; 19: DFS VISIT (V, E, u); 20: } 21: } 22: color[u] ← BLACK ; 23: f [u] ← time ← time + 1; 24: }

Figure 2.2: Depth-first search algorithm