Chaining XK-1As and AVB reference end point

Technical questions regarding the XTC tools and programming with XMOS.
ashleyb
Member
Posts: 14
Joined: Sun Dec 20, 2009 1:08 am

Chaining XK-1As and AVB reference end point

Post by ashleyb »

Hi All,
I'm trying to chain together 2 XK-1As and an AVB reference board via the XSYS connectors. The setup I have is XTAG2->XK-1A->XK-1A->AVB. I want the setup to boot from the SPI flash on AVB board. I created a custom XN file for this setup, the code compiles but I can't get it to run. At the moment it is just a copy of the app_17221_device from the sw_avb repository with the xlog server moved to the XK-1 nearest the XTAG2.

Can anyone see anything wrong with my XN file which would cause this?

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>XR-AVB-LC-BRD</Name>
  <!-- Board Version 1V0 -->
  <!-- File Version 1V0 -->

  <Declarations>
    <Declaration>core stdcore[4]</Declaration>
  </Declarations>

  <Packages>
    <Package id="0" Type="XS1-L1A-TQ128">
      <Nodes>
        <Node Id="2" InPackageId="0" Type="XS1-L1A" Oscillator="20MHz" SystemFrequency="400MHz">
          <Boot>
            <Source Location="XMOSLINK"/>
         </Boot>
          <Core Number="0" Reference="stdcore[2]">
            <Port Location="XS1_PORT_1I" Name="PORT_UART_RX"/>
            <Port Location="XS1_PORT_1J" Name="PORT_UART_TX"/>
    
            <Port Location="XS1_PORT_1K" Name="PORT_BUT_1"/>
            <Port Location="XS1_PORT_1L" Name="PORT_BUT_2"/>
    
            <Port Location="XS1_PORT_1M" Name="PORT_SPI_MISO3"/>
            <Port Location="XS1_PORT_1N" Name="PORT_SPI_SS3"/>
            <Port Location="XS1_PORT_1O" Name="PORT_SPI_CLK3"/>
            <Port Location="XS1_PORT_1P" Name="PORT_SPI_MOSI3"/>

            <Port Location="XS1_PORT_4F" Name="PORT_LED"/>
          </Core>
        </Node>
      </Nodes>
    </Package>
    <Package id="0" Type="XS1-L1A-TQ128">
      <Nodes>
        <Node Id="3" InPackageId="0" Type="XS1-L1A" Oscillator="20MHz" SystemFrequency="400MHz">
          <Boot>
            <Source Location="XMOSLINK"/>
          </Boot>
          <Core Number="0" Reference="stdcore[3]">
            <Port Location="XS1_PORT_1I" Name="PORT_UART_RX2"/>
            <Port Location="XS1_PORT_1J" Name="PORT_UART_TX2"/>
    
            <Port Location="XS1_PORT_1K" Name="PORT_BUT_12"/>
            <Port Location="XS1_PORT_1L" Name="PORT_BUT_22"/>

            <Port Location="XS1_PORT_4F" Name="PORT_LED2"/>
          </Core>
        </Node>
      </Nodes>
    </Package>
    <Package id="L2" Type="XS1-L2A-QF124">
  <Nodes>
    <Node Id="0" InPackageId="0" Type="XS1-L1A" Oscillator="25Mhz" SystemFrequency="500MHz">
      <Boot>
        <Source Location="SPI:bootFlash"/>
 	        <Bootee NodeId="2"/>
 	        <Bootee NodeId="3"/>
	        <Bootee NodeId="1"/>
      </Boot>
      <Core Number="0" Reference="stdcore[0]">
        <!-- SPI FLASH -->
		<Port Location="XS1_PORT_1A" Name="PORT_SPI_MISO"/>
		<Port Location="XS1_PORT_1B" Name="PORT_SPI_SS"/>
		<Port Location="XS1_PORT_1C" Name="PORT_SPI_CLK"/>
		<Port Location="XS1_PORT_1D" Name="PORT_SPI_MOSI"/>
	
		<!-- I2S -->
		<Port Location="XS1_PORT_1E" Name="PORT_SYNC_OUT"/>
		<Port Location="XS1_PORT_1F" Name="PORT_SCLK"/>
		<Port Location="XS1_PORT_1G" Name="PORT_SDATA_OUT0"/>
		<Port Location="XS1_PORT_1H" Name="PORT_SDATA_OUT1"/>
		<Port Location="XS1_PORT_1I" Name="PORT_SDATA_OUT2"/>
		<Port Location="XS1_PORT_1J" Name="PORT_SDATA_OUT3"/>
		<Port Location="XS1_PORT_1K" Name="PORT_MCLK"/>
		<Port Location="XS1_PORT_1L" Name="PORT_LRCLK"/>
		<Port Location="XS1_PORT_1M" Name="PORT_SDATA_IN0"/>
		<Port Location="XS1_PORT_1N" Name="PORT_SDATA_IN1"/>
		<Port Location="XS1_PORT_1O" Name="PORT_SDATA_IN2"/>
		<Port Location="XS1_PORT_1P" Name="PORT_SDATA_IN3"/>
		
		<!-- SHARED -->
		<Port Location="XS1_PORT_4C" Name="PORT_SHARED_A"/>
		<Port Location="XS1_PORT_4D" Name="PORT_SHARED_B"/>
		
		<!-- UART -->
		<Port Location="XS1_PORT_4E" Name="PORT_UART_RX3"/>
		<Port Location="XS1_PORT_4F" Name="PORT_UART_TX3"/>
		  </Core>
		</Node>
		<Node Id="1" InPackageId="1" Type="XS1-L1A" Oscillator="25Mhz" SystemFrequency="500MHz">
		  <Boot>
			<Source Location="XMOSLINK"/>
		  </Boot>
		  <Core Number="0" Reference="stdcore[1]">
			<!-- ETHERNET -->
		<Port Location="XS1_PORT_1A" Name="PORT_ETH_RXCLK"/>
		<Port Location="XS1_PORT_1B" Name="PORT_ETH_RXER"/>
		<Port Location="XS1_PORT_1C" Name="PORT_ETH_TXCLK"/>
		<Port Location="XS1_PORT_1D" Name="PORT_ETH_RXDV"/>
		<Port Location="XS1_PORT_1E" Name="PORT_ETH_TXEN"/>
		<Port Location="XS1_PORT_1G" Name="PORT_ETH_MDIO"/>
		<Port Location="XS1_PORT_1H" Name="PORT_ETH_RSTN"/>
		<Port Location="XS1_PORT_1I" Name="PORT_ETH_MDC"/>
		<Port Location="XS1_PORT_4C" Name="PORT_ETH_RXD"/>
		<Port Location="XS1_PORT_4D" Name="PORT_ETH_TXD"/>
	
		<!-- SHARED & LEDS -->
		<Port Location="XS1_PORT_4A" Name="PORT_SHARED_IN"/>
		<Port Location="XS1_PORT_1F" Name="PORT_ADC_HEADER"/>
		<Port Location="XS1_PORT_4E" Name="PORT_SHARED_OUT"/>
		<Port Location="XS1_PORT_4F" Name="PORT_LEDS"/>
						
		<!-- I2C -->
		<Port Location="XS1_PORT_1K" Name="PORT_I2C_SDA"/>
		<Port Location="XS1_PORT_1L" Name="PORT_I2C_SCL"/>      
		  </Core>
		</Node>
	  </Nodes>
    </Package>
  </Packages>


  <Links>
    <Link Encoding="2wire" Delays="4,4">
      <LinkEndpoint NodeId="2" Link="1"/>
      <LinkEndpoint NodeId="3" Link="0"/>
    </Link>
    <Link Encoding="2wire" Delays="4,4">
      <LinkEndpoint NodeId="3" Link="1"/>
      <LinkEndpoint NodeId="0" Link="0"/>
    </Link>
    <!-- L2 Internal -->
    <Link Encoding="5wire" Delays="0,1">
      <LinkEndpoint NodeId="0" Link="4"/>
      <LinkEndpoint NodeId="1" Link="7"/>
    </Link>
    <Link Encoding="5wire" Delays="0,1">
      <LinkEndpoint NodeId="0" Link="5"/>
      <LinkEndpoint NodeId="1" Link="6"/>
    </Link>
    <Link Encoding="5wire" Delays="0,1">
      <LinkEndpoint NodeId="0" Link="6"/>
      <LinkEndpoint NodeId="1" Link="5"/>
    </Link>
    <Link Encoding="5wire" Delays="0,1">
      <LinkEndpoint NodeId="0" Link="7"/>
      <LinkEndpoint NodeId="1" Link="4"/>
    </Link>
  </Links>

  <ExternalDevices>
    <Device NodeId="0" Core="0" Class="SPIFlash" Name="bootFlash" Type="winbond_25x40">
      <Attribute Name="PORT_SPI_MISO" Value="PORT_SPI_MISO"/>
      <Attribute Name="PORT_SPI_SS"   Value="PORT_SPI_SS"/>
      <Attribute Name="PORT_SPI_CLK"  Value="PORT_SPI_CLK"/>
      <Attribute Name="PORT_SPI_MOSI" Value="PORT_SPI_MOSI"/>
    </Device>
  </ExternalDevices>

  <JTAGChain>
     <JTAGDevice NodeId="2"/>
     <JTAGDevice NodeId="3"/>
     <JTAGDevice NodeId="0"/>
     <JTAGDevice NodeId="1"/>
  </JTAGChain>
 
</Network>
Thanks

Ashley


User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

Make sure you are using the 'c' rev of the XK1 as versions before that have incompatible SYS extension connectors. Otherwise you will need to put an adaptor in between the last XK1 and the AVB board to correct the Xmos Link connections.

some more info here :
XK-1 Adapter Dongle
XSYS XLINK Corrector(not tested)
XK-1 User group


regards
Al
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Folknology wrote:Make sure you are using the 'c' rev of the XK1 as versions before that have incompatible SYS extension connectors. Otherwise you will need to put an adaptor in between the last XK1 and the AVB board to correct the Xmos Link connections.

some more info here :
XK-1 Adapter Dongle
XSYS XLINK Corrector(not tested)
XK-1 User group


regards
Al
He's talking about XK-1A's so that shouldn't be a problem.

The XK-1A's are not bootable over XMOS Link (The XSYS headers are connected to link C and D; the XS1-L can only boot from link B).
ashleyb
Member
Posts: 14
Joined: Sun Dec 20, 2009 1:08 am

Post by ashleyb »

Thanks guys. I guess that means I am going to have to program each of them individually and then let them boot and connect to each other.

Is there any example code of showing how to setup links across devices which have individually booted?
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

This thread may be useful

regards
Al