Visualizing, Analyzing and Debugging SystemVerilog Testbench Environments

Figure 1: Basic components of an OVM testbench.
Figure 1 depicts the basic components of an OVM-based transaction-level verification environment. VMM-based environments are similar in nature.
Regardless of the underlying library, the most interesting and useful data for the engineer are the transactions between the sequencer and the driver and between the monitor and analyzers. Ideally, this traffic needs to be recorded into a format that is useful for post-simulation analysis and debug. Because a transaction is a much more convenient high-level encapsulation of data for OVM and VMM-based environments, transaction-level debug visualization and analysis is clearly desirable.
SpringSoft's Solutions
SpringSoft's approach to testbench debug builds on existing logging and interactive mechanisms to provide the engineer insight into what is going on in the testbench during simulation (see Figure 2). It makes the logging process much more sophisticated and automated so that most of the debug and analysis of testbench activity can be done at that level. The approach, advanced logging, can be used to directly identify a problem or, in cases where a problem is identified as being on the testbench side with more detail required, it can drive the interactive inspection.

Figure 2: A flow consisting of advanced logging coupled with interactive inspection
As illustrated in Figure 3, the logging output is automatically captured into the same debug database as the design results (SpringSoft's de-facto standard FSDB format). This is fundamental to enabling advanced visualization, debug and analysis functionality.

Figure 3: Advanced logging into the FSDB database, allows advanced visualization and analysis in SpringSoft's Verdi Automated Debug System
With advanced logging and Verdi, engineers can observe what is going on in the entire environment. The system captures and allows the engineer to view:
• Transaction-level messages
• Severities, variable states, etc... as properties or attributes of the message
• The call stack, which can later be leveraged in further debug automation
Special-purpose features can be added to these views to help the engineer easily identify messages of interest from the logged data. For example, advanced filtering and highlighting can be used to filter or colorize specific messages based on some condition (e.g., highlight in red any messages that have "WRITE" as their label and "address=5"). Logged message viewing applications also enable engineers to quickly search and locate messages that match user-specified search criteria.
Ongoing Innovation
Advanced logging, coupled with interactive inspection, offers a clear advantage over other currently used approaches for comprehending, analyzing and debugging SystemVerilog testbench environments. Yet it still requires the engineer to instrument the code to log information of interest. OVM and VMM libraries can provide some level of automation for this task, relieving a significant burden from the engineer.
SpringSoft continues to research new techniques for further automation. One idea is to leverage the structure and transaction-based nature of the OVM and VMM libraries, as well as the object-oriented nature of SystemVerilog. Ongoing research is now focusing on pre-embedding relevant logging instrumentation into the standard functions and macros which are used to pass data between different layers of a testbench. This would enable the automatic recording of all transaction-level data passed between the different testbench layers which can then be analyzed in traditional views like waveforms. Moreover, the completeness and easy availability of this data could also potentially drive new views based on UML-like sequence diagrams.
The content is excerpted from the article Visualizing, Analyzing and Debugging SystemVerilog Testbench Environments
