title: Hierarchical paths to access local variables in bind files?
body: <p>It's a common methodology to keep assertions, cover points, etc. separate from the design by putting them in a separate module or interface, and use <code>bind</code> to attach them to the design, e.g.,</p>
  <pre><code>module foo (input a);
    wire b = a;
  endmodule
  
  interface foo_assertions (input a, b);
    initial #1 assert (b == a);
  endinterface
  bind foo foo_assertions i_foo_assertions(.*);
  </code></pre>
  <p>One problem with this is that it requires maintenance of the port list in <code>foo_assertions</code>. However, if <code>foo</code> has a <code>bar</code> submodule, signals inside <code>bar</code> can be accessed conveniently using hierarchical references in the assertions file relative to <code>foo</code>, e.g., <code>assert (i_bar.sig == a)</code>.</p>
  <p>Is there a way to use the hierarchical path syntax for accessing variables declared directly in <code>foo</code> as well, eliminating the need for the port list in <code>foo_assertions</code>? Note that <code>foo</code> is not necessarily the top-level module, so <code>$root.b</code> will not work. It looks like <code>foo.b</code> works, however is this safe when multiple instances of <code>foo</code> exist at the top level?</p>