How to debug the environment by tracing objections, phases and config db.

If you are stuck debugging an issue in your environment, here are three useful built-in debug features that can help you:

  • +UVM_OBJECTION_TRACE
  • +UVM_CONFIG_DB_TRACE
  • +UVM_PHASES_TRACE

Simply add this to your run command, and you will get useful information in the log.

UVM_OBJECTION_TRACE

It traces each rise and drop of objections. Every objection that rises must eventually be dropped, rendering it useful if the test is stuck for reasons other than endless loops.

UVM_CONFIG_DB_TRACE

This will provide information about every set() and get() call that was made. You can also use this in conjunction with printing the entire contents of the config database.

UVM_PHASES_TRACE

This will provide information about when each phase starts and ends.

BONUSYou can also print the whole factory.

When we pair all of these methods, we can get a complete picture of what is going on in our environment.