Jump to content
udmittal

Read only behavior for uvm_transaction classes used to create verification component configuration object

Recommended Posts

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:

  1. 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.
  2. pass it to verification component using uvm_config_db::set() call
  3. verification component gets the configuration object using uvm_config_db::get() call
  4. 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 ....)
  5. once unlock by verification component, users can change configuration attributes and set the lock again.

BR,

Udit

 

  1.  

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×