<pb_type name="WE_MUX" num_pb="1">
  <input name="CE" num_pins="1"/>
  <input name="WE" num_pins="1"/>

  <output name="WE_OUT" num_pins="1"/>

  <interconnect>
    <mux name="WE_MUX" input="WE_MUX.CE WE_MUX.WE" output="WE_MUX.WE_OUT">
      <metadata>
        <meta name="fasm_mux">
          WE_MUX.CE = WEMUX.CE
          WE_MUX.WE = NULL
        </meta>
      </metadata>
    </mux>
  </interconnect>
  
  <metadata>
    <meta name="type">bel</meta>
    <meta name="subtype">routing</meta>
  </metadata>
</pb_type>


<pb_type name="WE_MUX" num_pb="1">
  <input name="CE" num_pins="1"/>
  <input name="WE" num_pins="1"/>

  <!-- Insert another edge between WE and WE_OUT to increase it's cost.
      This nudges the pack router to prefer the CE connection, when possible.
    !-->
  <pb_type name="EXTRA_WE_EDGE" num_pb="1">
    <input name="WE" num_pins="1"/>
    <output name="WE_OUT" num_pins="1"/>

    <interconnect>
      <direct name="EDGE" input="EXTRA_WE_EDGE.WE" output="EXTRA_WE_EDGE.WE_OUT" />
    </interconnect>
  </pb_type>

  <output name="WE_OUT" num_pins="1"/>

  <interconnect>
    <direct name="WE_IN_TO_EDGE" input="WE_MUX.WE" output="EXTRA_WE_EDGE.WE" />
    <mux name="WE_MUX" input="WE_MUX.CE EXTRA_WE_EDGE.WE_OUT" output="WE_MUX.WE_OUT">
      <metadata>
        <meta name="fasm_mux">
          WE_MUX.CE = WEMUX.CE
          EXTRA_WE_EDGE.WE_OUT = NULL
        </meta>
      </metadata>
    </mux>
  </interconnect>

  <metadata>
    <meta name="type">bel</meta>
    <meta name="subtype">routing</meta>
  </metadata>
</pb_type>


Increase path length on lower priority path.
Increase path length on lower priority path.

CE path is preferred over the WE path.  By inserting another edge on the
WE path, this effectively increasing the cost of this path.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>
