Hi
I got confused btw base and parent class.
I thought it was the same thing however I read in some forums that they have different meaning
I am not going to comment on if they are different or not. Honestly, I don’t care. For my understanding, I strictly use the below :
The terminology, “Parent” and “child” are abstract and can be used for a lot of things especially trees. They are used to describe hierarchy. And that’s why it’s not wrong to use parent and child for classes/inheritance.
With respect to inheritance, the preferred, correct and non-ambiguous terminology is “base” and “derived”.
In reply to mariam triki:
https://verificationacademy.com/forums/uvm/casting-parent-class-child-class#reply-58981
In reply to dave_59:
Hi Dave
when I was searching I found this explanation can you confirm it please ?
In the UVM test hierarchy, a parent class is the class that is one level above in the test heirarchy. For example:
uvm_test is the parent of uvm_env
uvm_env is the parent of uvm_agent
uvm_agent is the parent of uvm_driver, uvm_sequencer, uvm_monitor
Now, on the other hand, base classes are an OOP concept. You can extend a base class and add on functionality to it. So for example, you may have something like:
my_agent_base extends uvm_agent (uvm_agent is base class, my_agent_base is derived)
my_agent_derived1 extends my_agent_base
my_agent_derived2 extends my_agent_base
In reply to mariam triki:
Exactly.