Hi,
I intend to randomize the a and b values 500 times
condition:
- a should get unique values between 0 to 11
- if a= 1 then b should be 0 to 6. The value of b can repeat once it completes the full-cycle (0 to 6)
Code:
rand bit [3:0] a;
randc bit [2:0] b;
bit [2:0] arr [bit [3:0]] [$] ;
constraint a_c {a inside {[0:11]};
unique{a}; }
constraint b_c { b inside {[0:6]};
if(arr.exists(a))
arr[a] != b ; }
function void post_randomize();
$display("Inside post_randomize");
arr[a].push_back(b);
if(arr.size() == 96)
a_arr[a].pop_front();
endfunction
am getting below errors
Feature not yet implemented for assoc array exists() on a
variable-size multidimensional array Expression
The variable this.arr[a] is not an integral type.
Illegal aggregate comparison because arrays to be compared must be of
equivalent type.
Thanks in advance.