Set object A into root scope, then get A to object B. If I change item in A, will item in B change meanwhile?

In reply to dave_59:

In reply to shanshan:
The uvm_config_db is much simpler in some regards than OVM’s set/get_config. In the UVM, you are just setting/getting the contents of a variable, and the config_db does not care what type that variable is. So I assume you setting a class handle, then getting the handle. There is only one class object. It’s up to the user to clone the object if needed.
If by root scope you mean the top-level module with an initial block that calls run_test() and another initial block that calls uvm_config_db#(classA)::set(), the UVM guarantees a “delta” cycle before any of the uvm_component phases being executing. So the set() will always come before the get().

Thanks Dave,

uvm_config_db#(class A_TYPE)::set(uvm_root::get(), “*”, “A”, A);
uvm_config_db#(class A_TYPE)::get(uvm_root::get(), “”, “A”, B);

According to your reply, do you mean in above code. If I change item in A, the item in B will not change ?

And if I use the below code, the item in A change will make the item in B change, too, right?
set_config_object(“*”, “A”, A, 0);
get_config_object(“A”, B, 0);

So, how what should I do if I want to the change in A also happen in B in UVM ? How to clone?