title: Assinging inout port to inout in both directions
body: <p>For simulation purposes, using Verilog, I would like to create a block that only has 2 inout ports (say left and right) and will be transmitting signals either from left to right or from right to left. It can be assumed that the block will be active only during the transition and will be waiting for inputs for the rest of the time. But I'm not allowed to use any other ports. So the module definition will be something like this in theory:</p>
  
  <pre><code>module blackbox(inout left, inout right)
    assign left = right;
    assign right = left;
  
    specify
      (left =&gt; (right:1'b1)) = 7;
      (right =&gt; (left:1'b1)) = 8;
    endspecify
  endmodule
  </code></pre>
  
  <p>Is there a solution for this?</p>
  
  <hr>
  
  <p>As a 2nd question, The problem can be simplified by determining the direction after the placement. For example, if the block placed in one location it will always transmit signal from left to right but in another location it can be from right to left. Would it be possible to somehow code this inside the module?</p>
  
  <p>Thanks,</p>