quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_green_ball.gif Introduction

SystemC provides very basic verification support. This support is same what Verilog 1995 provided. The SCV or SystemC Verification standard, provides APIs for transaction-based verification, constrained and weighted randomization, exception handling, and other verification tasks. We will seeing following topics in detail in next few pages.

   

space.gif

  • Data Introspection
  • Randomization
  • Constraints
  • Transaction Recording
  • Dynamic Threads
  • Data Structures
   

space.gif

  ../images/main/bullet_green_ball.gif Manipulation of Arbitrary Data Types

The SystemC Verification Standard uses data introspection to enable the manipulation of arbitrary data types. It allows a library routine to extract information from data objects of arbitrary types, regardless of whether it is a C/C++ built-in type, a SystemC data type, a user-specified composite type (struct), or a user-specified enumeration.

   

space.gif

Using C++ template specialization, the Verification Standard maps these data types to an abstract interface called scv_extensions_if, through which the following operations can be performed on the data object.

   

space.gif

  • Extraction of type information
  • Value access and value assignment
  • Randomization
  • Callback registration
   

space.gif

Using data introspection, a piece of code can manipulate a data object without explicit type information at compiletime. This facility can be considered as a C++ version of the Verilog PLI standard. It is a crucial building block for constrained randomization, variable recording, and transaction attribute recording.

   

space.gif

This facility includes the following classes and templates:

   

space.gif

  • The scv_extensions_if abstract interface: This abstract interface enables the manipulation of arbitrary data types without compile-time type information.
  • The scv_extensions template: Data objects are extended to support the abstract interface through partial template specialization of this template
  • The scv_shared_ptr template: This template enables sharing of data objects among multiple threads, with reference counting to perform automatic memory management.
  • The scv_smart_ptr template: This template combines scv_extensions and scv_shared_ptr to implement dynamic extensions that require instance-specific auxiliary data, such as randomization and callback handling.
   

space.gif

Data introspection of SystemC Verification library provided following API's

   

space.gif

  • util : Basic utility methods
  • rw : Methods to read and write to data object, its fields, its array elements
  • type : Methods to extract type information
  • rand : Methods for randomization-related operations
  • callback : Methods for callback registration
   

space.gif

Manipulation of data objects without compile-time information is supported through the scv_extensions_if abstract interface. The postfix '_if' indicates that this is an abstract interface class with C++ abstract methods and without member variables.

   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com