Always assert your randomizations

Today I was bitten twice by the same issue: randomization.
 
When you randomize something you should always assert the randomization. This will allow you to find the source of the problem much quicker. I lament the fact that UVM sequence macros do not assert the randomization by default. Instead they issue a warning with id RNDZFLD.
 
By the way, in case the randomization failed, you can rerun the simulation with the -solvefaildebug switch if running Modelsim/Questa. This will give you an idea why the solver was unable to satisfy your constraints.

Comments

Popular posts from this blog

The crooked ways of UVM's register model's coverage methods

uvm_config_db vs uvm_resource_db, where they come from and what are they good for

Don't use null as a sequencer argument to uvm_reg_sequence