Link, Switch Question:

Technical questions regarding the XTC tools and programming with XMOS.
mark486
Newbie
Posts: 1
Joined: Mon Jan 31, 2011 9:06 pm

Link, Switch Question:

Post by mark486 »

Hi,
I modified the led-demo (XC-2). Send 44byte chanend on a Core3 to Core0, this takes ~2.6 microseconds! is it realistic? Is the max speed? -> ~15Mbyte/sek

is the internal link speed always equal to the external?
Somewhere there's sample-source-code to configure switch and link?

Mark


User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Hello,

The bandwidth between cores on a G4 is as large as the ISA can handle.
The speed between two different chips using XMOS Links is lower.

If you use XC and regular channels, data objects will be transmitted with a handshake.
This means that if you send over characters one by one (44 times) it will do a handshake for each character and thus have a large overhead (80% in that case). Try to redo your test with a streaming channel.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

You can also add the use of reinterpretation, e.g. allocate

unsigned data[11];

for(int i=0;i<44;i++)
(data,char [])='0'+i; //reinterpret data as a char[]


#pragma unsafe arrays
for(int i=0;i<11;i++)
c<:data;

You can also use master{} and slave{} to form a package of data, if you cannot allocate a streaming channel.
Probably not the most confused programmer anymore on the XCORE forum.