Kernel Bypass - 2021.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
ft:locale
English (United States)
Release Date
2021-12-17
Version
2021.2 English

A bypass encapsulator construct discussed in Run-Time Graph Reconfiguration Using Control Parameters is used to execute a kernel conditionally. The control of the bypass is done through a run-time parameter: 0 for no bypass and 1 for bypass. In addition to the control parameter, the external connections of a bypassed kernel or a graph are directed to the external ports of the bypass construct itself. Internally, the bypass construct is connected to the bypassed kernel or the graph automatically by the compiler. The following example shows the required coding.

inout_port control;
bypass b;
kernel f, p, c;
f = kernel::create(filter);
...
b = bypass::create(f);
connect<parameter> (control, b.bp);
connect<window<128>> n1(p.out[0], b.in[0]);
connect<window<128>> n2(b.out[0], c.out[0]);
Note: For the bypass to work correctly, a one-to-one correspondence between the input and output data ports is required, both in type and size.