I need to parametrize the uvm_sequence_item
as my signal width change based on configuration.
Is it good idea to declare configuration object inside uvm_sequence_item?
Or is it possible to parametrize uvm_sequence_item
like following?:
class my_sequence#(int width) extends uvm_sequence_item;
The best way is to use the factory override mechanism instead of the config_db mechanism to choose chose the parameterized sequence/_item you want.
See below links. Its already mentioned there.
https://verificationacademy.com/cookbook/usingfactoryoverrides
https://forum.verificationacademy.com/forum/verification-methodology-discussion-forum/uvm-forum/31530-parameterized-uvm-sequence-item-and-usage-sequence