HI All,
Need help on following
test declare a sequence as default sequence which is extended from a base sequence, seeing prints from base sequence pre_body and it is getting completed, but not seeing the message(first line in body) from body of the sequence
Not getting any clue what went wrong here.
Thanks
Hard to tell without seeing any code. Normally we recommend avoiding the use of default sequences and pre_/post_ methods.
Hello all,
In UVM, default sequences can be used to start a sequence. I can see many replies in this forum regarding default sequences say “It is not recommended to use default sequences in test”.
Could you please tell why it is not recommended to use default sequences in a test?
what will the issue while using a default sequence?
why do we need pre_body and post_body in a UVM sequence?
we have pre and post randomize to control anything related to randomization , so outside of it why do we even need any thing else outside body as we can break down the sequence steps using start_item, finish_item for any customization without using uvm_do macros.
Please help in throwing any info on what these pre post body are and any examples on when we would need them in a sequence.
Thanks Dev for looking,
Seeing following warning in log as well, Not sure why
UVM_WARNING @ 0.000ns: …@@test_seq [uvm_sequence_base] Body definition undefined
Following is the code.
class test_seq extends test_default_seq;
`uvm_object_utils(test_seq)
`uvm_declare_p_sequencer(test_vseqr)
extern function new(string name = "");
extern task body();
endclass : test_seq
function test_seq::new(string name = "");
super.new(name);
endfunction : new
task test_seq::body();
`uvm_info(get_type_name(), $sformatf(" test_seq::start"), UVM_NONE)
super.body();
`uvm_info(get_type_name(), $sformatf(" test_seq:super.body::done"), UVM_NONE)
#1us;
`uvm_info(get_type_name(), $sformatf(" test_seq::Done"), UVM_NONE)
endtask: test_seq
Does test_default_seq
define a body()
? Is it getting called? If not, you should not be calling super.body()
.
I would put a display debug message (or a breakpoint) in your test_seq
constructor. If it is not getting constructed, you have a very different problem.