Subject: [sv-ec] FW: Question on DIST constraint (from Ray Ryan at Mentor)
From: David W. Smith (david.smith@synopsys.com)
Date: Mon Jun 16 2003 - 15:16:16 PDT
Here is a forwarded message from Ray Ryan at Mentor which bounced due to his
not being a member (which has now been fixed).
Regards
David
============================================================================
==========================================
In looking at Distribution constraints for random variables (12.4.4
Distribution) I have some questions.
1) In a distribution constraint, is a random variable legal in
the expression for the value or weight? That is, are the
following constraints legal?
rand integer x,y,z;
constraint c1 { x dist { y:=9, z:=1 }; }
constraint c2 { x dist { 0:=y, [1:10]:/z, [11:15]:=1 }; }
constraint c3 { x dist { y:=z, 0:=1 }; }
constraint c4 { x dist { [y:z]/=100, 0:=1 }; }
constraint c5 { x dist { y:=x, z:=z }; }
If these are legal, what is the semantic for these constraints?
What is the order of solving for x,y,z?
Are these constraints 'bidirectional' (like the 'inside' constraint)?
2) Can the values and ranges in a distribution constraint overlap?
Are the following legal?
rand integer x,y,z;
constraint c1 { x dist { 0:=100, [0:9]:/100, [0:3]:/100 }; }
Is this equivalent to:
constraint c2 { x dist { 0:=(100+10+25), [1:3]:=(10+25), [4:9]:=25 }; }
3) It seems that the constraint below is legal. Is this right?
rand integer x,y,z;
constraint c1 { x+y+z dist { 0:=99, [1:255]:=1}; }
Is this equivalent to:
rand integer x,y,z;
rand integer tmp;
constraint c1a { tmp dist { 0:=99, [1:255]:=1}; }
constraint c1b { x+y+z = tmp; }
Thanks,
Ray
Ray Ryan
Staff Engineer
Model Tech
(408)487-7240
ray_ryan@mentorg.com
This archive was generated by hypermail 2b28 : Mon Jun 16 2003 - 15:17:44 PDT