title: Reuse the same function in 2 Verilog modules
body: <p>I have a function <code>f()</code>, defined in a Verilog module, <code>M1</code>. I would like to reuse this same function in a different module, <code>M2</code>.</p>
  <p>Is there anyway of doing this without redefining the function in <code>M2</code>?</p>
  <pre><code>  --- M1.v ---
    module M1();
       function f;
          //do stuff
       endfunction
    endmodule
  
    --- M2.v -----
    module M2();
    // Use f() here
    endmodule
  </code></pre>