




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































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
Contents
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.
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
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.
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
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
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].
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
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
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
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