Cookbook :: Configuring Per Sequence

In reply to TC_2017:

When doing multiple calls to uvm_config_db::set() from the same component, last write wins. In [Q1] The first set() is broadcast to “agent1*”, then the second set() is a more specific string “agent1.seqr_h.error*”.

It might help to think of a list of strings pushed to the front of a queue for every call to set(). Then each call to get() scans the queue from front to back to find a string match with the scope name provided with the get. The first match gets the config_db setting associated with that string’s setting.

When you reverse the setting in [Q2], it’s going to find the match with “agent1*” first and never match the “agent1.seqr_h.error*” setting.

So the more specific string setting must come before the less specific string setting.