AWhooley Posted September 21, 2011 Report Share Posted September 21, 2011 (edited) Hi, The UVM field automation provides an automated way of registering class properties for copying, printing etc. However I also note that there are do_* methods the user can also use to do this. What is the preferred method? Or does it just depend on environemnt complexity where the do_* methods would allow more flexability if/when needed? Thanks Alan Edited September 21, 2011 by tzar Correcting OOP terminology Quote Link to comment Share on other sites More sharing options...
mea1201 Posted September 21, 2011 Report Share Posted September 21, 2011 Hey Alan again, The do_* methods are hooks that allow you to override the default behavior of basic object operations such as copy, print, etc. The field macros register a class's attributes with the factory to set up these operations. In general, it's easiest to use the field macros in a transaction class (i.e. one derived from uvm_sequence_item) to enable its attributes for copying, printing, comparing, etc. In the same transaction class, you can override any do_* method if you wish to define custom behavior for copying, printing, comparing, etc. I find that field automation for components is useless, since components are not manipulated in the same way transactions are. Quote Link to comment Share on other sites More sharing options...
AWhooley Posted September 21, 2011 Author Report Share Posted September 21, 2011 Cheers again 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.