Randomization of array without using rand or any randomize methods

Hi, I am trying to solve the below question.

How to generate an array of unique values without using randomize method or rand.
Please help me with the solution.

Thanks,
Sruthi.

In reply to sruthikrapa:
This appears to be a homework question based on the fact you have used randomize() in your other questions. So I’ll help but not give you a solution

What you need to do create a loop that generate a random value and pushes it onto a queue. Before pushing the value into the queue, you need to check if the value does not already exist inside the queue. If it does , you need to generate a new random value and try again.

In reply to sruthikrapa:

You could:

  1. Implement your own pseudo-random number generator algorithm, such as a simple linear feedback shift register.
  2. Use an older Verilog randomization function, such as $urandom.
  3. Obtain a hardware random number generator, such as TrueRNG. Note that using a hardware RNG for verification is oftentimes a bad idea since the random number patterns are almost always unique.