Hello,
I have the following constraint in a class =>
// Variable declaration
rand cb_destination_t scaler_out_enabled_cb_inputs[];
// Constrain the size of the dynamic array
constraint c_scaler_out_enabled_cb_inputs_size {
scaler_out_enabled_cb_inputs.size() inside { [0:2] };
}
// where the enumerated type cb_destination_t is declared as follows:
typedef enum {
LAYER0 = 0
, LAYER1 = 1
, LAYER2 = 2
} cb_destination_t;
When I randomize the class, following randomization error is seen =>
Solved: m_tb_constraints.scaler_out_enabled_cb_inputs.size = 569603560
** Error: (vsim-7020): Illegal attempt to resize random dynamic array ‘m_tb_constraints.data_flow_constraints.scaler_out_enabled_cb_inputs’ to 569603560 elements. (SolveArrayResizeMax=10000)
The same test is run with a lot of different seeds and this error is seen only for a small number of seed values.
How do I fix the dynamic array size constraint so that it will always work for all the seed values?