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 (:doc:`examples`) runs there too, with ``make vwapb``. .. list-table:: :header-rows: 1 :widths: 8 30 62 * - Target - Test - What it covers * - ``vw0`` - ``t0_msg_verbosity`` - Messages at all severities and verbosities. Ends with 3 errors and a fatal on purpose. * - ``vw1`` - ``t1_class_phases`` - Component phases. * - ``vw2`` - ``t2_run_test_default`` - ``run_test`` with a default test. * - ``vw3`` - ``t3_clp_timeout`` - ``+UVM_TIMEOUT``. Ends with the timeout error on purpose. * - ``vw4`` - ``ivl_uvm_test_4`` - Test chosen through the factory with a user-defined test class. * - ``vw5`` - ``t5_mbx_int`` - Mailbox with integer payloads. * - ``vw6`` - ``t6_mbx_class`` - Mailbox with class payloads. * - ``vw7`` - ``t7_apb_vip`` - APB master example. Ends on the global timeout, which is the expected result. * - ``vw8`` - ``t8_scope_stack`` - ``uvm_scope_stack``. * - ``vw9`` - ``t9_copy_map`` - ``uvm_copy_map``. * - ``vw10`` - ``t10_status_container`` - ``uvm_status_container``. * - ``vw11`` - ``t11_comparer`` - ``uvm_comparer`` and ``compare``. * - ``vw12`` - ``t12_packer`` - ``uvm_packer``, ``pack`` and ``unpack``. * - ``vw13`` - ``t13_copy_clone`` - ``copy`` and ``clone``. * - ``vw14`` - ``t14_printer`` - The table printer, ``print`` and ``sprint``. * - ``vw15`` - ``t15_field_macros`` - The field macros for int, string, enum, real and object fields. * - ``vw16`` - ``t16_transaction`` - ``uvm_transaction``. * - ``vw17`` - ``t17_sequence_item`` - ``uvm_sequence_item``. * - ``vw18`` - ``t18_registry`` - ``type_id`` and the registry for objects. * - ``vw19`` - ``t19_item_flow`` - A user item: create with ``type_id``, print, copy, clone, compare, pack and unpack. * - ``vw20`` - ``t20_component`` - ``uvm_component``: name, parent, full name, children, depth, duplicate child name. * - ``vw21`` - ``t21_run_test_phases`` - A user-style test through ``run_test``: ``build_phase`` to ``report_phase``, an item created with ``type_id``, objections. * - ``vw22`` - ``t22_component_registry`` - ``type_id::create(name, parent)`` for components, ``get_type``, creation by type name. * - ``vw23`` - ``t23_children_walk`` - A test, an env and two agents: the order of the phases over the tree (see :doc:`phasing`). * - ``vw24`` - ``t24_deep_tree`` - The same on a deeper tree with branches: order, full names, depth and child counts. * - ``vw25`` - ``t25_objections`` - 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. * - ``vw26`` - ``t26_fork_run_phase`` - Parallel ``run_phase``: all tasks start at time 0, ``run_test`` returns when the longest objection is dropped, a ``forever`` task is stopped, and a thread the test forked before ``run_test`` keeps running. * - ``vw27`` - ``t27_nba_raise`` - An objection raised after a nonblocking assignment in the first time step is honoured. * - ``vw28`` - ``t28_orphan_components`` - Components created with ``parent = null`` get every phase, as does the test. * - ``vw29`` - ``t29_sorted_list`` - ``ivl_uvm_linked_list::set_sorted``: keys kept in ascending string order. * - ``vw30`` - ``t30_uvm_root`` - ``uvm_root`` and ``uvm_top``: a single root, parent of the top-level components, children in name order. * - ``vw31`` - ``t31_run_test_nocomp`` - ``run_test`` with no test name and no component. Ends with the ``NOCOMP`` fatal on purpose. * - ``vw32`` - ``t32_run_test_twice`` - A second ``run_test`` call. Ends with the ``TTINST`` fatal on purpose. * - ``vw33`` - ``t33_find_topology`` - ``uvm_is_match``, ``uvm_top.find``, ``find_all`` and ``print_topology``. * - ``vw34`` - ``t34_set_timeout_short`` - ``uvm_top.set_timeout`` with ``overridable = 0``: a later call is refused. Ends with the timeout error at 300 ns on purpose. * - ``vw35`` - ``t35_set_timeout_long`` - ``uvm_top.set_timeout`` raises the limit above the default of 1 ms. * - ``vw36`` - ``t36_set_timeout_cmdline`` - ``+UVM_TIMEOUT=2,NO``: the test cannot change the timeout. Ends with the timeout error at 2 ms on purpose. * - ``vw37`` - ``t37_env`` - ``uvm_env``: constructor defaults, type name, an env with a sub-env through ``run_test``: phase order, full names, creation by type name. * - ``vw38`` - ``t38_agent`` - ``uvm_agent``: ``is_active``, ``get_is_active`` and an override of it, an active and a passive agent in an env. * - ``vw39`` - ``t39_topology`` - 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 ``uvm_top.find`` and ``find_all``. * - ``vw40`` - ``t40_monitor`` - ``uvm_monitor``: type name, a monitor in a passive agent that samples in a ``forever`` loop and is stopped with the run phase. * - ``vw41`` - ``t41_scoreboard`` - ``uvm_scoreboard``: type name, a scoreboard in an env that counts matches and is checked in ``check_phase`` and ``report_phase``. * - ``vw42`` - ``t42_subscriber`` - ``uvm_subscriber``: an ``int`` subscriber and a class-item subscriber, ``write`` called through base class handles. * - ``vw43`` - ``t43_sequencer`` - A ``uvm_driver`` takes items from a ``uvm_sequencer`` through ``seq_item_port``: the sender waits for ``item_done``, a second sender waits its turn, and each item carries its IDs. * - ``vw44`` - ``t44_sequence`` - A test, env, agent, sequencer and driver as a user writes them: the topology, a sequence of three items and a driver with a ``forever`` loop. * - ``vw45`` - ``t45_sequence_methods`` - The sequence hooks with a parent and a child sequence, state and priority, ``create_item``, ``execute_item``, ``get`` and ``peek`` on a sequencer, and the ``get_next_item`` flags. * - ``vw46`` - ``t46_tlm_mbx`` - ``ivl_uvm_tlm_mbx``: order, bound, the ``try_`` calls, a ``get`` that waits for a ``put``, a ``put`` that waits for a ``get`` and two waiting getters. * - ``vw47`` - ``t47_seq_item_pull_port`` - A driver uses every call of ``seq_item_port``: ``get_next_item``, ``peek``, ``get``, ``try_next_item`` and ``has_do_available``. The topology shows the port and the export. * - ``vw48`` - ``t48_analysis_port`` - 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. * - ``vw49`` - ``t49_pull_port_noconn`` - A driver asks an unconnected ``seq_item_port`` for an item. Ends with the ``NOCONN`` fatal error on purpose. * - ``vw50`` - ``t50_tlm_misuse`` - Connecting an analysis port to null, to itself or twice to the same provider, connecting anything to an imp, a second ``seq_item_port.connect`` and a null provider are each reported as an error. Ends with errors on purpose. * - ``vw51`` - ``t51_try_next_item_b2b`` - A driver that polls with ``try_next_item`` finds five items sent back to back without an idle poll. ``uvm_analysis_imp_decl`` gives a scoreboard two write functions. * - ``vw52`` - ``t52_tlm_mbx_two`` - Two ``ivl_uvm_tlm_mbx`` objects at once: a getter or a blocked putter waits for its own mailbox only, and a put or get on the other mailbox does not serve it. * - ``vwapb`` - ``ivl_uvm_examples/apb_requester`` - The APB requester example: eight writes and eight reads, checked by a scoreboard (``APB: PASS (8 checks, 0 failed)``). It writes ``apb_requester.vcd``. Golden logs ----------- Each test has golden logs in ``ivl_uvm_regress/goldLogs``. .. code-block:: tcsh 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 vwN`` succeeds. An unknown target, such as ``TESTS=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: .. code-block:: text 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: .. code-block:: tcsh cd ivl_uvm_regress/run_dir ./ivl_uvm_check_selftest.sh