カウントありの自動再起動 - 2022.1 日本語

Vitis 統合ソフトウェア プラットフォームの資料: アプリケーション アクセラレーション開発 (UG1393)

Document ID
UG1393
Release Date
2022-05-25
Version
2022.1 日本語

この例では同じコードを使用していますが、この場合、カーネルが再起動して 3 回イテレーションが実行されてから停止するように設定されています。必要な変更は、次のコード例に示すように、イテレーションの数を指定することだけです。

ヒント: カウントありの自動再起動の場合は、ホストがいつ停止するかわかるので、abort() を使用する必要はありません。
143   xrt::kernel incr(device, uuid, "increment");
144   int adder1 = 20;  // arbitrarily chosen to be different from 0
145   int adder2 = 10;  // arbitrarily chosen to be different from 0
151   // start the incr kernel in auto restart mode with default adders
152   // since it is a streaming kernel it will be stalled waiting for
153   // input
154   auto incr_run = incr(xrt::autostart{3}, nullptr, nullptr, adder1);