Can someone tell whats the exact difference between uvm_config_db::set and uvm_config_db::wait_modified? How to decide which one to use? And also explain me how the internal mechanism of factory works when I set and get and also when I set and wait_modified?
According to the UVM source code, wait_modified() allows you to wait until a specific field is set in the uvm_config_db. I have never seen this task used and see no reason to use it, so I would recommend not using it.
The UVM Cookbook has a section on the uvm_config_db that explains how it functions.
The functionality of the uvm_config_db is too complex to explain in a single post. If you really want to know how it functions, I would recommend looking at the source code. From the user’s perspective, understanding the UVM Cookbook’s API explanation is sufficient.
In reply to janudeep3:
The factory is a common coding design pattern that you can look up in many places. Here is one paper I write on it: http://go.mentor.com/yin-and-yang
When to use the uvm_config_db is explained in the cookbook as well as many other places if you search for it.