Can the compiler give a detailed list of chanend usage?

If you have a simple question and just want an answer.
Post Reply
philwick
Member
Posts: 10
Joined: Tue Dec 08, 2015 1:20 pm

Can the compiler give a detailed list of chanend usage?

Post by philwick »

Hello,

Is it possible to request the compiler to print a detailed list of channel and chanend usage? I have made some modifications to the USB AUDIO2 reference code and I now have a constraint check failure on the tile [0]. I use 33 chanends while only 32 are available. I've tried to enumerate the usage by reading the SDK code but this code is not what I could call a "friendly readable" code :-) Because the compiler is able to count chanends usage maybe it is also capable of printing a detailed list?

Thx


User avatar
Caleb
Experienced Member
Posts: 82
Joined: Thu Apr 04, 2013 10:14 pm
Contact:

Post by Caleb »

I've found that migrating a design from one version of development tools to another can change the number of chanends reported to be used. These are presumably cases of bugs in library (opaque) code for XUD or DFU - or perhaps the loader not freeing channel resources. I believe at least one case of this was confirmed by XMOS - though hopefully now resolved. It may be worth trying earlier versions of the tools (or later depending on what you have). This can become complex if you're using DFU.

It seems that there should always be an even number of chanends or else the tools should optimize away the unused one. If you check all the cases of function parameters that are indicated by: "chanend ?c_xxx," check to see that the chan that is the parameter to that function is actually being used - and if not define it as null (see examples of this in main.xc).

It is not necessary and not always convenient or efficient to use channels to communicate between threads (cores?). You may be able to free-up some channel resources. Check out GET_SHARED_GLOBAL and SET_SHARED_GLOBAL - or all of the cases where in-line asm instructions move data in and out of memory. The tools have periodically increased their interference with such skirting the paradigm. But the audio reference project depends on non-channel cross-thread data sharing.
philwick wrote:Hello,
I have made some modifications to the USB AUDIO2 reference code and I now have a constraint check failure on the tile [0]. I use 33 chanends while only 32 are available.
Thx
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

I don't know of an option for that purpose.

You will have to get intimate with the code I am afraid; on the plus side, if you think of resolving this issue by deleting one of the channels in the code, you will have to be very familiar with it, so you may as well get right to the bottom of it.

Is this the single tile audio design?
Post Reply