Page 1 of 1

Dynamic channel connecting

Posted: Fri May 18, 2018 9:45 am
by MarcAntigny
Hi all,

Working on a tile of xCORE-200, I am making a chain of threads to process samples, dynamically creating/suppressing threads. But I couldn't find how to dynamically change the channels connected to a thread.
The initial chain of threads is :
Image
What I want to do is :
Image
Creating a new thread (Thread 2') and a new chan (Channel 3) is ok but I can't pass the new channel to thread 2 to connect thread 2' and 2. I tried using global chan array but the xC rules doesn't allow it (even for reading only the channel in the array).
If someone did it or know if there is a tricky way to do it, let me know.
Thanks for your hints,

Marc

Re: Dynamic channel connecting

Posted: Fri May 18, 2018 12:06 pm
by mon2
Hi. No direct experience with your requirement but have a look at section 1.2 of this document.

https://www.xmos.com/support/libraries/lib_xcore_c


Image

Hope it helps.

Re: Dynamic channel connecting

Posted: Fri May 18, 2018 2:48 pm
by MarcAntigny
Hi mon,
Yes it could be useful, thanks. However I use select and inuint_byref in the thread (1, 2' and 2), do you think it will work with C library ?
I'll give it a try, and I'll let you know.

Thanks again,
Marc