Hi,
I am trying to call a task written in top module from UVM sequence, and it does not recognize the task, This used to work for me in uvm 1.1d and currently i am using uvm 1.2. Is there any thing changed? is there a right way to do this?
class soc_initialize_power_seq extends soc_vseq_base;
`uvm_object_utils (soc_initialize_power_seq)
// uvm_root top;
// uvm_coreservice_t cs;
function new (string name= "soc_initialize_power_seq");
super.new (name);
set_automatic_phase_objection (1);
endfunction
extern virtual task body ();
endclass : soc_initialize_power_seq
task soc_initialize_power_seq::body ();
super.body();
TOP.initialize_power(); // how to call a Task in my Testbench Top in
// Error: illegal location for a hierarchical name though i copied from GUI
//--- get root ----------- This also does not work
// cs = uvm_coreservice_t::get();
// top = cs.get_root();
//-------------------------
// top.initialize_power();
// Error is :
// initialize_power is not a class item.
//-------------------------
endtask : body
//--I have a task in my Top module
task initialize_power();
//$display("initialize power --> supply is turned on");
// switch_supply = 1'b1;
endtask: initialize_power