Dual boot or dynamic thread count

Technical questions regarding the XTC tools and programming with XMOS.
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Dual boot or dynamic thread count

Post by mmar »

Hello.
I need help with use thread count on one tile dynamicly.

If my code need more as 4 cores , then speed go down, but after make some operations, i can revert to low count of used cores.

How this write to main code?

par {
1.
2.
3.
4.
if(need5) 5.
if(need6) 6.
if(need7) 7.
if(need8) 8.
}

I understand this syntax is unusable, but in core code 5,6,7,8 i need use an select or other for stop use this thread. But how method to stop is best?
Is wait for channel data best method? I need complete stop round robin multitask for this core and revert cores 1-4 to max speed.
Second question is how to stop or pause XUD? (dont have source code)
When RST for usb is active , is too XUD core stopped?(dont use speed of core?)


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

Post by lilltroll »

Both a waiting channel or a select will pause the thread (as long as you do not use the "fast thread" syntax before a function) and only the active threads will be given a timeslot on the ALU.

If only one event can happen you can use a waiting channel (or a waiting timer). If several different event can happen, use the select syntax.
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

Thanks for info,but

how i can pause or stop XUD usb thread if not used (is stopped when rst usb) ?