Number of Channels

New to XMOS and XCore? Get started here.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Number of Channels

Postby JohnRobert » Fri Jun 28, 2013 6:14 am

G'day,

I believe there is a limit on the number of streaming channels, but is there a limit on the number of allowable non-streaming channels.

If I am allowed as many non-streaming channels as I want, would it be sensible for me to open, say 20, and have them continually open?
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Fri Jun 28, 2013 10:01 am

You can have 32 channel ends open at any time (per CPU).

XC will tell you if you have too many; add option "-report" to see
how much you use even when it's not too much.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Postby JohnRobert » Fri Jun 28, 2013 10:06 am

G'day,

Thanks!

So, if I was using the XC-1A (G4 CPU, with 4 cores), that'd mean 128?
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Fri Jun 28, 2013 11:33 am

32 on each core, yes.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Postby Bianco » Fri Jun 28, 2013 3:35 pm

There is no limit on streaming channels between threads on the same core (other than the limit on chanends). You can have at most four streaming channels from one core to other cores because there are four links between each core and the network switch. This can be lower depending on your network topology, i.e if there is only one xConnect Link between two physical devices you can only have one streaming channel between them.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Postby JohnRobert » Sat Jun 29, 2013 3:28 am

G'day,

So, question about the 32 channels, so, there are 32 channels for comms between threads on each core, but can those 32 channels communicate over different cores?

Or is my lack of knowledge of concurrency on XMOS failing me, and you can only use channels on the cores you "defined" them on?
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Sat Jun 29, 2013 2:45 pm

There are 32 channel ends per core. You can configure any channel
end to route messages sent on it to any destination; usually another
channel end on the same or another core. You can change this
destination at any time.

That's what the hardware does; channels are not a hardware concept,
channels are an XC concept.

In XC, a channel is two channel ends that have each other as destination.
Those two channel ends have to be on the cores the two communicating
threads are on; XC handles this automatically, you do not need to declare
it anywhere (a channel is used on two threads, and XC already knows what
CPUs those threads run on).

Who is online

Users browsing this forum: No registered users and 1 guest