Manually specify xCONNECT link network routing

To route messages across the xCONNECT Link network, the routing ID and routing table of each node on the network must configured. In most cases the tools will configure the network automatically based on the network topology described in the XN file, but if the tools cannot automatically route the network you can specify the network configuration manually. See Describe a target platform for a list of which topologies that can be automatically routed by the tools.

Add a network configuration to a XN file

The XN file format lets you optionally specify the network configuration to use with the target device. If the target device has a network topology that can’t be automatically routed by the xTIMEcomposer tools you must specify the network configuration in the XN file. You can add the network configuration as follows:

  1. Add the RoutingId attribute to each Node element:
    <Node Id="0" InPackageId="0" Type="XS1-L8A-64" SystemFrequency="500MHz" RoutingId="1">
    
  2. Add a RoutingTable element to each Node element:
    <RoutingTable>
      <Bits>
        <Bit number="0" direction="1"/>
      </Bits>
      <Links>
        <Link name="XLB" direction="1"/>
      </Links>
    </RoutingTable>
    

The tools use this information to generate code that sets up the following control registers before your application runs:

  • Switch node identifier
  • Direction registers
  • Link direction field of the link status, direction, and network control register

See xCONNECT Architecture for a description of the xCONNECT interconnect.

When an XN file containing a network configuration is passed to the xTIMEcomposer tools, they check the network configuration is fully routable, i.e. they check it is possible to route a packet between every pair of nodes on the network. Routing problems are reported as errors.

Use xntools to annotate a XN file with routing information

If no network configuration is present in the XN file the xTIMEcomposer tools automatically choose a suitable set routing IDs and routing tables based on the network topology. To inspect this network configuration you can use the command line utility xntools to write it to the XN file.

  1. Start the command-line tools
  2. Run the following command:

    xntools –add-routing target.xn

Example XN (Two XS1-L8-64 devices).

See Example XN with custom routing information. for an example XN file for a network of two XS1-L8-64 devices.

Example XN with custom routing information.
<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xmos.com">
  <Declarations>
    <Declaration>tileref tile[2]</Declaration>
  </Declarations>
  <Packages>
    <Package id="0" Type="XS1-LnA-64-TQ128">
      <Nodes>
        <Node Id="0" InPackageId="0" Type="XS1-L8A-64" SystemFrequency="500MHz" RoutingId="1">
          <Tile Number="0" Reference="tile[0]"/>
          <RoutingTable>
            <Bits>
              <Bit number="0" direction="1"/>
            </Bits>
            <Links>
              <Link name="XLB" direction="1"/>
            </Links>
          </RoutingTable>
        </Node>
      </Nodes>
    </Package>
    <Package id="1" Type="XS1-LnA-64-TQ128">
      <Nodes>
        <Node Id="1" InPackageId="0" Type="XS1-L8A-64" SystemFrequency="500MHz" RoutingId="0">
          <Tile Number="0" Reference="tile[1]"/>
          <RoutingTable>
            <Bits>
              <Bit number="0" direction="0"/>
            </Bits>
            <Links>
              <Link name="XLB" direction="0"/>
            </Links>
          </RoutingTable>
        </Node>
      </Nodes>
    </Package>
  </Packages>
  <Links>
    <Link Encoding="5wire" Delays="0,1">
      <LinkEndpoint NodeId="0" Link="XLB"/>
      <LinkEndpoint NodeId="1" Link="XLB"/>
    </Link>
  </Links>
  <JTAGChain>
    <JTAGDevice NodeId="0"/>
    <JTAGDevice NodeId="1"/>
  </JTAGChain>
</Network>