User guide
21-66
OpenVera Native Testbench
4. Create an AssertEvent object for each event to be monitored.
Including the Header Files
To start, every file that instantiates an Assertion object must include
the header file:
#include <assertion.vrh>
Setting Up the AssertEngine Object
The program block must instantiate one, and only one, AssertEngine
object. For a summary of the class and its methods, see the
description of AssertEngine Class in the OpenVera Language
Reference Manual: Native Testbench book.
program test {
...
AssertEngine assert_engine = new();
...
}
Controlling Assertion Reporting
Once the engine is running, use its Configure() task to specify how
the assertion reports results. The testbench settings take priority
over compiler and runtime options.
Example 21-4 instantiates the AssertEngine, turns off the
ASSERT_QUIET option, thus turning on runtime messages, and
turns on line information in the messages with the ASSERT_INFO
option. The ASSERT_REPORT option, which generates the
ova.report file, is on by default.