Hardware/Software Co-verification Using Path-based Symbolic Execution

Rajdeep Mukherjee, Saurabh Joshi, John O'Leary, Daniel Kroening, Tom MelhamarXiv 2020

Abstract

Formal verification of integrated hardware/software (HW/SW) systems often suffers from state explosion due to monolithic Bounded Model Checking (BMC) approaches. This paper introduces COVERIF, a tool that leverages path-based symbolic execution and property-driven slicing to focus verification efforts on relevant hardware logic exercised by firmware. By moving away from monolithic formulas, COVERIF achieves an average 5× speedup over state-of-the-art tools and successfully identifies critical bugs in complex System-on-Chip (SoC) designs.

The Challenge of HW/SW Co-verification

In modern embedded systems, hardware (RTL) and software (firmware) are developed in parallel. Verifying their joint correctness is a significant bottleneck. Traditional formal methods typically rely on Bounded Model Checking (BMC), which converts the entire HW/SW system into a single, massive propositional formula.

These "monolithic" formulas are often inefficient because they include every possible state of the hardware, even if the firmware only interacts with a tiny fraction of the logic. This results in "irrelevant logic" that unnecessarily complicates the task for SAT (Satisfiability) solvers, leading to timeouts and high computational costs.

The COVERIF Methodology

To address these scalability issues, the authors propose a four-step methodology implemented in the COVERIF tool. The core philosophy is to treat the firmware as a filter that restricts the searchable state space of the hardware.

The COVERIF tool flow, illustrating the path from RTL and firmware to verification results.

1. Software Netlist Generation

The process begins by automatically translating Verilog RTL into a cycle-accurate C program, referred to as a "software netlist." This translation allows both hardware and software to be analyzed within a unified language environment using standard software verification techniques.

Example of translating Verilog RTL into a cycle-accurate C-based software netlist.

2. Sequentialization and Slicing

The firmware and the hardware netlist are combined into a single sequential model. This is feasible because most HW/SW interactions follow a "producer-consumer" pattern, which can be modeled without exhaustive concurrent interleaving. Before the main analysis, Property-Driven Slicing performs a backward dependency analysis to identify and remove code segments that do not affect the specific property being verified.

3. Path-based Symbolic Execution

Instead of generating one giant formula, COVERIF explores the program path-by-path. It employs two key optimizations:

  • Eager Infeasibility Checking: The tool stops exploring a path as soon as it is determined to be mathematically impossible, preventing state explosion.
  • Incremental SAT Solving: The solver maintains its state across checks, adding only new constraints as it descends an execution path, which significantly reduces overhead.

Experimental Evaluation and Results

The authors evaluated COVERIF using two primary benchmarks: an open-source UART design and a complex SoC featuring an 8051 microcontroller, memory arbiter, and cryptographic accelerators (AES/SHA).

  • Performance Gains: COVERIF was consistently faster than the baseline tool, HW-CBMC. It achieved an 8× average speedup on the UART design. On the SoC design, it was 2× faster for proving safety and 6× faster for identifying bugs.
  • Bug Discovery: The tool successfully identified critical "control bugs" in the SoC memory arbiter where hardware incorrectly managed port selection, a violation of the data transfer protocol that monolithic tools struggled to detect.
  • Scalability: COVERIF successfully verified 39 properties for the UART and 19 for the SoC, many of which caused traditional monolithic baselines to time out.

Conclusion and Future Work

COVERIF demonstrates that path-based symbolic execution is a powerful alternative to monolithic BMC for HW/SW co-verification. By focusing on the specific logic exercised by firmware, the tool avoids the complexity of irrelevant hardware states. While currently optimized for producer-consumer interaction patterns, future work will focus on path-merging techniques to handle systems with high path counts and more complex asynchronous concurrency.

Summary updated

BibTeX
@misc{mukherjee2020hardware,
  author = {Rajdeep Mukherjee and Saurabh Joshi and John O'Leary and Daniel Kroening and Tom Melham},
  title = {{Hardware/Software Co-verification Using Path-based Symbolic Execution}},
  year = {2020},
  eprint = {2001.01324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.01324},
}
Figure