Hi, I am digging into the source cod eof uvm1.2, in an effort to create a mental graph for myself about the implementation. I am encountered with this piece fo code in uvm_port_base.svh
virtual class uvm_port_base #(type IF=uvm_void) extends IF;
typedef uvm_port_base #(IF) this_type;
// local, protected, and non-user properties
protected int unsigned m_if_mask;
protected this_type m_if; // REMOVE
protected int unsigned m_def_index;
uvm_port_component #(this_type) m_comp;
local this_type m_provided_by[string];
local this_type m_provided_to[string];
local uvm_port_type_e m_port_type;
local int m_min_size;
local int m_max_size;
local bit m_resolved;
local this_type m_imp_list[string];
Does this mean that the class uvm_port_base#(IF) has a nested uvm_port_base#(IF) instantiation “m_if”? I was under the impression that such code will create an indefinitely nested loop, and shouldn’t be able to compile. Furthermore, there are associative arrays m_provided_by, and m_proved_to. How do we get away with the indefinite-Russian-doll kind of situation?
It would also be greatly appreciated if anyone can illustrated why this is necessary or this facilitate anything. :)