Write a constraint for the 8-bit variable that provides distribution 70% for range 0-100 and the remaining 30% for range 101-255.
In reply to prasanthB:
Ratio will be 7:3
So I guess this will be the answer
constraint condition {variable_name dist{[0:100]:=7 , [101:255]:=3};}
In reply to Shubhabrata:
Have u excute in EDA playground
In reply to Shubhabrata:
That is incorrect. You need to use :/ instead of := so that the weight gets distributed across the range of values.
In reply to prasanthB:
Nope. I had doubts regarding the distribution. Sir, cleared it.
In reply to dave_59:
I got the question wrong. I thought each value is having 75% weightage.
I have one thing to clarify. if I get distribution like -
constraint tag{data dist{7:=5 , [11:20]:=3 , [26:30]:/5};}
This one is providing dist of 12.5% for value 7, 7.5% for each value inside the range of 11-20 or 75% for that range, and 12.5% for the range 26-30.
Am I right or do I badly need to go through a probability course again?