Thought Leadership

Assertions and benefits of abstractions in Formal Verification

How are assertions specified?

Assertions are typically specified using languages like SystemVerilog Assertions (SVA) or Property Specification Language (PSL). These languages provide constructs for expressing complex design behaviors, making it possible to verify a wide range of conditions and scenarios.

Example: A design team developing an Ethernet controller might use SVA to write assertions that check for correct data packet formatting and transmission. These assertions could ensure that all packets conform to the Ethernet standard, and that no illegal or malformed packets are generated. In another project using VHDL, the team might opt for PSL to achieve similar verification goals, leveraging the language’s ability to express properties in a way that aligns with the design’s implementation.

How are assertions related to properties and constraints?

Assertions are statements about the expected behavior of a design, while constraints limit the analysis to valid input sequences or states. Cover properties help measure how thoroughly the design has been verified. Together, these elements guide the formal verification process, ensuring that the design behaves as intended under all specified conditions.

Example: In a memory controller, an assertion might state that every read operation must return the correct data from the addressed memory location. Constraints might ensure that memory addresses and control signals remain within valid ranges during the analysis. Cover properties might be used to check that every possible memory address is accessed and verified during the formal analysis, ensuring comprehensive coverage of the memory controller’s functionality.

What is an abstraction in formal verification?

Abstraction is a technique used in formal verification to simplify a design, making the analysis more manageable. By reducing the complexity of certain parts of the design, formal tools can focus on verifying the core logic without getting bogged down by less critical details. The key is to ensure that any proofs obtained are still valid for the original, more complex design.

Example: When verifying a cache memory system, the entire memory might be too large to analyze effectively. An abstraction could involve reducing the memory size or simplifying the address decoding logic, allowing the formal tool to verify the key aspects of the cache’s behavior without dealing with the full complexity of the memory array. This approach can drastically reduce verification time while still providing insightful results.

What expertise is required for formal verification?

Today’s formal verification tools have become user-friendly, reducing the need for advanced formal methods expertise. Many commercial tools provide formal apps—pre-packaged solutions that address specific verification challenges with minimal user input. However, for more complex or customized verification tasks, knowledge of assertion languages and formal verification techniques is beneficial.

Example: A verification engineer might use a formal app to check for clock domain crossing issues in a System-on-Chip (SoC) design. This app can automatically identify synchronization problems without requiring deep formal verification knowledge. However, if the engineer needs to write custom assertions for a unique design challenge, understanding languages like SystemVerilog Assertions (SVA) would be essential.

Does formal verification work on data paths?

Formal verification has traditionally been applied to control logic, where the number of states and conditions is more manageable. However, advances in formal tools have made it possible to verify data paths, which are often more complex due to the vast number of possible data values and operations.

Example: Formal verification of a 32–bit floating-point unit with Questa FPU is a prime example of applying formal methods to data paths. The verification process proved that implementation functions correctly across all possible input values, ensuring that it produces the correct product in every case. This level of assurance is particularly important in designs where data integrity is critical, such as in cryptographic or signal processing applications.

Nicolae Tusinschi

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/verificationhorizons/2024/09/11/assertions-and-benefits-of-abstractions-in-formal-verification/