Call same function from more cores Topic is solved

If you have a simple question and just want an answer.
tilde
Member++
Posts: 22
Joined: Fri Nov 07, 2014 9:03 am

Call same function from more cores

Postby tilde » Tue Sep 10, 2019 4:34 pm

Is it possible to call same function from two cores(, but on same tile)?

The function which I used is especially the function: db_to_mult() from xmos audio class tutorial on xc200_MC kit. Function db_to_mult() uses one global variable: static unsigned coef[14], which is used like a constant.
I call it from endpoint0 and buffer core, too. They are on same tile. I can compile it, it works, but I m afraid about stability.
With kind regards
Tilde
View Solution
User avatar
akp
Respected Member
Posts: 314
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Tue Sep 10, 2019 4:44 pm

This function will be fine. The global isn't modified so there's nothing to worry about. The two calls will run with completely separate context so it will work no problem. I would have used static unsigned const coef[14] or something like that just to make it clear.
tilde
Member++
Posts: 22
Joined: Fri Nov 07, 2014 9:03 am

Postby tilde » Wed Sep 11, 2019 8:16 am

Thanks!
With kind regards
Tilde

Who is online

Users browsing this forum: No registered users and 0 guests