The problem for me is the:paul wrote:In reply to your post here: https://www.xcore.com/forum/viewtopic.php?p=6589#p6589 (which says you didn't quite get your answer to your original question).
If you are using XC and not using streaming channels then it should do the arbitration for you. The only situation where it will look like this is not working is when you have a thread blocking because it is not receiving the data. The channel will remain open until the other end picks up the data.
Using these 'normal' channels (just declared using the chan and chanend types) you would see something like this on the producer and consumer sides respectively:
Code: Select all
outct res[r10], 0x1 chkct res[r10], 0x1 out r0, res[r10] outct res[r10], 0x1 chkct res[r10], 0x1
Obviously in between the outct and chkct's you can put as many in/outs as you want if you want to send multiple lumps of data - this is what a transaction does.Code: Select all
chkct res[r10], 0x1 outct res[r10], 0x1 in r0, res[r10] chkct res[r10], 0x1 outct res[r10], 0x1
This is all you should need for multiple channels across a single link. In fact if you are just using XC then this should all be transparent if you are not using streaming channels and your threads are taking data off their respective channels in time.
Hope that helps,
asm("setd res[%0],%1" ::"r"(Chanend),"r"((ServerCore<<16)+0x102));
It is only active with one channelend in the time, but I hope the last message is helping me.