This satisfies the child component, but the parent (compA) can no longer find it’s configuration in the database.
If I want it to work, I also have to add this to build_phase:
"You can have a single get() in your CompA base clase, but CompB will need $cast the object to CompB_cfg variable. "
Got it. Thanks.
"Also, you should not be constructing both CompA_cfg and CompB_cfg objects. Use the factory to override the cfg object creation. "
I don’t currently construct both, just CompB_cfg. I see what you mean though. I could, in my env config have CompA_cfg instead. Then, in my test do an override, build env, then cast cfg.comp_cfg to compB_cfg. Then I can configure the additional properties of the extension.
This is my only class I don’t modify using the factory; it uses parameters. I did this because I can’t “create” the ‘cfc’ and ‘env’ objects if they are types uvm_component, and uvm_object.
Furthermore, I’d have to do an ‘instance’ override with a static path name in a test_BASE extension.