hugemx830202 Posted March 30, 2011 Report Posted March 30, 2011 Hi, I defined an integer in TB env(tb_env) called 'test', and in my sequence, I call assert(uvm_config_db#(int)::exists(uvm_top, "tb_env", "test", 1)); to check whether the sequence can obtain 'test' value, but assert failed. I just used `uvm_field_int(test, UVM_ALL_ON) to register to the factory. Could you help? Thanks a lot! BR Mike Quote
janick Posted March 30, 2011 Report Posted March 30, 2011 Your environment should not look upward in to the configuration DB, only downward. Otherwise you are breaking the encpasulation principle. Instead you should use the uvm_resource_db#(int) and store an int under a known name. Quote
uwes Posted March 31, 2011 Report Posted March 31, 2011 hi, adding to janick's comments. its not that this style breaks encapsulation its also prevents a proper configuration override. so you should make a local field "test" and make an appropriate set_config or ::set from test/env/agent or similar. (keep in mind that there could be more than a single set-config) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.