# Overriding UVM Sequence Items

**URL:** <https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398>\
**Category:** UVM\
**Tags:** UVM, Cookbook-SequencesOverrides\
**Created:** [February 24, 2015, 4:43pm UTC](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398 "2015-02-24T16:43:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbanken](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@cbanken](https://verificationacademy.com/forums/u/cbanken)\
**Post date:** [February 24, 2015, 4:43pm UTC](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/1 "2015-02-24T16:43:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [February 24, 2015, 5:03pm UTC](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/2 "2015-02-24T17:03:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Digeshkumar](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@Digeshkumar](https://verificationacademy.com/forums/u/Digeshkumar)\
**Post date:** [February 24, 2015, 10:50pm UTC](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/3 "2015-02-24T22:50:01Z")

</div>

_In reply to [cgales](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/2):_

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.

---

<div class="post-metadata">

**Author:** ![Tudor\_Timi](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/tudor_timi/32/1897_2.png) [@Tudor\_Timi](https://verificationacademy.com/forums/u/Tudor_Timi)\
**Post date:** [February 25, 2015, 9:26am UTC](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/4 "2015-02-25T09:26:35Z")

</div>

_In reply to [cbanken](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/3):_

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

---

<div class="post-metadata">

**Author:** ![Ashith](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/ashith/32/2071_2.png) [@Ashith](https://verificationacademy.com/forums/u/Ashith)\
**Post date:** [March 4, 2015, 11:31am UTC](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/5 "2015-03-04T11:31:09Z")

</div>

_In reply to [Digesh](https://verificationacademy.com/forums/t/overriding-uvm-sequence-items/30398/4):_

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
