Help with XN XConnect between an L16 and U8 to use the USB

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Redrat
Member++
Posts: 20
Joined: Wed Feb 04, 2015 10:14 am

Help with XN XConnect between an L16 and U8 to use the USB

Post by Redrat »

Hi,

I'm having trouble with an XN for the custom board, I've searched the forums for a solution but couldn't find one so apologies if this has been answered before(and apologies if this is posted in the wrong place).

So I'm using a custom board with an L16A-128-QF124 and an U8A-64-FB96 in the following layout.

Code: Select all

SPI Flash
   |
[node0] <--LINK--> [node1] <LA--LINK--LB> [node2] 

|________________________|                |_____|       
           |                                 |
          L16                                U8
This has worked fine for basic I/O functions and such but I've been wanting to start experimenting with the USB features of the U8 and USB demos XMOS provides.
I modified the XN I have with the following lines taken from the standard U8 XN:

Code: Select all

<Declaration>tileref usb_tile</Declaration>

Code: Select all

<Node Id="3" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile">
          			<Service Proto="xs1_su_adc_service(chanend c)">
            			<Chanend Identifier="c" end="2" remote="31"/>
          			</Service>
        		</Node>

Code: Select all

<Link Encoding="5wire">
      <LinkEndpoint NodeId="2" Link="XLH" Delays="52clk,52clk"/>
      <LinkEndpoint NodeId="3" Link="XLC" Delays="1clk,1clk"/>
    </Link>

Code: Select all

<JTAGDevice NodeId="3" />
But this causes the error: Error: XN11049 Network positioning failed (unsupported topology).
Attached is the full XN.

I'm at a complete lose as to what's wrong and would appreciate any help or tips.

Thanks,
Red.
You do not have the required permissions to view the files attached to this post.


User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Best starting point for you is to look at the XN file in the following workspace:

http://www.xcore.com/questions/2226/how ... sing-links

The XN file shows platform information to connect DJ kit(U8) with sliceKIT-L16 using links.
User avatar
Redrat
Member++
Posts: 20
Joined: Wed Feb 04, 2015 10:14 am

Post by Redrat »

Hi Sethu,

Thanks, I had found that before but it doesn't really help me. I've managed to link the U8 and L16 with the attached XN. But to use XUD library with the U8, as I understand it, I needed to add the lines I mentioned in my first post, and the example you provided doesn't show how to setup/link the USB/ADC.

I believe it's the following link that's causing me trouble:

Code: Select all

<Link Encoding="5wire">
      <LinkEndpoint NodeId="2" Link="XLH" Delays="52clk,52clk"/>
      <LinkEndpoint NodeId="3" Link="XLC" Delays="1clk,1clk"/>
    </Link>
The USB/ADC node is meant to link with the tile node on the same package, yes?
You do not have the required permissions to view the files attached to this post.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Okay, I undertand what the issue is now. When you specify the link configuration in the XN file, the xTIMEcomposer tools generates the routing table automatically and writes the routing information into the switch. So, the kind of topologies supported by the tools are limited.

The topology which you have specified in the XN file is not supported by tools be default.

But, you can achieve the topology you want by specifying the routing information manually in the XN file.

Have a look at the following link on how to specify routing information manually in XN file:

https://www.xmos.com/support/xtools/doc ... 20and%20XN

Hope this helps.
User avatar
Redrat
Member++
Posts: 20
Joined: Wed Feb 04, 2015 10:14 am

Post by Redrat »

Hi Sethu,

Thanks, that was help full. Though I'm a bit sketchy on bits.
I've got it to compile but it won't run: 'First stage multi-node boot failed, please check XN file and Xmos link connectivity'

I'm guessing the following for the U8 node is wrong:

Code: Select all

<RoutingTable>
  <Bits>
    <Bit number="0" direction="0"/>
    <Bit number="2" direction="0"/>
  </Bits>
  <Links>
    <Link name="XLH" direction="0"/>
    <Link name="XLB" direction="0"/>
  </Links>
</RoutingTable>
You do not have the required permissions to view the files attached to this post.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Not 100% sure. But, I think the following :

Code: Select all

<Link Encoding="5wire">
          <LinkEndpoint NodeId="2" Link="XLH" Delays="52clk,52clk"/>
          <LinkEndpoint NodeId="usbTile" Link="XLC" Delays="1clk,1clk"/>
        </Link>
should be

Code: Select all

<Link Encoding="5wire">
          <LinkEndpoint NodeId="2" Link="XLC" Delays="52clk,52clk"/>
          <LinkEndpoint NodeId="usbTile" Link="XLC" Delays="1clk,1clk"/>
        </Link>
User avatar
Redrat
Member++
Posts: 20
Joined: Wed Feb 04, 2015 10:14 am

Post by Redrat »

That causes :Error: XN11188 Network configuration is not fully routable (can't route from node "2" to node "0")

which if I ignore and try to compile again it succeeds but then throws: 'First stage multi-node boot failed, please check XN file and Xmos link connectivity' when I try to run it...
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Did you try running xrun -l command to see if the JTAG is showing the device correctly?

You should see something like this:

ID Name Adapter ID Devices
-- ---- ---------- -------
0 XMOS XTAG-2 RxU4-FgA L[0..2]

Also, can you check if your mode pins are configured correctly for both the devices?

Which version of the tool are you using?
User avatar
Redrat
Member++
Posts: 20
Joined: Wed Feb 04, 2015 10:14 am

Post by Redrat »

ID Name Adapter ID Devices
-- ---- ---------- -------
0 XMOS XTAG-2 PS9tWsX2 L[0..2]


The L16's boot mode pins are connected to the xtag's TRST_N:JTAG Test Reset pin, the rest are pulled down.
The U8's boot mode pins are pulled down.

Since I've had basic led flash programs flashing leds from both devices surely the boot mode is correct?

Tools version is Community_13.2.0
User avatar
Redrat
Member++
Posts: 20
Joined: Wed Feb 04, 2015 10:14 am

Post by Redrat »

Hi,
just to update on progress with this problem.

The attached xn with the scope removed will compile without fault, but when I attempt to run it with a simple led flash code I get : xrun: First stage multi-node boot failed, please check XN file and Xmos link connectivity

If I remove the usb elements (the node, link and jtag device) from the xn, the leds flash from all 3 tiles no problem.

Also, I was mistaken about the mode pins I mentioned in my previous post, they are;
for the L16:
MODE 1:0 = 10 Clock 48Mhz Core 400Mhz
MODE 4:2 = 011 Tile 0 Boot from SPI, Tile 1 from CHAN0 VIA Tile 0
3 and 2 are connected to pin 3 on the xSYS header
and for the U8:
MODE 1:0 = 10 Clock 48Mhz Core 400Mhz
MODE 3:2 = 10 Boot xConnect Link B
3 is connected to pin 3 on the xSYS header
You do not have the required permissions to view the files attached to this post.