天天看点

how does Interface Wrapper promote re use / ease of use of interface class

My question is how does it help / add value to have the virtual interface in a wrapper class and initialize / configure using vmm_opts related code ?

In summary , how does Interface Wrapper promote re use / ease of use of interface class ?

Currently, systemverilog interfaces are not extensible.

Therefore once you have picked one you are stuck and cannot modify it/add a signal/ change a signals defualt value etc.

If you embed the interface within a wrapper-class you canuse the factory to select which wrapper-class you use.

and each wrapper class can have a different interface embedded within it.

Thus, you get better reuse.

There are several alternatives such as passing the interface to all objects that require them at time of construction, allowing you to pass a different interface as a class-parameter.

or use a lookup table where you store the interface and the objects get the interface from the look-up table and yuo can control the interface that is set in the lookup table.

etc

继续阅读