udmittal Posted March 29, 2017 Report Share Posted March 29, 2017 Hi, Do we have any mechanism in uvm data classes(i.e. any class extended from uvm_transaction) through which we don't allow users to change any attribute of the class object(typically configuration object). I am developing a verification component which has a configuration class and I need to ensure that users are not changing any attributes accidently, if they really need to change anything they should follow a specific protocol so that verification component work as expected all the time. The behaviour of the feature would be something like this: create configuration object, set the attributes as required, once all fields are setup as required assert lock to configuration object(by some method or attribute), after assert users can't modify anything in the configuration unless it gets unlocked. pass it to verification component using uvm_config_db::set() call verification component gets the configuration object using uvm_config_db::get() call if users want to change any configuration attribute at run time, first they need to unlock the configuration object, the unlocking can only be done by the verification component(verification component will ensure that changing the configuration does not impact anything => flush data buffers ....) once unlock by verification component, users can change configuration attributes and set the lock again. BR, Udit Quote Link to comment Share on other sites More sharing options...
tudor.timi Posted November 3, 2017 Report Share Posted November 3, 2017 Don't provide access to data variables, but encapsulate access using functions. Quote Link to comment Share on other sites More sharing options...
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.