Regression¶
The tests live in ivl_uvm_tests/ and run from ivl_uvm_regress/run_dir with
make vw0 to make vw52. The APB example (Examples) runs there too, with make vwapb.
Target |
Test |
What it covers |
|---|---|---|
|
|
Messages at all severities and verbosities. Ends with 3 errors and a fatal on purpose. |
|
|
Component phases. |
|
|
|
|
|
|
|
|
Test chosen through the factory with a user-defined test class. |
|
|
Mailbox with integer payloads. |
|
|
Mailbox with class payloads. |
|
|
APB master example. Ends on the global timeout, which is the expected result. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The table printer, |
|
|
The field macros for int, string, enum, real and object fields. |
|
|
|
|
|
|
|
|
|
|
|
A user item: create with |
|
|
|
|
|
A user-style test through |
|
|
|
|
|
A test, an env and two agents: the order of the phases over the tree (see Phasing: How run_test Runs the Phases). |
|
|
The same on a deeper tree with branches: order, full names, depth and child counts. |
|
|
The objection counter of the run phase: totals after raise and drop with counts, a component that never raises, and the total at the end. |
|
|
Parallel |
|
|
An objection raised after a nonblocking assignment in the first time step is honoured. |
|
|
Components created with |
|
|
|
|
|
|
|
|
|
|
|
A second |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The printed topology of a test with an env and two agents, one active (driver and monitor)
and one passive (monitor): names, types and mode through |
|
|
|
|
|
|
|
|
|
|
|
A |
|
|
A test, env, agent, sequencer and driver as a user writes them: the topology, a sequence of
three items and a driver with a |
|
|
The sequence hooks with a parent and a child sequence, state and priority, |
|
|
|
|
|
A driver uses every call of |
|
|
A monitor’s analysis port reaches two subscribers and a third one through an analysis export, in connection order, with the same object. A port with no connection does nothing. |
|
|
A driver asks an unconnected |
|
|
Connecting an analysis port to null, to itself or twice to the same provider, connecting
anything to an imp, a second |
|
|
A driver that polls with |
|
|
Two |
|
|
The APB requester example: eight writes and eight reads, checked by a scoreboard
( |
Golden logs¶
Each test has golden logs in ivl_uvm_regress/goldLogs.
cd ivl_uvm_regress/run_dir
make check # all tests: PASS or FAIL for each
make check TESTS="1 4" # only these tests
make gold # refresh the golden logs after an intended change
make check runs each test, removes file paths and line numbers from the report tags, and
compares the result with the golden log. Editing the sources does not cause false failures, but a
changed message, time stamp or severity count does.
A test passes only if all of these hold:
make vwNsucceeds. An unknown target, such asTESTS=99, fails.The run log was produced.
Every log the golden directory lists for the test was produced.
Every produced log matches its golden log.
make check exits with a non-zero status if any test fails. make gold writes nothing for a
test that does not meet the first two conditions, and also exits with a non-zero status.
Expected failures¶
The golden logs of vw0 and vw3 contain the intended errors of those tests. Some other tests
end in a particular UVM error or fatal, and are also listed in
ivl_uvm_regress/expected_fail.list: vw7 (the APB example ends on the global timeout),
vw31, vw32, vw34 and vw36. The file has one line per test:
7|Reached Timeout value of|the APB test ends at the global timeout (1 ms) with one UVM_ERROR; ...
31|[NOCOMP]|run_test with no test name and no component ends with the NOCOMP fatal, ...
The line gives the test number, text that must appear in the run log, and the reason. The test
passes only while that text is in its log, and the report says PASS (expected failure: ...).
If the text disappears from the log, for example because the APB example starts to complete, the
test fails until the line is updated or removed.
Checking the runner¶
ivl_uvm_check_selftest.sh tests the runner itself with a fake set of targets and needs no
simulator:
cd ivl_uvm_regress/run_dir
./ivl_uvm_check_selftest.sh