In reply to peter:
For a simple example like that where there are only 6 random bits, you can exhaustively loop through all 64 possible values for v and count the number of values that satisfy the constraint
module top;
struct packed {
bit [1:0] addr;
bit [1:0] start_addr;
bit [1:0] end_addr;
} v;
int count;
initial do if (v.addr inside {[v.start_addr:v.end_addr]})
$display("%p %0d",v,++count);
while (++v != 0);
endmodule
# run -all
# '{addr:0, start_addr:0, end_addr:0} 1
# '{addr:0, start_addr:0, end_addr:1} 2
# '{addr:0, start_addr:0, end_addr:2} 3
# '{addr:0, start_addr:0, end_addr:3} 4
# '{addr:1, start_addr:0, end_addr:1} 5
# '{addr:1, start_addr:0, end_addr:2} 6
# '{addr:1, start_addr:0, end_addr:3} 7
# '{addr:1, start_addr:1, end_addr:1} 8
# '{addr:1, start_addr:1, end_addr:2} 9
# '{addr:1, start_addr:1, end_addr:3} 10
# '{addr:2, start_addr:0, end_addr:2} 11
# '{addr:2, start_addr:0, end_addr:3} 12
# '{addr:2, start_addr:1, end_addr:2} 13
# '{addr:2, start_addr:1, end_addr:3} 14
# '{addr:2, start_addr:2, end_addr:2} 15
# '{addr:2, start_addr:2, end_addr:3} 16
# '{addr:3, start_addr:0, end_addr:3} 17
# '{addr:3, start_addr:1, end_addr:3} 18
# '{addr:3, start_addr:2, end_addr:3} 19
# '{addr:3, start_addr:3, end_addr:3} 20
Ordering of random variables means choosing the value of a random variable before choosing the value of another random variable. Normally in the absence of randc or dist constraints, the cover chooses 1 of the 20 solutions with equal probability and the values of the random variables are chosen as a set; there is no order in picking values for each variable.
If you put the randc qualifier on the variable as a whole, the solver makes sure that every solution out of the 20 gets picked before repeating the same solution.But if you put the randc qualifier on the three individual variables, the solver has to choose value for a variable before picking the value of another variable.
Let’s say the cover picks values in this order addr:1, start_addr:0, end_addr:3 (which is solution #7) in the first call to randomize. But in the next call, it picks # '{addr:3, start_addr:1, but then the only value for end_addr is 3, which it already used in the first call.