Hi,
problem statement: I wanted to set a value to a variable that is derived of a uvm_object. I wanted to use the get/.set method
prvious code snippet:
function new(int len = 0)
if(len > 0)
this.length = len;
else
ERROR
endfunction
Given that now the UVM constructor has to be like
function new(string name ="");
super.new(name);
endfunction
I wanted to set the len, variable using the set method.
1) however the set/get method requires a logical hierarchy, given that this object is instantiated in a sequence object, I don't know what which way can you pass the sequence_item hierarchy.
2) Also given that the ojbect does not have phasing involved unless I pass the value in some function and call the function explicitly it doesn't seem like it will work.
I wanted to know if there is an elegant way to do so?
Thanks,
Ankur