master instruction Topic is solved

If you have a simple question and just want an answer.
Post Reply
cschopges
Member++
Posts: 28
Joined: Mon Jul 25, 2016 2:03 pm

master instruction

Post by cschopges »

Hey,

what does the following instruction mean (what does master stand for)?

master {
c :> 1;
}


View Solution
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

in the above case, not much. Firstly it's inputting from a channel into a constant (which I guess is a typo!?) but secondly it's a single input.

Bit when you do:

master {
c :> array[0];
c: > array[1];
c: > array[2];
c: > array[3]}

it makes it into a transaction. This means that the switch path is setup at the beginning and closed at the end, as opposed to being setup and closed for each data unit for a normal channel. Each input in between then boils down to a single instruction, making it faster.
A streaming channel always keeps the path open, which may be restrictive if you have limited switch paths (you get 4 between tiles).

The above is a compromise which gives good performance but only blocks the switch path during the transaction.


See here for a full example:
https://www.xmos.com/published/how-use- ... r-channels
cschopges
Member++
Posts: 28
Joined: Mon Jul 25, 2016 2:03 pm

Post by cschopges »

Yes, typo. Only the master was important :)

Thanks much clearer now.

Does the other end of the transaction need to use the slave{...} instruction or will it work even if not used?
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Does the other end of the transaction need to use the slave{...} instruction or will it work even if not used?
Definitely - otherwise the channel protocol will mismatch and you'll get an exception...
Post Reply