Field automation macros

Hi,
Can anyone clear the following doubts?

  1. what is the default flag value set for a field, in field automation macros of an UVM class?
  2. I read that it is set to OVM_ALL_ON, if so why we need to explicitly set the same flag to the variable in the code?
  3. Is there any way to set the same flag for all the user defined fields in the derived class from an UVM base class? Or can we use regular expressions for the field name ?

Thanks

Short answer: Don’t use the field_automation macros. See here

Are you asking why you have to pass the field to the macro? You can’t define default parameters to macros, so you have to provide a value. I suppose a different macro could just use the default, but such a macro isn’t included in the library.

In reply to warnerrs:

Thank you for the response, can you please explain the following?

I suppose a different macro could just use the default, but such a macro isn’t included in the library.

In reply to jeyanthis:

At the time the OVM and later the UVM were created, not all simulators supported default macro arguments, so this feature was not available. You could write your own versions of the field automation macros and supply your own default argument values.

You will not be able to configure fields with regular expressions, nor are you able to override the behavior of the fields except by explicit implementation of the methods being automated by the macros. This issue, along with several other feature deficiencies. as well as the severe performance penalty imposed by using the field automation macros is why we recommend against using them and instead explicitly implement the methods in the first place.