カウントありの自動再起動の使用 - 2023.2 日本語

Vitis 高位合成ユーザー ガイド (UG1399)

Document ID
UG1399
Release Date
2023-12-18
Version
2023.2 日本語

この例では同じコードを使用していますが、この場合、HLS デザインは 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);