Skip to main content

Crate rustdv_runner

Crate rustdv_runner 

Source
Expand description

§rustdv-runner

The regression manager (design-doc D2.4, §4.5): port of cocotb’s RegressionManager. Owns the test registry (populated at link time by #[rustdv::test]), runs tests sequentially, applies timeouts, scores panics/errors vs. expectations, prints the summary table, and provides the simulator entry point.

Bootstrap deviation from D3.2 (STATUS.md): instead of exporting cocotb’s libpygpi entry symbols, the testbench cdylib is loaded as a plain VPI module (vvp -M<dir> -m<name>): rustdv::vpi_bootstrap!() exports vlog_startup_routines, whose startup routine registers a cbStartOfSimulation callback that kicks off the regression.

Structs§

RustdvCtx
Handed to each test. Since step 4 this is the one universal context (D47): the old TestCtx and RunCtx merged into RustdvCtx, which lives in rustdv-methodology beside the Component trait that receives it. Everything a running testbench is handed: the DUT, randomization, the objection registry, and the component’s path.
TestError
Test failure value — defined in rustdv-methodology since step 4, because Component::run returns it and the UVM crate sits below this one (D46/D47). Re-exported so ::rustdv::TestError is unchanged.
TestRegistration
One registered test (design-doc §6.1: the cocotb Test option set).

Functions§

collect_tests
All registered tests, in (file, line) order.
vpi_startup
Called from vlog_startup_routines at VPI module load time (before elaboration). Registers the start-of-simulation hook; everything else happens from simulator callbacks.