Hi all.
I’m looking through the uvm-cookbook, and i don’t understang what is a wrapper and how should it be properly used. Can anyone explain it to me, or give a link to an article with explanation?
Thank you=)
There are many different kinds of “wrappers” used in programming. In it used whenever you want or need to delegate access to a particular object. It is also sometimes called the Adapter Design Pattern in object-oriented programing.
The uvm_config_db is a wrapper class that provides standardized access to variables of any type into a configuration database using a common set/get API. In this case, a wrapper object is used as a container that holds a handle to the config object. The config object is a class member of the wrapper object.
The UVM factory use wrapper as lightweight proxies for another class type. I co-authored a DVCon paper the concepts behind the UVM factory wrapper.
A wrapper might a module containing another module. See https://verificationacademy.com/cookbook/dualtop
In reply to dave_59:
Thanks a lot Dave…