Simulation-based equivalence checking between SystemC models at different levels of abstraction

Markus Gross, Daniel Große, Markus Groß 0002, Ulrich Kühne, Rolf DrechslerACM Great Lakes Symposium on Vlsi 2011

TL;DR

This paper introduces a novel framework for verifying that SystemC models at different abstraction levels behave identically. By employing a client-server architecture and multi-threading, their approach significantly speeds up the equivalence checking process and aids in debugging by pinpointing the exact source of discrepancies.

What Problem Does This Paper Address?

As System-on-Chip (SoC) designs grow in complexity, Electronic System Level (ESL) design has become the standard. This involves modeling systems at high levels of abstraction, like Transaction Level Modeling (TLM), and then progressively refining them down to hardware (RTL). A major challenge in this workflow is ensuring functional equivalence between these models at each refinement step. Traditionally, this involves extensive simulation and manual comparison of results, which is time-consuming and error-prone. While formal equivalence checking methods exist for lower abstraction levels, they are not directly applicable to the abstract nature of TLM models. This paper addresses the need for an efficient and practical method to bridge this gap, enabling designers to verify equivalence between TLM and RTL models.

Methods

The core of the proposed solution is a client-server framework for equivalence checking.

  • Client-Server Architecture: Two SystemC models to be compared act as "clients," while a dedicated "server" performs the equivalence checking.
  • Model Extension: To enable communication, SystemC models are minimally extended using a provided library (libec). This involves registering variables of interest for comparison and instrumenting the code to report variable accesses (reads and writes) along with their values and addresses to the server.
  • Multi-threading: The equivalence checking server leverages multi-threading extensively. Separate threads handle data reception from each client, and dedicated threads compare the values of each registered variable. This parallelization is key to achieving high performance, especially on multi-core processors.
  • Equivalence Definition: Two models are considered equivalent if the normalized values of their selected variables match at each simulation time step. The framework also accounts for potential out-of-order execution by allowing a "swapped access" definition, where a variable access can be matched within a defined window of subsequent accesses.
  • Reporting: Upon completion, the server generates a detailed report summarizing access counts, matched accesses, unmatched accesses, and swapped accesses for each variable, providing crucial information for debugging.

Datasets

Not discussed in the paper. The authors use a modified version of the Y86 CPU as a case study for their experiments, which serves as a benchmark for their framework rather than a dataset in the traditional sense.

Key Insights and Ideas

  • Bridging the TLM-RTL Gap: The paper effectively tackles the challenge of verifying equivalence between abstract TLM models and concrete RTL models, a critical step in modern ESL flows.
  • Simulation-Based Pragmatism: Recognizing the limitations of formal methods for TLM, the authors embrace a simulation-based approach that is more practical for ESL design.
  • Efficiency Through Parallelism: The extensive use of multi-threading in the server is a significant contributor to the framework's performance, making it scalable for complex designs.
  • Targeted Debugging: The detailed equivalence report, including source code references for mismatches, dramatically reduces debugging time by quickly pinpointing the root cause of functional differences.
  • Minimal Model Modification: The framework requires only minor extensions to the SystemC models, making it easy to integrate into existing design flows without substantial overhead.

Key Results

The authors demonstrate the effectiveness of their framework through experiments with a Y86 CPU model.

  • Bug Detection and Localization: The framework successfully identified and helped locate two significant bugs:
  • An error in the ISA model's memory read function where data was shifted incorrectly, leading to incorrect values being reported.
  • An error in the RTL model's jump instruction handling, where the instruction pointer was not updated correctly, causing the model to get stuck in a loop.
  • Performance: The multi-threaded client-server architecture provides significant speedups. For the Y86 TLM and RTL models, a dual-core CPU offered a speedup of up to a factor of two compared to a single-core CPU. The runtime scales with the number of variables being checked.
  • Reduced Debugging Effort: The detailed reports enabled quick identification and localization of bugs, significantly reducing the time spent on debugging.

Limitations and Future Work

  • Variable Selection: The authors acknowledge that selecting the right set of variables for comparison is crucial for performance and accuracy. They plan to develop methods to assist designers in this selection process.
  • Coverage Integration: Future work includes investigating how their equivalence checking methods can be combined with functional and code coverage techniques to ensure that all aspects of the design are adequately tested.
  • Interactive Debugging: The authors aim to integrate an interactive debugging mode that includes a simulation rollback mechanism to allow for more in-depth analysis of unmatched accesses.

Summary updated

BibTeX
@inproceedings{gross2011simulation,
  author = {Markus Gross and Daniel Große and Markus Groß and Ulrich Kühne and Rolf Drechsler},
  title = {{Simulation-based equivalence checking between SystemC models at different levels of abstraction}},
  booktitle = {ACM Great Lakes Symposium on Vlsi},
  year = {2011},
  doi = {10.1145/1973009.1973054},
}
Figure