sankey Posted April 26, 2011 Report Share Posted April 26, 2011 Hi, As I know Uvm macro are specially used for two purposes (1) Automatically provide a create method (2) Also get_type_name and also different methods like pint,clone,pack and un_pack ... etc Now , there are three types of blocks `uvm_field_utils_begin & end `uvm_component_utils_begin & end `uvm_object_utils_begin & end I want to know where , which macro can be used. Quote Link to comment Share on other sites More sharing options...
jadec Posted April 26, 2011 Report Share Posted April 26, 2011 `uvm_component_utils_begin/end is used in uvm_component subclasses (including indirect ones). You'll place field macros inside which refer to declaration class variable (thus is goes after variable declarations). `uvm_object_utils_begin/end is used in non-component uvm_object subclasses including sequences. They will also go after the variable declarations for the class. If you don't have any field macros, the `uvm_component_utils or `uvm_object_utils macros could be used instead of begin/end pair. `uvm_field_utils should not be used directly by user code. Quote Link to comment Share on other sites More sharing options...
sankey Posted April 27, 2011 Author Report Share Posted April 27, 2011 Dear Jadec, Thank you very much for your valuable reply. Can you please elaborate.I.e. which class will be extended from Uvm component and which classes will be extended from the uvm object. I am not getting your point (including indirect ones) Also let me give one scenario like i have made one class A which extended from uvm_component and another class B i have extended from class A.Now i want to use uvm_component_utils_begin/end for class B variables. I am getting error in such scenario,please if you can provide me any help regarding that. once again thank you for reply. Quote Link to comment Share on other sites More sharing options...
vishal.jain Posted April 27, 2011 Report Share Posted April 27, 2011 Hi Sankey, uvm_object class should be used to code normal transfer objects which are dynamic in nature. uvm_compponent class would be used to create your UVC hierarchy. All your quasi static objects like monitor / driver / sequencer / environment / test class etc should be extended from uvm_component class. That way you can use config mechanism to set/get component's filed values. Please refer to UBUS example inside UVM library to get a working example. -Vishal Quote Link to comment Share on other sites More sharing options...
jadec Posted April 27, 2011 Report Share Posted April 27, 2011 If you can post the code you're trying to use and the error you're getting, we may be able to pinpoint the issue. 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.