title: Connect different port width
body: <p>Suppose my module has a 8-bit input and 8-bit output</p>
  
  <pre><code>module MyModule (input logic [7:0] in, output logic [7:0] out);
      ...
  endmodule : MyModule
  </code></pre>
  
  <p>If I want to connect a 1-bit input in and leave the other bits as zero, the following works:</p>
  
  <pre><code>MyModule (.in({7'b0, a}), .out(b))
  </code></pre>
  
  <p>How can I do the same if I want a 1-bit output, ignoring the other bits? Something like this</p>
  
  <pre><code>MyModule (.in(a), .out({7'b0, b}))
  </code></pre>
  
  <p>vcs says its invalid, and connecting <code>b</code> directly gives a warning. I'd ideally like a solution that doesn't throw warnings. </p>
  
  <p>Here's what I've thought of:</p>
  
  <ul>
  <li>Use <code>.out(b)</code> and use <code>b[0]</code> for bit</li>
  <li>Create unused logic variable <code>unused</code> and use <code>.out({unused, b})</code> which does work</li>
  <li>Use <code>assign</code> statment (I'd like to avoid this)  </li>
  </ul>
  
  <p>Any solution better than these?</p>