Teal: Verification Utility and Connection Library

New! You can now access the chapters detailing teal and truss from our published books. Our C++ documentation can be found here, and our SystemVerilog documentation here .

Teal is an open-source utility and connection library available from the downloads section. It was first implemented in C++ but with a systemVerilog version just released. Teal is part of the libraries we support and an independent sister library to truss. Where truss focuses on the big picture of running simulation, teal focuses on the utility functions needed to enable efficient verification. Teal was originally developed as a simple PLI connection library between C++ and all major simulators but has later expanded to solve several important utility functions for verification. Teal currently includes functionality for:

  • Four State arithmetics - C++ register class to deal with logic states 0,1,Z and X.Only needed for C++
  • Intuitive simulator Connection - The vreg class allows for simple access to and manipulation, monitoring of HDL signals in all major simulators: Synopsys' vcs, Cadence's ncsim, MTI's Modelsim as well as the free Verilog Simulator Ikarus.
  • Stable Random Number Generation - Access to stable, repeatable, independent stream random number with support methods
  • Concurrency - Seamless threading integration to allows different component run in independent simulation threads as needed
  • Software like memory access - The teal memory module allows development of driver like software testcases as well as simple back-door access to any simulation memory
  • Constraint and Parameter control - Intuitive ways of passing parameters and constraints into simulation through either dictionary text files or command line options
  • Solaris and Linux support - Proven to run on any UNIX bases operating system simulators use under both 32/64 bit operation as well as x86 and Sparc architectures

You can download teal's user manual from our downloads page.

Teal for C++ example

The following code is an example from the teal for C++ user's manual. It shows what C++ test code using teal might look like. As can be seen it is pretty straightforward code.

#include “teal.h”
using namespace teal;
int verification_top ()
{
vreg clock (“testbench.clk”);
vout log (“Chapter 4- Example 1”);
dictionary::start (“simple_clock_test.txt”);
uint number_of_periods (dictionary::find (“number_of_clocks”,20));
for (int i(0); i < number_of_periods; ++i)
{
log << note << “i is “ << i << clock is << clock << endm;
}
dictionary::stop ();
vlog::get (expected) << “test completed” << endl;
}

Back to top