In reply to chr_sue:
As per your remark , I changed code as below:
class my_env extends uvm_env;
`uvm_component_utils(my_env)
agent agt;
function new (string name, uvm_component parent);
super.new(name, parent);
endfunction : new
function void build_phase(uvm_phase phase);
agt= agent::type_id::create("agt",this);
endfunction
task run_phase(uvm_phase phase);
phase.raise_objection(this);
$display("%0t",$time);
#100;
phase.drop_objection(this);
endtask
endclass
class my_test extends uvm_test;
`uvm_component_utils(my_test)
my_sequence seq;
my_env env;
configuration cfg;
function new (string name, uvm_component parent);
super.new(name, parent);
endfunction : new
function void build_phase(uvm_phase phase);
env = my_env::type_id::create("env", this);
seq = my_sequence::type_id::create("seq");
cfg = configuration ::type_id :: create("cfg");
cfg.set_cfg();
seq.LIMIT=10;
endfunction
task run_phase(uvm_phase phase);
seq.start(env.agt.seqr);
endtask
endclass
output:-
# UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(277) @ 0: reporter [Questa UVM] QUESTA_UVM-1.2.3
# UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(278) @ 0: reporter [Questa UVM] questa_uvm::init(+struct)
# UVM_INFO @ 0: reporter [RNTST] Running test my_test...
# 0
# 0:req.data= 1
# 5:req.data= 1
# 15:req.data= 1
# 25:req.data= 1
# 35:req.data= 1
# 45:req.data= 1
# 55:req.data= 1
# 65:req.data= 1
# 75:req.data= 1
# 85:req.data= 1
# UVM_INFO verilog_src/uvm-1.1d/src/base/uvm_objection.svh(1267) @ 100: reporter [TEST_DONE] 'run' phase is ready to proceed to the 'extract' phase
#
# --- UVM Report Summary ---
#
# ** Report counts by severity
# UVM_INFO : 4
# UVM_WARNING : 0
# UVM_ERROR : 0
# UVM_FATAL : 0
Even in this case run_phase of test gets execute fully, Is it due to count of objection raise inside env also propagates to test and cause this to happen ?