Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

referring/connecting env in a test

$
0
0

Hi,

 

Following is the sample code

 

class a_env extends uvm_env

....

endclass

 

class basic_test extends uvm_test

 

a_env a_env1;

a_env1 = a_env::type_id:create("a_env", this);

 

endclass

 

class b_env extends uvm_env

a_env a_env2; // only reference

 

...

endclass

 

class my_test extends basic_test

b_env b_env1;

 

 

virtual function void connect_phase( umv_phase phase)

  super.connect_phase(phase);

  b_env1.a_env2 = a_env1;

endfunction

..

endclass

 

 

I am getting NULL_OBJCT access error with the above code..  can anyone helpout?

 

Thanks,

Satya


Viewing all articles
Browse latest Browse all 756

Trending Articles