Thanks a lot Andy.
I apologize for not providing the code earlier. I thought the piece of code that i gave should be enough.
OK. So i have implemented all your feedback points. However the problem is not a single $display statement embedded in the sequence gets displayed. Only the $display of test.sv gets displayed in which it says that the sequence is grabbed. So its clear that the sequence is not executed at all.
For your reference, I have attached entire simple directory in the zip format. The files that I have modified are test.sv and simple_seq_lib.sv.
Here is the code of test.sv
fork
begin
#300;
if(sequencer.is_grabbed())
$display("@%0t simple_seq_sub_seqs_obj grabed Instance ID = %0d",$time,simple_seq_sub_seqs_obj.get_inst_id()); else
$display("@%0t simple_seq_sub_seqs_obj Fail for grabed. Instance ID = %0d",$time,simple_seq_sub_seqs_obj.get_inst_id());
sequencer.grab(simple_seq_sub_seqs_obj);
if(sequencer.is_grabbed())
$display("@%0t simple_seq_sub_seqs_obj grabed Instance ID = %0d",$time,simple_seq_sub_seqs_obj.get_inst_id()); else
$display("@%0t simple_seq_sub_seqs_obj Fail for grabed Instance ID = %0d",$time,simple_seq_sub_seqs_obj.get_inst_id());
$display("Instance ID : %0d",simple_seq_sub_seqs_obj.get_inst_id());
sequencer.stop_sequences();
sequencer.start_default_sequence();
//$display("has_do_available=%0d",sequencer.has_do_available());
if(sequencer.is_blocked(simple_seq_sub_seqs_obj))
$display("@%0t simple_seq_sub_seqs_obj blocked Instance ID = %0d",$time,simple_seq_sub_seqs_obj.get_inst_id());
else
$display("@%0t simple_seq_sub_seqs_obj Fail for blocking Instance ID = %0d",$time,simple_seq_sub_seqs_obj.get_inst_id());
end
join
Here is the code of seq_lib.sv specifically only simple_seq_sub_seqs
class simple_seq_sub_seqs extends ovm_sequence #(simple_item);
function new(string name="simple_seq_sub_seqs");
super.new(name);
endfunction
`ovm_sequence_utils(simple_seq_sub_seqs, simple_sequencer)
simple_seq_do seq_do;
simple_seq_do_with seq_do_with;
simple_seq_do_with_vars seq_do_with_vars;
virtual task body();
ovm_report_info(get_name(), $psprintf("In body() of %s", get_name()),1000);
#100;
$display("Now Starting to call a sequence seq_do. Instance ID is %0d",get_inst_id());
`ovm_do(seq_do)
#100;
$display("Now Starting to call a sequence seq_do_with. Instance ID is %0d",get_inst_id());
`ovm_do(seq_do_with)
#100;
`ovm_do_with(seq_do_with_vars, { seq_do_with_vars.start_addr == 16'h0003; seq_do_with_vars.start_data == 16'h0009; } )
endtask
endclass : simple_seq_sub_seqs
Here is the output:
# @300 simple_seq_sub_seqs_obj Fail for grabed. Instance ID = 35
# @300 simple_seq_sub_seqs_obj grabed Instance ID = 35
# Instance ID : 35
# @300 simple_seq_sub_seqs_obj Fail for blocking Instance ID = 35
# OVM_INFO @ 300 [RNTST] Running test ...
# OVM_ERROR @ 9200000000000 [TIMOUT] Watchdog timeout of '85e0abb5ed4' expired.
Attached are the same files.
Please provide your inputs on where I am wrong.
Thanks,
Ashish