Jump to content
sathyakiran.p

referring/connecting env in a test

Recommended Posts

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×