User guide
21-71
OpenVera Native Testbench
Terminating the AssertEngine
When the testbench is completely finished with assertions, it should
terminate all assertion activity with the AssertEngine’s DoAction()
task. This task also recovers the memory space of all the assertion
objects.
Example 21-8
assert_engine.DoAction(ASSERT_TERMINATE);
Example Testbench
The following complete testbench is provided as an example:
//Design under test
`timescale 1ns/100ps
module test;
reg clk;
reg dat;
reg syn;
test_ntb vsh(
.SystemClock ( clk )
);
initial begin
clk = 0;
#10 clk = 1;
forever #5 clk = ~clk;
end
initial begin
#2 dat = 0;
#10 dat = 0;
#10 dat = 0;
#10 dat = 1;
#10 dat = 0;
#10 dat = 0;
#10 dat = 1;