Hey,
what does the following instruction mean (what does master stand for)?
master {
c :> 1;
}
master instruction Topic is solved
-
- Member++
- Posts: 28
- Joined: Mon Jul 25, 2016 2:03 pm
-
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
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
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
-
- Member++
- Posts: 28
- Joined: Mon Jul 25, 2016 2:03 pm
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?
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?
-
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
Definitely - otherwise the channel protocol will mismatch and you'll get an exception...Does the other end of the transaction need to use the slave{...} instruction or will it work even if not used?