Jump to content

Possible to use same Driver/Monitor code for multiple unique interfaces?

Recommended Posts

I have a DUT which will require multiple BFMs to handle the pin-wiggling of different sets of pins of the DUT. What I am wondering is whether it is possible to write just one driver class (monitor may be a different story), but then instantiate it for each of the BFMs. I have explored the technique of Polymorphic Interfaces to allow Drivers to hold a handle to the base abstract class for which each BFM interface will instantiate a "concrete" class inheriting from the abstract class in order to be type compatible. The uvm_config_db could be used to help each Driver "get" their respective "config", which will be set properly by the environment so that each Driver is talking with a different interface, but the same Driver code can be used for each instance of the agent. 
The goal of all of this is to make the agent/driver/monitor "generic" enough so that I don't have to write a new agent/driver/monitor class for each BFM. 
Assuming I can get the handle of the BFM to the Driver, then the only other problem to reconcile is how to send transactions. I could make every transaction (to all of the interfaces) a child of a parent "sequence_item" class so that the method could take in an entire Transaction of type "sequence_item" and then have each BFM cast the transaction to their child-type of sequence_item, but I don't know if BFMs are supposed to have the scope of sequence_items... In my case I would need the Driver to call the send_op() command and have each BFM override that command to process the incoming signals appropriately for their respective interface.
Is any of this possible?
I apologize if I have confused terms, please let me know if I can clarify what I mean on any of this.
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...