I see in this my TB code. cfg is a env configuration class and get_ci_id is a function which returns return(ci_id) which is of type cip_client_f
However i don’t see an object of cip_client_f being declared in that function. we don’t need object ?
function get_ci_id (string ..)
cip_client_f ci_id;
..
..
return (ci_id)
In another piece of code not related to this function i see
My question is if we can use the concept of not creating an object of class within a function as those are automatically allocated when the task or function is being called why are we explicitly creating an object ?
When to create a object and when not to when in functions ?
Based on the name, I’d guess that cip_slave_e is an enumerated typedef. Therefore, cip_id is a singular value variable which doesn’t need to be created or new’d like a class variable.