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?
Number of Channels
-
- Active Member
- Posts: 34
- Joined: Fri Nov 02, 2012 8:10 am
-
- XCore Expert
- Posts: 844
- Joined: Sun Jul 11, 2010 1:31 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.
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.
-
- Active Member
- Posts: 34
- Joined: Fri Nov 02, 2012 8:10 am
G'day,
Thanks!
So, if I was using the XC-1A (G4 CPU, with 4 cores), that'd mean 128?
Thanks!
So, if I was using the XC-1A (G4 CPU, with 4 cores), that'd mean 128?
-
- XCore Expert
- Posts: 844
- Joined: Sun Jul 11, 2010 1:31 am
32 on each core, yes.
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 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.
-
- Active Member
- Posts: 34
- Joined: Fri Nov 02, 2012 8:10 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?
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?
-
- XCore Expert
- Posts: 844
- Joined: Sun Jul 11, 2010 1:31 am
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).
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).