macrossystem-veriloguvm

Should i be using the uvm_component/object_utils macros


I see a lot of articles which talk about whether you should be using field macros.

General guideline is:

`uvm_do... macro:

Can be used, but try to avoid if you are lazy.


`uvm_field... macro:

Avoid like the plague.


Sure, people also tell not to use

`uvm_component_param_utils... 
`uvm_object_param_utils...

But i cannot seem to find what anyone thinks about the

`uvm_component_utils... 
`uvm_object_utils...

Should they be avoided? Or they can be used without much issues?

Thanks :)


Solution

  • The *_utils macros do not introduce any performance penalties. They do save some typing and may reduce typographical errors, but I wish people would learn the code behind the macros before using them. See Parameterized Classes, Static Members and the Factory Macros