Programming Multiple XS1-L1s

Technical questions regarding the XTC tools and programming with XMOS.
snoopy
Member++
Posts: 28
Joined: Wed Dec 01, 2010 5:46 pm

Programming Multiple XS1-L1s

Post by snoopy »

I am trying to develop a system using multiple XK-1s for scalability and wanted some feedback on implementation.

This is the basic idea (sorry for the shoddy ASCII art)

Code: Select all

                                       [           SINGLE BOARD              ]
    [    ]       ( USB Comms  ) XLINKS [   ( HANDLES    )  (COMMS WITH (1) ) ]
    [ PC ]---USB-(            )========[=( SOME OUTPUTS )==(  SOME OUTPUT  )=] POSSIBLE EXPANSION
    [    ]       ( XS1-L1 (0) )        [ (  XS1-L1 (1)  )  (    XS-L1 (2)  ) ] WITH MORE XS1-L1s
                                       [                                     ]
                                    
    == are XLINKS



EDIT: Had to put ASCII art in code form otherwise it falls apart :/

My question is in terms of programming them. Would it be more sensible to program then individually and then communicate using regular ports?

Or would I be better off programming a master chip with the whole set of functions and then the other XS-L1s all boot from it and communicate through the X-Links? (the board assumes this arrangement) The xn file would be a nightmare!

The goal is also to make it expandable but without editing the source too much...

Opinions?

Jake


User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

I'd use XLinks - the kind of application you describe is exactly why the inter-chip links exist. Writing a suitable XN file shouldn't be too much of a problem... a little pain getting the right links connected up will pay dividends when you come to program.

You'll be able to write a single program that distributes the threads over all the cores or replicate the same function several times. It's as easy as writing a program for a single chip with multiple cores but each 'stdcore' is on another chip:

e.g.

Code: Select all

on stdcore[0]: { some function } // Chip 1
on stdcore[1]: { some other function } // Chip 2
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Post by leon_heller »

The XK-1 demos on the XMOS web site include an application using two XK-1s connected by XLInks.
snoopy
Member++
Posts: 28
Joined: Wed Dec 01, 2010 5:46 pm

Post by snoopy »

Ye I've had a look at the implementations of XK-1's. I've currently got 3 xk-1s set up and setting 1 to master and the rest to slave.

I just wasn't sure if it was feasible for scalability as I would have to edit both source and xn files every time I make a change to system.

Thanks for the input though :)

Appreciate the advice :D