Properties encapsulation

Hello,

can anyone please explain to me when we need to encapsulate properties inside a module and when we need to encapsulate them inside an interface? What are the differences between the two methods?

Thank you in advance.

In reply to hamza:

You put your properties near the signals you want to check. Really you mean assertions, not just properties; you can put properties in a package and import the package.

Most assertions come from requirements with standard interfaces around your design periphery, so that’s where you see them the most. Putting assertions inside the interface make a convenient bundle.

But when it comes to design modules, projects want to keep the design and verification code separate. That’s where the bind construct comes into play. You can encapsulate your assertions into a separate module, and use the bind construct for insertion into the design module without modifying it.

In reply to dave_59:

Thank you Dave.