XC-1A one master - several slaves

Technical questions regarding the XTC tools and programming with XMOS.
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

XC-1A one master - several slaves

Post by cicga »

HI all,

is it possible to write a process on XC-1a board so that one thread will control execution of several threads?
what process need is - after one thread calculate data - play this data in parallel from different ports.

something like - one thread sending pulse train onto several other threads and pulse train is used by other threads like a clock pulses for sending data out. it cannot be a clocked port - process need only pulse trains
of specific length and frequency that can be changed on fly


thx


User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

cicga wrote:HI all,

is it possible to write a process on XC-1a board so that one thread will control execution of several threads?
what process need is - after one thread calculate data - play this data in parallel from different ports.

something like - one thread sending pulse train onto several other threads and pulse train is used by other threads like a clock pulses for sending data out. it cannot be a clocked port - process need only pulse trains
of specific length and frequency that can be changed on fly


thx
What about sending control tokens over channels to the other threads in a tree or ring structure.
An alternative is to use a word in the SRAM if it is on the same Core or use the registers in the Switch. It is the switch that holds the registers bits if a thread is running or paused anyway.
Probably not the most confused programmer anymore on the XCORE forum.
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

Post by cicga »

hi lilltroll

using registers in the switch - thats sounds interesting. could you pls point me where I can find more info about how to use switches?
thx
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

cicga wrote:hi lilltroll

using registers in the switch - thats sounds interesting. could you pls point me where I can find more info about how to use switches?
thx
Check out all read/write macros in <xc1.h> which contains sswitch and pswitch
Probably not the most confused programmer anymore on the XCORE forum.