Constrained randomization

In reply to chethan2807:

Probably not a good idea, but you have three choices:

  1. Use rand_mode(0) to turn of the random variables you do not want randomized
  2. using seq.randomize(num_seq) will randomize just num_seq, all active constraints are still considered.
  3. using std::randomize(seq.num_seq) will randomize just num_seq, only the constraints provided using the with{} clause are considered.

I say this is not recommended because once you start randomizing class variables one at a time, it becomes difficult to randomize the entire class and preserve the previously generated random variables.