In reply to dave_59:
That’s a nice trick for the False Operand .
So if I need to constraint elements within a range ( along with the sum ) ,
Would the following be permissible too ? ::
constraint array_c {
foreach (array1[i])
array1[i].sum(item) with ( ( item inside { [ Low : High ] , Specific value1 , Specific value2 , ... } ) ? item : 101) == 100;
}
The basic logic being that inside returns 1’b0 / 1’b1 .