Your text to link here…
Error-[XMRE] Cross-module reference resolution error
test.sv, 18
Error found while trying to resolve cross-module reference.
token ‘cfg’. Originating package ‘$unit’.
Source info: cfg.device_add[0] = 0;
You are using UVM-1.2 but you are coding in OVM syntax.
In UVM we are using build_phase, connect_phase, run_phase instead of buil, connect, run.
You should clean-up your code.
BTW it is running for me. See the code here: