Forum Discussion
Altera_Forum
Honored Contributor
7 years agoI am really surprised your code works correctly in the emulator since you have a clear mistake in your code:
int chIdx = idx & 0xC0; chIdx will never be equal to numbers 1, 2 and 3 since you are zeroing out the first 6 (binary) digits of idx. Because of this, the write to channels Ch1 to Ch3 will be optimized out by the compiler since they will never be triggered. Needless to say, since each channel needs to have at least one read and one write point, compilation fails. If you replace 0xC0 with 0x03, which I think is the correct choice for your code, your kernel will compile correctly.