LiorKoren Posted February 15, 2012 Report Share Posted February 15, 2012 Hey, Is there a way to overide classes within another class? e.g. class a_driver extends uvm_driver endclass class a_agent extend uvm_agent a_driver driver ; endclass class b_agent extend uvm_agent a_driver driver ; endclass class b_driver extends a_driver endclass and I want to use b_driver instead of a_driver ONLY in b_agent classes. Quote Link to comment Share on other sites More sharing options...
janick Posted February 15, 2012 Report Share Posted February 15, 2012 (edited) If you know the instance names of all b_agent classes, you can override it using the factory. If you don't know the instance names, you need to create a new "bb_agent" that overrides its driver type to use b_driver using the factory before calling super.build_phase(), then do an override-by-type of b_agent with bb_agent. Edited February 15, 2012 by janick Quote Link to comment Share on other sites More sharing options...
dave_59 Posted February 15, 2012 Report Share Posted February 15, 2012 Even if you don't know all the instance names you can use a wildcard to match the instances in b_agent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.