How do you bind to all instances of a module when the module may not exist?

We have a bind that binds to all instances of a module. In configurations where at least 1 instance exists, everything appears to bind correctly. In configurations where no instances exist, we get the following error. The module name in this example is abcd.

  • “Failed to find ‘abcd’ in hierarchical name abcd”

We’re trying to avoid having to bind to each instance manually or adding `ifdef around the bind.

However you decide if at least one target instance exists, that decision needs to be applied to the existence of thebind statement.

Thank you for the help!

Do you know if there is a suggested way to determine if at least 1 instance exists?

How did your compilation script determine to include at least one instance?

It doesn’t. We compile them regardless of whether they will get instantiated.