Generate unique elements in an array

In reply to mseyunni:

You have declared dcd2pdw as an associative array whose index type is bit[DCD_INDEX_BITS-1:0]. You cannot randomize the size of an associative array. Did you mean to declare a fixed sized array?

rand bit[PDW_INDEX_BITS-1:0] dcd2pdw[DCD_INDEX_BITS-1:0];