I am trying to understand the difference between := and :/
class packet
rand bit[7:0] b;
rand bit[7:0] a;
constraint adist {a dist {0:=9, [1:255]:=1};}
constraint bdist {b dist {0:/9, [1:255]:/1};}
endclass
What would be the probability of a being 0 and b being 0?
Is the probability of a being 0 = 9/264 and b being 0 = 9/10 ?
In reply to sfenil1804:
The difference is whether the weight gets applied to each value in the range (:=), or divided by the number of elements in the range(/:).
You answered your own question.
In reply to dave_59:
rand bit [1:0] ab;
constraint c1 { ab dist {0:= 25, 1:= 75}; }
constraint c2 { ab dist {0:= 50, 1:= 2}; }
Since Values are overlapping ab would still be either 0 OR 1 .
How would the weight be allocated ? Would weights be average ?
In reply to TC_2017:
This is not defined in the LRM. See issue 0003758