Difference between API and Virtual Interface

,

I am working with UVM BFM and I saw that communication between TB agent and Abstract(Concrete) BFM Class is through API, My question is What is the difference between API and Virtual interface? Can we replace API with Virtual interface?

In reply to meeteedesai:

They are two different approaches of addressing the same problem. Which one you choose may depend on what you are more comfortable with, and what code already exists. See Updated Example Code from DVCon Paper: The Missing Link: The Testbench to DUT Connection | Verification Academy

In reply to dave_59:

Thanks Dave, It helped a lot to understand the connection between abstract class and Agent.