Can I define a class with uvm_sequence without writing uvm_sequence#(seq_item) and will it work and if it works what are the conditions for it?
class xyz extends uvm_sequence
`uvm_object_utils(xyz)
…
Can I define a class with uvm_sequence without writing uvm_sequence#(seq_item) and will it work and if it works what are the conditions for it?
class xyz extends uvm_sequence
`uvm_object_utils(xyz)
…
In reply to vineetkumar99:
If you do not pass a sequence item to your sequence definition this sequence is considered as a virtual sequence. A virtual sequence is not generating any seq_items.
In general if you are using a parameterized class, and you forget (or dont intend to) add a parameter then the default parameter value is
used.
In this case uvm_sequence is a parameterized class that uses two parameters
virtual class uvm_sequence #(
type REQ = uvm_sequence_item,
type RSP = REQ
) extends uvm_sequence_base
The default parameter value for REQ is uvm_sequence_item
and the default parameter value for RSP is REQ which in this case resolves to uvm_sequence_item
So the following are equivalent:
Hope this helps.
Logie Ramachandran
Verikwest Systems Inc