Parameterized Class Declaration Error in Uvm

Parameterized Class Declaration Error in Uvm

I'm trying to use a parameterized class extended from uvm_object.

class som_util #(int entry_w=2) extends uvm_object;
 `uvm_object_utils(som_util)
 "Some other static functions using the parameterized variables"
endclass

When I run my tests on IUS using this utility function, it compiles and the overall tests passes too. But on VCS , it complains with the Identifier "entry_w" is not defined ?

What could be the possible reason ?

1 Answer

Parameterized classes in the UVM must be registered using the uvm_object_param_utils macro as below:

 `uvm_object_param_utils(som_util#(entry_w))

For more background, please see my discussion on this topic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.