urandom_range(), urandom(), random() in verilog

前端 未结 2 1083
误落风尘
误落风尘 2021-01-01 04:26

I am confused between these three functions and I was wondering for some explanation. If I set the range how do I make the range exclusive or inclusive? Are the ranges inclu

2条回答
  •  青春惊慌失措
    2021-01-01 05:10

    You should only be using $urandom and $urandom_range. These two functions provide better quality random numbers and better seed initialization and stability than $random. The range specified by $urandom_range is always inclusive.

    Although $random generates the exact same sequence of random numbers for each call, it is extremely difficult to keep the same call ordering as soon as any change is made to the design or testbench. Even more difficult when multiple threads are concurrently generating random numbers.

提交回复
热议问题