In reply to dave_59:
Hi Dave,
Thanks for your reply. This is what exactly I need:
I have the following testbench hierarchy:
Your text to link here...
[Capture.png](https://postimg.cc/CZN3JFL9)
https://i.postimg.cc/vBFGYTR8/Capture.png
I want to replace "Middle_base_test 1" with a "NEW middle_base_test 1" as the behaviour/flow of the testcase needs to be changed for verifying a new feature in RTL.
By the above requirement, I dont want to touch the child classes as whatever constraints are implemented in those classes could be re-used for the new feature.
So child testcases will extend from "Middle_base_test 1" always, but when I'm working with the new feature, they type of "Middle_base_test 1" should be overriden by "NEW middle_base_test 1".
I can do the following in my current TB:
1. Go to each and every child class and change the parent class by using an ifdef MACRO (But not an easy task if we have a lot of child testcases)
2. In the "Middle_base_test 1" file, keep two sets of ""Middle_base_test 1"" based ifdef MACRO.
But I would like to know if there are any other recommended ways to do this.
Hope you understood my requirement.
Thanks