cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mmyhui
Contributor
Contributor
262 Views
Registered: ‎10-13-2020

How to dump data from a window port for debug?

Jump to solution

I have a mid-level graph that I need to gain visibility to its internal window connections for debug.

So I connect a window output from the one level down sub-graph to two places: the usual place it needs to go to in functional mode, and an extra output port.

Then I see this:

ERROR: [aiecompiler 77-808] A 'window' source port can only broadcast to destination ports that are either all 'stream' type or all 'pktstream' type.

I understand that the error is 100% legitimate, as it's a simple hardware limitation.

I can create a new kernal that writes to several output windows with data it gets from an input window, and call that my "fanout" kernel.

I can also disconnect the functionally required output and send it to just the debug output temporarily.

But is there a simpler way? A generic way for gaining visibility?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
derekh
Xilinx Employee
Xilinx Employee
251 Views
Registered: ‎08-06-2018

Hi,

For windows you need to copy the buffers as you do in your example.

For stream you can have one to several listeners using either stream broadcast or packet switch. Stream broadcast is better when you have high utilization of the AXIS, but this also means the kernels will be tightly coupled so a stall in any of the receiving kernels or PLIOs will directly affect the kernels.

Derek
SAE DSP and AI Engine, Xilinx Sweden/EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

3 Replies
mmyhui
Contributor
Contributor
258 Views
Registered: ‎10-13-2020

Here is the fanout kernel I mentioned earlier:

#include <cardano.h>

#define INPUT_SAMPLES 2048

void fanout(       
     input_window_cint16 * restrict inputx,
    output_window_cint16 * restrict outputy,
    output_window_cint16 * restrict debug
)
{
    v8cint16 ibuf;

    for (unsigned i = 0; i < INPUT_SAMPLES/8; ++i)
    {
        ibuf = window_readincr_v8(inputx);
        window_writeincr(outputy, ibuf);
        window_writeincr(debug,   ibuf);
    }
}
derekh
Xilinx Employee
Xilinx Employee
252 Views
Registered: ‎08-06-2018

Hi,

For windows you need to copy the buffers as you do in your example.

For stream you can have one to several listeners using either stream broadcast or packet switch. Stream broadcast is better when you have high utilization of the AXIS, but this also means the kernels will be tightly coupled so a stall in any of the receiving kernels or PLIOs will directly affect the kernels.

Derek
SAE DSP and AI Engine, Xilinx Sweden/EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

mmi
Xilinx Employee
Xilinx Employee
241 Views
Registered: ‎01-10-2014

Another option is to directly write the debug data out one (or two) AXI stream AIE ports.