chan variable be used in more than two parallel statements i Topic is solved

If you have a simple question and just want an answer.
Bayanaa
Active Member
Posts: 33
Joined: Fri Feb 07, 2014 3:03 pm

chan variable be used in more than two parallel statements i

Postby Bayanaa » Wed Mar 19, 2014 3:48 am

I have a DJ KIT board. Code is something like  below:

int main(){

streaming chan c_mix_out;

streaming chan c_out;

par

{

 on stdcore[0]:
     {
      func1(c_mix_out);
     }
on stdcore[0]:
     {
      func2(c_mix_out);
     }
 
on stdcore[0]:
     {
      func3(c_mix_out);
     }
}


}

But compiler says that: error: `c_mix_out' used in more than two parallel statements;

So I tried to assign c_mix_out to another variable and wanted to use something like below:

assign c_out  <:  c_mix_out ;

but compiler says: incompatible types in output

Any idea? What I missing?

View Solution
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Postby sethu_jangala » Wed Mar 19, 2014 6:08 am

Channels are used to communicate between two logical cores. You cannot have same channel end connected between more than two logical cores. If you need to communicate inforamtion from a core to more than one logical core, you need to have a seperate channels between each core. You cannot use same chan el to communicate between more than two logical cores because, it violates parallel usage rules. You will find mor einformation about channels in the following : https://www.xmos.com/en/published/how-stream-data-between-2-cores-over-channel


Who is online

Users browsing this forum: No registered users and 0 guests