Jump to content

Possible bug in uvm_create_random_seed()

Recommended Posts

In uvm_create_random_seed() (in uvm_misc.svh) is the following code that returns different seed values for a given {type_id, inst_id}:

  seed_map.seed_table[type_id] = seed_map.seed_table[type_id]+seed_map.count[type_id]; 

  return seed_map.seed_table[type_id];

The problem is that this can return a seed of 0, which is not a valid seed value to srandom().

Am I missing something, or is this really a bug?


Jeff Schroeder

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now