Uvm_driver and sequence_item parameter

is it necessary to pass user defined sequence_item type to the user defined uvm_driver class?

For example,

class jelly_bean_driver extends uvm_driver#(jelly_bean_transaction);

In the above case, I can just declared jelly_bean_driver as:

class jelly_bean_driver extends uvm_driver;

This should still work as jelly_bean_transaction is derived from uvm_sequence_item.

Also, let us take the following example,

seq_item_1 derives from uvm_sequence_item
seq_item_2 derived from seq_item_1

If driver is parameterized with seq_item_2 then one will not be able to use seq_item_1 in the testbench.
While if default parameter (uvm_sequence_item) is left as it is then one can use seq_item_1 or seq_item_2 both, due to polymorphic behavior

In reply to verif_learner:

You can do that, but then your call to get_next_item() or get() will have to use a generic sequence_item type. You will then have to cast it to the appropriate type for your driver.

Typically, the sequence_item associated with the driver contains everything that the driver requires to drive the transaction correctly. Any class that extends this sequence_item will only contain additional constraints to limit the sequence_item randomization. Any additional functionality that changes the behavior should be added to the base sequence_item.

In reply to cgales:

In reply to verif_learner:
You can do that, but then your call to get_next_item() or get() will have to use a generic sequence_item type. You will then have to cast it to the appropriate type for your driver.
Typically, the sequence_item associated with the driver contains everything that the driver requires to drive the transaction correctly. Any class that extends this sequence_item will only contain additional constraints to limit the sequence_item randomization. Any additional functionality that changes the behavior should be added to the base sequence_item.

Thanks