|
|||
Authoring assertion IP using OpenVera assertion languageby Surrendra Dudani, Eduard Cerny, Synopsys, Inc. Abstract: INTRODUCTION The availability of assertion IP is significant in reducing the verification effort and improving the design quality. Its value comes from the fact that the assertions can passively monitor the design behavior by simply attaching them to the target design, without modifying the code representing the design. The errors indicated by the assertions point to design bugs, and the debugging information provided by the errors readily assists the designers to fix the bugs. Without needing to rewrite assertions or rules of behavior for each project, pre-built assertions from assertion IP provide powerful quality criteria for sign-off. Over the past few years, the design community has begun addressing the reuse of design blocks from previous projects and commercially available IP designs. As larger and larger designs are built, it becomes necessary to reuse verification environment as much as possible from existing designs, including various internal and 3rd party IP blocks. To ease integration, IP blocks often rely on the use of standard interface protocols, like SPI-4, ARM AMBA, and PCI. Associated with the reusable designs, a well-designed verification environment is essential for ensuring that the integration of the IP design blocks retains the quality needed for first silicon success. The interface assertions for the standard protocols are prime reusable assertion IP [2]. There are many commercial assertion IP products available, but they are developed in proprietary languages and tools. Assembling assertions from different commercial vendors for a design is not easily attainable. As a result, the usage of such IP products has been limited, as the assertions cannot be authored, extended, or executed interchangeably between different tools. At the first sight, it seems that writing assertions for bus protocols is rather straight forward, by looking at the timing diagrams, state machines and textual specifications. However, for the Assertion IP to be usable in many designs and in different verification environments, it must be formulated in certain ways and appropriately packaged. Furthermore, the assertion language must provide richness of expression of temporal properties, and for their encapsulation and parameterization. Hardware Description Languages (HDL) can be used for developing such assertions, but the level of abstraction is too low. Sequences of signal values have to be described using state machines that hide the original meaning of the assertion and make it more difficult to debug. If in addition such assertions are to be used on pipelined designs, many checks must overlap in time. The structure of the assertion then becomes even more complex, to the point where it starts resembling the pipelined design it is to verify. Due to this similarity between the design code and the verification code, the same errors can appear in both and thus there is great potential for not detecting design errors. Furthermore, the assertion HDL code is as difficult to debug as the original design. Assertion languages [1, 3, 4] are much more appropriate for checker development. This is because they raise the level of abstraction and allow a direct formulation of design properties in terms of sequences and their combinations. It is then a much easier and less error-prone process. Although such languages have been used in research institutions for years, only recently a number of such languages and associated software tools have emerged as commercial products. Standardization is also in progress by the Accellera committee. The Open Vera Assertion language (OVA) provides the means for writing effective assertions and for packaging them into reusable Assertion IP. Such Assertion IP should be usable in the context of dynamic verification (simulation) as well as static verification (property checking). If properly instrumented it can provide information on the coverage of various functional features of the design and do it in a way that combines the coverage results from simulation and formal property checking. The functional coverage based on assertions can be combined with the classical code-coverage metrics to yield a better picture of the status of the verification, resulting in higher confidence in the quality of the design. In the rest of the paper, we describe the basic requirements for an assertion language to be suitable for Assertion IP development, demonstrate how these requirements are met by the OVA language, and outline guidelines for writing an IP. An example based on the PCI bus protocol checker is presented to illustrate the method. Requirements for an assertion language
The supporting software must provide means for effective debugging of both the assertions and the design / testbench. The Open Vera Assertion Language (OVA) The OVA 1.1 language is subdivided into four levels (five in OVA 2.0, which includes LTL formulas). The above features are best illustrated on in example. Consider the following simple Verilog design: A simple OVA assertion file that checks for an overflow on the 8-bit counter could look like this: m Any Verilog Boolean expression can be used as part of an event specification. The #1 operator is a concatenation of the two operands such that they are one clock cycle apart. Any positive integer interval can be used in this time shift operation. The forbid directive in the assert statement fails any time the sequence e_overflow is satisfied. An attempt to evaluate the assertion is started at every tick of the sampling clock, i.e., corresponding to an implicit "Globally" top-level operator from the Linear Temporal Logic. A positive enforcement of an assertion (in opposition to the negative forbid directive) can be obtained by using the directive check:
In this case, event_sequence must not be satisfied for the assertion to fail in an evaluation attempt. Usually, the positive check is conditional on some Boolean expression (that can also be the outcome of matching some complex sequence of events). Conditional sequences can be written using the operator
The overflow example can be modified as follows to use a positive conditional check (again the implicit "Globally" operator is present):
In this case, when the counter cnt reaches 8'hff (the if part) then on the next falling edge of the clock cnt must not be zero. Other operators are || (OR), && (AND) of two sequences, repetition *[integer_interval], and constraints on the length or value of an expression while a sequence is in progress. To facilitate reuse of OVA assertions, complete definitions can be encapsulated in templates. These resemble parameterized macro definitions that can be instantiated in the appropriate scope and passed actual arguments. Their contents can also be accessed from outside the instance that permits using such templates to collect common definitions to other assertions and share them. For example, the standard OVA template library that is available with the OVA compiler and VCS simulator contains some 34 templates that check simple properties like the overflow above, but also very complex ones such as hand-shake protocols, memories, stack and various fifo's. For example, a template in the library to verify a similar situation as in our example is defined as:
The following instance in a scope specification will achieve the same effect as the expanded check shown earlier:
To facilitate the use of such templates in designs, they can be directly embedded in the Verilog modules using ova pragmas as shown below:
To provide for data checking and other signal value related checks, multi-dimensional variables can also be declared, like in Verilog, and assigned using a non-blocking assignment within a sampling clock context. Note that all names are bound automatically to the local symbols declared in the OVA code, and then to Verilog objects from the specified scope context. That also includes Verilog module parameters. In this way, the OVA checker is automatically adjusted to the size of the particular instance of the Verilog module. This can be seen in the example following the next section: The bus widths for ad and cbe_ in the OVA checkers are automatically derived from the Verilog signals which are parameterized by bus_w in the Verilog module. Reusability features
In OVA, the above features are obtained by "template" definitions, Verilog wrapper modules and the above mentioned automatic binding of names to Verilog objects. Furthermore, `define symbol definitions (like in Verilog) can be used in combination with other compiler directives to configure the checker according to the specific needs. Verification IP Example
The top-level template for the checker is as follows:
The common template has the following structure:
Finally, a rule template can be stated as follows: To use an OVA Assertion IP, the following simple steps must be followed:
The essential aspects of the methodology for developing OVA Assertion IP as reflected in the PCI example are described in authoring guidelines. Guidelines for authoring The guidelines address the following topics:
Applications The applications of OVA Assertion IP are varied. The most obvious ones are checking of properties of conformance to the bus protocol specification by the device under verification (DUV), either by simulation or by static means. Other interesting applications are also possible:
Conclusions We have presented:
The OVA language Version 1.1 is supported by VCS and MX VHDL simulation tool, FormalVera property checker and other 3rd party formal and emulation tools. Further development of the language and tools involves the implementation of OVA 2.x LTL formulas, better library support for OVA IP maintenance, and active development of verification IP. As universities, in most cases, do not have verification methodology in their curricula, it is important to carry out proper user training in the effective use of assertion-based verification technology, as a powerful complement to the usual techniques. References 1. OVA 1.1 User Guide, VCS 7.0 documentation, Synopsys Inc., 2002.2. Marcio T Oliviera, Alan J. Hu, "High-Level Specification and Automatic Generation of IP Interface Monitors" Proc. of DAC'02, New Orleans, June 10-14, 2002. 3. OpenVera Assertion language specification, Version 2.0: http://www.open-vera.com/ 4. Sugar Formal Property Language Reference Manual (Draft), Version 0.8, Accellera Committee, September 12, 2002.
|
Home | Feedback | Register | Site Map |
All material on this site Copyright © 2017 Design And Reuse S.A. All rights reserved. |