Bypassing specific constraints of uvm_sequence to create error scenarios

Hi everyone,

I have implemented 3 basic sequences with several constraints in each.I am at the point where i want to create error scenarios and for doing so i implemented an error sequence where i create each of the 3 basic sequences. What i want to do in the error injection test is send wrong values for specific variables of the transaction item, not to all of them, and i am facing errors in the randomization of the error sequence bacause of the constraints i already have in my basic sequences. Which is the most appropriate way to handle this issue or bypass the constraints ?

In reply to eleni_mak:

There are several options you can use:

  1. Use soft constraints
  2. Use rand_mode() to disable randomization of specific variables
  3. Use constraint_mode() to disable specific constraints
  4. Assign variables with specific values after randomization

In reply to cgales:

Option 5: Define base sequences without those error-preventing constraints, BASE. Then extend your GOOD transaction classes from BASE. Finally, extend your ERROR classes from BASE.