I have a xCORE-200 Multichannel Audio Platform that I have been experimenting with. I am progressively building USB demos targeting different hardware by modifying the XUE216-512-TQ128-C20.xn file (since this board is based on the XE216-512-TQ128) to meet my needs. I can get these demos to compile and run, which is fine. However, I am still struggling to understand the concept of how xConnect and xLinks work both in general and when it comes to communicating to the USB PHY.
Here is my current XN:
Code: Select all
<?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 http://www.xmos.com">
<Type>Device</Type>
<Name>XUE216-512-TQ128-C20 Device</Name>
<Declarations>
<!-- <Declaration>tileref tile[2]</Declaration>
<Declaration>tileref usb_tile</Declaration> -->
<Declaration>tileref tile[2]</Declaration>
<Declaration>tileref usb_tile</Declaration>
</Declarations>
<Packages>
<Package id="0" Type="XS2-UnA-512-TQ128">
<Nodes>
<!--
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" SystemFrequency="500MHz" OscillatorSrc="1">
<Tile Number="0" Reference="tile[0]"/>
<Tile Number="1" Reference="tile[1]"/>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile">
</Node> -->
<Node Id="0" InPackageId="0" Type="XS2-L16A-512">
<Tile Number="0" Reference="tile[0]"></Tile>
<Tile Number="1" Reference="tile[1]">
<!--
<Port Location="XS1_PORT_4B" Name="PORT_BUTTONS"></Port>
<Port Location="XS1_PORT_4C" Name="LED_ROWS"></Port>
<Port Location="XS1_PORT_4D" Name="LED_COLUMNS"></Port>
-->
</Tile>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz"></Node>
</Nodes>
<Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>
<JTAGChain>
<JTAGDevice NodeId="0"/>
</JTAGChain>
</Network>
If I comment out this section:
Code: Select all
<Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
OK, makes sense. If I have more than one Node, I need to specify a link to route data between them...\.\XUE216-512-TQ128-C20.xn: Error: XN11188 Network is not fully connected (no route from node "0" to node "1")
Now, if I additionally comment out this section of the XN:
Code: Select all
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz"></Node>
So this experimentation shows me that the USB tile is to be treated as a separate, isolated tile under its own Node. In order to use it, we must establish an xLink between the Nodes (general purpose tiles <---> usb_tile). So I went and read several XMOS documents (xConnect Architecture, XS-1 System Specification, XN Specification, xTIMEcomposer User Guide, the datasheet for this chip, the hardware manual for this platform, and lots more) and while I understand the concept of xConnect and xLinks, I just cant grasp how they are actually implemented and used.
For this specific application, the links defined by the XN connect the USB PHY to the 2 general purpose tiles:
Code: Select all
Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
I read that there are internal xLinks which can be used for communication within a chip and external xLinks that have external pins that can be used to talk to other xCore chips and/or devices. Are the links in this XN internal xLinks?
I searched throughout the source code of the project and XUD library to see if there were any referenced to these xLinks and how the pass data to each other but couldn't find anything helpful.
Any guidance will be very much appreciated!!