Sending chanends around is the way interfaces work.
If you compiler some code you can see it happening.
The client gets a chanend to the server.
It dynamically creates a chanend and passes its ID down the server's chanend.
The server now has a reply chanend to that client and non of the others.
When done, the client frees it's chanend.
The channends are 'connected' dynamically - there is no permanent channel (although streaming channels keep the connection live during their lifetime).
I would take the asm and wrap it in appropriate functions (inline?).
The https://www.xmos.com/download/private/x ... 1.1%29.pdf
alongside (simple) client interface asm output should give you enough information.
Channel Array Use
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
-
- Active Member
- Posts: 61
- Joined: Tue Feb 13, 2018 2:50 pm
Yes, I was investigating on interface at the same time but I didn't know that it is possible to use inline assembly to work with.
First I'll try with interface arrays (which exist cf this note https://www.xmos.com/download/private/a ... 0.a%29.pdf)
And if it is not enough I'll take a look at an asm version.
Thanks robert.
First I'll try with interface arrays (which exist cf this note https://www.xmos.com/download/private/a ... 0.a%29.pdf)
And if it is not enough I'll take a look at an asm version.
Thanks robert.
-
- Active Member
- Posts: 61
- Joined: Tue Feb 13, 2018 2:50 pm
So I tried using interface array and... "interface used as both client and server in one task". The compiler is assuming again that the index could be all of the values in the indexData array (even it won't on runtime) so it raises an error.
Interface are not an easier way to achieve what I want, it doesn't work.
I gave a look at asm for communications but there is really few examples. If anybody as a clue on how to use it, it would be really welcomed.
Interface are not an easier way to achieve what I want, it doesn't work.
I gave a look at asm for communications but there is really few examples. If anybody as a clue on how to use it, it would be really welcomed.
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
I would create an easy interface and look at the output assembler (-save-temps).
Compare this will the getr and freer instructions in the architecture document.
Compare this will the getr and freer instructions in the architecture document.