Constraint for a value range not inside a value range

In reply to dave_59:

Hi Dave,

Here are the details.

class packet;

rand bit [7:0] a;
rand bit [2:0] s;

endclass: packet

packet req;

bit [7:0] range_of_values[$];

The Queue stores the values of a to a+s after each randomization call.
Next time when we randomize the generated value a to a+s should be excluded from the random generation.

So lets say after 1st randomization call a = 50 and s = 5, then range_of_values = {50, 51, 52, 53, 54, 55};

So next time after the randomization call a = 47 ans s = 5 is illegl but a = 47 and s = 2 is legal.