[SOLVED] $urandom_range is generating same values

Status
Not open for further replies.

swabhi812

Member level 2
Joined
May 18, 2018
Messages
45
Helped
4
Reputation
8
Reaction score
4
Trophy points
8
Activity points
349
I am writing a test bench where I am randomizing few inputs using $urandom_range(max,min). However, every time I am running my test, it is returning same value. I would like to understand why I am getting this issue.

Thanks!
 

That is the correct behavior - it's called random stability which allows you to debug your test should it fail. You need to change the initial seed if you want another set of random values. Using Modelsim/Questa, look up the vsim -sv_seed switch in the manual
 


Thank you for detailed explanation. This makes sense to me. I was able to use -seed random in Cadence xrun to get desired behavior.

Thanks!
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…