Search the Community
Showing results for tags 'systemverilog randomization'.
Found 1 result
I have a variable logic [31:0] id which is not declared as rand or randc. I need different id's each time into an array logic [31:0] id_array . logic [31:0] id; logic [31:0] id_array ; foreach(id_array) begin std::randomize(id); id_array = id; end In the above code, there is a possibility of getting duplicate ids in the array. How do I change the code to get unique ids in the array ?