I have below code with some parent/child class definition (all of them are sequences)
class A;
my_ral_block my_block;
task pre_start();
uvm_config_db#(my_ral_block)::get(null, "*", "my_ral_block", my_block);
endtask;
task body();
...
endtask;
endclass
class B extends A;
task pre_start();
super.pre_start();
...
endtask;
task body();
super.body();
...
endtask;
taak my_func();
my_block.my_reg.write();
....
endtask
endclass
class C extends A;
B my_b;
task pre_start();
super.pre_start();
my_b = new();
endtask;
task body();
super.body();
my_b.my_func();
...
endtask;
endclass
And I got the error is Error-[NOA] Null object access in the code my_b.my_func() in class C. I don't know how to fix this. Can anyone help me on this ?