Writing Testbenches
Functional Verification of HDL Models
Home  |  Contents  |  Reviews  |  Errata  |  Resources  |  Guild  |  Source
 
 

 

Table of Contents

 

About the Cover

Foreword

Preface

CHAPTER 1: What is Verification?

    What is a Testbench?
    The Importance of Verification
    Reconvergence Model
    The Human Factor
      Automation
      Poka-Yoke
      Redundancy
    What Is Being Verified?
      Formal Verification
      Equivalence Checking
      Model Checking
      Functional Verification
    Functional Verification Approaches
      Black-Box Verification
      White-Box Verification
      Grey-Box Verification
    Testing Versus Verification
      Scan-Based Testing
      Design for Verification
    Design and Verification Reuse
      Reuse Is About Trust
      Verification for Reuse
      Verification Reuse
    The Cost of Verification
    Summary

CHAPTER 2: Verification Tools

    Linting Tools
      The Limitations of Linting Tools
      Linting Verilog Source Code
      Linting VHDL Source Code
      Linting OpenVera and e Source Code
      Code Reviews
    Simulators
      Stimulus and Response
      Event-Driven Simulation
      Cycle-Based Simulation
      Co-Simulators
    Verification Intellectual Property
      Hardware Modelers
    Waveform Viewers
    Code Coverage
      Statement Coverage
      Path Coverage
      Expression Coverage
      FSM Coverage
      What Does 100% Code Coverage Mean?
    Functional Coverage
      Item Coverage
      Cross Coverage
      Transition Coverage
      What Does 100% Functional Coverage Mean?
    Verification Languages
    Assertions
      Simulation Assertions
      Formal Assertion Proving
    Revision Control
      The Software Engineering Experience
      Configuration Management
      Working with Releases
    Issue Tracking
      What Is an Issue?
      The Grapevine System
      The Post-It System
      The Procedural System
      Computerized System
    Metrics
      Code-Related Metrics
      Quality-Related Metrics
      Interpreting Metrics
    Summary

CHAPTER 3: The Verification Plan

    The Role of the Verification Plan
      Specifying the Verification
      Defining First-Time Success
    Levels of Verification
      Unit-Level Verification
      Reusable Components Verification
      ASIC and FPGA Verification
      System-Level Verification
      Board-Level Verification
    Verification Strategies
      Verifying the Response
    From Specification to Features
      Component-Level Features
      System-Level Features
      Error Types to Look For
      Prioritize
      Design for Verification
    Directed Testbenches Approach
      Group into Testcases
      From Testcases to Testbenches
      Verifying Testbenches
      Measuring Progress
    Coverage-Driven Random-Based Approach
      Measuring Progress
      From Features to Functional Coverage
      From Features to Testbench
      From Features to Generators
      Directed Testcases
    Summary

CHAPTER 4: High-Level Modeling

    Behavioral versus RTL Thinking
      Contrasting the Approaches
    You Gotta Have Style!
      A Question of Discipline
      Optimize the Right Thing
      Good Comments Improve Maintainability
    Structure of Behavioral Code
      Encapsulation Hides Implementation Details
      Encapsulating Useful Subprograms
      Encapsulating Bus-Functional Models
    Data Abstraction
      Records
      Variant Records
      Arrays
      Lists
      Files
      Mapping High-Level Data Types to Physical Interface
    Object-Oriented Programming
      Classes
      Inheritance
      Polymorphism
      Limitations of OpenVera and e's OOP Implementation
    Aspect-Oriented Programming
      The Problem with Object-Oriented Programming
      Variant Data with Variant Code
      Limitations of e's AOP Implementation
    The Parallel Simulation Engine
      Connectivity, Time and Concurrency
      Connectivity, Time and Concurrency in HDLs and HVLs
      The Problems with Concurrency
      Emulating Parallelism on a Sequential Processor
      The Simulation Cycle
      The Co-Simulation Cycle
      Parallel vs. Sequential
      Fork/Join Statement
      The Difference Between Driving and Assigning
    Race Conditions
      Read/Write Race Conditions
      Write/Write Race Conditions
      Initialization Races
      Guidelines for Avoiding Race Conditions
      Semaphores
    Verilog Portability Issues
      Events from Overwritten Scheduled Values
      Disabled Scheduled Values
      Output Arguments on Disabled Tasks
      Non-Re-Entrant Tasks
    Summary

CHAPTER 5: Stimulus and Response

    Reference Signals
      Time Resolution Issues
      Aligning Signals in Delta-Time
      Clock Multipliers
      Asynchronous Reference Signals
      Random Generation of Reference Signal Parameters
      Applying Reset
    Simple Stimulus
      Applying Synchronous Data Values
      Encapsulating Waveform Generation
      Abstracting Waveform Generation
    Simple Output
      Visual Inspection of Response
      Producing Simulation Results
      Minimizing Sampling
      Visual Inspection of Waveforms
      Self-Checking Testbenches
      Input and Output Vectors
      Golden Vectors
      Self-Checking Operations
    Complex Stimulus
      Feedback Between Stimulus and Design
      Recovering from Deadlocks
      Asynchronous Interfaces
    Bus-Functional Models
      CPU Transactions
      From Bus-Functional Procedures to Bus-Functional Model
      OpenVera's Interface Model
      Bus-Functional Models in OpenVera
      Asynchronous Signals in OpenVera
      Synchronous Bus-Functional Models in e
      Asynchronous Bus-Functional Models in e
      Configurable Bus-Functional Models
    Response Monitors
      Autonomous Monitors
      Slave Generators
      Multiple Possible Transactions
    Transaction-Level Interface
      Variable-Length Transactions
      Split Transactions
      Retries and Completion Status
      Symbol-Level Control
    Summary

CHAPTER 6: Architecting Testbenches

    Test Harness
    VHDL Test Harness
      Bus-Functional Entity
      Abstracting the Client/Server Protocol
      Test Harness
      Multiple Server Instances
    Design Configuration
      Abstracting Design Configuration
      Configuring the Design
      Random Design Configuration
    Self-Checking Testbenches
      Hard Coded Response
      Data Tagging
      Reference Models
      Transfer Function
      Scoreboarding
      Integration with the Transaction Layer
    Directed Stimulus
    Random Stimulus
      Atomic Generation
      Adding Constraints in e
      Adding Constraints in OpenVera
      Constraining Sequences
      Defining Scenarios in OpenVera
      Defining Scenarios in e
    Summary

CHAPTER 7: Simulation Management

    Behavioral Models
      Behavioral versus Synthesizable Models
      Example of Behavioral Modeling
      Characteristics of a Behavioral Model
      Modeling Reset
      Writing Good Behavioral Models
      Behavioral Models Are Faster
      The Cost of Behavioral Models
      The Benefits of Behavioral Models
      Demonstrating Equivalence
    Pass or Fail?
    Managing Simulations
      Configuration Management
      Verilog Configuration Management
      VHDL Configuration Management
      OpenVera Configuration Management
      e Configuration Management
      SDF Back-Annotation
      Output File Management
      Seed Management
    Regression
      Running Regressions
      Regression Management
    Summary

APPENDIX A: Coding Guidelines

    Directory Structure
      VHDL Specific
      Verilog Specific
    General Coding Guidelines
      Comments
      Layout
      Syntax
      Debugging
    Naming Guidelines
      Capitalization
      Identifiers
      Constants
      HDL & HVL Specific
      Filenames
    HDL Coding Guidelines
      Structure
      Layout
      VHDL Specific
      Verilog Specific

APPENDIX B: Glossary

Afterwords

Index