External constraint fail

In reply to dave_59:
Hi Dave,

Thanks for the reply. The crux of the code is in the original post
Below I am showing what plusarg_int class contents are.(every other plusarg_* class has a rand variable ,‘m_value’, declared.)


class plusarg_int extends plusarg_base;
   rand int m_value;
  ....
endclass

The rand value is declared in this class and the constraint is applied outside.
you are correct that the this.randomize() considers the constraint.

An issue arises lets say when I call the randomize in the below seq:
randomize(TEST_BIT);
randomize(TEST);

instead of

randomize(TEST);
randomize(TEST_BIT);

I have a feeling that TEST.m_value is getting randomized twice in the above case and that creates a conflict. I could be wrong.