It is unclear to me what do you mean with ‘overriding enum variable from test’?
It seems you want to randomize your seq_item to get a certain vehicle. Right?
In reply to komal_chatterjee:
Please use code tags making your code easier to read. I have added them for you. Also sequence is a reserved word, I changed it to sequenc.
There is no variable named seq—I think you meant req. And finally there is no need to redeclare req, it is already declared in uvm_sequence.
In reply to komal_chatterjee:
Please find a running example here:
You had 2 key problems:
(1) your typedef was incorrect;
(2) your data member in the seq_item was not intended for randomization. RThe rand key word was missing