Overriding UVM Sequence Items

The UVM Cookbook states that “sequence_items are unlikely to be overriden”.

Sequence items usually have randomization constraints. A common practice in our company is to override the sequence item with a different one that has different randomization constraints. It is very simple to extend a test, use the factory over-ride of the sequence item, and create a new test with different randomization.

Is this not a common practice?

I would say that the term ‘unlikely’ comes from the argument that adding additional constraints to a sequence_item to create a new test is unnecessary.

When you develop a base sequence_item, it is constrained to the entire valid state-space for that specific agent protocol. If your DUT will support only a sub-set of that protocol, then you will add additional DUT specific constraints, and this sequence_item will be used in all of the test sequences for your DUT.

Ideally, you will always want to generate the widest variation of sequence items for testing. If you override your sequence_item with even more constraints to simply generate a new test, you are limiting the effectiveness of these tests.

In reply to cgales:

Can you please explain which are effectiveness of test we are limiting here.

Rather I would suggest we should use hybrid approach. We can have a base test and override sequence with new sequence and made different testcase. Because I have observed that in most of the testcases what we change is sequence only. All code of test remain same. If we really want to add something extra in to base test we can make new testcase extending base test. It can help discarding extra testcase which may not be required.

In reply to cbanken:

What you describe is the (Specman) e way of doing it. In my opinion it has its merits.

In reply to Digesh:

Hi Digesh,

What you are talking about is of test and sequences, but the question is regarding overriding sequence_items which might not be necessary.

Regards,
Ashith