Is it possible to constraint an entire array in SystemVerilog to have the same value as another array?
I tried this:
class some_class;
rand bit array1[10][10];
rand bit array2[10][10];
constraint arrays_c {
array1 == array2;
}
enclass
This isn't allowed in 2 of the Big3 simulators I've tried. One says it isn't currently supported and the other refers me to the constraint BNF, complaining that it isn't a valid integral expression.
Is there any other way of doing this, aside from setting a bit foreach constraint? What I ultimately want is to return an array from a function and use it to constrain another array that is a class field.