How to extend agent with interface with additional signals?

Hi all.

I’m not sure how to use the OOP/UVM methodology of extending classes to extend an agent when adding additional signals to the interface. It’s no problem extending all the agent classes but the SV Interface is not a class so it can’t be extended. I need an enhanced version of an existing interface/agent that has additional sideband signals for higher level handshaking. Is there a clean way to do this? Use generate to switch on and off the additional pins?

Thanks for any suggestions.

David

In reply to drogoff:

If you have a different interface it has to have a different name to differentiate between the 2 interfaces.
Each agent is related to a certain interface. You have to compile the extended agent with the new interface. It is simply straightforward.

In reply to drogoff:

The clean way is not to use virtual interfaces and instead use interface or abstract classes to access your interface. See Is interface mandatory to use? | Verification Academy

In reply to dave_59:

In reply to drogoff:
The clean way is not to use virtual interfaces and instead use interface or abstract classes to access your interface. See Is interface mandatory to use? - SystemVerilog - Verification Academy

Thanks Dave. I’ve found some online articles that describe this including John Aynsley’s great video ( https://www.youtube.com/watch?v=etmxjI2GTYA ) - where he credits you with helping come up with this. I’ve only been doing UVM for a few months so this is on the bleeding edge of my understanding. I’ll have to play with the code examples to really see what’s going on. It would be nice not to go through all the headaches of matching the set and gets of parameterized interfaces to include the parameter overrides. As the video points out, it can require modifying many files and tying the environment to particular instances.

David