Friday, 26 August 2016

Callback vs Factory in UVM

Callbacks and factory address different areas of re-usability.

Callback: Add functionality to existing logic.

Factory: Change the existing component before build, keeps environment same.

Although the callback and factory can be interchangeably used to address the same problem. Depending on the need and demand, a wise decision should be made while adopting either of the techniques as they have their own merits and demerits.



5 comments:

  1. In your callbacks example ,you are adding call back and then deleting ,same way we can achieve using factory right ?please let me know if i am wrong .
    1)In Test i will override driver with upd_driver ? i think this is possible .
    2)once the components are built ,can't i change upd_driver to driver in the same test ?

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Hi Sagar,

    Thanks for sharing valuable informarion..
    -Meghvendra

    ReplyDelete
  4. Nice Informative Blog having nice sharing.. https://verifications.io

    ReplyDelete