Cross model reference

can anyone please inform me why am I getting the Your text to link here…following error

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;

In reply to venkatasubbarao sutrave:

you are using the cfg handle inside the test class which isn’t created in the class .

I fix some of the issues but still long way to go. you are using some of the deprecated items also.

In reply to Rahulkumar Patel:

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: