In reply to Chisiya:
If I give constant value, it works.
But assigning constant value to lsb_index before randomization call generates compile error.
bit [15:0] a, size_a, c;
int b;
int lsb_index;
lsb_index = 19;
std:: randomize(a) with {a >= b;
a[lsb_index : 0] == 0;
(a + size_a) <= c;};
I have compilation error " Range width must be constant expression " for line that is highlighted.
Any idea why I have that error and how I can resolve it?