Skip to content

uvm_config_db::get() works fine – nobody ever called set()

config-dbUVM · runs take about 2 minutes

uvm_config_db is a lookup table keyed by component path and field name: set() writes an entry, get() reads one. get() doesn’t need a matching set(): with no entry it returns 0 and leaves its variable unchanged, with no error or warning.

worker reads its mode with uvm_config_db#(int)::get() in its build_phase(). That code is correct.

Right noww.mode stays -1, worker’s default, instead of becoming 1.

Fix test::build_phase() so w.mode ends up 1. Don’t touch worker.

Source on GitHub

uvm_config_db_never_set.sv